完善_parse_yolo_label_file函数的文档字符串,添加参数和返回值说明
This commit is contained in:
@@ -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.
|
Return a set of class_ids found in a YOLO .txt label file.
|
||||||
Empty file -> empty set. Missing file -> empty set.
|
Empty file -> empty set. Missing file -> empty set.
|
||||||
Robust to blank lines / trailing spaces.
|
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()
|
class_ids: Set[int] = set()
|
||||||
if not os.path.exists(label_path):
|
if not os.path.exists(label_path):
|
||||||
|
Reference in New Issue
Block a user