labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

Labels are not loaded from command line arguments

Open RyanHir opened this issue 3 years ago • 1 comments

  • 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

  1. Download COCO128 dataset from https://ultralytics.com/assets/coco128.zip
  2. Extract dataset
  3. 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
  4. Run ./labelImg /path/to/coco128/images/train2017/ /path/to/coco-labels-2014_2017.txt /path/to/coco128/labels/train2017/

RyanHir avatar Jul 06 '22 23:07 RyanHir

Yes, I encountered the same issue, any updates?

pugangxa avatar Mar 21 '23 09:03 pugangxa