Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
juncaipeng committed Jan 21, 2022
2 parents e554448 + 1356655 commit 5b3c4d5
Show file tree
Hide file tree
Showing 174 changed files with 11,131 additions and 2,087 deletions.
8 changes: 7 additions & 1 deletion EISeg/docs/remote_sensing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 1 环境配置

EISeg中对遥感数据的支持来自GDAL/OGR,GDAL是一个在X/MIT许可协议下的开源栅格空间数据转换库,OGR与其功能类似但主要提供对矢量数据的支持。
EISeg中对遥感数据的支持来自GDAL/OGR,GDAL是一个在X/MIT许可协议下的开源栅格空间数据转换库,OGR与其功能类似但主要提供对矢量数据的支持。同时需要安装rasterio。

### 1.1 依赖安装

Expand All @@ -31,7 +31,13 @@ Mac用户建议利用conda安装,如下:
```shell script
conda install gdal
```
#### 1.1.3 rasterio 安装

建议用户利用conda安装,如下

```shell script
conda install rasterio
```

## 2 功能介绍

Expand Down
66 changes: 33 additions & 33 deletions EISeg/docs/tools.md
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)


34 changes: 34 additions & 0 deletions EISeg/docs/tools_cn.md
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)

Loading

0 comments on commit 5b3c4d5

Please sign in to comment.