From c2e538898c52f05df0699a3c58367349ac14b03e Mon Sep 17 00:00:00 2001 From: Yunhao Meng Date: Thu, 2 Oct 2025 22:34:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=5Fparse=5Fyolo=5Flabel=5Ffil?= =?UTF-8?q?e=E5=87=BD=E6=95=B0=E7=9A=84=E6=96=87=E6=A1=A3=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E8=BF=94=E5=9B=9E=E5=80=BC=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/fed_util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/fed_util.py b/utils/fed_util.py index e462407..fea2bc5 100644 --- a/utils/fed_util.py +++ b/utils/fed_util.py @@ -25,6 +25,10 @@ def _parse_yolo_label_file(label_path: str) -> Set[int]: Return a set of class_ids found in a YOLO .txt label file. Empty file -> empty set. Missing file -> empty set. Robust to blank lines / trailing spaces. + Args: + label_path: path to the label file + Returns: + set of class IDs (integers) found in the file """ class_ids: Set[int] = set() if not os.path.exists(label_path):