forked from rmaphoh/AutoMorph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
63 lines (44 loc) · 1.3 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# RUN FILE FOR AUTOMORPH
# YUKUN ZHOU 2023-08-24
date
# STEP 0 - prepare AUTOMORH_DATA directory and clean up results
python automorph_data.py
if [ -z "${AUTOMORPH_DATA}" ]; then
rm -rf ./Results/*
echo "AUTOMORPH_DATA not set, using default directory"
else
rm -rf ${AUTOMORPH_DATA}/Results/*
echo "AUTOMORPH_DATA set to ${AUTOMORPH_DATA}"
fi
# STEP 1 IMAGE PREPROCESSING (EXTRA BACKGROUND REMOVE, SQUARE)
echo "### Preprocess Start ###"
cd M0_Preprocess
python EyeQ_process_main.py
# STEP 2 IMAGE QUALITY ASSESSMENT
echo "### Image Quality Assessment ###"
cd ../M1_Retinal_Image_quality_EyePACS
sh test_outside.sh
python merge_quality_assessment.py
# STEP 3 OPTIC DISC & VESSEL & ARTERY/VEIN SEG
echo "### Segmentation Modules ###"
cd ../M2_Vessel_seg
sh test_outside.sh
cd ../M2_Artery_vein
sh test_outside.sh
cd ../M2_lwnet_disc_cup
sh test_outside.sh
# STEP 4 METRIC MEASUREMENT
echo "### Feature measuring ###"
cd ../M3_feature_zone/retipy/
python create_datasets_disc_centred_B.py
python create_datasets_disc_centred_C.py
python create_datasets_macular_centred_B.py
python create_datasets_macular_centred_C.py
cd ../../M3_feature_whole_pic/retipy/
python create_datasets_macular_centred.py
python create_datasets_disc_centred.py
cd ../../
python csv_merge.py
echo "### Done ###"
date