Unet Medical model for 2D image segmentation. This implementation is as described in the original paper [UNet: Convolutional Networks for Biomedical Image Segmentation](https://arxiv.org/abs/1505.04597). Unet, in the 2015 ISBI cell tracking competition, many of the best are obtained. In this paper, a network model for medical image segmentation is proposed, and a data enhancement method is proposed to effectively use the annotation data to solve the problem of insufficient annotation data in the medical field. A U-shaped network structure is also used to extract the context and location information.
Unet for 2D image segmentation. This implementation is as described in the original paper [UNet: Convolutional Networks for Biomedical Image Segmentation](https://arxiv.org/abs/1505.04597). Unet, in the 2015 ISBI cell tracking competition, many of the best are obtained. In this paper, a network model for medical image segmentation is proposed, and a data enhancement method is proposed to effectively use the annotation data to solve the problem of insufficient annotation data in the medical field. A U-shaped network structure is also used to extract the context and location information.
UNet++ is a neural architecture for semantic and instance segmentation with re-designed skip pathways and deep supervision.
@@ -71,7 +71,8 @@ After installing MindSpore via the official website, you can start training and
- Select the network and dataset to use
Refer to `src/config.py`. We support some parameter configurations for quick start. You can set `'model'` to `'unet_medical'`,`'unet_nested'` or `'unet_simple'` to select which net to use. We support `ISBI` and `Cell_nuclei` two dataset, you can set `'dataset'` to `'Cell_nuclei'` to use `Cell_nuclei` dataset, default is `ISBI`.
1. Select `cfg_unet` in `src/config.py`. We support unet and unet++, and we provide some parameter configurations for quick start.
2. If you want other parameters, please refer to `src/config.py`. You can set `'model'` to `'unet_nested'` or `'unet_simple'` to select which net to use. We support `ISBI` and `Cell_nuclei` two dataset, you can set `'dataset'` to `'Cell_nuclei'` to use `Cell_nuclei` dataset, default is `ISBI`.
- Run on Ascend
@@ -157,6 +158,7 @@ Parameters for both training and evaluation can be set in config.py
'name': 'Unet', # model name
'lr': 0.0001, # learning rate
'epochs': 400, # total training epochs when run 1p
'repeat': 400, # Repeat times pre one epoch
'distribute_epochs': 1600, # total training epochs when run 8p
'batchsize': 16, # training batch size
'cross_valid_ind': 1, # cross valid ind
@@ -185,6 +187,7 @@ Parameters for both training and evaluation can be set in config.py
'img_size': [96, 96], # image size
'lr': 3e-4, # learning rate
'epochs': 200, # total training epochs when run 1p
'repeat': 10, # Repeat times pre one epoch
'distribute_epochs': 1600, # total training epochs when run 8p
'batchsize': 16, # batch size
'num_classes': 2, # the number of classes in the dataset
@@ -206,6 +209,8 @@ Parameters for both training and evaluation can be set in config.py
'eval_interval': 1 # valuation interval when run_eval is True
```
*Note: total steps pre epoch is floor(epochs / repeat), because unet dataset usually is small, we repeat the dataset to avoid drop too many images when add batch size.*
## [Training Process](#contents)
### Training
@@ -269,7 +274,7 @@ You can add `run_eval` to start shell and set it True, if you want evaluation wh
Before running the command below, please check the checkpoint path used for evaluation. Please set the checkpoint path to be the absolute full path, e.g., "username/unet/ckpt_unet_medical_adam-48_600.ckpt".