diff --git a/labelImg.py b/labelImg.py index efd8a2976..611e0d7c9 100755 --- a/labelImg.py +++ b/labelImg.py @@ -1637,6 +1637,12 @@ def load_yolo_txt_by_filename(self, txt_path): self.set_format(FORMAT_YOLO) t_yolo_parse_reader = YoloReader(txt_path, self.image) + self.label_hist = [] + for cls in t_yolo_parse_reader.classes: + self.label_hist.append(cls) + if len(self.label_hist) > 0: + self.label_dialog = LabelDialog( + parent=self, list_item=self.label_hist) shapes = t_yolo_parse_reader.get_shapes() print(shapes) self.load_labels(shapes)