-
Notifications
You must be signed in to change notification settings - Fork 4
/
eval_instructions.txt
179 lines (155 loc) · 7.35 KB
/
eval_instructions.txt
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# ------------------------------------------------------------------------------------------------#
Steps to be followed
# ------------------------------------------------------------------------------------------------#
1. git clone https://github.com/lalithjets/Global-reasoned-multi-task-model.git
2. cd Global-reasoned-multi-task-model/
# ------------------------- Download Commands ------------------------- #
# ------------------------- Checkpoints ------------------------- #
Link : https://drive.google.com/file/d/1HTSYta_Dn9-nF1Df4TUym38Nu0VMtl5l/view?usp=sharing
Command : (GDrive wget download - Optional) - Can be downloaded manually and placed in root
> 3. wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1HTSYta_Dn9-nF1Df4TUym38Nu0VMtl5l' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1HTSYta_Dn9-nF1Df4TUym38Nu0VMtl5l" -O gr_mtl_ssu_checkpoints.zip && rm -rf /tmp/cookies.txt
4. unzip gr_mtl_ssu_checkpoints.zip
5. rm gr_mtl_ssu_checkpoints.zip
# ------------------------- Dataset ------------------------- #
Link : https://drive.google.com/file/d/1OwWfgBZE0W5grXVaQN63VUUaTvufEmW0/view?usp=sharing
Command : (GDrive wget download - Optional) - Can be downloaded manually and placed in root
> 6. wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1OwWfgBZE0W5grXVaQN63VUUaTvufEmW0' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1OwWfgBZE0W5grXVaQN63VUUaTvufEmW0" -O gr_mtl_ssu_dataset.zip && rm -rf /tmp/cookies.txt
7. unzip gr_mtl_ssu_dataset.zip
8. rm gr_mtl_ssu_dataset.zip
9. Set the model_type, ver, seg_mode and checkpoint_dir in evaluation.py as given in instructions
# ------------------------- Run the command for Evaluation ------------------------- #
10. CUDA_VISIBLE_DEVICES=1 python3 evaluation.py
# --------------------------------------------- Sample Output --------------------------------------------- #
Settings :
model_type = 'amtl-t0'
ver = 'amtl_t0_sv1'
seg_mode = 'v1'
checkpoint_dir = 'amtl_t0_sv1'
# ------------------------------------------------------------------------------------------------#
Output
# ------------------------------------------------------------------------------------------------#
================= Evaluation ====================
Graph : acc: 0.7003 map: 0.2885 recall: 0.3096 loss: 0.3764}
Segmentation : Pacc: 0.9638 mIoU: 0.4354 loss: 0.1500}
================= Class-wise IoU ====================
Mean Value: 0.435358693711956
| Class | IoU |
|---------------------------+------------|
| Background | 0.971428 |
| Bipolar_Forceps | 0.696591 |
| Prograsp_Forceps | 0.435617 |
| Large_Needle_Driver | 0.00154275 |
| Monopolar_Curved_Scissors | 0.871583 |
| Ultrasound_Probe | 0.120284 |
| Suction_Instrument | 0.347132 |
| Clip_Applier | 0.0386921 |
# ------------------------------------------------------------------------------------------------#
Eval Repository Structure
# ------------------------------------------------------------------------------------------------#
├── checkpoints
│ ├── amtl_t0_s
│ │ └── best_epoch.pth
│ ├── amtl_t0_sv1
│ │ └── best_epoch.pth
│ ├── amtl_t0_sv2gc
│ │ └── best_epoch.pth
│ ├── amtl_t3g_sv1
│ │ └── best_epoch.pth
│ ├── amtl_t3pn_sv1
│ │ └── best_epoch.pth
│ ├── mtl_kd_t0_s
│ │ └── best_epoch.pth
│ ├── mtl_kd_t0_sv1
│ │ └── best_epoch.pth
│ ├── mtl_kd_t1_sv1
│ │ └── best_epoch.pth
│ ├── mtl_kd_t3g_sv1
│ │ └── best_epoch.pth
│ ├── stl_s
│ │ └── best_epoch.pth
│ ├── stl_sg
│ │ └── best_epoch.pth
│ ├── stl_s_ng
│ │ └── best_epoch.pth
│ ├── stl_s_v1
│ │ └── best_epoch.pth
│ └── stl_s_v2gc
│ └── best_epoch.pth
├── dataset
│ ├── labels_isi_dataset.json
│ ├── seq_1
│ │ ├── annotations
│ │ │ ├── frame000.png
│ │ │ ├── ...
│ │ ├── left_frames
│ │ │ ├── frame000.png
│ │ │ ├── ...
│ │ ├── vsgat
│ │ │ └── features
│ │ │ ├── frame000_features.hdf5
│ │ │ ├── ...
│ │ └── xml
│ │ ├── frame000.xml
│ │ ├── ...
│ ├── seq_16
│ │ ├── annotations
│ │ │ ├── frame000.png
│ │ │ ├── ...
│ │ ├── left_frames
│ │ │ ├── frame000.png
│ │ │ ├── ...
│ │ ├── vsgat
│ │ │ └── features
│ │ │ ├── frame000_features.hdf5
│ │ │ ├── ...
│ │ └── xml
│ │ ├── frame000.xml
│ │ ├── ...
│ ├── seq_5
│ │ ├── annotations
│ │ │ ├── frame000.png
│ │ │ ├── ...
│ │ ├── left_frames
│ │ │ ├── frame000.png
│ │ │ ├── ...
│ │ ├── vsgat
│ │ │ └── features
│ │ │ ├── frame000_features.hdf5
│ │ │ ├── ...
│ │ └── xml
│ │ ├── frame000.xml
│ │ ├── ...
│ └── surgicalscene_word2vec.hdf5
├── environment.yml
├── evaluation.py
├── eval_instructions.txt
├── figures
│ ├── figure_1.pdf
│ ├── figure_2.pdf
│ ├── figure_3.pdf
│ ├── figure_4.pdf
│ └── figure_5.pdf
├── models
│ ├── mtl_model.py
│ ├── __pycache__
│ │ ├── mtl_model.cpython-36.pyc
│ │ ├── scene_graph.cpython-36.pyc
│ │ ├── segmentation_model.cpython-36.pyc
│ │ └── surgicalDataset.cpython-36.pyc
│ ├── scene_graph.py
│ ├── segmentation_model.py
│ └── surgicalDataset.py
├── model_train.py
├── README.md
├── result_logs
│ ├── results_combined
│ └── results_kd.txt
└── utils
├── io.py
├── __pycache__
│ ├── scene_graph_eval_matrix.cpython-36.pyc
│ └── segmentation_eval_matrix.cpython-36.pyc
├── scene_graph_eval_matrix.py
├── segmentation_eval_matrix.py
├── utils.py
└── vis_tool.py