How to install and use LabelImg?

LabelImg is a graphic image annotation tool. It is very easy to use and intuitive to operate, and it is a good helper for users who want to mark many labels! I wrote it in Python and uses Qt for its graphical interface. Labels are saved as XML files in PASCAL VOC format, which is the format used by ImageNet. Additionally, it supports YOLO and CreateML formats. We can store it in different formats according to user needs, let us see how to install and use it together!


Windows Installation

Download, unzip it, and click labelImg.exe in the folder.



Mac Installation

Go to the GitHub clone source file, or download the source compressed file and unzip it.


Open Terminal, first confirm whether Python3 and pip3 are installed, move to the labelImg directory and execute the following commands, if there is pip3, it is recommended to install pyqt5 and lxml with pip3.

Then execute make qt5py3, and open with python 3, as shown in the figure below.



Other Installation

Please refer to the Github.





Watch a demo video

Select the image storage directory.


Select the xml storage directory

If you have already marked the data, you will see the marked box after opening it. If the first one does not appear, press one and switch back to the previous one and it will appear.


Select the save format

According to training needs. (PascalVOC or YOLO)




Ctrl + uLoad all of the images from a directory
Ctrl + rChange the default annotation target dir
Ctrl + sSave  儲存
Ctrl + dCopy the current label and rect box
Ctrl + Shift + dDelete the current image
SpaceFlag the current image as verified
wCreate a rect box
dNext image  下一張圖片
aPrevious image  上一張圖片
delDelete the selected rect box
Ctrl++Zoom in  放大
Ctrl–Zoom out  縮小
↑ → ↓ ←Keyboard arrows to move selected rect box