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.19k stars 6.23k forks source link

labelImg.py [IMAGE_PATH] does not work #930

Closed ahmetburakgozel closed 1 year ago

ahmetburakgozel commented 1 year ago

labelImg.py [IMAGE_PATH] does not work .

ahmedibrahim0100 commented 1 year ago

I think it should be:

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

ahmetburakgozel commented 1 year ago

how to use [PRE-DEFINED CLASS FILE]

ahmedibrahim0100 commented 1 year ago

[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"

KaiquanMah commented 1 year ago

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