-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline_GI.sh
64 lines (42 loc) · 1.43 KB
/
pipeline_GI.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
#!/bash/bin
echo "-------------- SCRIPT TO EXECUTE GI PIPELINE -----------------"
# Assumed folder structure:
# ~/base
# /codes
# /data
# /images, /cleaned, /cropped, /points
dir=$(pwd)
echo "Current directory (should be codes folder): "$dir
##########################
# ---- GI HISTOLOGY ---- #
echo "STEP 1: PROCESS THE IMAGE FILES"
python clean_crop.py
# output: (i) Full cleaned images: ~/data/cleaned/{ID}/{file}.png
# (ii) Cropped images: ~/data/cropped/{train,test}/{ID}/{tissue}/{file}.png
# (iii) Crop location ~/data/dat_idx_crops.csv
echo "STEP 2: PROCESSING ROBARTS"
python lbl_robarts.py
# output: ../data/df_lbls_robarts.csv
echo "STEP 3: PROCESSING NANCY"
python lbl_nancy.py
# output: ../data/df_lbls_nancy.csv
echo "STEP 4: ANONYMIZE DATA"
python data_anonymize.py
# output: ../data/df_lbls_anon.csv
# ../data/df_codebreaker.csv
# ../data/cropped/{train/test}/{ID}/*.png
return
echo "STEP 5: TRAINING ORDINAL MODEL"
python cnn_ordinal_nancy_robarts.py
# output: ../data/di_ID.npy
# /saved_networks/cnn_conc_epoch{#}.pt
echo "STEP 6: EVALUATE MODEL"
python eval_ordinal.py
# output: ../data/df_ordinal_score.csv
############################
# ---- CELL ANNOTATOR ---- #
echo "STEP 1: SELECT PATIENTS/IMAGES FOR TRAINING"
python patient_select.py
# output: ../data/cell_counter/*.png
echo "STEP 2: RUN SCRIPTS ON ANNOTATION POINTS"
python qupath_points.py