💩 [Bad] json dataloader will load unmapp class id
Browse files
yolo/tools/dataset_helper.py
CHANGED
|
@@ -20,9 +20,10 @@ def find_labels_path(dataset_path: str, phase_name: str):
|
|
| 20 |
"""
|
| 21 |
json_labels_path = path.join(dataset_path, "annotations", f"instances_{phase_name}.json")
|
| 22 |
|
| 23 |
-
txt_labels_path = path.join(dataset_path, "
|
| 24 |
|
| 25 |
-
|
|
|
|
| 26 |
return json_labels_path, "json"
|
| 27 |
|
| 28 |
elif path.isdir(txt_labels_path):
|
|
|
|
| 20 |
"""
|
| 21 |
json_labels_path = path.join(dataset_path, "annotations", f"instances_{phase_name}.json")
|
| 22 |
|
| 23 |
+
txt_labels_path = path.join(dataset_path, "labels", phase_name)
|
| 24 |
|
| 25 |
+
# TODO: Operation turned off, it may load wrong class_id, need converter_json2txt's function to map back?
|
| 26 |
+
if path.isfile(json_labels_path) and False:
|
| 27 |
return json_labels_path, "json"
|
| 28 |
|
| 29 |
elif path.isdir(txt_labels_path):
|