forked from mindspore-Ecosystem/mindspore
add introduction for the use of preprocess_dataset.py
This commit is contained in:
parent
7295e106e6
commit
1915ec4ca9
|
@ -98,12 +98,12 @@ If set `split`=1.0, you should split train dataset and val dataset by directorie
|
|||
|
||||
We support script to convert COCO and a Cell_Nuclei dataset used in used in [Unet++ original paper](https://arxiv.org/abs/1912.05074) to mulyi-class dataset format.
|
||||
|
||||
1. Select `*yaml` in `unet`.
|
||||
1. Select `*.yaml` file under `unet` and modify the parameters as needed.
|
||||
|
||||
2. run script to convert to mulyi-class dataset format:
|
||||
|
||||
```shell
|
||||
python preprocess_dataset.py -d /data/save_data_path
|
||||
python preprocess_dataset.py --config_path path/unet/*.yaml --data_path /data/save_data_path
|
||||
```
|
||||
|
||||
## [Environment Requirements](#contents)
|
||||
|
@ -481,7 +481,7 @@ Export MindIR on local
|
|||
Before exporting, you need to modify the parameter in the configuration — checkpoint_file_path and batch_ Size . checkpoint_ file_ Path is the CKPT file path, batch_ Size is set to 1.
|
||||
|
||||
```shell
|
||||
python export.py --config_path=[CONFIG_PATH]
|
||||
python export.py --config_path=[CONFIG_PATH] --checkpoint_file_path=[model_ckpt_path] --file_name=[air_model_name] --file_format=AIR
|
||||
```
|
||||
|
||||
The checkpoint_file_path parameter is required,
|
||||
|
|
|
@ -102,12 +102,12 @@ UNet++是U-Net的增强版本,使用了新的跨层链接方式和深层监督
|
|||
|
||||
我们提供了一个脚本来将 COCO 和 Cell_Nuclei 数据集([Unet++ 原论文](https://arxiv.org/abs/1912.05074) 中使用)转换为multi-class格式。
|
||||
|
||||
1. 在`src/model_utils/`下选择对应的yaml文件。
|
||||
1. 在unet下选择*.yaml文件,根据需要修改参数。
|
||||
|
||||
2. 运行转换脚本:
|
||||
|
||||
```shell
|
||||
python preprocess_dataset.py -d /data/save_data_path
|
||||
python preprocess_dataset.py --config_path path/unet/*.yaml --data_path /data/save_data_path
|
||||
```
|
||||
|
||||
## 环境要求
|
||||
|
@ -480,7 +480,7 @@ python eval.py --data_path=/path/to/data/ --checkpoint_file_path=/path/to/checkp
|
|||
本地导出mindir
|
||||
|
||||
```shell
|
||||
python export.py --config_path=[CONFIG_PATH]
|
||||
python export.py --config_path=[CONFIG_PATH] --checkpoint_file_path=[model_ckpt_path] --file_name=[air_model_name] --file_format=AIR
|
||||
```
|
||||
|
||||
ModelArts导出mindir
|
||||
|
|
|
@ -19,7 +19,7 @@ Images within one folder is an image, the image file named `"image.png"`, the ma
|
|||
import os
|
||||
import cv2
|
||||
import numpy as np
|
||||
from model_zoo.official.cv.unet.src.model_utils.config import config
|
||||
from src.model_utils.config import config
|
||||
|
||||
def annToMask(ann, height, width):
|
||||
"""Convert annotation to RLE and then to binary mask."""
|
||||
|
|
Loading…
Reference in New Issue