Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Latest commit

 

History

History
195 lines (136 loc) · 5.88 KB

README.zh.rst

File metadata and controls

195 lines (136 loc) · 5.88 KB

LabelImg

https://img.shields.io/github/workflow/status/tzutalin/labelImg/Package?style=for-the-badge:alt:GitHubWorkflowStatus

/resources/icons/app.png

LabelImg 是影像標註工具,它是用python 和 QT 寫成的.

支持的儲存格式包括PASCAL VOC format, YOLO, createML.

Demo Image

Demo Image

展示影片

安裝

透過編譯原始碼

Linux/Ubuntu/Mac 需要 Python 和 PyQt

Ubuntu Linux

Python 3 + Qt5

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 3 + Qt5

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 (推薦方法)

Virtualenv 可以避免版本和相依性問題

brew install python3
pip3 install pipenv
pipenv run pip install pyqt5==5.15.2 lxml
pipenv run make qt5py3
pipenv run python3 labelImg.py
[Optional] rm -rf build dist; python setup.py py2app -A;mv "dist/labelImg.app" /Applications

Windows

安裝 Python, PyQt5install lxml.

安裝並到 labelImg 目錄

pyrcc4 -o libs/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

下載並安裝 Anaconda (Python 3+)

打開 Anaconda Prompt 然後到 labelImg 目錄

conda install pyqt=5
conda install -c anaconda lxml
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

pip3 install labelImg
labelImg
labelImg [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

Use Docker

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

你可以參考影片

使用方法

你可以先產生標籤

修改這個檔案 data/predefined_classes.txt

快捷鍵

Ctrl + u 讀取所有影像從每個目錄
Ctrl + r 改變標示結果的存檔目錄
Ctrl + s 存檔
Ctrl + d 複製目前的標籤和物件的區塊
Ctrl + Shift + d 刪除目前影像
Space 標示目前照片已經處理過
w 產生新的物件區塊
d 下張影像
a 上張影像
del 刪除所選的物件區塊
Ctrl++ 放大影像
Ctrl-- 縮小影像
↑→↓← 移動所選的物件區塊

如何貢獻

歡迎上傳程式碼直接貢獻