labelImg
labelImg copied to clipboard
Labels are not loaded from command line arguments
- OS: Arch Linux
- PyQt version: 5.15.6 (GitHub Action)
- Other Info: Binary pulled from GitHub actions artifact, so all deps are packaged.
Description
Currently, when you attempt to launch labelImg with the arguments that are provided in the help screen (see below) the class_file argument is ignored and labelImg expects there to be a classes.txt under the save_dir. Along with this issue, labels are not loaded until the user opens the "Save Annotations" menu and selects the same directory as chosen from the command line arguments.
Ideally, there is not a dependence on classes.txt being inside the save directory. And properly loading labels on startup.
$ ./labelImg -h
usage: labelImg [-h] [image_dir] [class_file] [save_dir]
positional arguments:
image_dir
class_file
save_dir
optional arguments:
-h, --help show this help message and exit
Steps to reproduce
- Download COCO128 dataset from https://ultralytics.com/assets/coco128.zip
- Extract dataset
- Create a labels file in a directory (does not need to be in the extracted directory)
-
wget https://raw.githubusercontent.com/amikelive/coco-labels/master/coco-labels-2014_2017.txt
-
- Run
./labelImg /path/to/coco128/images/train2017/ /path/to/coco-labels-2014_2017.txt /path/to/coco128/labels/train2017/
Yes, I encountered the same issue, any updates?