Commit 0fc11e73 authored by cc215's avatar cc215 💬
Browse files

update readme

parent 4cbe93f3
......@@ -97,7 +97,7 @@ Results will be saved under `test_results` by default
## Model update (2021.3.9):
- A model trained on UKBB data (SAX slices) with adversarial data augmentation is available.
- This model is expected with improved robustness (especially for images with bias field)
- This model is expected with improved robustness on cross-domain data (especially for images affected by bias field)
- To deploy the model for segmentation, please run the following command to test first:
- run `source ./demo_scripts/predict_test.sh`
- this script will perform the following steps:
......@@ -109,14 +109,17 @@ Results will be saved under `test_results` by default
- 6. recover the image size and resample the prediction back to its original image space.
- 7. save the predicted segmentation maps for `test_data/patient_id/LVSA/LVSA_img_{}.nii.gz` to `test_results/LVSA/patient_id/Adv_Compose_pred_ED.nii.gz`
- we also provide a script to process a single image each time.
- to use, please run the following command to test first:
- we also provide a script to predict a single image each time.
- before use, please run the following command to test first:
run `source ./demo_scripts/predict_single.sh`
- then you can modify the command to process your own data (XXX.nii.gz) and a segmentation mask will be saved at 'YYY.nii.gz'
- `python predict_single_LVSA.py -m './checkpoints/UNet_LVSA_Adv_Compose.pth' -i 'XXX.nii.gz' -o 'YYY.nii.gz' -c 192 -g 0 -b 8`
* other commands:
- c: crop image to save memory, you can change it to any size as long as it can be divided by 16, and your segmented objects is still within the cropped image
- g: gpu id
- b: batch size (>=1)
- then you can modify the command to process your own data (XXX.nii.gz) and a segmentation mask will be saved at 'YYY.nii.gz',
- run `python predict_single_LVSA.py -m './checkpoints/UNet_LVSA_Adv_Compose.pth' -i 'XXX.nii.gz' -o 'YYY.nii.gz' -c 192 -g 0 -b 8`
* notes:
- m: model path
- i: input image path
- o: output path for prediction
- c: crop image to save memory, you can change it to any size as long as it can be divided by 16, and the targeted structures are still within the image region after cropping
- g: int, gpu id
- b: int, batch size (>=1)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment