Segmentation of Organs at Risk Based on a Cascaded FAS-UNet+ Framework with Iterative Optimization Strategy
This repository provides the Pytorch code for "Segmentation of Organs at Risk Based on a Cascaded FAS-UNet+ Framework with Iterative Optimization Strategy".
Some important required packages include:
- Python == 3.8.15
- Pytorch == 1.13.1
- Some basic Python packages, such as Numpy, skimage.
- First, you can download the test datasets at SegTHOR challenge and put them in './nii_41_60'. To save the dataset as ".npy", run:
cd ./utils/
python3 get_test_npy_data.py
-
Put pth files.
(1). Download the 'pth' file of coarse and fine segmentation models from [BaiduPan [code:code], [BaiduPan [code:code].
(2). Place coarse ('123_s3_fold*_1e6_avg_best.pth') and fine ('123_fold*_net2_s3_net1_avg_best.pth') segmentation models in './test/pth_net_1/' and './test/pth_net_2_by_net1/' directory, respectively.
The files format is as follows:
/test/pth_net_1/
123_s3_fold1_1e6_avg_best.pth
...
123_s3_fold5_1e6_avg_best.pth
/test/pth_net_2_by_net1/
123_fold1_net2_s3_net1_avg_best.pth
...
123_fold5_net2_s3_net1_avg_best.pth
- To test cascaded FAS-UNet+ on test dataset, run:
cd ./test/
python3 two_stage_weight_pred.py
The segmentation results are saved in the './test/2stage_result/' directory.