HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.56k stars 6.27k forks source link

Updating path conflicts between "self.file_path" and "default_open_dir_path" #968

Open jzw0025 opened 1 year ago

jzw0025 commented 1 year ago

When the variable "default_open_dir_path" changed in the system, somehow, providing a new path "self.file_path" always fails:

labelImg [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

and this [IMAGE_PATH] has been overwritten by it:

target_dir_path = ustr(default_open_dir_path)

I have added the following into labelImg.py to have hot fix: (hope someone can add this and check-in with new version)

1357:

if self.file_path:
     target_dir_path = self.file_path
else:
     target_dir_path = ustr(default_open_dir_path)
sthoduka commented 1 year ago

this problem was introduced by this change This also means that the default_open_dir_path gets saved in the settings