| #!/bin/bash |
| set -e |
| |
|
|
|
|
| |
| pip install numpy |
| pip install torch |
| pip install 'monai[nibabel]' |
|
|
|
|
| |
| homedir="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| TEMP_LOG="temp.txt" |
|
|
| cd "$homedir" |
| find "$homedir" -type f -name $TEMP_LOG -delete |
|
|
|
|
| |
| if [ -e "./testing_ixi_t1.tar.gz" ] && [ -d "./workspace/" ]; then |
| echo "1" >> $TEMP_LOG |
| else |
| wget https://www.dropbox.com/s/y890gb6axzzqff5/testing_ixi_t1.tar.gz?dl=1 |
| mv testing_ixi_t1.tar.gz?dl=1 testing_ixi_t1.tar.gz |
| mkdir -p ./workspace/data/medical/ixi/IXI-T1/ |
| tar -C ./workspace/data/medical/ixi/IXI-T1/ -xf testing_ixi_t1.tar.gz |
| fi |
|
|
|
|
| |
| for file in "examples/classification_3d"/*train* |
| do |
| python "$file" |
| done |
|
|
| |
| [ -e "./best_metric_model_classification3d_array.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples classification_3d: model file not generated" | tee $TEMP_LOG && exit 0) |
| [ -e "./best_metric_model_classification3d_dict.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples classification_3d: model file not generated" | tee $TEMP_LOG && exit 0) |
|
|
| |
| for file in "examples/classification_3d"/*eval* |
| do |
| python "$file" |
| done |
|
|
|
|
| |
| for file in "examples/classification_3d_ignite"/*train* |
| do |
| python "$file" |
| done |
|
|
| |
| [ -e "./runs_array/net_checkpoint_20.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples classification_3d_ignite: model file not generated" | tee $TEMP_LOG && exit 0) |
| [ -e "./runs_dict/net_checkpoint_20.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples classification_3d_ignite: model file not generated" | tee $TEMP_LOG && exit 0) |
|
|
| |
| for file in "examples/classification_3d_ignite"/*eval* |
| do |
| python "$file" |
| done |
|
|
|
|
| |
| for file in "examples/segmentation_3d"/*train* |
| do |
| python "$file" |
| done |
|
|
| |
| [ -e "./best_metric_model_segmentation3d_array.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples segmentation_3d: model file not generated" | tee $TEMP_LOG && exit 0) |
| [ -e "./best_metric_model_segmentation3d_dict.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples segmentation_3d: model file not generated" | tee $TEMP_LOG && exit 0) |
|
|
| |
| for file in "examples/segmentation_3d"/*eval* |
| do |
| python "$file" |
| done |
|
|
|
|
| |
| for file in "examples/segmentation_3d_ignite"/*train* |
| do |
| python "$file" |
| done |
|
|
| |
| [ -e "./runs_array/net_checkpoint_100.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples segmentation_3d_ignite: model file not generated" | tee $TEMP_LOG && exit 0) |
| [ -e "./runs_dict/net_checkpoint_50.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples segmentation_3d_ignite: model file not generated" | tee $TEMP_LOG && exit 0) |
|
|
| |
| for file in "examples/segmentation_3d_ignite"/*eval* |
| do |
| python "$file" |
| done |
|
|
|
|
| |
| for file in "examples/workflows"/*train* |
| do |
| python "$file" |
| done |
|
|
| |
| [ -e "./runs/net_key_metric*.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples workflows: model file not generated" | tee $TEMP_LOG && exit 0) |
|
|
| |
| for file in "examples/workflows"/*eval* |
| do |
| python "$file" |
| done |
|
|
|
|
| |
| for file in "examples/synthesis"/*train* |
| do |
| python "$file" |
| done |
|
|
| |
| [ -e "./model_out/*.pth" ] && echo "1" >> $TEMP_LOG || (echo "examples synthesis: model file not generated" | tee $TEMP_LOG && exit 0) |
|
|
| |
| for file in "examples/synthesis"/*eval* |
| do |
| python "$file" |
| done |
|
|