Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Fixed Issue 465: Saving Yolo labels, corrupts classes.txt #934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion labelImg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,11 @@ def open_dir_dialog(self, _value=False, dir_path=None, silent=False):
target_dir_path = ustr(default_open_dir_path)
self.last_open_dir = target_dir_path
self.import_dir_images(target_dir_path)
self.default_save_dir = target_dir_path
if not self.default_save_dir:
self.default_save_dir = target_dir_path
file_containing_labels = os.path.join(self.default_save_dir, 'classes.txt')
if not self.label_hist:
self.load_predefined_classes(file_containing_labels)
if self.file_path:
self.show_bounding_box_from_annotation_file(file_path=self.file_path)

Expand Down