From 1995617c9d8b614a60e8467962a3c2bde8523fd3 Mon Sep 17 00:00:00 2001
From: zz952332446 <34162360+zz952332446@users.noreply.github.com>
Date: Sat, 6 Aug 2022 10:52:36 +0800
Subject: [PATCH] Update English version of DetAnnoTools and KeyPointAnnoTool
(#6582)
* Update MOTAnnoTools.md
update instruction of DarkLabel
* update English version
* update english version
* update english verison
* update english version
update english version
---
docs/tutorials/data/DetAnnoTools.md | 6 +-
docs/tutorials/data/DetAnnoTools_en.md | 271 ++++++++++++++++++++
docs/tutorials/data/KeyPointAnnoTools.md | 4 +-
docs/tutorials/data/KeyPointAnnoTools_en.md | 165 ++++++++++++
4 files changed, 442 insertions(+), 4 deletions(-)
create mode 100644 docs/tutorials/data/DetAnnoTools_en.md
mode change 100644 => 100755 docs/tutorials/data/KeyPointAnnoTools.md
create mode 100755 docs/tutorials/data/KeyPointAnnoTools_en.md
diff --git a/docs/tutorials/data/DetAnnoTools.md b/docs/tutorials/data/DetAnnoTools.md
index 780f42987..fd7c8fee9 100644
--- a/docs/tutorials/data/DetAnnoTools.md
+++ b/docs/tutorials/data/DetAnnoTools.md
@@ -1,6 +1,8 @@
-# 目标检测标注工具
+简体中文 | [English](DetAnnoTools_en.md)
+
+# 目标检测标注工具
## 目录
@@ -273,5 +275,5 @@ png/jpeg/jpg-->labelImg标注-->xml/txt/json
#### 格式转换注意事项
-**PaddleDetection支持VOC或COCO格式的数据**,经LabelImg标注导出后的标注文件,需要修改为**VOC或COCO格式**,调整说明可以参考[准备训练数据](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.4/docs/tutorials/PrepareDataSet.md#%E5%87%86%E5%A4%87%E8%AE%AD%E7%BB%83%E6%95%B0%E6%8D%AE)
+**PaddleDetection支持VOC或COCO格式的数据**,经LabelImg标注导出后的标注文件,需要修改为**VOC或COCO格式**,调整说明可以参考[准备训练数据](./PrepareDataSet.md#%E5%87%86%E5%A4%87%E8%AE%AD%E7%BB%83%E6%95%B0%E6%8D%AE)
diff --git a/docs/tutorials/data/DetAnnoTools_en.md b/docs/tutorials/data/DetAnnoTools_en.md
new file mode 100644
index 000000000..7b948d213
--- /dev/null
+++ b/docs/tutorials/data/DetAnnoTools_en.md
@@ -0,0 +1,271 @@
+[简体中文](DetAnnoTools.md) | English
+
+
+
+# Object Detection Annotation Tools
+
+## Concents
+
+[LabelMe](#LabelMe)
+
+* [Instruction](#Instruction-of-LabelMe)
+ * [Installation](#Installation)
+ * [Annotation of Images](#Annotation-of-images-in-LabelMe)
+* [Annotation Format](#Annotation-Format-of-LabelMe)
+ * [Export Format](#Export-Format-of-LabelMe)
+ * [Summary of Format Conversion](#Summary-of-Format-Conversion)
+ * [Annotation file(json)—>VOC Dataset](#annotation-filejsonvoc-dataset)
+ * [Annotation file(json)—>COCO Dataset](#annotation-filejsoncoco-dataset)
+
+[LabelImg](#LabelImg)
+
+* [Instruction](#Instruction-of-LabelImg)
+ * [Installation](#Installation-of-LabelImg)
+ * [Installation Notes](#Installation-Notes)
+ * [Annotation of images](#Annotation-of-images-in-LabelImg)
+* [Annotation Format](#Annotation-Format-of-LabelImg)
+ * [Export Format](#Export-Format-of-LabelImg)
+ * [Notes of Format Conversion](#Notes-of-Format-Conversion)
+
+
+
+## [LabelMe](https://github.com/wkentaro/labelme)
+
+### Instruction of LabelMe
+
+#### Installation
+
+Please refer to [The github of LabelMe](https://github.com/wkentaro/labelme) for installation details.
+
+
+ Ubuntu
+
+```
+sudo apt-get install labelme
+
+# or
+sudo pip3 install labelme
+
+# or install standalone executable from:
+# https://github.com/wkentaro/labelme/releases
+```
+
+
+
+
+ macOS
+
+```
+brew install pyqt # maybe pyqt5
+pip install labelme
+
+# or
+brew install wkentaro/labelme/labelme # command line interface
+# brew install --cask wkentaro/labelme/labelme # app
+
+# or install standalone executable/app from:
+# https://github.com/wkentaro/labelme/releases
+```
+
+
+
+
+
+We recommend installing by Anoncanda.
+
+```
+conda create –name=labelme python=3
+conda activate labelme
+pip install pyqt5
+pip install labelme
+```
+
+
+
+
+
+#### Annotation of Images in LabelMe
+
+After starting labelme, select an image or an folder with images.
+
+Select `create polygons` in the formula bar. Draw an annotation area as shown in the following GIF. You can right-click on the image to select different shape. When finished, press the Enter/Return key, then fill the corresponding label in the popup box, such as, people.
+
+Click the save button in the formula bar,it will generate an annotation file in json.
+
+![](https://media3.giphy.com/media/XdnHZgge5eynRK3ATK/giphy.gif?cid=790b7611192e4c0ec2b5e6990b6b0f65623154ffda66b122&rid=giphy.gif&ct=g)
+
+
+
+### Annotation Format of LabelMe
+
+#### Export Format of LabelMe
+
+```
+#generate an annotation file
+png/jpeg/jpg-->labelme-->json
+```
+
+
+
+
+
+#### Summary of Format Conversion
+
+```
+#convert annotation file to VOC dataset format
+json-->labelme2voc.py-->VOC dataset
+
+#convert annotation file to COCO dataset format
+json-->labelme2coco.py-->COCO dataset
+```
+
+
+
+
+
+#### Annotation file(json)—>VOC Dataset
+
+Use this script [labelme2voc.py](https://github.com/wkentaro/labelme/blob/main/examples/bbox_detection/labelme2voc.py) in command line.
+
+```Te
+python labelme2voc.py data_annotated(annotation folder) data_dataset_voc(output folder) --labels labels.txt
+```
+
+Then, it will generate following contents:
+
+```
+# It generates:
+# - data_dataset_voc/JPEGImages
+# - data_dataset_voc/Annotations
+# - data_dataset_voc/AnnotationsVisualization
+
+```
+
+
+
+
+
+#### Annotation file(json)—>COCO Dataset
+
+Convert the data annotated by LabelMe to COCO dataset by the script [x2coco.py](https://github.com/PaddlePaddle/PaddleDetection/blob/develop/tools/x2coco.py) provided by PaddleDetection.
+
+```bash
+python tools/x2coco.py \
+ --dataset_type labelme \
+ --json_input_dir ./labelme_annos/ \
+ --image_input_dir ./labelme_imgs/ \
+ --output_dir ./cocome/ \
+ --train_proportion 0.8 \
+ --val_proportion 0.2 \
+ --test_proportion 0.0
+```
+
+After the user dataset is converted to COCO data, the directory structure is as follows (Try to avoid use Chinese for the path name in case of errors caused by Chinese coding problems):
+
+```
+dataset/xxx/
+├── annotations
+│ ├── train.json # Annotation file of coco data
+│ ├── valid.json # Annotation file of coco data
+├── images
+│ ├── xxx1.jpg
+│ ├── xxx2.jpg
+│ ├── xxx3.jpg
+│ | ...
+...
+```
+
+
+
+
+
+## [LabelImg](https://github.com/tzutalin/labelImg)
+
+### Instruction
+
+#### Installation of LabelImg
+
+Please refer to [The github of LabelImg](https://github.com/tzutalin/labelImg) for installation details.
+
+
+ Ubuntu
+
+```
+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
+
+```
+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]
+```
+
+
+
+
+
+We recommend installing by Anoncanda.
+
+Download and go to the folder of [labelImg](https://github.com/tzutalin/labelImg#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]
+```
+
+
+
+
+
+#### Installation Notes
+
+Use python scripts to startup LabelImg: `python labelImg.py `
+
+#### Annotation of images in LabelImg
+
+After the startup of LabelImg, select an image or a folder with images.
+
+Select `Create RectBox` in the formula bar. Draw an annotation area as shown in the following GIF. When finished, select corresponding label in the popup box. Then save the annotated file in three forms: VOC/YOLO/CreateML.
+
+
+
+![](https://user-images.githubusercontent.com/34162360/177526022-fd9c63d8-e476-4b63-ae02-76d032bb7656.gif)
+
+
+
+
+
+### Annotation Format of LabelImg
+
+#### Export Format of LabelImg
+
+```
+#generate annotation files
+png/jpeg/jpg-->labelImg-->xml/txt/json
+```
+
+
+
+#### Notes of Format Conversion
+
+**PaddleDetection supports the format of VOC or COCO.** The annotation file generated by LabelImg needs to be converted by VOC or COCO. You can refer to [PrepareDataSet](./PrepareDataSet.md#%E5%87%86%E5%A4%87%E8%AE%AD%E7%BB%83%E6%95%B0%E6%8D%AE).
+
diff --git a/docs/tutorials/data/KeyPointAnnoTools.md b/docs/tutorials/data/KeyPointAnnoTools.md
old mode 100644
new mode 100755
index db8f614ee..678b94ac7
--- a/docs/tutorials/data/KeyPointAnnoTools.md
+++ b/docs/tutorials/data/KeyPointAnnoTools.md
@@ -1,6 +1,6 @@
-# 关键点检测标注工具
-
+简体中文 | [English](KeyPointAnnoTools_en.md)
+# 关键点检测标注工具
## 目录
diff --git a/docs/tutorials/data/KeyPointAnnoTools_en.md b/docs/tutorials/data/KeyPointAnnoTools_en.md
new file mode 100755
index 000000000..3ef054842
--- /dev/null
+++ b/docs/tutorials/data/KeyPointAnnoTools_en.md
@@ -0,0 +1,165 @@
+[简体中文](KeyPointAnnoTools.md) | English
+
+# Key Points Detection Annotation Tool
+
+## Concents
+
+[LabelMe](#LabelMe)
+
+- [Instruction](#Instruction)
+ - [Installation](#Installation)
+ - [Notes of Key Points Data](#Notes-of-Key-Points-Data)
+ - [Annotation of LabelMe](#Annotation-of-LabelMe)
+- [Annotation Format](#Annotation-Format)
+ - [Data Export Format](#Data-Export-Format)
+ - [Summary of Format Conversion](#Summary-of-Format-Conversion)
+ - [Annotation file(json)—>COCO Dataset](#annotation-filejsoncoco-dataset)
+
+
+
+## [LabelMe](https://github.com/wkentaro/labelme)
+
+### Instruction
+
+#### Installation
+
+Please refer to [The github of LabelMe](https://github.com/wkentaro/labelme) for installation details.
+
+
+ Ubuntu
+
+```
+sudo apt-get install labelme
+
+# or
+sudo pip3 install labelme
+
+# or install standalone executable from:
+# https://github.com/wkentaro/labelme/releases
+```
+
+
+
+
+ macOS
+
+```
+brew install pyqt # maybe pyqt5
+pip install labelme
+
+# or
+brew install wkentaro/labelme/labelme # command line interface
+# brew install --cask wkentaro/labelme/labelme # app
+
+# or install standalone executable/app from:
+# https://github.com/wkentaro/labelme/releases
+```
+
+
+
+
+
+We recommend installing by Anoncanda.
+
+```
+conda create –name=labelme python=3
+conda activate labelme
+pip install pyqt5
+pip install labelme
+```
+
+
+
+#### Notes of Key Points Data
+
+COCO dataset needs to collect 17 key points.
+
+```
+keypoint indexes:
+ 0: 'nose',
+ 1: 'left_eye',
+ 2: 'right_eye',
+ 3: 'left_ear',
+ 4: 'right_ear',
+ 5: 'left_shoulder',
+ 6: 'right_shoulder',
+ 7: 'left_elbow',
+ 8: 'right_elbow',
+ 9: 'left_wrist',
+ 10: 'right_wrist',
+ 11: 'left_hip',
+ 12: 'right_hip',
+ 13: 'left_knee',
+ 14: 'right_knee',
+ 15: 'left_ankle',
+ 16: 'right_ankle'
+```
+
+
+
+
+
+#### Annotation of LabelMe
+
+After starting labelme, select an image or an folder with images.
+
+Select `create polygons` in the formula bar. Draw an annotation area as shown in the following GIF. You can right-click on the image to select different shape. When finished, press the Enter/Return key, then fill the corresponding label in the popup box, such as, people.
+
+Click the save button in the formula bar,it will generate an annotation file in json.
+
+![操作说明](https://user-images.githubusercontent.com/34162360/178250648-29ee781a-676b-419c-83b1-de1e4e490526.gif)
+
+
+
+### Annotation Format
+
+#### Data Export Format
+
+```
+#generate an annotation file
+png/jpeg/jpg-->labelme-->json
+```
+
+
+
+#### Summary of Format Conversion
+
+```
+#convert annotation file to COCO dataset format
+json-->labelme2coco.py-->COCO dataset
+```
+
+
+
+
+
+#### Annotation file(json)—>COCO Dataset
+
+Convert the data annotated by LabelMe to COCO dataset by this script [x2coco.py](https://github.com/PaddlePaddle/PaddleDetection/blob/develop/tools/x2coco.py).
+
+```bash
+python tools/x2coco.py \
+ --dataset_type labelme \
+ --json_input_dir ./labelme_annos/ \
+ --image_input_dir ./labelme_imgs/ \
+ --output_dir ./cocome/ \
+ --train_proportion 0.8 \
+ --val_proportion 0.2 \
+ --test_proportion 0.0
+```
+
+After the user dataset is converted to COCO data, the directory structure is as follows (note that the path name and file name in the dataset should not use Chinese as far as possible to avoid errors caused by Chinese coding problems):
+
+```
+dataset/xxx/
+├── annotations
+│ ├── train.json # Annotation file of coco data
+│ ├── valid.json # Annotation file of coco data
+├── images
+│ ├── xxx1.jpg
+│ ├── xxx2.jpg
+│ ├── xxx3.jpg
+│ | ...
+...
+```
+
--
GitLab