henry000 commited on
Commit
c40db62
·
1 Parent(s): 96a806a

💩 [Bad] json dataloader will load unmapp class id

Browse files
Files changed (1) hide show
  1. yolo/tools/dataset_helper.py +3 -2
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, "label", phase_name)
24
 
25
- if path.isfile(json_labels_path):
 
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):