diff --git a/README.rst b/README.rst index 637b64bf..e04371d9 100644 --- a/README.rst +++ b/README.rst @@ -7,6 +7,15 @@ LabelImg .. image:: https://img.shields.io/travis/tzutalin/labelImg.svg :target: https://travis-ci.org/tzutalin/labelImg +.. image:: https://img.shields.io/badge/lang-en-blue.svg + :target: https://github.com/tzutalin/labelImg/blob/master/README.zh.rst + +.. image:: https://img.shields.io/badge/lang-zh-green.svg + :target: https://github.com/tzutalin/labelImg/blob/master/readme/README.zh.rst + +.. image:: https://img.shields.io/badge/lang-zh--TW-green.svg + :target: (https://github.com/jonatasemidio/multilanguage-readme-pattern/blob/master/README.pt-br.md + .. image:: /resources/icons/app.png :width: 200px :align: center @@ -16,7 +25,7 @@ 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 `__. Besides, it also supports YOLO format +by `ImageNet `__. Besides, it also supports YOLO and CreateML formats. .. image:: https://raw.githubusercontent.com/tzutalin/labelImg/master/demo/demo3.jpg :alt: Demo Image @@ -225,7 +234,7 @@ Hotkeys +--------------------+--------------------------------------------+ | Ctrl-- | Zoom out | +--------------------+--------------------------------------------+ -| ↑→↓← | Keyboard arrows to move selected rect box | +| ↑→↓← | Keyboard arrows to move selected rect box | +--------------------+--------------------------------------------+ **Verify Image:** diff --git a/readme/README.zh.rst b/readme/README.zh.rst new file mode 100644 index 00000000..93344436 --- /dev/null +++ b/readme/README.zh.rst @@ -0,0 +1,202 @@ +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:: https://img.shields.io/badge/lang-en-blue.svg + :target: https://github.com/tzutalin/labelImg/blob/master/README.zh.rst + +.. image:: https://img.shields.io/badge/lang-zh-green.svg + :target: https://github.com/tzutalin/labelImg/blob/master/readme/README.zh.rst + +.. image:: https://img.shields.io/badge/lang-zh--TW-green.svg + :target: (https://github.com/jonatasemidio/multilanguage-readme-pattern/blob/master/README.pt-br.md + +.. image:: /resources/icons/app.png + :width: 200px + :align: center + +LabelImg 是影像標註工具,它是用寫成的 + +It is written in Python and uses Qt for its graphical interface. + +支持的儲存格式包括PASCAL VOC format, YOLO, createML + +.. 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 + +`展示影片 `__ + +安裝 +------------------ + + +透過編譯原始碼 +~~~~~~~~~~~~~~~~~ + +Linux/Ubuntu/Mac 需要 `Python +2.6 `__ and has been tested with `PyQt +4.8 `__. However, `Python +3 or above `__ and `PyQt5 `__ 是最好的選擇 + + +Ubuntu Linux +^^^^^^^^^^^^ + +Python 3 + Qt5 + +.. 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 3 + Qt5 + +.. 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 (推薦方法) + +Virtualenv 可以避免版本和相依性問題 + +.. code:: shell + + brew install python3 + pip3 install pipenv + pipenv run pip install pyqt5==5.12.1 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 `__, +`PyQt5 `__ +和 `install lxml `__. + +安裝並到 `labelImg <#labelimg>`__ 目錄 + +.. code:: shell + + 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 <#labelimg>`__ 目錄 + +.. code:: shell + + 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 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. 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 + +你可以參考影片 `Watch a demo video `__ + + +使用方法 +----- + +你可以先產生標籤 +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +修改這個檔案 +`data/predefined\_classes.txt `__ + +快捷鍵 +~~~~~~~ + ++--------------------+--------------------------------------------+ +| Ctrl + u | 讀取所有影像從每個目錄 | ++--------------------+--------------------------------------------+ +| Ctrl + r | 改變標示結果的存檔目錄 | ++--------------------+--------------------------------------------+ +| Ctrl + s | 存檔 | ++--------------------+--------------------------------------------+ +| Ctrl + d | 複製目前的標籤和物件的區塊 | ++--------------------+--------------------------------------------+ +| Ctrl + Shift + d | 刪除目前影像 | ++--------------------+--------------------------------------------+ +| Space | 標示目前照片已經處理過 | ++--------------------+--------------------------------------------+ +| w | 產生新的物件區塊 | ++--------------------+--------------------------------------------+ +| d | 下張影像 | ++--------------------+--------------------------------------------+ +| a | 上張影像 | ++--------------------+--------------------------------------------+ +| del | 刪除所選的物件區塊 | ++--------------------+--------------------------------------------+ +| Ctrl++ | 放大影像 | ++--------------------+--------------------------------------------+ +| Ctrl-- | 縮小影像 | ++--------------------+--------------------------------------------+ +| ↑→↓← | 移動所選的物件區塊 | ++--------------------+--------------------------------------------+ + +如何貢獻 +~~~~~~~~~~~~~~~~~ + +歡迎上傳程式碼直接貢獻