[CF]提交文件
7
.idea/misc.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.13 (le-yolo)" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (le-yolo)" project-jdk-type="Python SDK" />
|
||||
</project>
|
BIN
data/images/train/1.jpg
Normal file
After Width: | Height: | Size: 184 KiB |
BIN
data/images/train/2.jpg
Normal file
After Width: | Height: | Size: 237 KiB |
BIN
data/images/train/3.jpg
Normal file
After Width: | Height: | Size: 230 KiB |
BIN
data/images/train/4.jpg
Normal file
After Width: | Height: | Size: 199 KiB |
BIN
data/images/train/5.jpg
Normal file
After Width: | Height: | Size: 189 KiB |
BIN
data/images/train/6.jpg
Normal file
After Width: | Height: | Size: 432 KiB |
BIN
data/images/train/7.jpg
Normal file
After Width: | Height: | Size: 217 KiB |
BIN
data/images/train/8.jpg
Normal file
After Width: | Height: | Size: 297 KiB |
BIN
data/images/val/1.jpg
Normal file
After Width: | Height: | Size: 184 KiB |
BIN
data/images/val/2.jpg
Normal file
After Width: | Height: | Size: 237 KiB |
BIN
data/images/val/3.jpg
Normal file
After Width: | Height: | Size: 230 KiB |
BIN
data/images/val/4.jpg
Normal file
After Width: | Height: | Size: 199 KiB |
BIN
data/images/val/5.jpg
Normal file
After Width: | Height: | Size: 189 KiB |
BIN
data/images/val/6.jpg
Normal file
After Width: | Height: | Size: 432 KiB |
BIN
data/images/val/7.jpg
Normal file
After Width: | Height: | Size: 217 KiB |
BIN
data/images/val/8.jpg
Normal file
After Width: | Height: | Size: 297 KiB |
BIN
data/labels/train.cache
Normal file
1
data/labels/train/1.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.4796854521625161 0.36631716906946254 0.19134993446920037 0.33944954128440374
|
1
data/labels/train/2.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.5137614678899075 0.3695937090432503 0.17562254259501947 0.39580602883355154
|
1
data/labels/train/3.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.4639580602883355 0.4272608125819135 0.1834862385321101 0.31716906946264745
|
2
data/labels/train/4.txt
Normal file
@ -0,0 +1,2 @@
|
||||
0 0.4501965923984272 0.4757536041939713 0.17169069462647432 0.3093053735255571
|
||||
0 0.37418086500655307 0.4750982961992136 0.027522935779816536 0.0013106159895150426
|
1
data/labels/train/5.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.515727391874181 0.3912188728702489 0.15596330275229378 0.34207077326343355
|
1
data/labels/train/6.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.4882044560943644 0.4646133682830928 0.17169069462647438 0.40235910878112674
|
1
data/labels/train/7.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.48361730013106086 0.496723460026212 0.2568807339449536 0.4325032765399734
|
1
data/labels/train/8.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.6159895150720839 0.5498034076015726 0.16251638269986907 0.41546526867627775
|
BIN
data/labels/val.cache
Normal file
1
data/labels/val/1.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.4796854521625161 0.36631716906946254 0.19134993446920037 0.33944954128440374
|
1
data/labels/val/2.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.5137614678899075 0.3695937090432503 0.17562254259501947 0.39580602883355154
|
1
data/labels/val/3.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.4639580602883355 0.4272608125819135 0.1834862385321101 0.31716906946264745
|
2
data/labels/val/4.txt
Normal file
@ -0,0 +1,2 @@
|
||||
0 0.4501965923984272 0.4757536041939713 0.17169069462647432 0.3093053735255571
|
||||
0 0.37418086500655307 0.4750982961992136 0.027522935779816536 0.0013106159895150426
|
1
data/labels/val/5.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.515727391874181 0.3912188728702489 0.15596330275229378 0.34207077326343355
|
1
data/labels/val/6.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.4882044560943644 0.4646133682830928 0.17169069462647438 0.40235910878112674
|
1
data/labels/val/7.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.48361730013106086 0.496723460026212 0.2568807339449536 0.4325032765399734
|
1
data/labels/val/8.txt
Normal file
@ -0,0 +1 @@
|
||||
0 0.6159895150720839 0.5498034076015726 0.16251638269986907 0.41546526867627775
|
19
labelImg-master/.gitignore
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
resources/icons/.DS_Store
|
||||
|
||||
resources.py
|
||||
|
||||
.idea*
|
||||
labelImg.egg-info*
|
||||
|
||||
*.pyc
|
||||
.*.swp
|
||||
|
||||
build/
|
||||
dist/
|
||||
|
||||
tags
|
||||
cscope*
|
||||
.ycm_extra_conf.py
|
||||
.subvimrc
|
||||
.vscode
|
||||
*.pkl
|
86
labelImg-master/.travis.yml
Normal file
@ -0,0 +1,86 @@
|
||||
# vim: set ts=2 et:
|
||||
|
||||
# run xvfb with 32-bit color
|
||||
# xvfb-run -s '-screen 0 1600x1200x24+32' command_goes_here
|
||||
|
||||
matrix:
|
||||
include:
|
||||
|
||||
|
||||
# Python 2.7 + QT4
|
||||
- os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
language: generic
|
||||
python: "2.7"
|
||||
env:
|
||||
- QT=4
|
||||
- CONDA=4.2.0
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
#- python-qt4
|
||||
#- pyqt4-dev-tools
|
||||
- xvfb
|
||||
before_install:
|
||||
# ref: https://www.continuum.io/downloads
|
||||
- curl -O https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh
|
||||
# ref: http://conda.pydata.org/docs/help/silent.html
|
||||
- /bin/bash Anaconda2-4.2.0-Linux-x86_64.sh -b -p $HOME/anaconda2
|
||||
- export PATH="$HOME/anaconda2/bin:$PATH"
|
||||
# ref: http://stackoverflow.com/questions/21637922/how-to-install-pyqt4-in-anaconda
|
||||
- conda create -y -n labelImg-py2qt4 python=2.7
|
||||
- source activate labelImg-py2qt4
|
||||
- conda install -y pyqt=4
|
||||
- conda install -y lxml
|
||||
- make qt4py2
|
||||
- xvfb-run make testpy2
|
||||
|
||||
|
||||
# Python 3 + QT5
|
||||
- os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
language: generic
|
||||
python: "3.5"
|
||||
env:
|
||||
- QT=5
|
||||
- CONDA=4.2.0
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cmake
|
||||
- xvfb
|
||||
before_install:
|
||||
# ref: https://www.continuum.io/downloads
|
||||
- curl -O https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
|
||||
# ref: http://conda.pydata.org/docs/help/silent.html
|
||||
- /bin/bash Anaconda3-4.2.0-Linux-x86_64.sh -b -p $HOME/anaconda3
|
||||
- export PATH="$HOME/anaconda3/bin:$PATH"
|
||||
# ref: http://stackoverflow.com/questions/21637922/how-to-install-pyqt4-in-anaconda
|
||||
- conda create -y -n labelImg-py3qt5 python=3.5
|
||||
- source activate labelImg-py3qt5
|
||||
- conda install -y pyqt=5
|
||||
- conda install -y lxml
|
||||
- make qt5py3
|
||||
- xvfb-run make testpy3
|
||||
|
||||
# Pipenv Python 3 + QT5 - Build .app
|
||||
- os: osx
|
||||
language: generic
|
||||
python: "3.7"
|
||||
env:
|
||||
- PIPENV_VENV_IN_PROJECT=1
|
||||
- PIPENV_IGNORE_VIRTUALENVS=1
|
||||
install:
|
||||
- pip3 install pipenv
|
||||
- pipenv install pyqt5 lxml
|
||||
- pipenv run pip install pyqt5==5.13.2 lxml
|
||||
- pipenv run make qt5py3
|
||||
- rm -rf build dist
|
||||
- pipenv run python setup.py py2app
|
||||
- open dist/labelImg.app
|
||||
|
||||
script:
|
||||
- exit 0
|
3
labelImg-master/CONTRIBUTING.rst
Normal file
@ -0,0 +1,3 @@
|
||||
TzuTa Lin
|
||||
[LabelMe](http://labelme2.csail.mit.edu/Release3.0/index.php)
|
||||
Ryan Flynn
|
110
labelImg-master/HISTORY.rst
Normal file
@ -0,0 +1,110 @@
|
||||
History
|
||||
=======
|
||||
|
||||
1.8.2 (2018-12-02)
|
||||
------------------
|
||||
|
||||
* Fix pip depolyment issue
|
||||
|
||||
|
||||
1.8.1 (2018-12-02)
|
||||
------------------
|
||||
|
||||
* Fix issues
|
||||
* Support zh-Tw strings
|
||||
|
||||
|
||||
1.8.0 (2018-10-21)
|
||||
------------------
|
||||
|
||||
* Support drawing sqaure rect
|
||||
* Add item single click slot
|
||||
* Fix issues
|
||||
|
||||
1.7.0 (2018-05-18)
|
||||
------------------
|
||||
|
||||
* Support YOLO
|
||||
* Fix minor issues
|
||||
|
||||
|
||||
1.6.1 (2018-04-17)
|
||||
------------------
|
||||
|
||||
* Fix issue
|
||||
|
||||
1.6.0 (2018-01-29)
|
||||
------------------
|
||||
|
||||
* Add more pre-defined labels
|
||||
* Show cursor pose in status bar
|
||||
* Fix minor issues
|
||||
|
||||
1.5.2 (2017-10-24)
|
||||
------------------
|
||||
|
||||
* Assign different colors to different lablels
|
||||
|
||||
1.5.1 (2017-9-27)
|
||||
------------------
|
||||
|
||||
* Show a autosaving dialog
|
||||
|
||||
1.5.0 (2017-9-14)
|
||||
------------------
|
||||
|
||||
* Fix the issues
|
||||
* Add feature: Draw a box easier
|
||||
|
||||
|
||||
1.4.3 (2017-08-09)
|
||||
------------------
|
||||
|
||||
* Refactor setting
|
||||
* Fix the issues
|
||||
|
||||
|
||||
1.4.0 (2017-07-07)
|
||||
------------------
|
||||
|
||||
* Add feature: auto saving
|
||||
* Add feature: single class mode
|
||||
* Fix the issues
|
||||
|
||||
1.3.4 (2017-07-07)
|
||||
------------------
|
||||
|
||||
* Fix issues and improve zoom-in
|
||||
|
||||
1.3.3 (2017-05-31)
|
||||
------------------
|
||||
|
||||
* Fix issues
|
||||
|
||||
1.3.2 (2017-05-18)
|
||||
------------------
|
||||
|
||||
* Fix issues
|
||||
|
||||
|
||||
1.3.1 (2017-05-11)
|
||||
------------------
|
||||
|
||||
* Fix issues
|
||||
|
||||
1.3.0 (2017-04-22)
|
||||
------------------
|
||||
|
||||
* Fix issues
|
||||
* Add difficult tag
|
||||
* Create new files for pypi
|
||||
|
||||
1.2.3 (2017-04-22)
|
||||
------------------
|
||||
|
||||
* Fix issues
|
||||
|
||||
1.2.2 (2017-01-09)
|
||||
------------------
|
||||
|
||||
* Fix issues
|
9
labelImg-master/LICENSE
Normal file
@ -0,0 +1,9 @@
|
||||
Copyright (c) <2015-Present> Tzutalin
|
||||
|
||||
Copyright (C) 2013 MIT, Computer Science and Artificial Intelligence Laboratory. Bryan Russell, Antonio Torralba, William T. Freeman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
15
labelImg-master/MANIFEST.in
Normal file
@ -0,0 +1,15 @@
|
||||
include CONTRIBUTING.rst
|
||||
include HISTORY.rst
|
||||
include LICENSE
|
||||
include README.rst
|
||||
|
||||
include resources.qrc
|
||||
|
||||
recursive-include data *
|
||||
recursive-include icons *
|
||||
recursive-include libs *
|
||||
|
||||
recursive-exclude build-tools *
|
||||
recursive-exclude tests *
|
||||
recursive-exclude * __pycache__
|
||||
recursive-exclude * *.py[co]
|
35
labelImg-master/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
# ex: set ts=8 noet:
|
||||
|
||||
all: qt5 test
|
||||
|
||||
test: testpy3
|
||||
|
||||
testpy2:
|
||||
python -m unittest discover tests
|
||||
|
||||
testpy3:
|
||||
python3 -m unittest discover tests
|
||||
|
||||
qt4: qt4py2
|
||||
|
||||
qt5: qt5py3
|
||||
|
||||
qt4py2:
|
||||
pyrcc4 -py2 -o libs/resources.py resources.qrc
|
||||
|
||||
qt4py3:
|
||||
pyrcc4 -py3 -o libs/resources.py resources.qrc
|
||||
|
||||
qt5py3:
|
||||
pyrcc5 -o libs/resources.py resources.qrc
|
||||
|
||||
clean:
|
||||
rm -rf ~/.labelImgSettings.pkl *.pyc dist labelImg.egg-info __pycache__ build
|
||||
|
||||
pip_upload:
|
||||
python3 setup.py upload
|
||||
|
||||
long_description:
|
||||
restview --long-description
|
||||
|
||||
.PHONY: all
|
275
labelImg-master/README.rst
Normal file
@ -0,0 +1,275 @@
|
||||
LabelImg
|
||||
========
|
||||
|
||||
.. image:: https://img.shields.io/pypi/v/labelimg.svg
|
||||
:target: https://pypi.python.org/pypi/labelimg
|
||||
|
||||
.. image:: https://img.shields.io/travis/tzutalin/labelImg.svg
|
||||
:target: https://travis-ci.org/tzutalin/labelImg
|
||||
|
||||
.. image:: /resources/icons/app.png
|
||||
:width: 200px
|
||||
:align: center
|
||||
|
||||
LabelImg is a graphical image annotation tool.
|
||||
|
||||
It is written in Python and uses Qt for its graphical interface.
|
||||
|
||||
Annotations are saved as XML files in PASCAL VOC format, the format used
|
||||
by `ImageNet <http://www.image-net.org/>`__. Besides, it also supports YOLO format
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/tzutalin/labelImg/master/demo/demo3.jpg
|
||||
:alt: Demo Image
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/tzutalin/labelImg/master/demo/demo.jpg
|
||||
:alt: Demo Image
|
||||
|
||||
`Watch a demo video <https://youtu.be/p0nR2YsCY_U>`__
|
||||
|
||||
Installation
|
||||
------------------
|
||||
|
||||
|
||||
Build from source
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Linux/Ubuntu/Mac requires at least `Python
|
||||
2.6 <https://www.python.org/getit/>`__ and has been tested with `PyQt
|
||||
4.8 <https://www.riverbankcomputing.com/software/pyqt/intro>`__. However, `Python
|
||||
3 or above <https://www.python.org/getit/>`__ and `PyQt5 <https://pypi.org/project/PyQt5/>`__ are strongly recommended.
|
||||
|
||||
|
||||
Ubuntu Linux
|
||||
^^^^^^^^^^^^
|
||||
Python 2 + Qt4
|
||||
|
||||
.. code:: shell
|
||||
|
||||
sudo apt-get install pyqt4-dev-tools
|
||||
sudo pip install lxml
|
||||
make qt4py2
|
||||
python labelImg.py
|
||||
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
|
||||
|
||||
Python 3 + Qt5 (Recommended)
|
||||
|
||||
.. code:: shell
|
||||
|
||||
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]
|
||||
|
||||
macOS
|
||||
^^^^^
|
||||
Python 2 + Qt4
|
||||
|
||||
.. code:: shell
|
||||
|
||||
brew install qt qt4
|
||||
brew install libxml2
|
||||
make qt4py2
|
||||
python labelImg.py
|
||||
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
|
||||
|
||||
Python 3 + Qt5 (Recommended)
|
||||
|
||||
.. code:: shell
|
||||
|
||||
brew install qt # Install qt-5.x.x by Homebrew
|
||||
brew install libxml2
|
||||
|
||||
or using pip
|
||||
|
||||
pip3 install pyqt5 lxml # Install qt and lxml by pip
|
||||
|
||||
make qt5py3
|
||||
python3 labelImg.py
|
||||
python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
|
||||
|
||||
|
||||
Python 3 Virtualenv (Recommended)
|
||||
|
||||
Virtualenv can avoid a lot of the QT / Python version issues
|
||||
|
||||
.. code:: shell
|
||||
|
||||
brew install python3
|
||||
pip3 install pipenv
|
||||
pipenv run pip install pyqt5==5.13.2 lxml
|
||||
pipenv run make qt5py3
|
||||
python3 labelImg.py
|
||||
[Optional] rm -rf build dist; python setup.py py2app -A;mv "dist/labelImg.app" /Applications
|
||||
|
||||
Note: The Last command gives you a nice .app file with a new SVG Icon in your /Applications folder. You can consider using the script: build-tools/build-for-macos.sh
|
||||
|
||||
|
||||
Windows
|
||||
^^^^^^^
|
||||
|
||||
Install `Python <https://www.python.org/downloads/windows/>`__,
|
||||
`PyQt5 <https://www.riverbankcomputing.com/software/pyqt/download5>`__
|
||||
and `install lxml <http://lxml.de/installation.html>`__.
|
||||
|
||||
Open cmd and go to the `labelImg <#labelimg>`__ directory
|
||||
|
||||
.. code:: shell
|
||||
|
||||
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]
|
||||
|
||||
Windows + Anaconda
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Download and install `Anaconda <https://www.anaconda.com/download/#download>`__ (Python 3+)
|
||||
|
||||
Open the Anaconda Prompt and go to the `labelImg <#labelimg>`__ directory
|
||||
|
||||
.. code:: shell
|
||||
|
||||
conda install pyqt=5
|
||||
pyrcc5 -o libs/resources.py resources.qrc
|
||||
python labelImg.py
|
||||
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
|
||||
|
||||
Get from PyPI but only python3.0 or above
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.. code:: shell
|
||||
|
||||
pip3 install labelImg
|
||||
labelImg
|
||||
labelImg [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
|
||||
|
||||
|
||||
Use Docker
|
||||
~~~~~~~~~~~~~~~~~
|
||||
.. code:: shell
|
||||
|
||||
docker run -it \
|
||||
--user $(id -u) \
|
||||
-e DISPLAY=unix$DISPLAY \
|
||||
--workdir=$(pwd) \
|
||||
--volume="/home/$USER:/home/$USER" \
|
||||
--volume="/etc/group:/etc/group:ro" \
|
||||
--volume="/etc/passwd:/etc/passwd:ro" \
|
||||
--volume="/etc/shadow:/etc/shadow:ro" \
|
||||
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
tzutalin/py2qt4
|
||||
|
||||
make qt4py2;./labelImg.py
|
||||
|
||||
You can pull the image which has all of the installed and required dependencies. `Watch a demo video <https://youtu.be/nw1GexJzbCI>`__
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Steps (PascalVOC)
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. Build and launch using the instructions above.
|
||||
2. Click 'Change default saved annotation folder' in Menu/File
|
||||
3. Click 'Open Dir'
|
||||
4. Click 'Create RectBox'
|
||||
5. Click and release left mouse to select a region to annotate the rect
|
||||
box
|
||||
6. 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.
|
||||
|
||||
Steps (YOLO)
|
||||
~~~~~~~~~~~~
|
||||
|
||||
1. In ``data/predefined_classes.txt`` define the list of classes that will be used for your training.
|
||||
|
||||
2. Build and launch using the instructions above.
|
||||
|
||||
3. Right below "Save" button in the toolbar, click "PascalVOC" button to switch to YOLO format.
|
||||
|
||||
4. 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.
|
||||
|
||||
Note:
|
||||
|
||||
- Your label list shall not change in the middle of processing a list of images. When you save an image, classes.txt will also get updated, while previous annotations will not be updated.
|
||||
|
||||
- You shouldn't use "default class" function when saving to YOLO format, it will not be referred.
|
||||
|
||||
- When saving as YOLO format, "difficult" flag is discarded.
|
||||
|
||||
Create pre-defined classes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can edit the
|
||||
`data/predefined\_classes.txt <https://github.com/tzutalin/labelImg/blob/master/data/predefined_classes.txt>`__
|
||||
to load pre-defined classes
|
||||
|
||||
Hotkeys
|
||||
~~~~~~~
|
||||
|
||||
+------------+--------------------------------------------+
|
||||
| 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.
|
||||
|
||||
How to contribute
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Send a pull request
|
||||
|
||||
License
|
||||
~~~~~~~
|
||||
`Free software: MIT license <https://github.com/tzutalin/labelImg/blob/master/LICENSE>`_
|
||||
|
||||
Citation: Tzutalin. LabelImg. Git code (2015). https://github.com/tzutalin/labelImg
|
||||
|
||||
Related
|
||||
~~~~~~~
|
||||
|
||||
1. `ImageNet Utils <https://github.com/tzutalin/ImageNet_Utils>`__ to
|
||||
download image, create a label text for machine learning, etc
|
||||
2. `Use Docker to run labelImg <https://hub.docker.com/r/tzutalin/py2qt4>`__
|
||||
3. `Generating the PASCAL VOC TFRecord files <https://github.com/tensorflow/models/blob/4f32535fe7040bb1e429ad0e3c948a492a89482d/research/object_detection/g3doc/preparing_inputs.md#generating-the-pascal-voc-tfrecord-files>`__
|
||||
4. `App Icon based on Icon by Nick Roach (GPL) <https://www.elegantthemes.com/>`__
|
||||
5. `Setup python development in vscode <https://tzutalin.blogspot.com/2019/04/set-up-visual-studio-code-for-python-in.html>`__
|
||||
6. `The link of this project on iHub platform <https://code.ihub.org.cn/projects/260/repository/labelImg>`__
|
||||
|
0
labelImg-master/__init__.py
Normal file
12
labelImg-master/build-tools/.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
*.spec
|
||||
build
|
||||
dist
|
||||
pyinstaller
|
||||
python-2.*
|
||||
pywin32*
|
||||
virtual-wine
|
||||
venv_wine
|
||||
PyQt4-*
|
||||
lxml-*
|
||||
windows_v*
|
||||
linux_v*
|
35
labelImg-master/build-tools/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
### Deploy to PyPI
|
||||
|
||||
```
|
||||
cd [ROOT]
|
||||
sh build-tools/build-for-pypi.sh
|
||||
```
|
||||
|
||||
### Build for Ubuntu
|
||||
|
||||
```
|
||||
cd build-tools
|
||||
sh run-in-container.sh
|
||||
sh envsetup.sh
|
||||
sh build-ubuntu-binary.sh
|
||||
```
|
||||
|
||||
### Build for Windows
|
||||
|
||||
```
|
||||
cd build-tools
|
||||
sh run-in-container.sh
|
||||
sh envsetup.sh
|
||||
sh build-windows-binary.sh
|
||||
```
|
||||
|
||||
### Build for macOS High Sierra
|
||||
```
|
||||
cd build-tools
|
||||
./build-for-macos.sh
|
||||
```
|
||||
|
||||
Note: If there are some problems, try to
|
||||
```
|
||||
sudo rm -rf virtual-wne venv_wine
|
||||
```
|
30
labelImg-master/build-tools/build-for-macos.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
brew install python@2
|
||||
pip install --upgrade virtualenv
|
||||
|
||||
# clone labelimg source
|
||||
rm -rf /tmp/labelImgSetup
|
||||
mkdir /tmp/labelImgSetup
|
||||
cd /tmp/labelImgSetup
|
||||
curl https://codeload.github.com/tzutalin/labelImg/zip/master --output labelImg.zip
|
||||
unzip labelImg.zip
|
||||
rm labelImg.zip
|
||||
|
||||
# setup python3 space
|
||||
virtualenv --system-site-packages -p python3 /tmp/labelImgSetup/labelImg-py3
|
||||
source /tmp/labelImgSetup/labelImg-py3/bin/activate
|
||||
cd labelImg-master
|
||||
|
||||
# build labelImg app
|
||||
pip install py2app
|
||||
pip install PyQt5 lxml
|
||||
make qt5py3
|
||||
rm -rf build dist
|
||||
python setup.py py2app -A
|
||||
mv "/tmp/labelImgSetup/labelImg-master/dist/labelImg.app" /Applications
|
||||
# deactivate python3
|
||||
deactivate
|
||||
cd ../
|
||||
rm -rf /tmp/labelImgSetup
|
||||
echo 'DONE'
|
17
labelImg-master/build-tools/build-for-pypi.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# Packaging and Release
|
||||
docker run --workdir=$(pwd)/ --volume="/home/$USER:/home/$USER" tzutalin/py2qt4 /bin/sh -c 'make qt4py2; make test;sudo python setup.py sdist;sudo python setup.py install'
|
||||
|
||||
while true; do
|
||||
read -p "Do you wish to deploy this to PyPI(twine upload dist/* or pip install dist/*)?" yn
|
||||
case $yn in
|
||||
[Yy]* ) docker run -it --rm --workdir=$(pwd)/ --volume="/home/$USER:/home/$USER" tzutalin/py2qt4; break;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
# python setup.py register
|
||||
# python setup.py sdist upload
|
||||
# Net pypi: twine upload dist/*
|
||||
|
||||
# Test before upladoing: pip install dist/labelImg.tar.gz
|
24
labelImg-master/build-tools/build-ubuntu-binary.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
### Ubuntu use pyinstall v3.0
|
||||
THIS_SCRIPT_PATH=`readlink -f $0`
|
||||
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`
|
||||
cd pyinstaller
|
||||
git checkout v3.2
|
||||
cd ${THIS_SCRIPT_DIR}
|
||||
|
||||
rm -r build
|
||||
rm -r dist
|
||||
rm labelImg.spec
|
||||
python pyinstaller/pyinstaller.py --hidden-import=xml \
|
||||
--hidden-import=xml.etree \
|
||||
--hidden-import=xml.etree.ElementTree \
|
||||
--hidden-import=lxml.etree \
|
||||
-D -F -n labelImg -c "../labelImg.py" -p ../libs -p ../
|
||||
|
||||
FOLDER=$(git describe --abbrev=0 --tags)
|
||||
FOLDER="linux_"$FOLDER
|
||||
rm -rf "$FOLDER"
|
||||
mkdir "$FOLDER"
|
||||
cp dist/labelImg $FOLDER
|
||||
cp -rf ../data $FOLDER/data
|
||||
zip "$FOLDER.zip" -r $FOLDER
|
32
labelImg-master/build-tools/build-windows-binary.sh
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
### Window requires pyinstall v2.1
|
||||
wine msiexec -i python-2.7.8.msi
|
||||
wine pywin32-218.win32-py2.7.exe
|
||||
wine PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe
|
||||
wine lxml-3.7.3.win32-py2.7.exe
|
||||
|
||||
THIS_SCRIPT_PATH=`readlink -f $0`
|
||||
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`
|
||||
cd pyinstaller
|
||||
git checkout v2.1
|
||||
cd ${THIS_SCRIPT_DIR}
|
||||
echo ${THIS_SCRIPT_DIR}
|
||||
|
||||
#. venv_wine/bin/activate
|
||||
rm -r build
|
||||
rm -r dist
|
||||
rm labelImg.spec
|
||||
|
||||
wine c:/Python27/python.exe pyinstaller/pyinstaller.py --hidden-import=xml \
|
||||
--hidden-import=xml.etree \
|
||||
--hidden-import=xml.etree.ElementTree \
|
||||
--hidden-import=lxml.etree \
|
||||
-D -F -n labelImg -c "../labelImg.py" -p ../libs -p ../
|
||||
|
||||
FOLDER=$(git describe --abbrev=0 --tags)
|
||||
FOLDER="windows_"$FOLDER
|
||||
rm -rf "$FOLDER"
|
||||
mkdir "$FOLDER"
|
||||
cp dist/labelImg.exe $FOLDER
|
||||
cp -rf ../data $FOLDER/data
|
||||
zip "$FOLDER.zip" -r $FOLDER
|
53
labelImg-master/build-tools/envsetup.sh
Normal file
@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
THIS_SCRIPT_PATH=`readlink -f $0`
|
||||
THIS_SCRIPT_DIR=`dirname ${THIS_SCRIPT_PATH}`
|
||||
#OS Ubuntu 14.04
|
||||
### Common packages for linux/windows
|
||||
if [ ! -e "pyinstaller" ]; then
|
||||
git clone https://github.com/pyinstaller/pyinstaller
|
||||
cd pyinstaller
|
||||
git checkout v2.1 -b v2.1
|
||||
cd ${THIS_SCRIPT_DIR}
|
||||
fi
|
||||
|
||||
echo "Going to clone and download packages for building windows"
|
||||
#Pacakges
|
||||
#> pyinstaller (2.1)
|
||||
#> wine (1.6.2)
|
||||
#> virtual-wine (0.1)
|
||||
#> python-2.7.8.msi
|
||||
#> pywin32-218.win32-py2.7.exe
|
||||
|
||||
## tool to install on Ubuntu
|
||||
#$ sudo apt-get install wine
|
||||
|
||||
### Clone a repo to create virtual wine env
|
||||
if [ ! -e "virtual-wine" ]; then
|
||||
git clone https://github.com/htgoebel/virtual-wine.git
|
||||
fi
|
||||
|
||||
apt-get install scons
|
||||
### Create virtual env
|
||||
rm -rf venv_wine
|
||||
./virtual-wine/vwine-setup venv_wine
|
||||
#### Active virutal env
|
||||
. venv_wine/bin/activate
|
||||
|
||||
### Use wine to install packages to virtual env
|
||||
if [ ! -e "python-2.7.8.msi" ]; then
|
||||
wget "https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi"
|
||||
fi
|
||||
|
||||
if [ ! -e "pywin32-218.win32-py2.7.exe" ]; then
|
||||
wget "http://nchc.dl.sourceforge.net/project/pywin32/pywin32/Build%20218/pywin32-218.win32-py2.7.exe"
|
||||
fi
|
||||
|
||||
if [ ! -e "PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe" ]; then
|
||||
wget "http://nchc.dl.sourceforge.net/project/pyqt/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe"
|
||||
fi
|
||||
|
||||
if [ ! -e "lxml-3.7.3.win32-py2.7.exe" ]; then
|
||||
wget "https://pypi.python.org/packages/a3/f6/a28c5cf63873f6c55a3eb7857b736379229b85ba918261d2e88cf886905e/lxml-3.7.3.win32-py2.7.exe#md5=a0f746355876aca4ca5371cb0f1d13ce"
|
||||
fi
|
||||
|
13
labelImg-master/build-tools/run-in-container.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
docker run -it \
|
||||
--user $(id -u) \
|
||||
-e DISPLAY=unix$DISPLAY \
|
||||
--workdir=$(pwd) \
|
||||
--volume="/home/$USER:/home/$USER" \
|
||||
--volume="/etc/group:/etc/group:ro" \
|
||||
--volume="/etc/passwd:/etc/passwd:ro" \
|
||||
--volume="/etc/shadow:/etc/shadow:ro" \
|
||||
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
tzutalin/py2qt4
|
||||
|
15
labelImg-master/data/predefined_classes.txt
Normal file
@ -0,0 +1,15 @@
|
||||
dog
|
||||
person
|
||||
cat
|
||||
tv
|
||||
car
|
||||
meatballs
|
||||
marinara sauce
|
||||
tomato soup
|
||||
chicken noodle soup
|
||||
french onion soup
|
||||
chicken breast
|
||||
ribs
|
||||
pulled pork
|
||||
hamburger
|
||||
cavity
|
BIN
labelImg-master/demo/demo.jpg
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
labelImg-master/demo/demo3.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
labelImg-master/demo/demo4.png
Normal file
After Width: | Height: | Size: 2.7 MiB |
BIN
labelImg-master/demo/demo5.png
Normal file
After Width: | Height: | Size: 3.1 MiB |
7
labelImg-master/issue_template.md
Normal file
@ -0,0 +1,7 @@
|
||||
<!--
|
||||
Please provide as much as detail and example as you can.
|
||||
You can add screenshots if appropriate.
|
||||
-->
|
||||
|
||||
- **OS:**
|
||||
- **PyQt version:**
|
1482
labelImg-master/labelImg.py
Normal file
2
labelImg-master/libs/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
__version_info__ = ('1', '8', '2')
|
||||
__version__ = '.'.join(__version_info__)
|
724
labelImg-master/libs/canvas.py
Normal file
@ -0,0 +1,724 @@
|
||||
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
#from PyQt4.QtOpenGL import *
|
||||
|
||||
from libs.shape import Shape
|
||||
from libs.utils import distance
|
||||
|
||||
CURSOR_DEFAULT = Qt.ArrowCursor
|
||||
CURSOR_POINT = Qt.PointingHandCursor
|
||||
CURSOR_DRAW = Qt.CrossCursor
|
||||
CURSOR_MOVE = Qt.ClosedHandCursor
|
||||
CURSOR_GRAB = Qt.OpenHandCursor
|
||||
|
||||
# class Canvas(QGLWidget):
|
||||
|
||||
|
||||
class Canvas(QWidget):
|
||||
zoomRequest = pyqtSignal(int)
|
||||
scrollRequest = pyqtSignal(int, int)
|
||||
newShape = pyqtSignal()
|
||||
selectionChanged = pyqtSignal(bool)
|
||||
shapeMoved = pyqtSignal()
|
||||
drawingPolygon = pyqtSignal(bool)
|
||||
|
||||
CREATE, EDIT = list(range(2))
|
||||
|
||||
epsilon = 11.0
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Canvas, self).__init__(*args, **kwargs)
|
||||
# Initialise local state.
|
||||
self.mode = self.EDIT
|
||||
self.shapes = []
|
||||
self.current = None
|
||||
self.selectedShape = None # save the selected shape here
|
||||
self.selectedShapeCopy = None
|
||||
self.drawingLineColor = QColor(0, 0, 255)
|
||||
self.drawingRectColor = QColor(0, 0, 255)
|
||||
self.line = Shape(line_color=self.drawingLineColor)
|
||||
self.prevPoint = QPointF()
|
||||
self.offsets = QPointF(), QPointF()
|
||||
self.scale = 1.0
|
||||
self.pixmap = QPixmap()
|
||||
self.visible = {}
|
||||
self._hideBackround = False
|
||||
self.hideBackround = False
|
||||
self.hShape = None
|
||||
self.hVertex = None
|
||||
self._painter = QPainter()
|
||||
self._cursor = CURSOR_DEFAULT
|
||||
# Menus:
|
||||
self.menus = (QMenu(), QMenu())
|
||||
# Set widget options.
|
||||
self.setMouseTracking(True)
|
||||
self.setFocusPolicy(Qt.WheelFocus)
|
||||
self.verified = False
|
||||
self.drawSquare = False
|
||||
|
||||
def setDrawingColor(self, qColor):
|
||||
self.drawingLineColor = qColor
|
||||
self.drawingRectColor = qColor
|
||||
|
||||
def enterEvent(self, ev):
|
||||
self.overrideCursor(self._cursor)
|
||||
|
||||
def leaveEvent(self, ev):
|
||||
self.restoreCursor()
|
||||
|
||||
def focusOutEvent(self, ev):
|
||||
self.restoreCursor()
|
||||
|
||||
def isVisible(self, shape):
|
||||
return self.visible.get(shape, True)
|
||||
|
||||
def drawing(self):
|
||||
return self.mode == self.CREATE
|
||||
|
||||
def editing(self):
|
||||
return self.mode == self.EDIT
|
||||
|
||||
def setEditing(self, value=True):
|
||||
self.mode = self.EDIT if value else self.CREATE
|
||||
if not value: # Create
|
||||
self.unHighlight()
|
||||
self.deSelectShape()
|
||||
self.prevPoint = QPointF()
|
||||
self.repaint()
|
||||
|
||||
def unHighlight(self):
|
||||
if self.hShape:
|
||||
self.hShape.highlightClear()
|
||||
self.hVertex = self.hShape = None
|
||||
|
||||
def selectedVertex(self):
|
||||
return self.hVertex is not None
|
||||
|
||||
def mouseMoveEvent(self, ev):
|
||||
"""Update line with last point and current coordinates."""
|
||||
pos = self.transformPos(ev.pos())
|
||||
|
||||
# Update coordinates in status bar if image is opened
|
||||
window = self.parent().window()
|
||||
if window.filePath is not None:
|
||||
self.parent().window().labelCoordinates.setText(
|
||||
'X: %d; Y: %d' % (pos.x(), pos.y()))
|
||||
|
||||
# Polygon drawing.
|
||||
if self.drawing():
|
||||
self.overrideCursor(CURSOR_DRAW)
|
||||
if self.current:
|
||||
color = self.drawingLineColor
|
||||
if self.outOfPixmap(pos):
|
||||
# Don't allow the user to draw outside the pixmap.
|
||||
# Project the point to the pixmap's edges.
|
||||
pos = self.intersectionPoint(self.current[-1], pos)
|
||||
elif len(self.current) > 1 and self.closeEnough(pos, self.current[0]):
|
||||
# Attract line to starting point and colorise to alert the
|
||||
# user:
|
||||
pos = self.current[0]
|
||||
color = self.current.line_color
|
||||
self.overrideCursor(CURSOR_POINT)
|
||||
self.current.highlightVertex(0, Shape.NEAR_VERTEX)
|
||||
|
||||
if self.drawSquare:
|
||||
initPos = self.current[0]
|
||||
minX = initPos.x()
|
||||
minY = initPos.y()
|
||||
min_size = min(abs(pos.x() - minX), abs(pos.y() - minY))
|
||||
directionX = -1 if pos.x() - minX < 0 else 1
|
||||
directionY = -1 if pos.y() - minY < 0 else 1
|
||||
self.line[1] = QPointF(minX + directionX * min_size, minY + directionY * min_size)
|
||||
else:
|
||||
self.line[1] = pos
|
||||
|
||||
self.line.line_color = color
|
||||
self.prevPoint = QPointF()
|
||||
self.current.highlightClear()
|
||||
else:
|
||||
self.prevPoint = pos
|
||||
self.repaint()
|
||||
return
|
||||
|
||||
# Polygon copy moving.
|
||||
if Qt.RightButton & ev.buttons():
|
||||
if self.selectedShapeCopy and self.prevPoint:
|
||||
self.overrideCursor(CURSOR_MOVE)
|
||||
self.boundedMoveShape(self.selectedShapeCopy, pos)
|
||||
self.repaint()
|
||||
elif self.selectedShape:
|
||||
self.selectedShapeCopy = self.selectedShape.copy()
|
||||
self.repaint()
|
||||
return
|
||||
|
||||
# Polygon/Vertex moving.
|
||||
if Qt.LeftButton & ev.buttons():
|
||||
if self.selectedVertex():
|
||||
self.boundedMoveVertex(pos)
|
||||
self.shapeMoved.emit()
|
||||
self.repaint()
|
||||
elif self.selectedShape and self.prevPoint:
|
||||
self.overrideCursor(CURSOR_MOVE)
|
||||
self.boundedMoveShape(self.selectedShape, pos)
|
||||
self.shapeMoved.emit()
|
||||
self.repaint()
|
||||
return
|
||||
|
||||
# Just hovering over the canvas, 2 posibilities:
|
||||
# - Highlight shapes
|
||||
# - Highlight vertex
|
||||
# Update shape/vertex fill and tooltip value accordingly.
|
||||
self.setToolTip("Image")
|
||||
for shape in reversed([s for s in self.shapes if self.isVisible(s)]):
|
||||
# Look for a nearby vertex to highlight. If that fails,
|
||||
# check if we happen to be inside a shape.
|
||||
index = shape.nearestVertex(pos, self.epsilon)
|
||||
if index is not None:
|
||||
if self.selectedVertex():
|
||||
self.hShape.highlightClear()
|
||||
self.hVertex, self.hShape = index, shape
|
||||
shape.highlightVertex(index, shape.MOVE_VERTEX)
|
||||
self.overrideCursor(CURSOR_POINT)
|
||||
self.setToolTip("Click & drag to move point")
|
||||
self.setStatusTip(self.toolTip())
|
||||
self.update()
|
||||
break
|
||||
elif shape.containsPoint(pos):
|
||||
if self.selectedVertex():
|
||||
self.hShape.highlightClear()
|
||||
self.hVertex, self.hShape = None, shape
|
||||
self.setToolTip(
|
||||
"Click & drag to move shape '%s'" % shape.label)
|
||||
self.setStatusTip(self.toolTip())
|
||||
self.overrideCursor(CURSOR_GRAB)
|
||||
self.update()
|
||||
break
|
||||
else: # Nothing found, clear highlights, reset state.
|
||||
if self.hShape:
|
||||
self.hShape.highlightClear()
|
||||
self.update()
|
||||
self.hVertex, self.hShape = None, None
|
||||
self.overrideCursor(CURSOR_DEFAULT)
|
||||
|
||||
def mousePressEvent(self, ev):
|
||||
pos = self.transformPos(ev.pos())
|
||||
|
||||
if ev.button() == Qt.LeftButton:
|
||||
if self.drawing():
|
||||
self.handleDrawing(pos)
|
||||
else:
|
||||
self.selectShapePoint(pos)
|
||||
self.prevPoint = pos
|
||||
self.repaint()
|
||||
elif ev.button() == Qt.RightButton and self.editing():
|
||||
self.selectShapePoint(pos)
|
||||
self.prevPoint = pos
|
||||
self.repaint()
|
||||
|
||||
def mouseReleaseEvent(self, ev):
|
||||
if ev.button() == Qt.RightButton:
|
||||
menu = self.menus[bool(self.selectedShapeCopy)]
|
||||
self.restoreCursor()
|
||||
if not menu.exec_(self.mapToGlobal(ev.pos()))\
|
||||
and self.selectedShapeCopy:
|
||||
# Cancel the move by deleting the shadow copy.
|
||||
self.selectedShapeCopy = None
|
||||
self.repaint()
|
||||
elif ev.button() == Qt.LeftButton and self.selectedShape:
|
||||
if self.selectedVertex():
|
||||
self.overrideCursor(CURSOR_POINT)
|
||||
else:
|
||||
self.overrideCursor(CURSOR_GRAB)
|
||||
elif ev.button() == Qt.LeftButton:
|
||||
pos = self.transformPos(ev.pos())
|
||||
if self.drawing():
|
||||
self.handleDrawing(pos)
|
||||
|
||||
def endMove(self, copy=False):
|
||||
assert self.selectedShape and self.selectedShapeCopy
|
||||
shape = self.selectedShapeCopy
|
||||
#del shape.fill_color
|
||||
#del shape.line_color
|
||||
if copy:
|
||||
self.shapes.append(shape)
|
||||
self.selectedShape.selected = False
|
||||
self.selectedShape = shape
|
||||
self.repaint()
|
||||
else:
|
||||
self.selectedShape.points = [p for p in shape.points]
|
||||
self.selectedShapeCopy = None
|
||||
|
||||
def hideBackroundShapes(self, value):
|
||||
self.hideBackround = value
|
||||
if self.selectedShape:
|
||||
# Only hide other shapes if there is a current selection.
|
||||
# Otherwise the user will not be able to select a shape.
|
||||
self.setHiding(True)
|
||||
self.repaint()
|
||||
|
||||
def handleDrawing(self, pos):
|
||||
if self.current and self.current.reachMaxPoints() is False:
|
||||
initPos = self.current[0]
|
||||
minX = initPos.x()
|
||||
minY = initPos.y()
|
||||
targetPos = self.line[1]
|
||||
maxX = targetPos.x()
|
||||
maxY = targetPos.y()
|
||||
self.current.addPoint(QPointF(maxX, minY))
|
||||
self.current.addPoint(targetPos)
|
||||
self.current.addPoint(QPointF(minX, maxY))
|
||||
self.finalise()
|
||||
elif not self.outOfPixmap(pos):
|
||||
self.current = Shape()
|
||||
self.current.addPoint(pos)
|
||||
self.line.points = [pos, pos]
|
||||
self.setHiding()
|
||||
self.drawingPolygon.emit(True)
|
||||
self.update()
|
||||
|
||||
def setHiding(self, enable=True):
|
||||
self._hideBackround = self.hideBackround if enable else False
|
||||
|
||||
def canCloseShape(self):
|
||||
return self.drawing() and self.current and len(self.current) > 2
|
||||
|
||||
def mouseDoubleClickEvent(self, ev):
|
||||
# We need at least 4 points here, since the mousePress handler
|
||||
# adds an extra one before this handler is called.
|
||||
if self.canCloseShape() and len(self.current) > 3:
|
||||
self.current.popPoint()
|
||||
self.finalise()
|
||||
|
||||
def selectShape(self, shape):
|
||||
self.deSelectShape()
|
||||
shape.selected = True
|
||||
self.selectedShape = shape
|
||||
self.setHiding()
|
||||
self.selectionChanged.emit(True)
|
||||
self.update()
|
||||
|
||||
def selectShapePoint(self, point):
|
||||
"""Select the first shape created which contains this point."""
|
||||
self.deSelectShape()
|
||||
if self.selectedVertex(): # A vertex is marked for selection.
|
||||
index, shape = self.hVertex, self.hShape
|
||||
shape.highlightVertex(index, shape.MOVE_VERTEX)
|
||||
self.selectShape(shape)
|
||||
return
|
||||
for shape in reversed(self.shapes):
|
||||
if self.isVisible(shape) and shape.containsPoint(point):
|
||||
self.selectShape(shape)
|
||||
self.calculateOffsets(shape, point)
|
||||
return
|
||||
|
||||
def calculateOffsets(self, shape, point):
|
||||
rect = shape.boundingRect()
|
||||
x1 = rect.x() - point.x()
|
||||
y1 = rect.y() - point.y()
|
||||
x2 = (rect.x() + rect.width()) - point.x()
|
||||
y2 = (rect.y() + rect.height()) - point.y()
|
||||
self.offsets = QPointF(x1, y1), QPointF(x2, y2)
|
||||
|
||||
def snapPointToCanvas(self, x, y):
|
||||
"""
|
||||
Moves a point x,y to within the boundaries of the canvas.
|
||||
:return: (x,y,snapped) where snapped is True if x or y were changed, False if not.
|
||||
"""
|
||||
if x < 0 or x > self.pixmap.width() or y < 0 or y > self.pixmap.height():
|
||||
x = max(x, 0)
|
||||
y = max(y, 0)
|
||||
x = min(x, self.pixmap.width())
|
||||
y = min(y, self.pixmap.height())
|
||||
return x, y, True
|
||||
|
||||
return x, y, False
|
||||
|
||||
def boundedMoveVertex(self, pos):
|
||||
index, shape = self.hVertex, self.hShape
|
||||
point = shape[index]
|
||||
if self.outOfPixmap(pos):
|
||||
pos = self.intersectionPoint(point, pos)
|
||||
|
||||
if self.drawSquare:
|
||||
opposite_point_index = (index + 2) % 4
|
||||
opposite_point = shape[opposite_point_index]
|
||||
|
||||
min_size = min(abs(pos.x() - opposite_point.x()), abs(pos.y() - opposite_point.y()))
|
||||
directionX = -1 if pos.x() - opposite_point.x() < 0 else 1
|
||||
directionY = -1 if pos.y() - opposite_point.y() < 0 else 1
|
||||
shiftPos = QPointF(opposite_point.x() + directionX * min_size - point.x(),
|
||||
opposite_point.y() + directionY * min_size - point.y())
|
||||
else:
|
||||
shiftPos = pos - point
|
||||
|
||||
shape.moveVertexBy(index, shiftPos)
|
||||
|
||||
lindex = (index + 1) % 4
|
||||
rindex = (index + 3) % 4
|
||||
lshift = None
|
||||
rshift = None
|
||||
if index % 2 == 0:
|
||||
rshift = QPointF(shiftPos.x(), 0)
|
||||
lshift = QPointF(0, shiftPos.y())
|
||||
else:
|
||||
lshift = QPointF(shiftPos.x(), 0)
|
||||
rshift = QPointF(0, shiftPos.y())
|
||||
shape.moveVertexBy(rindex, rshift)
|
||||
shape.moveVertexBy(lindex, lshift)
|
||||
|
||||
def boundedMoveShape(self, shape, pos):
|
||||
if self.outOfPixmap(pos):
|
||||
return False # No need to move
|
||||
o1 = pos + self.offsets[0]
|
||||
if self.outOfPixmap(o1):
|
||||
pos -= QPointF(min(0, o1.x()), min(0, o1.y()))
|
||||
o2 = pos + self.offsets[1]
|
||||
if self.outOfPixmap(o2):
|
||||
pos += QPointF(min(0, self.pixmap.width() - o2.x()),
|
||||
min(0, self.pixmap.height() - o2.y()))
|
||||
# The next line tracks the new position of the cursor
|
||||
# relative to the shape, but also results in making it
|
||||
# a bit "shaky" when nearing the border and allows it to
|
||||
# go outside of the shape's area for some reason. XXX
|
||||
#self.calculateOffsets(self.selectedShape, pos)
|
||||
dp = pos - self.prevPoint
|
||||
if dp:
|
||||
shape.moveBy(dp)
|
||||
self.prevPoint = pos
|
||||
return True
|
||||
return False
|
||||
|
||||
def deSelectShape(self):
|
||||
if self.selectedShape:
|
||||
self.selectedShape.selected = False
|
||||
self.selectedShape = None
|
||||
self.setHiding(False)
|
||||
self.selectionChanged.emit(False)
|
||||
self.update()
|
||||
|
||||
def deleteSelected(self):
|
||||
if self.selectedShape:
|
||||
shape = self.selectedShape
|
||||
self.shapes.remove(self.selectedShape)
|
||||
self.selectedShape = None
|
||||
self.update()
|
||||
return shape
|
||||
|
||||
def copySelectedShape(self):
|
||||
if self.selectedShape:
|
||||
shape = self.selectedShape.copy()
|
||||
self.deSelectShape()
|
||||
self.shapes.append(shape)
|
||||
shape.selected = True
|
||||
self.selectedShape = shape
|
||||
self.boundedShiftShape(shape)
|
||||
return shape
|
||||
|
||||
def boundedShiftShape(self, shape):
|
||||
# Try to move in one direction, and if it fails in another.
|
||||
# Give up if both fail.
|
||||
point = shape[0]
|
||||
offset = QPointF(2.0, 2.0)
|
||||
self.calculateOffsets(shape, point)
|
||||
self.prevPoint = point
|
||||
if not self.boundedMoveShape(shape, point - offset):
|
||||
self.boundedMoveShape(shape, point + offset)
|
||||
|
||||
def paintEvent(self, event):
|
||||
if not self.pixmap:
|
||||
return super(Canvas, self).paintEvent(event)
|
||||
|
||||
p = self._painter
|
||||
p.begin(self)
|
||||
p.setRenderHint(QPainter.Antialiasing)
|
||||
p.setRenderHint(QPainter.HighQualityAntialiasing)
|
||||
p.setRenderHint(QPainter.SmoothPixmapTransform)
|
||||
|
||||
p.scale(self.scale, self.scale)
|
||||
p.translate(self.offsetToCenter())
|
||||
|
||||
p.drawPixmap(0, 0, self.pixmap)
|
||||
Shape.scale = self.scale
|
||||
for shape in self.shapes:
|
||||
if (shape.selected or not self._hideBackround) and self.isVisible(shape):
|
||||
shape.fill = shape.selected or shape == self.hShape
|
||||
shape.paint(p)
|
||||
if self.current:
|
||||
self.current.paint(p)
|
||||
self.line.paint(p)
|
||||
if self.selectedShapeCopy:
|
||||
self.selectedShapeCopy.paint(p)
|
||||
|
||||
# Paint rect
|
||||
if self.current is not None and len(self.line) == 2:
|
||||
leftTop = self.line[0]
|
||||
rightBottom = self.line[1]
|
||||
rectWidth = rightBottom.x() - leftTop.x()
|
||||
rectHeight = rightBottom.y() - leftTop.y()
|
||||
p.setPen(self.drawingRectColor)
|
||||
brush = QBrush(Qt.BDiagPattern)
|
||||
p.setBrush(brush)
|
||||
p.drawRect(leftTop.x(), leftTop.y(), rectWidth, rectHeight)
|
||||
|
||||
if self.drawing() and not self.prevPoint.isNull() and not self.outOfPixmap(self.prevPoint):
|
||||
p.setPen(QColor(0, 0, 0))
|
||||
p.drawLine(self.prevPoint.x(), 0, self.prevPoint.x(), self.pixmap.height())
|
||||
p.drawLine(0, self.prevPoint.y(), self.pixmap.width(), self.prevPoint.y())
|
||||
|
||||
self.setAutoFillBackground(True)
|
||||
if self.verified:
|
||||
pal = self.palette()
|
||||
pal.setColor(self.backgroundRole(), QColor(184, 239, 38, 128))
|
||||
self.setPalette(pal)
|
||||
else:
|
||||
pal = self.palette()
|
||||
pal.setColor(self.backgroundRole(), QColor(232, 232, 232, 255))
|
||||
self.setPalette(pal)
|
||||
|
||||
p.end()
|
||||
|
||||
def transformPos(self, point):
|
||||
"""Convert from widget-logical coordinates to painter-logical coordinates."""
|
||||
return point / self.scale - self.offsetToCenter()
|
||||
|
||||
def offsetToCenter(self):
|
||||
s = self.scale
|
||||
area = super(Canvas, self).size()
|
||||
w, h = self.pixmap.width() * s, self.pixmap.height() * s
|
||||
aw, ah = area.width(), area.height()
|
||||
x = (aw - w) / (2 * s) if aw > w else 0
|
||||
y = (ah - h) / (2 * s) if ah > h else 0
|
||||
return QPointF(x, y)
|
||||
|
||||
def outOfPixmap(self, p):
|
||||
w, h = self.pixmap.width(), self.pixmap.height()
|
||||
return not (0 <= p.x() <= w and 0 <= p.y() <= h)
|
||||
|
||||
def finalise(self):
|
||||
assert self.current
|
||||
if self.current.points[0] == self.current.points[-1]:
|
||||
self.current = None
|
||||
self.drawingPolygon.emit(False)
|
||||
self.update()
|
||||
return
|
||||
|
||||
self.current.close()
|
||||
self.shapes.append(self.current)
|
||||
self.current = None
|
||||
self.setHiding(False)
|
||||
self.newShape.emit()
|
||||
self.update()
|
||||
|
||||
def closeEnough(self, p1, p2):
|
||||
#d = distance(p1 - p2)
|
||||
#m = (p1-p2).manhattanLength()
|
||||
# print "d %.2f, m %d, %.2f" % (d, m, d - m)
|
||||
return distance(p1 - p2) < self.epsilon
|
||||
|
||||
def intersectionPoint(self, p1, p2):
|
||||
# Cycle through each image edge in clockwise fashion,
|
||||
# and find the one intersecting the current line segment.
|
||||
# http://paulbourke.net/geometry/lineline2d/
|
||||
size = self.pixmap.size()
|
||||
points = [(0, 0),
|
||||
(size.width(), 0),
|
||||
(size.width(), size.height()),
|
||||
(0, size.height())]
|
||||
x1, y1 = p1.x(), p1.y()
|
||||
x2, y2 = p2.x(), p2.y()
|
||||
d, i, (x, y) = min(self.intersectingEdges((x1, y1), (x2, y2), points))
|
||||
x3, y3 = points[i]
|
||||
x4, y4 = points[(i + 1) % 4]
|
||||
if (x, y) == (x1, y1):
|
||||
# Handle cases where previous point is on one of the edges.
|
||||
if x3 == x4:
|
||||
return QPointF(x3, min(max(0, y2), max(y3, y4)))
|
||||
else: # y3 == y4
|
||||
return QPointF(min(max(0, x2), max(x3, x4)), y3)
|
||||
|
||||
# Ensure the labels are within the bounds of the image. If not, fix them.
|
||||
x, y, _ = self.snapPointToCanvas(x, y)
|
||||
|
||||
return QPointF(x, y)
|
||||
|
||||
def intersectingEdges(self, x1y1, x2y2, points):
|
||||
"""For each edge formed by `points', yield the intersection
|
||||
with the line segment `(x1,y1) - (x2,y2)`, if it exists.
|
||||
Also return the distance of `(x2,y2)' to the middle of the
|
||||
edge along with its index, so that the one closest can be chosen."""
|
||||
x1, y1 = x1y1
|
||||
x2, y2 = x2y2
|
||||
for i in range(4):
|
||||
x3, y3 = points[i]
|
||||
x4, y4 = points[(i + 1) % 4]
|
||||
denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1)
|
||||
nua = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)
|
||||
nub = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)
|
||||
if denom == 0:
|
||||
# This covers two cases:
|
||||
# nua == nub == 0: Coincident
|
||||
# otherwise: Parallel
|
||||
continue
|
||||
ua, ub = nua / denom, nub / denom
|
||||
if 0 <= ua <= 1 and 0 <= ub <= 1:
|
||||
x = x1 + ua * (x2 - x1)
|
||||
y = y1 + ua * (y2 - y1)
|
||||
m = QPointF((x3 + x4) / 2, (y3 + y4) / 2)
|
||||
d = distance(m - QPointF(x2, y2))
|
||||
yield d, i, (x, y)
|
||||
|
||||
# These two, along with a call to adjustSize are required for the
|
||||
# scroll area.
|
||||
def sizeHint(self):
|
||||
return self.minimumSizeHint()
|
||||
|
||||
def minimumSizeHint(self):
|
||||
if self.pixmap:
|
||||
return self.scale * self.pixmap.size()
|
||||
return super(Canvas, self).minimumSizeHint()
|
||||
|
||||
def wheelEvent(self, ev):
|
||||
qt_version = 4 if hasattr(ev, "delta") else 5
|
||||
if qt_version == 4:
|
||||
if ev.orientation() == Qt.Vertical:
|
||||
v_delta = ev.delta()
|
||||
h_delta = 0
|
||||
else:
|
||||
h_delta = ev.delta()
|
||||
v_delta = 0
|
||||
else:
|
||||
delta = ev.angleDelta()
|
||||
h_delta = delta.x()
|
||||
v_delta = delta.y()
|
||||
|
||||
mods = ev.modifiers()
|
||||
if Qt.ControlModifier == int(mods) and v_delta:
|
||||
self.zoomRequest.emit(v_delta)
|
||||
else:
|
||||
v_delta and self.scrollRequest.emit(v_delta, Qt.Vertical)
|
||||
h_delta and self.scrollRequest.emit(h_delta, Qt.Horizontal)
|
||||
ev.accept()
|
||||
|
||||
def keyPressEvent(self, ev):
|
||||
key = ev.key()
|
||||
if key == Qt.Key_Escape and self.current:
|
||||
print('ESC press')
|
||||
self.current = None
|
||||
self.drawingPolygon.emit(False)
|
||||
self.update()
|
||||
elif key == Qt.Key_Return and self.canCloseShape():
|
||||
self.finalise()
|
||||
elif key == Qt.Key_Left and self.selectedShape:
|
||||
self.moveOnePixel('Left')
|
||||
elif key == Qt.Key_Right and self.selectedShape:
|
||||
self.moveOnePixel('Right')
|
||||
elif key == Qt.Key_Up and self.selectedShape:
|
||||
self.moveOnePixel('Up')
|
||||
elif key == Qt.Key_Down and self.selectedShape:
|
||||
self.moveOnePixel('Down')
|
||||
|
||||
def moveOnePixel(self, direction):
|
||||
# print(self.selectedShape.points)
|
||||
if direction == 'Left' and not self.moveOutOfBound(QPointF(-1.0, 0)):
|
||||
# print("move Left one pixel")
|
||||
self.selectedShape.points[0] += QPointF(-1.0, 0)
|
||||
self.selectedShape.points[1] += QPointF(-1.0, 0)
|
||||
self.selectedShape.points[2] += QPointF(-1.0, 0)
|
||||
self.selectedShape.points[3] += QPointF(-1.0, 0)
|
||||
elif direction == 'Right' and not self.moveOutOfBound(QPointF(1.0, 0)):
|
||||
# print("move Right one pixel")
|
||||
self.selectedShape.points[0] += QPointF(1.0, 0)
|
||||
self.selectedShape.points[1] += QPointF(1.0, 0)
|
||||
self.selectedShape.points[2] += QPointF(1.0, 0)
|
||||
self.selectedShape.points[3] += QPointF(1.0, 0)
|
||||
elif direction == 'Up' and not self.moveOutOfBound(QPointF(0, -1.0)):
|
||||
# print("move Up one pixel")
|
||||
self.selectedShape.points[0] += QPointF(0, -1.0)
|
||||
self.selectedShape.points[1] += QPointF(0, -1.0)
|
||||
self.selectedShape.points[2] += QPointF(0, -1.0)
|
||||
self.selectedShape.points[3] += QPointF(0, -1.0)
|
||||
elif direction == 'Down' and not self.moveOutOfBound(QPointF(0, 1.0)):
|
||||
# print("move Down one pixel")
|
||||
self.selectedShape.points[0] += QPointF(0, 1.0)
|
||||
self.selectedShape.points[1] += QPointF(0, 1.0)
|
||||
self.selectedShape.points[2] += QPointF(0, 1.0)
|
||||
self.selectedShape.points[3] += QPointF(0, 1.0)
|
||||
self.shapeMoved.emit()
|
||||
self.repaint()
|
||||
|
||||
def moveOutOfBound(self, step):
|
||||
points = [p1+p2 for p1, p2 in zip(self.selectedShape.points, [step]*4)]
|
||||
return True in map(self.outOfPixmap, points)
|
||||
|
||||
def setLastLabel(self, text, line_color = None, fill_color = None):
|
||||
assert text
|
||||
self.shapes[-1].label = text
|
||||
if line_color:
|
||||
self.shapes[-1].line_color = line_color
|
||||
|
||||
if fill_color:
|
||||
self.shapes[-1].fill_color = fill_color
|
||||
|
||||
return self.shapes[-1]
|
||||
|
||||
def undoLastLine(self):
|
||||
assert self.shapes
|
||||
self.current = self.shapes.pop()
|
||||
self.current.setOpen()
|
||||
self.line.points = [self.current[-1], self.current[0]]
|
||||
self.drawingPolygon.emit(True)
|
||||
|
||||
def resetAllLines(self):
|
||||
assert self.shapes
|
||||
self.current = self.shapes.pop()
|
||||
self.current.setOpen()
|
||||
self.line.points = [self.current[-1], self.current[0]]
|
||||
self.drawingPolygon.emit(True)
|
||||
self.current = None
|
||||
self.drawingPolygon.emit(False)
|
||||
self.update()
|
||||
|
||||
def loadPixmap(self, pixmap):
|
||||
self.pixmap = pixmap
|
||||
self.shapes = []
|
||||
self.repaint()
|
||||
|
||||
def loadShapes(self, shapes):
|
||||
self.shapes = list(shapes)
|
||||
self.current = None
|
||||
self.repaint()
|
||||
|
||||
def setShapeVisible(self, shape, value):
|
||||
self.visible[shape] = value
|
||||
self.repaint()
|
||||
|
||||
def currentCursor(self):
|
||||
cursor = QApplication.overrideCursor()
|
||||
if cursor is not None:
|
||||
cursor = cursor.shape()
|
||||
return cursor
|
||||
|
||||
def overrideCursor(self, cursor):
|
||||
self._cursor = cursor
|
||||
if self.currentCursor() is None:
|
||||
QApplication.setOverrideCursor(cursor)
|
||||
else:
|
||||
QApplication.changeOverrideCursor(cursor)
|
||||
|
||||
def restoreCursor(self):
|
||||
QApplication.restoreOverrideCursor()
|
||||
|
||||
def resetState(self):
|
||||
self.restoreCursor()
|
||||
self.pixmap = None
|
||||
self.update()
|
||||
|
||||
def setDrawingShapeToSquare(self, status):
|
||||
self.drawSquare = status
|
37
labelImg-master/libs/colorDialog.py
Normal file
@ -0,0 +1,37 @@
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import QColorDialog, QDialogButtonBox
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
BB = QDialogButtonBox
|
||||
|
||||
|
||||
class ColorDialog(QColorDialog):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(ColorDialog, self).__init__(parent)
|
||||
self.setOption(QColorDialog.ShowAlphaChannel)
|
||||
# The Mac native dialog does not support our restore button.
|
||||
self.setOption(QColorDialog.DontUseNativeDialog)
|
||||
# Add a restore defaults button.
|
||||
# The default is set at invocation time, so that it
|
||||
# works across dialogs for different elements.
|
||||
self.default = None
|
||||
self.bb = self.layout().itemAt(1).widget()
|
||||
self.bb.addButton(BB.RestoreDefaults)
|
||||
self.bb.clicked.connect(self.checkRestore)
|
||||
|
||||
def getColor(self, value=None, title=None, default=None):
|
||||
self.default = default
|
||||
if title:
|
||||
self.setWindowTitle(title)
|
||||
if value:
|
||||
self.setCurrentColor(value)
|
||||
return self.currentColor() if self.exec_() else None
|
||||
|
||||
def checkRestore(self, button):
|
||||
if self.bb.buttonRole(button) & BB.ResetRole and self.default:
|
||||
self.setCurrentColor(self.default)
|
18
labelImg-master/libs/constants.py
Normal file
@ -0,0 +1,18 @@
|
||||
SETTING_FILENAME = 'filename'
|
||||
SETTING_RECENT_FILES = 'recentFiles'
|
||||
SETTING_WIN_SIZE = 'window/size'
|
||||
SETTING_WIN_POSE = 'window/position'
|
||||
SETTING_WIN_GEOMETRY = 'window/geometry'
|
||||
SETTING_LINE_COLOR = 'line/color'
|
||||
SETTING_FILL_COLOR = 'fill/color'
|
||||
SETTING_ADVANCE_MODE = 'advanced'
|
||||
SETTING_WIN_STATE = 'window/state'
|
||||
SETTING_SAVE_DIR = 'savedir'
|
||||
SETTING_PAINT_LABEL = 'paintlabel'
|
||||
SETTING_LAST_OPEN_DIR = 'lastOpenDir'
|
||||
SETTING_AUTO_SAVE = 'autosave'
|
||||
SETTING_SINGLE_CLASS = 'singleclass'
|
||||
FORMAT_PASCALVOC='PascalVOC'
|
||||
FORMAT_YOLO='YOLO'
|
||||
SETTING_DRAW_SQUARE = 'draw/square'
|
||||
DEFAULT_ENCODING = 'utf-8'
|
28
labelImg-master/libs/hashableQListWidgetItem.py
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
except ImportError:
|
||||
# needed for py3+qt4
|
||||
# Ref:
|
||||
# http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html
|
||||
# http://stackoverflow.com/questions/21217399/pyqt4-qtcore-qvariant-object-instead-of-a-string
|
||||
if sys.version_info.major >= 3:
|
||||
import sip
|
||||
sip.setapi('QVariant', 2)
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
# PyQt5: TypeError: unhashable type: 'QListWidgetItem'
|
||||
|
||||
|
||||
class HashableQListWidgetItem(QListWidgetItem):
|
||||
|
||||
def __init__(self, *args):
|
||||
super(HashableQListWidgetItem, self).__init__(*args)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(id(self))
|
83
labelImg-master/libs/labelDialog.py
Normal file
@ -0,0 +1,83 @@
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
from libs.utils import newIcon, labelValidator
|
||||
|
||||
BB = QDialogButtonBox
|
||||
|
||||
|
||||
class LabelDialog(QDialog):
|
||||
|
||||
def __init__(self, text="Enter object label", parent=None, listItem=None):
|
||||
super(LabelDialog, self).__init__(parent)
|
||||
|
||||
self.edit = QLineEdit()
|
||||
self.edit.setText(text)
|
||||
self.edit.setValidator(labelValidator())
|
||||
self.edit.editingFinished.connect(self.postProcess)
|
||||
|
||||
model = QStringListModel()
|
||||
model.setStringList(listItem)
|
||||
completer = QCompleter()
|
||||
completer.setModel(model)
|
||||
self.edit.setCompleter(completer)
|
||||
|
||||
layout = QVBoxLayout()
|
||||
layout.addWidget(self.edit)
|
||||
self.buttonBox = bb = BB(BB.Ok | BB.Cancel, Qt.Horizontal, self)
|
||||
bb.button(BB.Ok).setIcon(newIcon('done'))
|
||||
bb.button(BB.Cancel).setIcon(newIcon('undo'))
|
||||
bb.accepted.connect(self.validate)
|
||||
bb.rejected.connect(self.reject)
|
||||
layout.addWidget(bb)
|
||||
|
||||
if listItem is not None and len(listItem) > 0:
|
||||
self.listWidget = QListWidget(self)
|
||||
for item in listItem:
|
||||
self.listWidget.addItem(item)
|
||||
self.listWidget.itemClicked.connect(self.listItemClick)
|
||||
self.listWidget.itemDoubleClicked.connect(self.listItemDoubleClick)
|
||||
layout.addWidget(self.listWidget)
|
||||
|
||||
self.setLayout(layout)
|
||||
|
||||
def validate(self):
|
||||
try:
|
||||
if self.edit.text().trimmed():
|
||||
self.accept()
|
||||
except AttributeError:
|
||||
# PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
|
||||
if self.edit.text().strip():
|
||||
self.accept()
|
||||
|
||||
def postProcess(self):
|
||||
try:
|
||||
self.edit.setText(self.edit.text().trimmed())
|
||||
except AttributeError:
|
||||
# PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
|
||||
self.edit.setText(self.edit.text())
|
||||
|
||||
def popUp(self, text='', move=True):
|
||||
self.edit.setText(text)
|
||||
self.edit.setSelection(0, len(text))
|
||||
self.edit.setFocus(Qt.PopupFocusReason)
|
||||
if move:
|
||||
self.move(QCursor.pos())
|
||||
return self.edit.text() if self.exec_() else None
|
||||
|
||||
def listItemClick(self, tQListWidgetItem):
|
||||
try:
|
||||
text = tQListWidgetItem.text().trimmed()
|
||||
except AttributeError:
|
||||
# PyQt5: AttributeError: 'str' object has no attribute 'trimmed'
|
||||
text = tQListWidgetItem.text().strip()
|
||||
self.edit.setText(text)
|
||||
|
||||
def listItemDoubleClick(self, tQListWidgetItem):
|
||||
self.listItemClick(tQListWidgetItem)
|
||||
self.validate()
|
146
labelImg-master/libs/labelFile.py
Normal file
@ -0,0 +1,146 @@
|
||||
# Copyright (c) 2016 Tzutalin
|
||||
# Create by TzuTaLin <tzu.ta.lin@gmail.com>
|
||||
|
||||
try:
|
||||
from PyQt5.QtGui import QImage
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import QImage
|
||||
|
||||
from base64 import b64encode, b64decode
|
||||
from libs.pascal_voc_io import PascalVocWriter
|
||||
from libs.yolo_io import YOLOWriter
|
||||
from libs.pascal_voc_io import XML_EXT
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
|
||||
class LabelFileError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class LabelFile(object):
|
||||
# It might be changed as window creates. By default, using XML ext
|
||||
# suffix = '.lif'
|
||||
suffix = XML_EXT
|
||||
|
||||
def __init__(self, filename=None):
|
||||
self.shapes = ()
|
||||
self.imagePath = None
|
||||
self.imageData = None
|
||||
self.verified = False
|
||||
|
||||
def savePascalVocFormat(self, filename, shapes, imagePath, imageData,
|
||||
lineColor=None, fillColor=None, databaseSrc=None):
|
||||
imgFolderPath = os.path.dirname(imagePath)
|
||||
imgFolderName = os.path.split(imgFolderPath)[-1]
|
||||
imgFileName = os.path.basename(imagePath)
|
||||
#imgFileNameWithoutExt = os.path.splitext(imgFileName)[0]
|
||||
# Read from file path because self.imageData might be empty if saving to
|
||||
# Pascal format
|
||||
image = QImage()
|
||||
image.load(imagePath)
|
||||
imageShape = [image.height(), image.width(),
|
||||
1 if image.isGrayscale() else 3]
|
||||
writer = PascalVocWriter(imgFolderName, imgFileName,
|
||||
imageShape, localImgPath=imagePath)
|
||||
writer.verified = self.verified
|
||||
|
||||
for shape in shapes:
|
||||
points = shape['points']
|
||||
label = shape['label']
|
||||
# Add Chris
|
||||
difficult = int(shape['difficult'])
|
||||
bndbox = LabelFile.convertPoints2BndBox(points)
|
||||
writer.addBndBox(bndbox[0], bndbox[1], bndbox[2], bndbox[3], label, difficult)
|
||||
|
||||
writer.save(targetFile=filename)
|
||||
return
|
||||
|
||||
def saveYoloFormat(self, filename, shapes, imagePath, imageData, classList,
|
||||
lineColor=None, fillColor=None, databaseSrc=None):
|
||||
imgFolderPath = os.path.dirname(imagePath)
|
||||
imgFolderName = os.path.split(imgFolderPath)[-1]
|
||||
imgFileName = os.path.basename(imagePath)
|
||||
#imgFileNameWithoutExt = os.path.splitext(imgFileName)[0]
|
||||
# Read from file path because self.imageData might be empty if saving to
|
||||
# Pascal format
|
||||
image = QImage()
|
||||
image.load(imagePath)
|
||||
imageShape = [image.height(), image.width(),
|
||||
1 if image.isGrayscale() else 3]
|
||||
writer = YOLOWriter(imgFolderName, imgFileName,
|
||||
imageShape, localImgPath=imagePath)
|
||||
writer.verified = self.verified
|
||||
|
||||
for shape in shapes:
|
||||
points = shape['points']
|
||||
label = shape['label']
|
||||
# Add Chris
|
||||
difficult = int(shape['difficult'])
|
||||
bndbox = LabelFile.convertPoints2BndBox(points)
|
||||
writer.addBndBox(bndbox[0], bndbox[1], bndbox[2], bndbox[3], label, difficult)
|
||||
|
||||
writer.save(targetFile=filename, classList=classList)
|
||||
return
|
||||
|
||||
def toggleVerify(self):
|
||||
self.verified = not self.verified
|
||||
|
||||
''' ttf is disable
|
||||
def load(self, filename):
|
||||
import json
|
||||
with open(filename, 'rb') as f:
|
||||
data = json.load(f)
|
||||
imagePath = data['imagePath']
|
||||
imageData = b64decode(data['imageData'])
|
||||
lineColor = data['lineColor']
|
||||
fillColor = data['fillColor']
|
||||
shapes = ((s['label'], s['points'], s['line_color'], s['fill_color'])\
|
||||
for s in data['shapes'])
|
||||
# Only replace data after everything is loaded.
|
||||
self.shapes = shapes
|
||||
self.imagePath = imagePath
|
||||
self.imageData = imageData
|
||||
self.lineColor = lineColor
|
||||
self.fillColor = fillColor
|
||||
|
||||
def save(self, filename, shapes, imagePath, imageData, lineColor=None, fillColor=None):
|
||||
import json
|
||||
with open(filename, 'wb') as f:
|
||||
json.dump(dict(
|
||||
shapes=shapes,
|
||||
lineColor=lineColor, fillColor=fillColor,
|
||||
imagePath=imagePath,
|
||||
imageData=b64encode(imageData)),
|
||||
f, ensure_ascii=True, indent=2)
|
||||
'''
|
||||
|
||||
@staticmethod
|
||||
def isLabelFile(filename):
|
||||
fileSuffix = os.path.splitext(filename)[1].lower()
|
||||
return fileSuffix == LabelFile.suffix
|
||||
|
||||
@staticmethod
|
||||
def convertPoints2BndBox(points):
|
||||
xmin = float('inf')
|
||||
ymin = float('inf')
|
||||
xmax = float('-inf')
|
||||
ymax = float('-inf')
|
||||
for p in points:
|
||||
x = p[0]
|
||||
y = p[1]
|
||||
xmin = min(x, xmin)
|
||||
ymin = min(y, ymin)
|
||||
xmax = max(x, xmax)
|
||||
ymax = max(y, ymax)
|
||||
|
||||
# Martin Kersner, 2015/11/12
|
||||
# 0-valued coordinates of BB caused an error while
|
||||
# training faster-rcnn object detector.
|
||||
if xmin < 1:
|
||||
xmin = 1
|
||||
|
||||
if ymin < 1:
|
||||
ymin = 1
|
||||
|
||||
return (int(xmin), int(ymin), int(xmax), int(ymax))
|
171
labelImg-master/libs/pascal_voc_io.py
Normal file
@ -0,0 +1,171 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
import sys
|
||||
from xml.etree import ElementTree
|
||||
from xml.etree.ElementTree import Element, SubElement
|
||||
from lxml import etree
|
||||
import codecs
|
||||
from libs.constants import DEFAULT_ENCODING
|
||||
from libs.ustr import ustr
|
||||
|
||||
|
||||
XML_EXT = '.xml'
|
||||
ENCODE_METHOD = DEFAULT_ENCODING
|
||||
|
||||
class PascalVocWriter:
|
||||
|
||||
def __init__(self, foldername, filename, imgSize,databaseSrc='Unknown', localImgPath=None):
|
||||
self.foldername = foldername
|
||||
self.filename = filename
|
||||
self.databaseSrc = databaseSrc
|
||||
self.imgSize = imgSize
|
||||
self.boxlist = []
|
||||
self.localImgPath = localImgPath
|
||||
self.verified = False
|
||||
|
||||
def prettify(self, elem):
|
||||
"""
|
||||
Return a pretty-printed XML string for the Element.
|
||||
"""
|
||||
rough_string = ElementTree.tostring(elem, 'utf8')
|
||||
root = etree.fromstring(rough_string)
|
||||
return etree.tostring(root, pretty_print=True, encoding=ENCODE_METHOD).replace(" ".encode(), "\t".encode())
|
||||
# minidom does not support UTF-8
|
||||
'''reparsed = minidom.parseString(rough_string)
|
||||
return reparsed.toprettyxml(indent="\t", encoding=ENCODE_METHOD)'''
|
||||
|
||||
def genXML(self):
|
||||
"""
|
||||
Return XML root
|
||||
"""
|
||||
# Check conditions
|
||||
if self.filename is None or \
|
||||
self.foldername is None or \
|
||||
self.imgSize is None:
|
||||
return None
|
||||
|
||||
top = Element('annotation')
|
||||
if self.verified:
|
||||
top.set('verified', 'yes')
|
||||
|
||||
folder = SubElement(top, 'folder')
|
||||
folder.text = self.foldername
|
||||
|
||||
filename = SubElement(top, 'filename')
|
||||
filename.text = self.filename
|
||||
|
||||
if self.localImgPath is not None:
|
||||
localImgPath = SubElement(top, 'path')
|
||||
localImgPath.text = self.localImgPath
|
||||
|
||||
source = SubElement(top, 'source')
|
||||
database = SubElement(source, 'database')
|
||||
database.text = self.databaseSrc
|
||||
|
||||
size_part = SubElement(top, 'size')
|
||||
width = SubElement(size_part, 'width')
|
||||
height = SubElement(size_part, 'height')
|
||||
depth = SubElement(size_part, 'depth')
|
||||
width.text = str(self.imgSize[1])
|
||||
height.text = str(self.imgSize[0])
|
||||
if len(self.imgSize) == 3:
|
||||
depth.text = str(self.imgSize[2])
|
||||
else:
|
||||
depth.text = '1'
|
||||
|
||||
segmented = SubElement(top, 'segmented')
|
||||
segmented.text = '0'
|
||||
return top
|
||||
|
||||
def addBndBox(self, xmin, ymin, xmax, ymax, name, difficult):
|
||||
bndbox = {'xmin': xmin, 'ymin': ymin, 'xmax': xmax, 'ymax': ymax}
|
||||
bndbox['name'] = name
|
||||
bndbox['difficult'] = difficult
|
||||
self.boxlist.append(bndbox)
|
||||
|
||||
def appendObjects(self, top):
|
||||
for each_object in self.boxlist:
|
||||
object_item = SubElement(top, 'object')
|
||||
name = SubElement(object_item, 'name')
|
||||
name.text = ustr(each_object['name'])
|
||||
pose = SubElement(object_item, 'pose')
|
||||
pose.text = "Unspecified"
|
||||
truncated = SubElement(object_item, 'truncated')
|
||||
if int(float(each_object['ymax'])) == int(float(self.imgSize[0])) or (int(float(each_object['ymin']))== 1):
|
||||
truncated.text = "1" # max == height or min
|
||||
elif (int(float(each_object['xmax']))==int(float(self.imgSize[1]))) or (int(float(each_object['xmin']))== 1):
|
||||
truncated.text = "1" # max == width or min
|
||||
else:
|
||||
truncated.text = "0"
|
||||
difficult = SubElement(object_item, 'difficult')
|
||||
difficult.text = str( bool(each_object['difficult']) & 1 )
|
||||
bndbox = SubElement(object_item, 'bndbox')
|
||||
xmin = SubElement(bndbox, 'xmin')
|
||||
xmin.text = str(each_object['xmin'])
|
||||
ymin = SubElement(bndbox, 'ymin')
|
||||
ymin.text = str(each_object['ymin'])
|
||||
xmax = SubElement(bndbox, 'xmax')
|
||||
xmax.text = str(each_object['xmax'])
|
||||
ymax = SubElement(bndbox, 'ymax')
|
||||
ymax.text = str(each_object['ymax'])
|
||||
|
||||
def save(self, targetFile=None):
|
||||
root = self.genXML()
|
||||
self.appendObjects(root)
|
||||
out_file = None
|
||||
if targetFile is None:
|
||||
out_file = codecs.open(
|
||||
self.filename + XML_EXT, 'w', encoding=ENCODE_METHOD)
|
||||
else:
|
||||
out_file = codecs.open(targetFile, 'w', encoding=ENCODE_METHOD)
|
||||
|
||||
prettifyResult = self.prettify(root)
|
||||
out_file.write(prettifyResult.decode('utf8'))
|
||||
out_file.close()
|
||||
|
||||
|
||||
class PascalVocReader:
|
||||
|
||||
def __init__(self, filepath):
|
||||
# shapes type:
|
||||
# [labbel, [(x1,y1), (x2,y2), (x3,y3), (x4,y4)], color, color, difficult]
|
||||
self.shapes = []
|
||||
self.filepath = filepath
|
||||
self.verified = False
|
||||
try:
|
||||
self.parseXML()
|
||||
except:
|
||||
pass
|
||||
|
||||
def getShapes(self):
|
||||
return self.shapes
|
||||
|
||||
def addShape(self, label, bndbox, difficult):
|
||||
xmin = int(float(bndbox.find('xmin').text))
|
||||
ymin = int(float(bndbox.find('ymin').text))
|
||||
xmax = int(float(bndbox.find('xmax').text))
|
||||
ymax = int(float(bndbox.find('ymax').text))
|
||||
points = [(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax)]
|
||||
self.shapes.append((label, points, None, None, difficult))
|
||||
|
||||
def parseXML(self):
|
||||
assert self.filepath.endswith(XML_EXT), "Unsupport file format"
|
||||
parser = etree.XMLParser(encoding=ENCODE_METHOD)
|
||||
xmltree = ElementTree.parse(self.filepath, parser=parser).getroot()
|
||||
filename = xmltree.find('filename').text
|
||||
try:
|
||||
verified = xmltree.attrib['verified']
|
||||
if verified == 'yes':
|
||||
self.verified = True
|
||||
except KeyError:
|
||||
self.verified = False
|
||||
|
||||
for object_iter in xmltree.findall('object'):
|
||||
bndbox = object_iter.find("bndbox")
|
||||
label = object_iter.find('name').text
|
||||
# Add chris
|
||||
difficult = False
|
||||
if object_iter.find('difficult') is not None:
|
||||
difficult = bool(int(object_iter.find('difficult').text))
|
||||
self.addShape(label, bndbox, difficult)
|
||||
return True
|
38
labelImg-master/libs/resources.qrc
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
|
||||
<file alias="help">resources/icons/help.png</file>
|
||||
<file alias="app">resources/icons/app.png</file>
|
||||
<file alias="expert">resources/icons/expert2.png</file>
|
||||
<file alias="done">resources/icons/done.png</file>
|
||||
<file alias="file">resources/icons/file.png</file>
|
||||
<file alias="labels">resources/icons/labels.png</file>
|
||||
<file alias="new">resources/icons/objects.png</file>
|
||||
<file alias="close">resources/icons/close.png</file>
|
||||
<file alias="fit-width">resources/icons/fit-width.png</file>
|
||||
<file alias="fit-window">resources/icons/fit-window.png</file>
|
||||
<file alias="undo">resources/icons/undo.png</file>
|
||||
<file alias="hide">resources/icons/eye.png</file>
|
||||
<file alias="quit">resources/icons/quit.png</file>
|
||||
<file alias="copy">resources/icons/copy.png</file>
|
||||
<file alias="edit">resources/icons/edit.png</file>
|
||||
<file alias="open">resources/icons/open.png</file>
|
||||
<file alias="save">resources/icons/save.png</file>
|
||||
<file alias="format_voc">resources/icons/format_voc.png</file>
|
||||
<file alias="format_yolo">resources/icons/format_yolo.png</file>
|
||||
<file alias="save-as">resources/icons/save-as.png</file>
|
||||
<file alias="color">resources/icons/color.png</file>
|
||||
<file alias="color_line">resources/icons/color_line.png</file>
|
||||
<file alias="zoom">resources/icons/zoom.png</file>
|
||||
<file alias="zoom-in">resources/icons/zoom-in.png</file>
|
||||
<file alias="zoom-out">resources/icons/zoom-out.png</file>
|
||||
<file alias="delete">resources/icons/cancel.png</file>
|
||||
<file alias="next">resources/icons/next.png</file>
|
||||
<file alias="prev">resources/icons/prev.png</file>
|
||||
<file alias="resetall">resources/icons/resetall.png</file>
|
||||
<file alias="verify">resources/icons/verify.png</file>
|
||||
<file alias="strings">resources/strings/strings.properties</file>
|
||||
<file alias="strings-zh-TW">resources/strings/strings-zh-TW.properties</file>
|
||||
<file alias="strings-zh-CN">resources/strings/strings-zh-CN.properties</file>
|
||||
</qresource>
|
||||
</RCC>
|
46
labelImg-master/libs/settings.py
Normal file
@ -0,0 +1,46 @@
|
||||
import pickle
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
class Settings(object):
|
||||
def __init__(self):
|
||||
# Be default, the home will be in the same folder as labelImg
|
||||
home = os.path.expanduser("~")
|
||||
self.data = {}
|
||||
self.path = os.path.join(home, '.labelImgSettings.pkl')
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
self.data[key] = value
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self.data[key]
|
||||
|
||||
def get(self, key, default=None):
|
||||
if key in self.data:
|
||||
return self.data[key]
|
||||
return default
|
||||
|
||||
def save(self):
|
||||
if self.path:
|
||||
with open(self.path, 'wb') as f:
|
||||
pickle.dump(self.data, f, pickle.HIGHEST_PROTOCOL)
|
||||
return True
|
||||
return False
|
||||
|
||||
def load(self):
|
||||
try:
|
||||
if os.path.exists(self.path):
|
||||
with open(self.path, 'rb') as f:
|
||||
self.data = pickle.load(f)
|
||||
return True
|
||||
except:
|
||||
print('Loading setting failed')
|
||||
return False
|
||||
|
||||
def reset(self):
|
||||
if os.path.exists(self.path):
|
||||
os.remove(self.path)
|
||||
print('Remove setting pkl file ${0}'.format(self.path))
|
||||
self.data = {}
|
||||
self.path = None
|
205
labelImg-master/libs/shape.py
Normal file
@ -0,0 +1,205 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
from libs.utils import distance
|
||||
import sys
|
||||
|
||||
DEFAULT_LINE_COLOR = QColor(0, 255, 0, 128)
|
||||
DEFAULT_FILL_COLOR = QColor(255, 0, 0, 128)
|
||||
DEFAULT_SELECT_LINE_COLOR = QColor(255, 255, 255)
|
||||
DEFAULT_SELECT_FILL_COLOR = QColor(0, 128, 255, 155)
|
||||
DEFAULT_VERTEX_FILL_COLOR = QColor(0, 255, 0, 255)
|
||||
DEFAULT_HVERTEX_FILL_COLOR = QColor(255, 0, 0)
|
||||
MIN_Y_LABEL = 10
|
||||
|
||||
|
||||
class Shape(object):
|
||||
P_SQUARE, P_ROUND = range(2)
|
||||
|
||||
MOVE_VERTEX, NEAR_VERTEX = range(2)
|
||||
|
||||
# The following class variables influence the drawing
|
||||
# of _all_ shape objects.
|
||||
line_color = DEFAULT_LINE_COLOR
|
||||
fill_color = DEFAULT_FILL_COLOR
|
||||
select_line_color = DEFAULT_SELECT_LINE_COLOR
|
||||
select_fill_color = DEFAULT_SELECT_FILL_COLOR
|
||||
vertex_fill_color = DEFAULT_VERTEX_FILL_COLOR
|
||||
hvertex_fill_color = DEFAULT_HVERTEX_FILL_COLOR
|
||||
point_type = P_ROUND
|
||||
point_size = 8
|
||||
scale = 1.0
|
||||
|
||||
def __init__(self, label=None, line_color=None, difficult=False, paintLabel=False):
|
||||
self.label = label
|
||||
self.points = []
|
||||
self.fill = False
|
||||
self.selected = False
|
||||
self.difficult = difficult
|
||||
self.paintLabel = paintLabel
|
||||
|
||||
self._highlightIndex = None
|
||||
self._highlightMode = self.NEAR_VERTEX
|
||||
self._highlightSettings = {
|
||||
self.NEAR_VERTEX: (4, self.P_ROUND),
|
||||
self.MOVE_VERTEX: (1.5, self.P_SQUARE),
|
||||
}
|
||||
|
||||
self._closed = False
|
||||
|
||||
if line_color is not None:
|
||||
# Override the class line_color attribute
|
||||
# with an object attribute. Currently this
|
||||
# is used for drawing the pending line a different color.
|
||||
self.line_color = line_color
|
||||
|
||||
def close(self):
|
||||
self._closed = True
|
||||
|
||||
def reachMaxPoints(self):
|
||||
if len(self.points) >= 4:
|
||||
return True
|
||||
return False
|
||||
|
||||
def addPoint(self, point):
|
||||
if not self.reachMaxPoints():
|
||||
self.points.append(point)
|
||||
|
||||
def popPoint(self):
|
||||
if self.points:
|
||||
return self.points.pop()
|
||||
return None
|
||||
|
||||
def isClosed(self):
|
||||
return self._closed
|
||||
|
||||
def setOpen(self):
|
||||
self._closed = False
|
||||
|
||||
def paint(self, painter):
|
||||
if self.points:
|
||||
color = self.select_line_color if self.selected else self.line_color
|
||||
pen = QPen(color)
|
||||
# Try using integer sizes for smoother drawing(?)
|
||||
pen.setWidth(max(1, int(round(2.0 / self.scale))))
|
||||
painter.setPen(pen)
|
||||
|
||||
line_path = QPainterPath()
|
||||
vrtx_path = QPainterPath()
|
||||
|
||||
line_path.moveTo(self.points[0])
|
||||
# Uncommenting the following line will draw 2 paths
|
||||
# for the 1st vertex, and make it non-filled, which
|
||||
# may be desirable.
|
||||
#self.drawVertex(vrtx_path, 0)
|
||||
|
||||
for i, p in enumerate(self.points):
|
||||
line_path.lineTo(p)
|
||||
self.drawVertex(vrtx_path, i)
|
||||
if self.isClosed():
|
||||
line_path.lineTo(self.points[0])
|
||||
|
||||
painter.drawPath(line_path)
|
||||
painter.drawPath(vrtx_path)
|
||||
painter.fillPath(vrtx_path, self.vertex_fill_color)
|
||||
|
||||
# Draw text at the top-left
|
||||
if self.paintLabel:
|
||||
min_x = sys.maxsize
|
||||
min_y = sys.maxsize
|
||||
for point in self.points:
|
||||
min_x = min(min_x, point.x())
|
||||
min_y = min(min_y, point.y())
|
||||
if min_x != sys.maxsize and min_y != sys.maxsize:
|
||||
font = QFont()
|
||||
font.setPointSize(8)
|
||||
font.setBold(True)
|
||||
painter.setFont(font)
|
||||
if(self.label == None):
|
||||
self.label = ""
|
||||
if(min_y < MIN_Y_LABEL):
|
||||
min_y += MIN_Y_LABEL
|
||||
painter.drawText(min_x, min_y, self.label)
|
||||
|
||||
if self.fill:
|
||||
color = self.select_fill_color if self.selected else self.fill_color
|
||||
painter.fillPath(line_path, color)
|
||||
|
||||
def drawVertex(self, path, i):
|
||||
d = self.point_size / self.scale
|
||||
shape = self.point_type
|
||||
point = self.points[i]
|
||||
if i == self._highlightIndex:
|
||||
size, shape = self._highlightSettings[self._highlightMode]
|
||||
d *= size
|
||||
if self._highlightIndex is not None:
|
||||
self.vertex_fill_color = self.hvertex_fill_color
|
||||
else:
|
||||
self.vertex_fill_color = Shape.vertex_fill_color
|
||||
if shape == self.P_SQUARE:
|
||||
path.addRect(point.x() - d / 2, point.y() - d / 2, d, d)
|
||||
elif shape == self.P_ROUND:
|
||||
path.addEllipse(point, d / 2.0, d / 2.0)
|
||||
else:
|
||||
assert False, "unsupported vertex shape"
|
||||
|
||||
def nearestVertex(self, point, epsilon):
|
||||
for i, p in enumerate(self.points):
|
||||
if distance(p - point) <= epsilon:
|
||||
return i
|
||||
return None
|
||||
|
||||
def containsPoint(self, point):
|
||||
return self.makePath().contains(point)
|
||||
|
||||
def makePath(self):
|
||||
path = QPainterPath(self.points[0])
|
||||
for p in self.points[1:]:
|
||||
path.lineTo(p)
|
||||
return path
|
||||
|
||||
def boundingRect(self):
|
||||
return self.makePath().boundingRect()
|
||||
|
||||
def moveBy(self, offset):
|
||||
self.points = [p + offset for p in self.points]
|
||||
|
||||
def moveVertexBy(self, i, offset):
|
||||
self.points[i] = self.points[i] + offset
|
||||
|
||||
def highlightVertex(self, i, action):
|
||||
self._highlightIndex = i
|
||||
self._highlightMode = action
|
||||
|
||||
def highlightClear(self):
|
||||
self._highlightIndex = None
|
||||
|
||||
def copy(self):
|
||||
shape = Shape("%s" % self.label)
|
||||
shape.points = [p for p in self.points]
|
||||
shape.fill = self.fill
|
||||
shape.selected = self.selected
|
||||
shape._closed = self._closed
|
||||
if self.line_color != Shape.line_color:
|
||||
shape.line_color = self.line_color
|
||||
if self.fill_color != Shape.fill_color:
|
||||
shape.fill_color = self.fill_color
|
||||
shape.difficult = self.difficult
|
||||
return shape
|
||||
|
||||
def __len__(self):
|
||||
return len(self.points)
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self.points[key]
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
self.points[key] = value
|
73
labelImg-master/libs/stringBundle.py
Normal file
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
import locale
|
||||
from libs.ustr import ustr
|
||||
|
||||
try:
|
||||
from PyQt5.QtCore import *
|
||||
except ImportError:
|
||||
if sys.version_info.major >= 3:
|
||||
import sip
|
||||
sip.setapi('QVariant', 2)
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
|
||||
class StringBundle:
|
||||
|
||||
__create_key = object()
|
||||
|
||||
def __init__(self, create_key, localeStr):
|
||||
assert(create_key == StringBundle.__create_key), "StringBundle must be created using StringBundle.getBundle"
|
||||
self.idToMessage = {}
|
||||
paths = self.__createLookupFallbackList(localeStr)
|
||||
for path in paths:
|
||||
self.__loadBundle(path)
|
||||
|
||||
@classmethod
|
||||
def getBundle(cls, localeStr=None):
|
||||
if localeStr is None:
|
||||
try:
|
||||
localeStr = locale.getlocale()[0] if locale.getlocale() and len(
|
||||
locale.getlocale()) > 0 else os.getenv('LANG')
|
||||
except:
|
||||
print('Invalid locale')
|
||||
localeStr = 'en'
|
||||
|
||||
return StringBundle(cls.__create_key, localeStr)
|
||||
|
||||
def getString(self, stringId):
|
||||
assert(stringId in self.idToMessage), "Missing string id : " + stringId
|
||||
return self.idToMessage[stringId]
|
||||
|
||||
def __createLookupFallbackList(self, localeStr):
|
||||
resultPaths = []
|
||||
basePath = ":/strings"
|
||||
resultPaths.append(basePath)
|
||||
if localeStr is not None:
|
||||
# Don't follow standard BCP47. Simple fallback
|
||||
tags = re.split('[^a-zA-Z]', localeStr)
|
||||
for tag in tags:
|
||||
lastPath = resultPaths[-1]
|
||||
resultPaths.append(lastPath + '-' + tag)
|
||||
|
||||
return resultPaths
|
||||
|
||||
def __loadBundle(self, path):
|
||||
PROP_SEPERATOR = '='
|
||||
f = QFile(path)
|
||||
if f.exists():
|
||||
if f.open(QIODevice.ReadOnly | QFile.Text):
|
||||
text = QTextStream(f)
|
||||
text.setCodec("UTF-8")
|
||||
|
||||
while not text.atEnd():
|
||||
line = ustr(text.readLine())
|
||||
key_value = line.split(PROP_SEPERATOR)
|
||||
key = key_value[0].strip()
|
||||
value = PROP_SEPERATOR.join(key_value[1:]).strip().strip('"')
|
||||
self.idToMessage[key] = value
|
||||
|
||||
f.close()
|
39
labelImg-master/libs/toolBar.py
Normal file
@ -0,0 +1,39 @@
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
|
||||
class ToolBar(QToolBar):
|
||||
|
||||
def __init__(self, title):
|
||||
super(ToolBar, self).__init__(title)
|
||||
layout = self.layout()
|
||||
m = (0, 0, 0, 0)
|
||||
layout.setSpacing(0)
|
||||
layout.setContentsMargins(*m)
|
||||
self.setContentsMargins(*m)
|
||||
self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
|
||||
|
||||
def addAction(self, action):
|
||||
if isinstance(action, QWidgetAction):
|
||||
return super(ToolBar, self).addAction(action)
|
||||
btn = ToolButton()
|
||||
btn.setDefaultAction(action)
|
||||
btn.setToolButtonStyle(self.toolButtonStyle())
|
||||
self.addWidget(btn)
|
||||
|
||||
|
||||
class ToolButton(QToolButton):
|
||||
"""ToolBar companion class which ensures all buttons have the same size."""
|
||||
minSize = (60, 60)
|
||||
|
||||
def minimumSizeHint(self):
|
||||
ms = super(ToolButton, self).minimumSizeHint()
|
||||
w1, h1 = ms.width(), ms.height()
|
||||
w2, h2 = self.minSize
|
||||
ToolButton.minSize = max(w1, w2), max(h1, h2)
|
||||
return QSize(*ToolButton.minSize)
|
17
labelImg-master/libs/ustr.py
Normal file
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
from libs.constants import DEFAULT_ENCODING
|
||||
|
||||
def ustr(x):
|
||||
'''py2/py3 unicode helper'''
|
||||
|
||||
if sys.version_info < (3, 0, 0):
|
||||
from PyQt4.QtCore import QString
|
||||
if type(x) == str:
|
||||
return x.decode(DEFAULT_ENCODING)
|
||||
if type(x) == QString:
|
||||
#https://blog.csdn.net/friendan/article/details/51088476
|
||||
#https://blog.csdn.net/xxm524/article/details/74937308
|
||||
return unicode(x.toUtf8(), DEFAULT_ENCODING, 'ignore')
|
||||
return x
|
||||
else:
|
||||
return x
|
103
labelImg-master/libs/utils.py
Normal file
@ -0,0 +1,103 @@
|
||||
from math import sqrt
|
||||
from libs.ustr import ustr
|
||||
import hashlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
|
||||
def newIcon(icon):
|
||||
return QIcon(':/' + icon)
|
||||
|
||||
|
||||
def newButton(text, icon=None, slot=None):
|
||||
b = QPushButton(text)
|
||||
if icon is not None:
|
||||
b.setIcon(newIcon(icon))
|
||||
if slot is not None:
|
||||
b.clicked.connect(slot)
|
||||
return b
|
||||
|
||||
|
||||
def newAction(parent, text, slot=None, shortcut=None, icon=None,
|
||||
tip=None, checkable=False, enabled=True):
|
||||
"""Create a new action and assign callbacks, shortcuts, etc."""
|
||||
a = QAction(text, parent)
|
||||
if icon is not None:
|
||||
a.setIcon(newIcon(icon))
|
||||
if shortcut is not None:
|
||||
if isinstance(shortcut, (list, tuple)):
|
||||
a.setShortcuts(shortcut)
|
||||
else:
|
||||
a.setShortcut(shortcut)
|
||||
if tip is not None:
|
||||
a.setToolTip(tip)
|
||||
a.setStatusTip(tip)
|
||||
if slot is not None:
|
||||
a.triggered.connect(slot)
|
||||
if checkable:
|
||||
a.setCheckable(True)
|
||||
a.setEnabled(enabled)
|
||||
return a
|
||||
|
||||
|
||||
def addActions(widget, actions):
|
||||
for action in actions:
|
||||
if action is None:
|
||||
widget.addSeparator()
|
||||
elif isinstance(action, QMenu):
|
||||
widget.addMenu(action)
|
||||
else:
|
||||
widget.addAction(action)
|
||||
|
||||
|
||||
def labelValidator():
|
||||
return QRegExpValidator(QRegExp(r'^[^ \t].+'), None)
|
||||
|
||||
|
||||
class struct(object):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.__dict__.update(kwargs)
|
||||
|
||||
|
||||
def distance(p):
|
||||
return sqrt(p.x() * p.x() + p.y() * p.y())
|
||||
|
||||
|
||||
def fmtShortcut(text):
|
||||
mod, key = text.split('+', 1)
|
||||
return '<b>%s</b>+<b>%s</b>' % (mod, key)
|
||||
|
||||
|
||||
def generateColorByText(text):
|
||||
s = ustr(text)
|
||||
hashCode = int(hashlib.sha256(s.encode('utf-8')).hexdigest(), 16)
|
||||
r = int((hashCode / 255) % 255)
|
||||
g = int((hashCode / 65025) % 255)
|
||||
b = int((hashCode / 16581375) % 255)
|
||||
return QColor(r, g, b, 100)
|
||||
|
||||
def have_qstring():
|
||||
'''p3/qt5 get rid of QString wrapper as py3 has native unicode str type'''
|
||||
return not (sys.version_info.major >= 3 or QT_VERSION_STR.startswith('5.'))
|
||||
|
||||
def util_qt_strlistclass():
|
||||
return QStringList if have_qstring() else list
|
||||
|
||||
def natural_sort(list, key=lambda s:s):
|
||||
"""
|
||||
Sort the list into natural alphanumeric order.
|
||||
"""
|
||||
def get_alphanum_key_func(key):
|
||||
convert = lambda text: int(text) if text.isdigit() else text
|
||||
return lambda s: [convert(c) for c in re.split('([0-9]+)', key(s))]
|
||||
sort_key = get_alphanum_key_func(key)
|
||||
list.sort(key=sort_key)
|
146
labelImg-master/libs/yolo_io.py
Normal file
@ -0,0 +1,146 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf8 -*-
|
||||
import sys
|
||||
import os
|
||||
from xml.etree import ElementTree
|
||||
from xml.etree.ElementTree import Element, SubElement
|
||||
from lxml import etree
|
||||
import codecs
|
||||
from libs.constants import DEFAULT_ENCODING
|
||||
|
||||
TXT_EXT = '.txt'
|
||||
ENCODE_METHOD = DEFAULT_ENCODING
|
||||
|
||||
class YOLOWriter:
|
||||
|
||||
def __init__(self, foldername, filename, imgSize, databaseSrc='Unknown', localImgPath=None):
|
||||
self.foldername = foldername
|
||||
self.filename = filename
|
||||
self.databaseSrc = databaseSrc
|
||||
self.imgSize = imgSize
|
||||
self.boxlist = []
|
||||
self.localImgPath = localImgPath
|
||||
self.verified = False
|
||||
|
||||
def addBndBox(self, xmin, ymin, xmax, ymax, name, difficult):
|
||||
bndbox = {'xmin': xmin, 'ymin': ymin, 'xmax': xmax, 'ymax': ymax}
|
||||
bndbox['name'] = name
|
||||
bndbox['difficult'] = difficult
|
||||
self.boxlist.append(bndbox)
|
||||
|
||||
def BndBox2YoloLine(self, box, classList=[]):
|
||||
xmin = box['xmin']
|
||||
xmax = box['xmax']
|
||||
ymin = box['ymin']
|
||||
ymax = box['ymax']
|
||||
|
||||
xcen = float((xmin + xmax)) / 2 / self.imgSize[1]
|
||||
ycen = float((ymin + ymax)) / 2 / self.imgSize[0]
|
||||
|
||||
w = float((xmax - xmin)) / self.imgSize[1]
|
||||
h = float((ymax - ymin)) / self.imgSize[0]
|
||||
|
||||
# PR387
|
||||
boxName = box['name']
|
||||
if boxName not in classList:
|
||||
classList.append(boxName)
|
||||
|
||||
classIndex = classList.index(boxName)
|
||||
|
||||
return classIndex, xcen, ycen, w, h
|
||||
|
||||
def save(self, classList=[], targetFile=None):
|
||||
|
||||
out_file = None #Update yolo .txt
|
||||
out_class_file = None #Update class list .txt
|
||||
|
||||
if targetFile is None:
|
||||
out_file = open(
|
||||
self.filename + TXT_EXT, 'w', encoding=ENCODE_METHOD)
|
||||
classesFile = os.path.join(os.path.dirname(os.path.abspath(self.filename)), "classes.txt")
|
||||
out_class_file = open(classesFile, 'w')
|
||||
|
||||
else:
|
||||
out_file = codecs.open(targetFile, 'w', encoding=ENCODE_METHOD)
|
||||
classesFile = os.path.join(os.path.dirname(os.path.abspath(targetFile)), "classes.txt")
|
||||
out_class_file = open(classesFile, 'w')
|
||||
|
||||
|
||||
for box in self.boxlist:
|
||||
classIndex, xcen, ycen, w, h = self.BndBox2YoloLine(box, classList)
|
||||
# print (classIndex, xcen, ycen, w, h)
|
||||
out_file.write("%d %.6f %.6f %.6f %.6f\n" % (classIndex, xcen, ycen, w, h))
|
||||
|
||||
# print (classList)
|
||||
# print (out_class_file)
|
||||
for c in classList:
|
||||
out_class_file.write(c+'\n')
|
||||
|
||||
out_class_file.close()
|
||||
out_file.close()
|
||||
|
||||
|
||||
|
||||
class YoloReader:
|
||||
|
||||
def __init__(self, filepath, image, classListPath=None):
|
||||
# shapes type:
|
||||
# [labbel, [(x1,y1), (x2,y2), (x3,y3), (x4,y4)], color, color, difficult]
|
||||
self.shapes = []
|
||||
self.filepath = filepath
|
||||
|
||||
if classListPath is None:
|
||||
dir_path = os.path.dirname(os.path.realpath(self.filepath))
|
||||
self.classListPath = os.path.join(dir_path, "classes.txt")
|
||||
else:
|
||||
self.classListPath = classListPath
|
||||
|
||||
# print (filepath, self.classListPath)
|
||||
|
||||
classesFile = open(self.classListPath, 'r')
|
||||
self.classes = classesFile.read().strip('\n').split('\n')
|
||||
|
||||
# print (self.classes)
|
||||
|
||||
imgSize = [image.height(), image.width(),
|
||||
1 if image.isGrayscale() else 3]
|
||||
|
||||
self.imgSize = imgSize
|
||||
|
||||
self.verified = False
|
||||
# try:
|
||||
self.parseYoloFormat()
|
||||
# except:
|
||||
# pass
|
||||
|
||||
def getShapes(self):
|
||||
return self.shapes
|
||||
|
||||
def addShape(self, label, xmin, ymin, xmax, ymax, difficult):
|
||||
|
||||
points = [(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax)]
|
||||
self.shapes.append((label, points, None, None, difficult))
|
||||
|
||||
def yoloLine2Shape(self, classIndex, xcen, ycen, w, h):
|
||||
label = self.classes[int(classIndex)]
|
||||
|
||||
xmin = max(float(xcen) - float(w) / 2, 0)
|
||||
xmax = min(float(xcen) + float(w) / 2, 1)
|
||||
ymin = max(float(ycen) - float(h) / 2, 0)
|
||||
ymax = min(float(ycen) + float(h) / 2, 1)
|
||||
|
||||
xmin = int(self.imgSize[1] * xmin)
|
||||
xmax = int(self.imgSize[1] * xmax)
|
||||
ymin = int(self.imgSize[0] * ymin)
|
||||
ymax = int(self.imgSize[0] * ymax)
|
||||
|
||||
return label, xmin, ymin, xmax, ymax
|
||||
|
||||
def parseYoloFormat(self):
|
||||
bndBoxFile = open(self.filepath, 'r')
|
||||
for bndBox in bndBoxFile:
|
||||
classIndex, xcen, ycen, w, h = bndBox.split(' ')
|
||||
label, xmin, ymin, xmax, ymax = self.yoloLine2Shape(classIndex, xcen, ycen, w, h)
|
||||
|
||||
# Caveat: difficult flag is discarded when saved as yolo format.
|
||||
self.addShape(label, xmin, ymin, xmax, ymax, False)
|
26
labelImg-master/libs/zoomWidget.py
Normal file
@ -0,0 +1,26 @@
|
||||
try:
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
except ImportError:
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
|
||||
|
||||
class ZoomWidget(QSpinBox):
|
||||
|
||||
def __init__(self, value=100):
|
||||
super(ZoomWidget, self).__init__()
|
||||
self.setButtonSymbols(QAbstractSpinBox.NoButtons)
|
||||
self.setRange(1, 500)
|
||||
self.setSuffix(' %')
|
||||
self.setValue(value)
|
||||
self.setToolTip(u'Zoom Level')
|
||||
self.setStatusTip(self.toolTip())
|
||||
self.setAlignment(Qt.AlignCenter)
|
||||
|
||||
def minimumSizeHint(self):
|
||||
height = super(ZoomWidget, self).minimumSizeHint().height()
|
||||
fm = QFontMetrics(self.font())
|
||||
width = fm.width(str(self.maximum()))
|
||||
return QSize(width, height)
|
@ -0,0 +1,2 @@
|
||||
pyqt5==5.10.1
|
||||
lxml==4.2.4
|
38
labelImg-master/resources.qrc
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
|
||||
<file alias="help">resources/icons/help.png</file>
|
||||
<file alias="app">resources/icons/app.png</file>
|
||||
<file alias="expert">resources/icons/expert2.png</file>
|
||||
<file alias="done">resources/icons/done.png</file>
|
||||
<file alias="file">resources/icons/file.png</file>
|
||||
<file alias="labels">resources/icons/labels.png</file>
|
||||
<file alias="new">resources/icons/objects.png</file>
|
||||
<file alias="close">resources/icons/close.png</file>
|
||||
<file alias="fit-width">resources/icons/fit-width.png</file>
|
||||
<file alias="fit-window">resources/icons/fit-window.png</file>
|
||||
<file alias="undo">resources/icons/undo.png</file>
|
||||
<file alias="hide">resources/icons/eye.png</file>
|
||||
<file alias="quit">resources/icons/quit.png</file>
|
||||
<file alias="copy">resources/icons/copy.png</file>
|
||||
<file alias="edit">resources/icons/edit.png</file>
|
||||
<file alias="open">resources/icons/open.png</file>
|
||||
<file alias="save">resources/icons/save.png</file>
|
||||
<file alias="format_voc">resources/icons/format_voc.png</file>
|
||||
<file alias="format_yolo">resources/icons/format_yolo.png</file>
|
||||
<file alias="save-as">resources/icons/save-as.png</file>
|
||||
<file alias="color">resources/icons/color.png</file>
|
||||
<file alias="color_line">resources/icons/color_line.png</file>
|
||||
<file alias="zoom">resources/icons/zoom.png</file>
|
||||
<file alias="zoom-in">resources/icons/zoom-in.png</file>
|
||||
<file alias="zoom-out">resources/icons/zoom-out.png</file>
|
||||
<file alias="delete">resources/icons/cancel.png</file>
|
||||
<file alias="next">resources/icons/next.png</file>
|
||||
<file alias="prev">resources/icons/prev.png</file>
|
||||
<file alias="resetall">resources/icons/resetall.png</file>
|
||||
<file alias="verify">resources/icons/verify.png</file>
|
||||
<file alias="strings">resources/strings/strings.properties</file>
|
||||
<file alias="strings-zh-TW">resources/strings/strings-zh-TW.properties</file>
|
||||
<file alias="strings-zh-CN">resources/strings/strings-zh-CN.properties</file>
|
||||
</qresource>
|
||||
</RCC>
|
BIN
labelImg-master/resources/icons/app.icns
Normal file
BIN
labelImg-master/resources/icons/app.png
Normal file
After Width: | Height: | Size: 31 KiB |
30
labelImg-master/resources/icons/app.svg
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="256.000000pt" height="256.000000pt" viewBox="0 0 256.000000 256.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.15, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,256.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M1410 1595 l0 -35 -107 -1 c-60 -1 -137 -4 -173 -8 l-65 -6 -6 -115
|
||||
c-4 -63 -7 -145 -8 -182 l-1 -68 -39 0 c-22 0 -43 -5 -46 -11 -4 -5 -4 -37 0
|
||||
-70 l7 -59 39 0 39 0 0 -188 c0 -133 4 -192 12 -200 8 -8 64 -12 185 -12 l173
|
||||
0 0 -30 0 -30 65 0 65 0 0 30 0 30 185 0 185 0 0 200 0 200 40 0 40 0 0 65 0
|
||||
65 -40 0 -40 0 -2 188 -3 187 -130 6 c-71 4 -151 7 -177 8 -48 1 -48 1 -48 36
|
||||
l0 35 -75 0 -75 0 0 -35z m10 -225 l5 -45 60 0 60 0 3 48 3 47 114 0 c135 0
|
||||
127 9 123 -145 l-3 -100 -37 -3 -38 -3 0 -64 0 -64 38 -3 37 -3 3 -105 c4
|
||||
-160 13 -150 -123 -150 l-115 0 0 50 0 50 -65 0 -65 0 0 -50 0 -50 -115 0
|
||||
-115 0 0 130 0 130 40 0 40 0 0 65 0 65 -40 0 -40 0 0 125 0 126 113 -3 112
|
||||
-3 5 -45z"/>
|
||||
<path d="M71 986 l-1 -330 32 45 c18 24 37 47 43 51 12 8 20 381 10 476 l-7
|
||||
62 -33 0 c-18 0 -36 6 -38 13 -3 6 -6 -136 -6 -317z"/>
|
||||
<path d="M284 1102 c-39 -3 -42 -5 -48 -40 -3 -20 -6 -151 -6 -291 l0 -255 24
|
||||
35 c14 19 39 52 55 75 l31 41 -1 154 c-1 85 -4 183 -8 219 l-6 65 -41 -3z"/>
|
||||
<path d="M415 959 c-3 -13 -4 -150 -3 -304 l3 -280 132 180 c73 99 138 187
|
||||
145 195 16 18 51 66 110 150 l45 65 -205 -3 c-155 -2 -207 0 -213 10 -5 8 -10
|
||||
4 -14 -13z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
BIN
labelImg-master/resources/icons/cancel.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
labelImg-master/resources/icons/close.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
labelImg-master/resources/icons/color.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
labelImg-master/resources/icons/color_line.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
labelImg-master/resources/icons/copy.png
Normal file
After Width: | Height: | Size: 646 B |
BIN
labelImg-master/resources/icons/delete.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
labelImg-master/resources/icons/done.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
400
labelImg-master/resources/icons/done.svg
Normal file
@ -0,0 +1,400 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
|
||||
<svg
|
||||
width="48pt"
|
||||
height="48pt"
|
||||
viewBox="0 0 256 256"
|
||||
style="overflow:visible;enable-background:new 0 0 256 256"
|
||||
xml:space="preserve"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xap="http://ns.adobe.com/xap/1.0/"
|
||||
xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
||||
xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/"
|
||||
xmlns:pdf="http://ns.adobe.com/pdf/1.3/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
|
||||
xmlns:x="adobe:ns:meta/"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
id="svg548"
|
||||
sodipodi:version="0.32"
|
||||
sodipodi:docname="/home/david/Desktop/action/button_ok.svg"
|
||||
sodipodi:docbase="/home/david/Desktop/action/">
|
||||
<defs
|
||||
id="defs584">
|
||||
<linearGradient
|
||||
id="XMLID_5_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="127.9536"
|
||||
y1="47.3267"
|
||||
x2="127.9536"
|
||||
y2="212.9885">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#009900"
|
||||
id="stop556" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#334966"
|
||||
id="stop557" />
|
||||
<a:midPointStop
|
||||
offset="0"
|
||||
style="stop-color:#009900"
|
||||
id="midPointStop558" />
|
||||
<a:midPointStop
|
||||
offset="0.5"
|
||||
style="stop-color:#009900"
|
||||
id="midPointStop559" />
|
||||
<a:midPointStop
|
||||
offset="1"
|
||||
style="stop-color:#334966"
|
||||
id="midPointStop560" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="XMLID_6_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="127.9536"
|
||||
y1="77.2075"
|
||||
x2="127.9536"
|
||||
y2="307.6057">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#33CC33"
|
||||
id="stop563" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#336666"
|
||||
id="stop564" />
|
||||
<a:midPointStop
|
||||
offset="0"
|
||||
style="stop-color:#33CC33"
|
||||
id="midPointStop565" />
|
||||
<a:midPointStop
|
||||
offset="0.5"
|
||||
style="stop-color:#33CC33"
|
||||
id="midPointStop566" />
|
||||
<a:midPointStop
|
||||
offset="1"
|
||||
style="stop-color:#336666"
|
||||
id="midPointStop567" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="XMLID_7_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="127.9536"
|
||||
y1="77.3672"
|
||||
x2="127.9536"
|
||||
y2="307.3626">
|
||||
<stop
|
||||
offset="0.0056"
|
||||
style="stop-color:#CCFF66"
|
||||
id="stop570" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#009900"
|
||||
id="stop571" />
|
||||
<a:midPointStop
|
||||
offset="0.0056"
|
||||
style="stop-color:#CCFF66"
|
||||
id="midPointStop572" />
|
||||
<a:midPointStop
|
||||
offset="0.5"
|
||||
style="stop-color:#CCFF66"
|
||||
id="midPointStop573" />
|
||||
<a:midPointStop
|
||||
offset="1"
|
||||
style="stop-color:#009900"
|
||||
id="midPointStop574" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
id="XMLID_8_"
|
||||
cx="54.2729"
|
||||
cy="89.3477"
|
||||
r="120.8132"
|
||||
fx="54.2729"
|
||||
fy="89.3477"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
offset="0.000000"
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
id="stop577" />
|
||||
<stop
|
||||
offset="1.000000"
|
||||
style="stop-color:#92ff00;stop-opacity:1;"
|
||||
id="stop578" />
|
||||
<a:midPointStop
|
||||
offset="0"
|
||||
style="stop-color:#FFFFFF"
|
||||
id="midPointStop579" />
|
||||
<a:midPointStop
|
||||
offset="0.5"
|
||||
style="stop-color:#FFFFFF"
|
||||
id="midPointStop580" />
|
||||
<a:midPointStop
|
||||
offset="1"
|
||||
style="stop-color:#000000"
|
||||
id="midPointStop581" />
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base" />
|
||||
<metadata
|
||||
id="metadata549">
|
||||
<xpacket>begin='' id='W5M0MpCehiHzreSzNTczkc9d' </xpacket>
|
||||
<x:xmpmeta
|
||||
x:xmptk="XMP toolkit 3.0-29, framework 1.6">
|
||||
<rdf:RDF>
|
||||
<rdf:Description
|
||||
rdf:about="uuid:609bc623-b01c-476b-9349-300763160df1">
|
||||
<pdf:Producer>
|
||||
Adobe PDF library 5.00</pdf:Producer>
|
||||
</rdf:Description>
|
||||
<rdf:Description
|
||||
rdf:about="uuid:609bc623-b01c-476b-9349-300763160df1" />
|
||||
<rdf:Description
|
||||
rdf:about="uuid:609bc623-b01c-476b-9349-300763160df1" />
|
||||
<rdf:Description
|
||||
rdf:about="uuid:609bc623-b01c-476b-9349-300763160df1">
|
||||
<xap:CreateDate>
|
||||
2003-12-22T22:34:35+02:00</xap:CreateDate>
|
||||
<xap:ModifyDate>
|
||||
2004-04-17T21:25:50Z</xap:ModifyDate>
|
||||
<xap:CreatorTool>
|
||||
Adobe Illustrator 10.0</xap:CreatorTool>
|
||||
<xap:MetadataDate>
|
||||
2004-01-19T17:51:02+01:00</xap:MetadataDate>
|
||||
<xap:Thumbnails>
|
||||
<rdf:Alt>
|
||||
<rdf:li
|
||||
rdf:parseType="Resource">
|
||||
<xapGImg:format>
|
||||
JPEG</xapGImg:format>
|
||||
<xapGImg:width>
|
||||
256</xapGImg:width>
|
||||
<xapGImg:height>
|
||||
256</xapGImg:height>
|
||||
<xapGImg:image>
|
||||
/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA
|
||||
AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK
|
||||
DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f
|
||||
Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgBAAEAAwER
|
||||
AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA
|
||||
AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB
|
||||
UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE
|
||||
1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ
|
||||
qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy
|
||||
obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp
|
||||
0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo
|
||||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FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FX
|
||||
Yq7FXYqpXNrb3MRiuIxJGexxVIG/L3yuZfUFsUJ6qjFR+GKp1YaVYWEfC0hWMUpUbmnzOKorFXYq
|
||||
7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7
|
||||
FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7F
|
||||
XYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FX
|
||||
Yq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXY
|
||||
q7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq7FXYq//Z</xapGImg:image>
|
||||
</rdf:li>
|
||||
</rdf:Alt>
|
||||
</xap:Thumbnails>
|
||||
</rdf:Description>
|
||||
<rdf:Description
|
||||
rdf:about="uuid:609bc623-b01c-476b-9349-300763160df1">
|
||||
<xapMM:DocumentID>
|
||||
uuid:4b4d592f-95b8-4bcd-a892-74a536c5e52f</xapMM:DocumentID>
|
||||
</rdf:Description>
|
||||
<rdf:Description
|
||||
rdf:about="uuid:609bc623-b01c-476b-9349-300763160df1">
|
||||
<dc:format>
|
||||
image/svg+xml</dc:format>
|
||||
<dc:title>
|
||||
<rdf:Alt>
|
||||
<rdf:li
|
||||
xml:lang="x-default">
|
||||
test.ai</rdf:li>
|
||||
</rdf:Alt>
|
||||
</dc:title>
|
||||
</rdf:Description>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
<xpacket>end='w' </xpacket>
|
||||
</metadata>
|
||||
<rect
|
||||
id="_x3C_Slice_x3E_"
|
||||
style="font-size:12;fill:none;"
|
||||
width="256"
|
||||
height="256" />
|
||||
<path
|
||||
style="font-size:12;opacity:0.2;"
|
||||
d="M221.848,47.811c0,0-130.558,89.471-132.578,90.855c-1.689-1.683-41.779-41.595-41.779-41.595 c-2.978-2.968-6.891-4.068-10.467-2.943c-3.89,1.232-6.403,4.005-7.08,7.809l-0.42,2.363c-0.135,0.765-0.122,1.532,0.037,2.285 l0.589,2.802l0.408,1.247l46.254,101.694c1.449,3.183,4.375,5.427,7.83,6.001c3.441,0.579,6.936-0.598,9.349-3.144 L235.225,65.893c2.066-2.169,3.252-5.263,3.252-8.481l-0.129-1.236l-0.572-2.723c-0.697-3.33-2.852-5.804-6.227-7.157 C229.395,45.431,225.963,44.991,221.848,47.811z"
|
||||
id="path552" />
|
||||
<path
|
||||
style="font-size:12;opacity:0.2;"
|
||||
d="M218.848,47.811c0,0-130.558,89.471-132.578,90.855c-1.689-1.683-41.779-41.595-41.779-41.595 c-2.978-2.968-6.891-4.068-10.467-2.943c-3.89,1.232-6.403,4.005-7.08,7.809l-0.42,2.363c-0.135,0.765-0.122,1.532,0.037,2.285 l0.589,2.802l0.408,1.247l46.254,101.694c1.449,3.183,4.375,5.427,7.83,6.001c3.441,0.579,6.936-0.598,9.349-3.144 L232.225,65.893c2.066-2.169,3.252-5.263,3.252-8.481l-0.129-1.236l-0.572-2.723c-0.697-3.33-2.852-5.804-6.227-7.157 C226.395,45.431,222.963,44.991,218.848,47.811z"
|
||||
id="path553" />
|
||||
<path
|
||||
style="font-size:12;opacity:0.2;"
|
||||
d="M217.848,45.811c0,0-130.558,89.471-132.578,90.855c-1.689-1.683-41.779-41.595-41.779-41.595 c-2.978-2.968-6.891-4.068-10.467-2.943c-3.89,1.232-6.403,4.005-7.08,7.809l-0.42,2.363c-0.135,0.765-0.122,1.532,0.037,2.285 l0.589,2.802l0.408,1.247l46.254,101.694c1.449,3.183,4.375,5.427,7.83,6.001c3.441,0.579,6.936-0.598,9.349-3.144 L231.225,63.893c2.066-2.169,3.252-5.263,3.252-8.481l-0.129-1.236l-0.572-2.723c-0.697-3.33-2.852-5.804-6.227-7.157 C225.395,43.431,221.963,42.991,217.848,45.811z"
|
||||
id="path554" />
|
||||
<path
|
||||
style="font-size:12;fill:url(#XMLID_5_);"
|
||||
d="M215.848,43.811c0,0-130.558,89.471-132.578,90.855 c-1.689-1.683-41.779-41.595-41.779-41.595c-2.978-2.968-6.891-4.068-10.467-2.943c-3.89,1.232-6.403,4.005-7.08,7.809 l-0.42,2.363c-0.135,0.765-0.122,1.532,0.037,2.285l0.589,2.802l0.408,1.247l46.254,101.694c1.449,3.183,4.375,5.427,7.83,6.001 c3.441,0.579,6.936-0.598,9.349-3.144L229.225,61.893c2.066-2.169,3.252-5.263,3.252-8.481l-0.129-1.236l-0.572-2.723 c-0.697-3.33-2.852-5.804-6.227-7.157C223.395,41.431,219.963,40.991,215.848,43.811z"
|
||||
id="path561" />
|
||||
<path
|
||||
style="font-size:12;fill:url(#XMLID_6_);"
|
||||
d="M219.239,48.761c0,0-135.454,92.824-136.679,93.665 c-5.106-5.083-45.302-45.103-45.302-45.103c-1.187-1.182-2.833-1.976-4.431-1.472c-1.597,0.505-2.684,1.485-2.977,3.135 l-0.42,2.364l0.589,2.802c0.007,0.016,46.252,101.691,46.252,101.691c0.621,1.363,1.876,2.321,3.354,2.567 c1.477,0.247,2.978-0.265,4.008-1.353L224.865,57.77c1.021-1.072,1.611-2.665,1.611-4.358l-0.572-2.728 c-0.309-1.471-1.192-2.26-2.588-2.82C221.922,47.305,220.477,47.913,219.239,48.761z"
|
||||
id="path568" />
|
||||
<path
|
||||
style="font-size:12;fill:url(#XMLID_7_);"
|
||||
d="M84.485,146.561c-1.425,0.977-3.344,0.803-4.567-0.416c0,0-44.921-44.724-45.833-45.632 c-0.091,0.252-0.154,0.533-0.154,0.838c0,0.328,0.06,0.662,0.192,0.955c0,0,46.096,101.347,46.241,101.664 c0.877-0.93,141.232-149.292,141.232-149.292c0.232-0.243,0.381-0.741,0.381-1.266c0-0.322-0.074-0.645-0.2-0.935 C220.751,53.177,84.485,146.561,84.485,146.561z"
|
||||
id="path575" />
|
||||
<path
|
||||
style="font-size:12;fill:url(#XMLID_8_);"
|
||||
d="M86.517,149.525c-0.001,0-0.001,0.004-0.001,0.004 c-2.848,1.947-6.69,1.596-9.133-0.838c0,0-20.052-19.966-33.287-33.141c10.589,23.282,30.678,67.45,37.327,82.069 c6.078-6.424,93.826-99.178,119.981-126.826C170.026,92.297,86.517,149.525,86.517,149.525z"
|
||||
id="path582" />
|
||||
</svg>
|
After Width: | Height: | Size: 22 KiB |
BIN
labelImg-master/resources/icons/edit.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
labelImg-master/resources/icons/expert1.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
labelImg-master/resources/icons/expert2.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
labelImg-master/resources/icons/eye.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
labelImg-master/resources/icons/feBlend-icon.png
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
labelImg-master/resources/icons/file.png
Normal file
After Width: | Height: | Size: 765 B |
BIN
labelImg-master/resources/icons/fit-width.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
labelImg-master/resources/icons/fit-window.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
labelImg-master/resources/icons/fit.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
labelImg-master/resources/icons/format_voc.png
Normal file
After Width: | Height: | Size: 786 B |
BIN
labelImg-master/resources/icons/format_yolo.png
Normal file
After Width: | Height: | Size: 675 B |