Repository contains images of forms and their respective annotations in PASCAL VOC format (XML Files).
All images are stored in data/images and all annotations are saves in data/annotations. Please look at CONTRIBUTORS to see who is responsible for what images.
- Make sure to save all images with the numbers assigned to you and to save all images and annotations in the correct folders.
- All annotations should be in XML PASCAL VOC format.
- All images should be in .png format
Python 3 or above and PyQt5 are strongly recommended.
Python 3 Virtualenv
Virtualenv can avoid a lot of the QT / Python version issues
brew install python3
pip3 install pipenv
pipenv --three # or pipenv install pyqt5 lxml
pipenv run pip install pyqt5 lxml
pipenv run make qt5py3
python3 labelImg.py
Install Python, PyQt5 and `install lxml <http://lxml.de/inst
Open cmd and go to the labelImg directory
pyrcc4 -o line/resources.py resources.qrc
For pyqt5, pyrcc5 -o libs/resources.py resources.qrc
python labelImg.py
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
Download and install Anaconda (Python 3+)
Open the Anaconda Prompt and go to the labelImg directory
conda install pyqt=5
pyrcc5 -o libs/resources.py resources.qrc
python labelImg.py
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
- 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.
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 |
Verify Image:
When pressing space, the user can flag the image as verified, a green background will appear. This is used when creating a dataset automatically, the user can then through all the pictures and flag them instead of annotate them.
Difficult:
The difficult field is set to 1 indicates that the object has been annotated as "difficult", for example, an object which is clearly visible but difficult to recognize without substantial use of context. According to your deep neural network implementation, you can include or exclude difficult objects during training.
Using labelImg by tzutalin Citation: Tzutalin. LabelImg. Git code (2015). https://github.com/tzutalin/labelImg