11. object detection을 위한 labelImg(VOC_XML 생성) 설치 - pineland/object-tracking GitHub Wiki
1. 설치
1.
Get from PyPI but only python3.x or above
$ git clone https://github.com/tzutalin/labelImg.git
$ cd labelImg
$ sudo apt-get install pyqt5-dev-tools
$ sudo pip3 install -r requirements/requirements-linux-python3.txt
$ make qt5py3
$ python3 labelImg.py
$ python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
2. 사용법
2.1 PascalVOC
- Build and launch using the instructions above.
- Click ‘Change default saved annotation folder’ in Menu/File
- Click ‘Open Dir’
- Click ‘Create RectBox’
- Click and release left mouse to select a region to annotate the rect box
- You can use right mouse to drag the rect box to copy or move it
The annotation will be saved to the folder you specify.
You can refer to the below hotkeys to speed up your workflow.
2.2 YOLO
- In data/predefined_classes.txt define the list of classes that will be used for your training.
- Build and launch using the instructions above.
- Right below “Save” button in the toolbar, click “PascalVOC” button to switch to YOLO format.
- You may use Open/OpenDIR to process single or multiple images. When finished with a single image, click save.
A txt file of YOLO format will be saved in the same folder as your image with same name. A file named “classes.txt” is saved to that folder too. “classes.txt” defines the list of class names that your YOLO label refers to.
3. 단축키
단축키 | 설명 |
---|---|
Ctrl + u | Load all of the images from a directory |
Ctrl + r | Change the default annotation target dir |
Ctrl + s | Save |
Ctrl + d | Copy the current label and rect box |
Space | Flag the current image as verified |
w | Create a rect box |
d | Next image |
a | Previous image |
del | Delete the selected rect box |
Ctrl++ | Zoom in |
Ctrl– | Zoom out |
↑→↓← | Keyboard arrows to move selected rect box |