-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
174 changed files
with
11,131 additions
and
2,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
# 脚本工具相关 | ||
|
||
以下内容为EISeg中的相关工具使用。位置位于EISeg/tool | ||
|
||
## EISeg PaddleX 语义分割数据集构建 | ||
|
||
在使用EISeg对网络爬取的图像标注完成后,通过`tool`中的`eiseg2paddlex`,可以将EISeg标注好的数据快速转换为PaddleX的训练格式。使用以下方法: | ||
``` | ||
python eiseg2paddlex.py -d save_folder_path -o image_folder_path [-l label_folder_path] [-s split_rate] | ||
``` | ||
其中: | ||
- `save_folder_path`: 为需要保存PaddleX数据的路径,必填 | ||
- `image_folder_path`: 为图像的路径,必填 | ||
- `label_folder_path`: 为标签的路径,非必填,若不填则为自动保存的位置(`image_folder_path/label`) | ||
- `split_rate`: 训练集和验证集划分的比例,非必填,若不填则为0.9 | ||
|
||
![68747470733a2f2f73332e626d702e6f76682f696d67732f323032312f31302f373134633433396139633766613439622e706e67](https://user-images.githubusercontent.com/71769312/141392744-f1a27774-2714-43a2-8808-2fc14a5a6b5a.png) | ||
|
||
## 语义标签转实例标签 | ||
|
||
语义分割标签转实例分割标签(原标签为0/255),结果为单通道图像采用调色板调色。通过`tool`中的`semantic2instance`,可以将EISeg标注好的语义分割数据转为实例分割数据。使用以下方法: | ||
|
||
``` shell | ||
python semantic2instance.py -o label_path -d save_path | ||
``` | ||
|
||
其中: | ||
|
||
- `label_path`: 语义标签存放路径,必填 | ||
- `save_path`: 实例标签保存路径,必填 | ||
|
||
![68747470733a2f2f73332e626d702e6f76682f696d67732f323032312f30392f303038633562373638623765343737612e706e67](https://user-images.githubusercontent.com/71769312/141392781-d99ec177-f445-4336-9ab2-0ba7ae75d664.png) | ||
|
||
English|[简体中文](tools_cn.md) | ||
## How to construct segmentation dataset for PaddleX | ||
|
||
After completing image anotation by EISeg,by applying `eiseg2paddlex.py` in `tool` file, yoou can quickly convert data to PaddleX format for training. Execute the following command: | ||
|
||
``` | ||
python eiseg2paddlex.py -d save_folder_path -o image_folder_path [-l label_folder_path] [-s split_rate] | ||
``` | ||
|
||
|
||
- `save_folder_path`: path to save PaddleX format data. | ||
- `image_folder_path`: path of data to be converted. | ||
- `label_folder_path`: path of the label, it is not required, if it is not filled, default is "image_folder_path/label". | ||
- `split_rate`: The devision ratio of training set and validation set, default is 0.9. | ||
|
||
![68747470733a2f2f73332e626d702e6f76682f696d67732f323032312f31302f373134633433396139633766613439622e706e67](https://user-images.githubusercontent.com/71769312/141392744-f1a27774-2714-43a2-8808-2fc14a5a6b5a.png) | ||
|
||
## Semantic labels to instance labels | ||
|
||
The semantic segmentation label is converted to the instance segmentation label (the original label is in range \[0,255\], and the result is a single-channel image that uses a palette to color. Through the `semantic2instance.py`, the semantic segmentation data marked by EISeg can be converted into instance segmentation data. Use the following method: | ||
|
||
``` shell | ||
python semantic2instance.py -o label_path -d save_path | ||
``` | ||
|
||
Parameters: | ||
|
||
- `label_path`: path to semantic label, required. | ||
- `save_path`: path to instance label, required. | ||
|
||
![68747470733a2f2f73332e626d702e6f76682f696d67732f323032312f30392f303038633562373638623765343737612e706e67](https://user-images.githubusercontent.com/71769312/141392781-d99ec177-f445-4336-9ab2-0ba7ae75d664.png) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
简体中文|[English](tools.md) | ||
# 脚本工具相关 | ||
|
||
以下内容为EISeg中的相关工具使用。位置位于EISeg/tool | ||
|
||
## EISeg PaddleX 语义分割数据集构建 | ||
|
||
在使用EISeg对网络爬取的图像标注完成后,通过`tool`中的`eiseg2paddlex`,可以将EISeg标注好的数据快速转换为PaddleX的训练格式。使用以下方法: | ||
``` | ||
python eiseg2paddlex.py -d save_folder_path -o image_folder_path [-l label_folder_path] [-s split_rate] | ||
``` | ||
其中: | ||
- `save_folder_path`: 为需要保存PaddleX数据的路径,必填 | ||
- `image_folder_path`: 为图像的路径,必填 | ||
- `label_folder_path`: 为标签的路径,非必填,若不填则为自动保存的位置(`image_folder_path/label`) | ||
- `split_rate`: 训练集和验证集划分的比例,非必填,若不填则为0.9 | ||
|
||
![68747470733a2f2f73332e626d702e6f76682f696d67732f323032312f31302f373134633433396139633766613439622e706e67](https://user-images.githubusercontent.com/71769312/141392744-f1a27774-2714-43a2-8808-2fc14a5a6b5a.png) | ||
|
||
## 语义标签转实例标签 | ||
|
||
语义分割标签转实例分割标签(原标签为0/255),结果为单通道图像采用调色板调色。通过`tool`中的`semantic2instance`,可以将EISeg标注好的语义分割数据转为实例分割数据。使用以下方法: | ||
|
||
``` shell | ||
python semantic2instance.py -o label_path -d save_path | ||
``` | ||
|
||
其中: | ||
|
||
- `label_path`: 语义标签存放路径,必填 | ||
- `save_path`: 实例标签保存路径,必填 | ||
|
||
![68747470733a2f2f73332e626d702e6f76682f696d67732f323032312f30392f303038633562373638623765343737612e706e67](https://user-images.githubusercontent.com/71769312/141392781-d99ec177-f445-4336-9ab2-0ba7ae75d664.png) | ||
|
Oops, something went wrong.