labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

labelImg.py [IMAGE_PATH] does not work

Open ahmetburakgozel opened this issue 3 years ago • 3 comments

labelImg.py [IMAGE_PATH] does not work .

ahmetburakgozel avatar Aug 15 '22 07:08 ahmetburakgozel

I think it should be:

python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

ahmedibrahim0100 avatar Aug 15 '22 20:08 ahmedibrahim0100

how to use [PRE-DEFINED CLASS FILE]

ahmetburakgozel avatar Aug 16 '22 05:08 ahmetburakgozel

[PRE-DEFINED CLASS FILE] is the path to your classes text file. Classes text file is the file where you store the names of classes. For example: if I have 3 classes called: cat, dog and bird, i should have a *.txt file where they are written. For the [IMAGE_PATH], you can leave it blank and then use the "Open dir" function from inside labelImg itself.

A live example can be as such: python labelImg.py "" "D:\Learning\classes.txt"

ahmedibrahim0100 avatar Aug 16 '22 16:08 ahmedibrahim0100

same as @ahmedibrahim0100, within the 'anaconda prompt' (I am using a windows pc),

this works - enclosing the file path (containing spaces) using double quotes

python labelImg.py "C:\path with spaces\fileName.jpg" "C:\pathWithoutSpaces\classes.txt" -> labelImg opens up with the image file

these do not work

python labelImg.py C:\path^ with^ spaces\fileName.jpg C:\pathWithoutSpaces\classes.txt -> cant even open up labelImg python labelImg.py "C:\path^ with^ spaces\fileName.jpg" C:\pathWithoutSpaces\classes.txt -> labelImg opens up but without the image file

KaiquanMah avatar Jan 19 '23 06:01 KaiquanMah