Skip to content

Commit 9cfd5b9

Browse files
authored
【EISeg】Add eiseg v1.1 (#2790)
1 parent bcb2871 commit 9cfd5b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+5660
-1495
lines changed

EISeg/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ EISeg(Efficient Interactive Segmentation)基于飞桨开发的一个高效智能
7272

7373
## <img src="../docs/images/teach.png" width="20"/> 使用教程
7474
* [安装说明](docs/install.md)
75-
* [图像标注](docs/image.md)
76-
* [视频及3D医疗标注](docs/video.md)
77-
* [遥感特色功能](docs/remote_sensing.md)
78-
* [医疗特色功能](docs/medical.md)
75+
* [图像分割标注](docs/image.md)
76+
* [视频及3D医疗分割标注](docs/video.md)
77+
* [遥感分割特色功能](docs/remote_sensing.md)
78+
* [医疗分割特色功能](docs/medical.md)
79+
* [图像检测标注](docs/det.md)
7980
* [数据处理脚本文档](docs/tools.md)
8081

8182

EISeg/README_EN.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</p>
88

99
**An Efficient Interactive Segmentation Tool based on [PaddlePaddle](https://github.com/paddlepaddle/paddle).**
10-
10+
1111
[![Python 3.6](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/release/python-360/) [![PaddlePaddle 2.2](https://img.shields.io/badge/paddlepaddle-2.2-blue.svg)](https://www.python.org/downloads/release/python-360/) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE) [![Downloads](https://pepy.tech/badge/eiseg)](https://pepy.tech/project/eiseg)
1212

1313
</div>
@@ -64,10 +64,11 @@ EISeg (Efficient Interactive Segmentation) is an efficient and intelligent inter
6464

6565
## <img src="../docs/images/teach.png" width="20"/> Tutorials
6666
* [Installation](docs/install_en.md)
67-
* [Image Annotation](docs/image_en.md)
68-
* [Video Annotation](docs/video_en.md)
69-
* [Remote Sensing](docs/remote_sensing_en.md)
67+
* [Image Segmentation Annotation](docs/image_en.md)
68+
* [Video Segmentation Annotation](docs/video_en.md)
69+
* [Remote Sensing Segmentation](docs/remote_sensing_en.md)
7070
* [Medical Treatment](docs/medical_en.md)
71+
* [Detection](docs/det_en.md)
7172

7273
## <img src="../docs/images/anli.png" width="20"/> Version Updates
7374

EISeg/docs/det.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
2+
# 图片检测标注
3+
<div align="center">
4+
<p align="center">
5+
<img src="https://user-images.githubusercontent.com/35907364/203894000-4ab86c85-e7e5-48f6-b2c4-bf8804ef6a08.gif" align="middle" alt="LOGO" width = "800" />
6+
</p>
7+
</div>
8+
9+
以下内容为2D图片检测预标注模型下载及EISeg2D图片检测标注流程,具体如下:
10+
11+
## 模型准备
12+
13+
在使用EISeg进行检测标注前,如果使用预标注功能,请先下载检测预标注模型参数。EISeg开放了在xxx数据集上训练的检测模型,满足通用场景检测预标注需求。用户可以根据自己的需要选择是否启用预标注功能来进行预标注模型的加载和使用。
14+
15+
16+
| 模型类型 | 适用场景 | 模型结构 | 模型下载地址 |
17+
|-------| -------------------------- | -------------- | ------------------------------------------------------------ |
18+
| 轻量化模型 | 通用场景的图像标注 | PicoDet-S | [PicoDet-S ](https://paddledet.bj.bcebos.com/deploy/Inference/picodet_s_416_coco_lcnet.tar) |
19+
20+
**NOTE**: 将下载的模型结构`*.pdmodel`及相应的模型参数`*.pdiparams`需要放到同一个目录下,在检测标注模式中,如果启用预标注功能,则加载模型时只需选择`*.pdiparams`结尾的模型参数位置即可, `*.pdmodel`会自动加载。如果选择不启用预标注,则无需加载模型。
21+
22+
23+
## 使用步骤
24+
EISeg的检测标注功能的使用整体流程如下图所示,具体可见下方使用步骤说明:
25+
26+
<p align="center">
27+
<img src="https://user-images.githubusercontent.com/48357642/202401769-49f3de96-41b8-406b-ae1c-b6edf163a5c4.png" width="100%" height="100%">
28+
<p align="center">
29+
整体使用流程
30+
</p>
31+
</p>
32+
33+
34+
打开软件后,在对项目进行标注前,需要进行如下设置:
35+
36+
0. **标注模式选择**
37+
38+
点击软件右上角的模式切换按钮,进入检测标注模式中,并根据弹窗提示选择是否启用检测预标注功能,若不启用,则跳过下方的步骤1和步骤2。
39+
40+
1. **模型参数加载**
41+
42+
`模型选择`区域中点击`加载网络参数`按钮,选择合适的模型及参数下载解压后,模型结构`*.pdmodel`及相应的模型参数`*.pdiparams`需要放到同一个目录下,加载模型时只需选择`*.pdiparams`结尾的模型参数位置即可。正确加载的模型参数会记录在`近期模型参数`中,可以方便切换,并且下次打开软件时自动加载退出时的模型参数。
43+
44+
<p align="center">
45+
<img src="https://user-images.githubusercontent.com/48357642/202402532-ef022aaa-eb43-4b1d-a2f8-7f4b0380bd5f.png" width="40%" height="20%">
46+
</p>
47+
48+
2. **预标注设置**
49+
50+
`检测设置`区域中点击`预标注设置`按钮,即可在弹出的界面中设置预标注模型标签和自定义标签之间的对应关系,以及是否启用某一类别的标签,此外,也可在该界面的搜索框中查找特定标签,便于用户快速选择目标标签建立标签对应关系,默认情况下,会启用COCO 80类的标签为预标注模型标签。完成建立标签对应关系之后,图像预标注的结果中只会显示用户启用的标签对以及自定义标签名。
51+
52+
<p align="center">
53+
<img src="https://user-images.githubusercontent.com/48357642/202402889-f45d3275-645e-4633-898a-d60b8c025f19.png" width="40%" height="20%">
54+
</p>
55+
56+
<p align="center">
57+
<img src="https://user-images.githubusercontent.com/48357642/202403435-5c30bf95-1389-4e63-8a49-cb08524050e6.png" width="40%" height="20%">
58+
</p>
59+
60+
3. **图像加载**
61+
62+
打开图像/图像文件夹。当看到主界面图像正确加载,`数据列表`正确出现图像路径即可。
63+
64+
<p align="center">
65+
<img src="https://user-images.githubusercontent.com/48357642/202403076-4d67bbc8-b9d8-401f-811d-cf5c7f8f8a1c.png" width="40%" height="20%">
66+
</p>
67+
68+
4. **标签添加/加载**
69+
70+
添加/加载标签。如果用户启用了预标注功能,则会在标签列表中自动添加模型预测的标签,用户也可以通过手动点击`添加标签`按钮来新建标签,标签分为4列,分别对应像素值、说明、颜色和删除。新建好的标签可以通过`保存标签列表`保存为txt文件,其他合作者可以通过`加载标签列表`将标签导入。通过加载方式导入的标签,重启软件后会自动加载。此外,还支持标签的查找,可以通过`查找`来搜索标签列表里面是否存在特定标签,便于用户快速定位目标标签。
71+
72+
<p align="center">
73+
<img src="https://user-images.githubusercontent.com/48357642/202403524-6a008e5f-9f00-418c-b91e-0602ae71fb49.png" width="40%" height="20%">
74+
</p>
75+
76+
5. **开始标注**
77+
78+
如果用户启用了预标注功能,则可以对模型预测的检测框进行修改和删除,用户也可以在`检测设置`区域中点击`开启画框功能`按钮,以及选中`标签列表`区域的特定标签在当前展示的图像中进行手动画框,可以拖动框的左上角和右下角来对框进行修改。可以通过鼠标左键点击选中指定框进行删除,也可以在画框的时候选择设置十字丝的颜色。此外,检测框的颜色和标签的颜色是一一对应的。
79+
80+
<p align="center">
81+
<img src="https://user-images.githubusercontent.com/48357642/202403616-8a57bf25-7eee-4814-be57-0d7889042ebb.png" width="40%" height="20%">
82+
</p>
83+
84+
6. **自动保存设置**
85+
86+
在使用中可以将`自动保存`设置上,设定好文件夹即可,这样在使用时切换图像会自动将完成标注的图像进行保存。
87+
88+
## 特色功能使用说明
89+
90+
- **检测设置**
91+
92+
- 在启用预标注功能后,用户可以在`检测设置`区域中拖动`分数域值`滑块,来设置模型预测的置信度,进而显示出不同数量的检测框,其中手动编辑过的框不会随着滑块的滑动而消失。
93+
- 在启用预标注功能后,用户可以在`检测设置`区域中点击`重推理`按钮,会删除原来所有的检测框并进行重新推理和显示。
94+
95+
- **保存格式**
96+
97+
- 检测标注的标签默认情况下保存为COCO格式,用户也可以根据自己的需要选择保存为VOC、YOLO格式。
98+
- 若不设置保存路径,默认保存至当前图像文件夹下的label文件夹中。

EISeg/docs/det_en.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
# 2D Image Detection Anotation
3+
4+
<div align="center">
5+
<p align="center">
6+
<img src="https://user-images.githubusercontent.com/35907364/203893714-9a1102d7-3977-4f03-8be2-5d6f7728211c.gif" align="middle" alt="LOGO" width = "800" />
7+
</p>
8+
</div>
9+
10+
The following content is about how to use EISeg to annotate 2D images. Model preparation and how to use can be seen as follow:
11+
12+
## Model Preparation
13+
14+
Before using EISeg for det annotation, if you use the pre annotation function, please download the detection pretrained model firstly. EISeg 1.1.0 provides PicoDet-S model trained on COCO dataset to meet the requirements of generic detection scenarios. Users can choose manual annotation or rely on AI model to generate labels.
15+
16+
17+
| Model Type | Applicable Scenarios | Model Architecture | Download Link |
18+
| ---------- | -------------------------- |---------------------| ------------------------------------------------------------ |
19+
| Lightweight Model | Image annotation in generic scenarios | PicoDet-S | [PicoDet-S ](https://paddledet.bj.bcebos.com/deploy/Inference/picodet_s_416_coco_lcnet.tar) |
20+
21+
22+
**NOTE**: The downloaded model structure `*.pdmodel` and the corresponding model parameters `*.pdiparams` should be put into the same directory. In the det annotation mode, if the pre annotation function is enabled, you only need to decide the location of the model parameter at the end of `*.pdiparams`, and `*.pdmodel` will be loaded automatically. If you choose not to enable pre annotation, you do not need to load the model.
23+
24+
## Using
25+
26+
The overall process of using EISeg detection labeling is shown in the figure below. For details, please refer to the following instructions:
27+
28+
<p align="center">
29+
<img src="https://user-images.githubusercontent.com/48357642/202401769-49f3de96-41b8-406b-ae1c-b6edf163a5c4.png" width="100%" height="100%">
30+
<p align="center">
31+
The overall process
32+
</p>
33+
34+
35+
36+
After opening the software, make the following settings before annotating:
37+
38+
0. **Annotation Mode Selection**
39+
40+
Select the detection annotation mode. Click the mode switch button in the upper right corner of EISeg to enter the detection annotation mode, and select whether to enable the detection pre annotation function according to the pop-up prompt. If not, skip steps 1 and 2 below.
41+
42+
1. **Load Model Parameter**
43+
44+
Select the appropriate network and load the corresponding model parameters. Click the `Load Network Parameters` button in the `Model Selection` area,After downloading and decompressing the right model and parameters, the model structure `*.pdmodel` and the corresponding model parameters `*.pdiparams` should be put into the same directory, and only the location of the model parameter at the end of `*.pdiparams`need to be selected when loading the model. The initialization of the static model takes some time, please wait patiently until the model is loaded. The correctly loaded model parameters will be recorded in `Recent Model Parameters`, which can be easily switched, and the exiting model parameter will be loaded automatically the next time you open the software.
45+
<p align="center">
46+
<img src="https://user-images.githubusercontent.com/48357642/202402532-ef022aaa-eb43-4b1d-a2f8-7f4b0380bd5f.png" width="40%" height="20%">
47+
</p>
48+
49+
2. **Pre Annotation Settings**
50+
51+
Create labels correspondence. Click the `Pre Annotation Settings` button in the `Detection Settings` area to set the corresponding relationship between pre annotation model labels and user-defined labels in the pop-up interface, as well as whether to enable labels of a certain category. In addition, you can also search for specific labels in the search box of the interface, so that users can quickly select target labels to establish the corresponding relationship between labels. By default, COCO 80 labels will be enabled as pre annotation model labels. After establishing the label correspondence, only the user enabled label pairs and user-defined label names will be displayed in the image pre annotation results.
52+
<p align="center">
53+
<img src="https://user-images.githubusercontent.com/48357642/202402889-f45d3275-645e-4633-898a-d60b8c025f19.png" width="40%" height="20%">
54+
</p>
55+
56+
<p align="center">
57+
<img src="https://user-images.githubusercontent.com/48357642/202403435-5c30bf95-1389-4e63-8a49-cb08524050e6.png" width="40%" height="20%">
58+
</p>
59+
60+
3. **Load Image**
61+
62+
Open the image or image folder. Things go well when you see that the main screen image is loaded correctly and the image path is rightly shown in `Data List`.
63+
64+
<p align="center">
65+
<img src="https://user-images.githubusercontent.com/48357642/202403076-4d67bbc8-b9d8-401f-811d-cf5c7f8f8a1c.png" width="40%" height="20%">
66+
</p>
67+
68+
4. **Add/Load Label**
69+
70+
Add/load labels. If the user has enabled the pre annotation function, the labels predicted by the model will be automatically added to the label list. Users can also manually click the `Add Label` button to create a new label, which are divided into 4 columns corresponding to pixel value, description, color and deletion. The newly created labels can be saved as txt files by `Save Label List`, and other collaborators can import labels by `Load Label List`. Labels imported by loading will be loaded automatically after restarting the software. In addition, label search is also supported. You can search whether there is a specific label in the label list through `Search`, so that users can quickly locate the target label.
71+
<p align="center">
72+
<img src="https://user-images.githubusercontent.com/48357642/202403524-6a008e5f-9f00-418c-b91e-0602ae71fb49.png" width="40%" height="20%">
73+
</p>
74+
75+
5. **Annotation**
76+
77+
Start labeling. If you enable the pre annotation function, you can modify and delete the bounding box predicted by the model. You can also click the `Start Draw Function` button in the `Detection Settings` area, and select a specific label in the `Label List` area to manually draw bounding box in the currently displayed image. You can drag the upper left and lower right corners of the bounding box to modify the box. You can click the left mouse button to select the specified bounding box to delete, or you can select the color of the cross hairs when drawing the bounding box. In addition, the color of the bounding box corresponds to the color of the label.
78+
<p align="center">
79+
<img src="https://user-images.githubusercontent.com/48357642/202403616-8a57bf25-7eee-4814-be57-0d7889042ebb.png" width="40%" height="20%">
80+
</p>
81+
82+
6. **Autosave**
83+
84+
You can choose the right folder and have the `autosave` set up, so that the annotated image will be saved automatically when switching images.
85+
86+
## Instruction of New Functions
87+
88+
- **Detection Settings**
89+
90+
- After enabling the pre annotation function, the user can drag the `score threshold` slider in the `Detection Settings` area to set the confidence level of the model prediction, thus displaying different numbers of bounding boxes. The manually edited boxes will not disappear with the sliding of the slider.
91+
- After enabling the pre annotation function, the user can click the `ReDet` button in the `Detection Settings` area to delete all the original bounding boxes and re inference and display them.
92+
93+
- **Save Format**
94+
95+
- By default, Annotation results are saved in COCO format. You can also select VOC and YOLO formats according to your needs.
96+
- With no specified save path, the image is save to the label folder under the current image folder by default.

EISeg/eiseg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import cv2
2323

2424
__APPNAME__ = "EISeg"
25-
__VERSION__ = "1.0.0"
25+
__VERSION__ = "1.1.0"
2626

2727
pjpath = osp.dirname(osp.realpath(__file__))
2828
sys.path.append(pjpath)

EISeg/eiseg/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
1514
from run import main
1615

1716
if __name__ == "__main__":

0 commit comments

Comments
 (0)