DHPR commited on
Commit
30ab71c
·
1 Parent(s): 5c5a570

Upload 25 files

Browse files
.gitattributes CHANGED
@@ -40,3 +40,10 @@ inference/images/potsdam_00077.png filter=lfs diff=lfs merge=lfs -text
40
  inference/images/potsdam_00356.png filter=lfs diff=lfs merge=lfs -text
41
  inference/images/roma_01067.png filter=lfs diff=lfs merge=lfs -text
42
  inference/images/roma_01440.png filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
40
  inference/images/potsdam_00356.png filter=lfs diff=lfs merge=lfs -text
41
  inference/images/roma_01067.png filter=lfs diff=lfs merge=lfs -text
42
  inference/images/roma_01440.png filter=lfs diff=lfs merge=lfs -text
43
+ images/bologna_00676.png filter=lfs diff=lfs merge=lfs -text
44
+ images/brno_01418.png filter=lfs diff=lfs merge=lfs -text
45
+ images/lyon_00016.png filter=lfs diff=lfs merge=lfs -text
46
+ images/potsdam_00077.png filter=lfs diff=lfs merge=lfs -text
47
+ images/potsdam_00356.png filter=lfs diff=lfs merge=lfs -text
48
+ images/roma_01067.png filter=lfs diff=lfs merge=lfs -text
49
+ images/roma_01440.png filter=lfs diff=lfs merge=lfs -text
anno_val_combined.json ADDED
The diff for this file is too large to render. See raw diff
 
images/04dd75bb-9507acc4.jpg ADDED
images/0e861c60-30da4fb2.jpg ADDED
images/130add4f-d6b8cd0a.jpg ADDED
images/198cfa25-f7b54297.jpg ADDED
images/3089bf15-f20cf8f2.jpg ADDED
images/4b9930a7-53e1e6c4.jpg ADDED
images/502aa4a8-eb99514f.jpg ADDED
images/61c9998c-f413580c.jpg ADDED
images/67c0474a-b6ce015a.jpg ADDED
images/8248d053-ae2a7446.jpg ADDED
images/8dc90ad0-f2a21273.jpg ADDED
images/8e574099-d7a825ba.jpg ADDED
images/9f20d1b9-faff5a29.jpg ADDED
images/a95ddb27-e0594fd7.jpg ADDED
images/bologna_00676.png ADDED

Git LFS Details

  • SHA256: f773a07023d1eec3a2cbfef2857ec921853a0c19ba036db9b3378be099d82f11
  • Pointer size: 132 Bytes
  • Size of remote file: 2.03 MB
images/brno_01418.png ADDED

Git LFS Details

  • SHA256: d32ed07c9d27e78cb90756a46453c1fcf7d9b1e10dadf1d41345aba26dd6e33e
  • Pointer size: 132 Bytes
  • Size of remote file: 2.24 MB
images/lyon_00016.png ADDED

Git LFS Details

  • SHA256: 3a681e5b870c50638beeda4fd654a0c8d4f9751980c5c80f111d03e3e7790e81
  • Pointer size: 132 Bytes
  • Size of remote file: 2.46 MB
images/potsdam_00077.png ADDED

Git LFS Details

  • SHA256: 285925ac7e933a1603487b0f80515dc92507f85bd6b21e75a0123b27d18fe33f
  • Pointer size: 132 Bytes
  • Size of remote file: 2.41 MB
images/potsdam_00356.png ADDED

Git LFS Details

  • SHA256: e6d2ab37b29d9d302a9ba22477e5d20259ea7d0a8c2305f37bba146331c177c4
  • Pointer size: 132 Bytes
  • Size of remote file: 2.35 MB
images/roma_01067.png ADDED

Git LFS Details

  • SHA256: 1f2c0c30dabc924a65b8fab43c48fb65f858441e183d0dbd107c738014a7a54b
  • Pointer size: 132 Bytes
  • Size of remote file: 2.06 MB
images/roma_01440.png ADDED

Git LFS Details

  • SHA256: fb5eac4f9d6463b876fe2cb3960214bb52cbd6d5c63368ff9b7e4c2f19abc78b
  • Pointer size: 132 Bytes
  • Size of remote file: 2.52 MB
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ omegaconf
2
+ Pillow
3
+ streamlit
4
+ pathlib
5
+ numpy
6
+ matplotlib
spec_val_demo.json ADDED
@@ -0,0 +1,866 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "9f20d1b9-faff5a29": {
3
+ "key": [
4
+ "0e861c60-30da4fb2",
5
+ "8ef7113f-8982496f",
6
+ "1a05ea87-806084c3",
7
+ "57af01e2-5f531cd9",
8
+ "9f20d1b9-faff5a29"
9
+ ],
10
+ "rank": [
11
+ 4.0,
12
+ 2.0,
13
+ 5.0,
14
+ 3.0,
15
+ 1.0
16
+ ],
17
+ "chatgpt_score": [
18
+ 0.6,
19
+ 0.4,
20
+ 0.2,
21
+ 0.1,
22
+ 1.0
23
+ ],
24
+ "hazard": [
25
+ "my car slids to the right due to my high speed and Entity #1 and won't stop in time thus crashing into Entity #2",
26
+ "driving forward with no snow tires, driving too fast on Entity #1, my car slides and clips Entity #2.",
27
+ "in two side of the road snow was melting. at that moment in front of my car Entity #1 is very close to my car. so, my car was skid the snow and hit the Entity #1.",
28
+ "Entity #1 driving forward, with my speed and Entity #2, my car is too far to the right, due to this my car clips parked Entity #1",
29
+ "driving with Entity #1 and Entity #2, going forward my car would slide when applying brakes and crash into Entity #3 passenger side due to Entity #1."
30
+ ],
31
+ "annotated_hazard": "driving with Entity #1 and Entity #2, going forward my car would slide when applying brakes and crash into Entity #3 passenger side due to Entity #1.",
32
+ "annotated_rank": 1.0
33
+ },
34
+ "67c0474a-b6ce015a": {
35
+ "key": [
36
+ "0ba01bd3-b1652add",
37
+ "barcelona_00144",
38
+ "roma_00781",
39
+ "berlin_00254",
40
+ "67c0474a-b6ce015a"
41
+ ],
42
+ "rank": [
43
+ 4.0,
44
+ 5.0,
45
+ 3.0,
46
+ 2.0,
47
+ 1.0
48
+ ],
49
+ "chatgpt_score": [
50
+ 0.4,
51
+ 0.3,
52
+ 0.2,
53
+ 0.5,
54
+ 1.0
55
+ ],
56
+ "hazard": [
57
+ "Entity #1 and Entity #2 are about to brake and Entity #2 might take the central lane and we would hit on Entity #2 unexpectedly at this speed",
58
+ "Entity #1 suddenly takes a slight left, so Entity #2, in an attempt to avoid the crash comes in front of our car, and we slam into Entity #2.",
59
+ "Entity #1 is about to stop while Entity #2 is overtaking Entity #1. both Entity #1 and Entity #2 are trying to block our way. our car would crash Entity #1 with this speed too.",
60
+ "Entity #1 would overtake Entity #2 and try to enter the center lane. We would hit Entity #1 as we did not expect it to suddenly come in front of our car.",
61
+ "both Entity #1 and Entity #2 might get into our lane and could crash unexpectedly. moving at this speed we might not able to stop in time and we might hit both Entity #1 and Entity #2."
62
+ ],
63
+ "annotated_hazard": "both Entity #1 and Entity #2 might get into our lane and could crash unexpectedly. moving at this speed we might not able to stop in time and we might hit both Entity #1 and Entity #2.",
64
+ "annotated_rank": 1.0
65
+ },
66
+ "lyon_00016": {
67
+ "key": [
68
+ "4b9930a7-53e1e6c4",
69
+ "198cfa25-f7b54297",
70
+ "97fdd307-1725c18e",
71
+ "060731f0-9b7f0cfd",
72
+ "lyon_00016"
73
+ ],
74
+ "rank": [
75
+ 2.0,
76
+ 3.0,
77
+ 5.0,
78
+ 4.0,
79
+ 1.0
80
+ ],
81
+ "chatgpt_score": [
82
+ 0.5,
83
+ 0.0,
84
+ 0.9,
85
+ 0.2,
86
+ 1.0
87
+ ],
88
+ "hazard": [
89
+ "Entity #2 is green, so I will not stop the car. at that moment, Entity #1 crosses my path suddenly. My car will hit Entity #1.",
90
+ "Entity #1 is red, we are braking almost stopped, walk in to my car.",
91
+ "driving forward due to Entity #2, Entity #1 disobeys Entity #2 and crosses, due to this my car won't stop in time and hits Entity #1",
92
+ "Entity #1 was standing on the cycle in front of me, because the Entity #2 is red. I'm not completely stop yet, my car hit Entity #1 at the back.",
93
+ "Entity #1 disobeys Entity #2, crosses, due to my car's speed will not stop in time and hits Entity #1"
94
+ ],
95
+ "annotated_hazard": "Entity #1 disobeys Entity #2, crosses, due to my car's speed will not stop in time and hits Entity #1",
96
+ "annotated_rank": 1.0
97
+ },
98
+ "61c9998c-f413580c": {
99
+ "key": [
100
+ "3b04ac02-0e2b2ef0",
101
+ "wuerzburg_00404",
102
+ "569c337c-2542eba2",
103
+ "352dd68d-21fa3b7e",
104
+ "61c9998c-f413580c"
105
+ ],
106
+ "rank": [
107
+ 2.0,
108
+ 5.0,
109
+ 4.0,
110
+ 3.0,
111
+ 1.0
112
+ ],
113
+ "chatgpt_score": [
114
+ 0.4,
115
+ 0.3,
116
+ 0.6,
117
+ 0.1,
118
+ 1.0
119
+ ],
120
+ "hazard": [
121
+ "Entity #1 comes into my lane; I veer to the right to avoid it, thus hitting Entity #2.",
122
+ "Entity #2 moves to my lane without looking due to Entity #1, due to speed, will not stop in time and hits Entity #1",
123
+ "distracted by Entity #2, Entity #1 changes into my lane without signaling, due to this my car hits Entity #1",
124
+ "my car is straddling Entity #1 instead of keeping in one lane. my car will clip the left rear of Entity #2.",
125
+ "Entity #1 comes into my lane due to Entity #2 in front, does not check mirror and collides with my car"
126
+ ],
127
+ "annotated_hazard": "Entity #1 comes into my lane due to Entity #2 in front, does not check mirror and collides with my car",
128
+ "annotated_rank": 1.0
129
+ },
130
+ "8e574099-d7a825ba": {
131
+ "key": [
132
+ "pisa_00195",
133
+ "barcelona_00191",
134
+ "3601d981-419b4970",
135
+ "bologna_00514",
136
+ "8e574099-d7a825ba"
137
+ ],
138
+ "rank": [
139
+ 2.0,
140
+ 3.0,
141
+ 4.0,
142
+ 5.0,
143
+ 1.0
144
+ ],
145
+ "chatgpt_score": [
146
+ 0.2,
147
+ 0.3,
148
+ 0.0,
149
+ 0.5,
150
+ 1.0
151
+ ],
152
+ "hazard": [
153
+ "I am turning left onto a street when I notice Entity #1, but I am already turning too wide and going too fast to avoid running into Entity #1.",
154
+ "both Entity #1 and Entity #2 would cross paths and we would hit Entity #1 and Entity #2 at its back.",
155
+ "i have swecrved into oncoming traffic lane to avoid Entity #1. now i will hit Entity #2 coming toward me in the oncoming lane, head on.",
156
+ "Entity #1 is stopping in front of me as Entity #2 is crossing the road. Misjudging the length of Entity #1, we hit Entity #1 from behind.",
157
+ "Entity #1 is crossing the road from left to right, and because of that, Entity #2 is moving slowly. At this time, my car is trying to turn right, so it will hit Entity #2."
158
+ ],
159
+ "annotated_hazard": "Entity #1 is crossing the road from left to right, and because of that, Entity #2 is moving slowly. At this time, my car is trying to turn right, so it will hit Entity #2.",
160
+ "annotated_rank": 1.0
161
+ },
162
+ "bologna_00676": {
163
+ "key": [
164
+ "pisa_00143",
165
+ "brno_00214",
166
+ "toulouse_00455",
167
+ "roma_01067",
168
+ "bologna_00676"
169
+ ],
170
+ "rank": [
171
+ 2.0,
172
+ 3.0,
173
+ 4.0,
174
+ 5.0,
175
+ 1.0
176
+ ],
177
+ "chatgpt_score": [
178
+ 0.2,
179
+ 0.0,
180
+ 0.4,
181
+ 0.0,
182
+ 1.0
183
+ ],
184
+ "hazard": [
185
+ "there is a possibility that Entity #1 and Entity #2 might crash at each other in front of us, at 45km/h speed we might not stop on time and might hit Entity #1 and Entity #2.",
186
+ "Entity #1 showing that we are too fast and Entity #2 is going to brake and make us crash into his back.",
187
+ "As we are heading down a very narrow road at 45 km/h, we might not get control at this speed and might hit Entity #1 unexpectedly.",
188
+ "Entity #2 would definitely enter the center lane, whereas Entity #1 would stop due to traffic ahead. We would hit Entity #2, who is slowing down for Entity #1.",
189
+ "We speed forward but suddenly realize that Entity #2 is coming from the opposite direction at a very high speed. Due to a narrow road, we drive our car to the left so Entity #2's car can pass smoothly, but in this process, we collide with Entity #1."
190
+ ],
191
+ "annotated_hazard": "We speed forward but suddenly realize that Entity #2 is coming from the opposite direction at a very high speed. Due to a narrow road, we drive our car to the left so Entity #2's car can pass smoothly, but in this process, we collide with Entity #1.",
192
+ "annotated_rank": 1.0
193
+ },
194
+ "brno_01418": {
195
+ "key": [
196
+ "roma_00781",
197
+ "roma_01067",
198
+ "roma_00531",
199
+ "67c0474a-b6ce015a",
200
+ "brno_01418"
201
+ ],
202
+ "rank": [
203
+ 5.0,
204
+ 4.0,
205
+ 2.0,
206
+ 3.0,
207
+ 1.0
208
+ ],
209
+ "chatgpt_score": [
210
+ 0.2,
211
+ 0.6,
212
+ 0.3,
213
+ 0.9,
214
+ 1.0
215
+ ],
216
+ "hazard": [
217
+ "Entity #1 is about to stop while Entity #2 is overtaking Entity #1. both Entity #1 and Entity #2 are trying to block our way. our car would crash Entity #1 with this speed too.",
218
+ "Entity #2 would definitely enter the center lane, whereas Entity #1 would stop due to traffic ahead. We would hit Entity #2, who is slowing down for Entity #1.",
219
+ "Entity #1 would turn right with the right signal indicator while Entity #2 would enter the center lane. At this speed, our car would not stop; we would hit Entity #2 while it slowing down for Entity #1.",
220
+ "both Entity #1 and Entity #2 might get into our lane and could crash unexpectedly. moving at this speed we might not able to stop in time and we might hit both Entity #1 and Entity #2.",
221
+ "Entity #1 is overtaking and would enter the center lane whereas Entity #2 would stop due to traffic. we would crash either Entity #1 or Entity #2 at this given speed"
222
+ ],
223
+ "annotated_hazard": "Entity #1 is overtaking and would enter the center lane whereas Entity #2 would stop due to traffic. we would crash either Entity #1 or Entity #2 at this given speed",
224
+ "annotated_rank": 1.0
225
+ },
226
+ "potsdam_00077": {
227
+ "key": [
228
+ "berlin_00254",
229
+ "9fd82c31-b6de6f52",
230
+ "9d9c971c-69c1dc36",
231
+ "roma_01085",
232
+ "potsdam_00077"
233
+ ],
234
+ "rank": [
235
+ 4.0,
236
+ 2.0,
237
+ 3.0,
238
+ 5.0,
239
+ 1.0
240
+ ],
241
+ "chatgpt_score": [
242
+ 0.2,
243
+ 0.6,
244
+ 0.4,
245
+ 0.0,
246
+ 1.0
247
+ ],
248
+ "hazard": [
249
+ "Entity #1 would overtake Entity #2 and try to enter the center lane. We would hit Entity #1 as we did not expect it to suddenly come in front of our car.",
250
+ "Entity #1 leaves parking spot but does not see my car due to Entity #2, with my speed my car hits Entity #1",
251
+ "Entity #1 is moving in front of me to the left direction connecting road. at the time, Entity #2 is coming from that road, due to this, i will collide at the Entity #1 sure.",
252
+ "i pull to the left more on lane due avoid Entity #1, due to this, i hit Entity #2",
253
+ "Entity #1 view is obstructed by Entity #2, reverses anyways, no signal, due to this my car will hit Entity #1"
254
+ ],
255
+ "annotated_hazard": "Entity #1 view is obstructed by Entity #2, reverses anyways, no signal, due to this my car will hit Entity #1",
256
+ "annotated_rank": 1.0
257
+ },
258
+ "roma_01067": {
259
+ "key": [
260
+ "5e6fcaaa-1d775375",
261
+ "roma_00781",
262
+ "0ba01bd3-b1652add",
263
+ "3de73ef3-29ef57ff",
264
+ "roma_01067"
265
+ ],
266
+ "rank": [
267
+ 2.0,
268
+ 3.0,
269
+ 5.0,
270
+ 4.0,
271
+ 1.0
272
+ ],
273
+ "chatgpt_score": [
274
+ 0.0,
275
+ 0.2,
276
+ 0.6,
277
+ 0.4,
278
+ 1.0
279
+ ],
280
+ "hazard": [
281
+ "Entity #1 would turn right because Entity #2 was blocking the way. We would hit Entity #1 due to this unexpected move.",
282
+ "Entity #1 is about to stop while Entity #2 is overtaking Entity #1. both Entity #1 and Entity #2 are trying to block our way. our car would crash Entity #1 with this speed too.",
283
+ "Entity #1 and Entity #2 are about to brake and Entity #2 might take the central lane and we would hit on Entity #2 unexpectedly at this speed",
284
+ "Entity #1 and Entity #2 are too close and are blocking our way so we at 45km/h will have no space to stop.",
285
+ "Entity #2 would definitely enter the center lane, whereas Entity #1 would stop due to traffic ahead. We would hit Entity #2, who is slowing down for Entity #1."
286
+ ],
287
+ "annotated_hazard": "Entity #2 would definitely enter the center lane, whereas Entity #1 would stop due to traffic ahead. We would hit Entity #2, who is slowing down for Entity #1.",
288
+ "annotated_rank": 1.0
289
+ },
290
+ "04dd75bb-9507acc4": {
291
+ "key": [
292
+ "2b03d428-8abaa40f",
293
+ "4b9930a7-53e1e6c4",
294
+ "b05d5f64-13c4b5c7",
295
+ "60ba1de1-c22d2d5c",
296
+ "04dd75bb-9507acc4"
297
+ ],
298
+ "rank": [
299
+ 2.0,
300
+ 4.0,
301
+ 5.0,
302
+ 3.0,
303
+ 1.0
304
+ ],
305
+ "chatgpt_score": [
306
+ 0.8,
307
+ 0.4,
308
+ 0.5,
309
+ 0.3,
310
+ 1.0
311
+ ],
312
+ "hazard": [
313
+ "I'm moving my car at a high speed because of Entity #1; at this time, as Entity #2 changes lanes in my direction, my car will hit Entity 2.",
314
+ "Entity #2 is green, so I will not stop the car. at that moment, Entity #1 crosses my path suddenly. My car will hit Entity #1.",
315
+ "there is only a single Entity #1 for traffic going my direction. Entity #2 is entering Entity #1 from my right. i will sideswipe Entity #2.",
316
+ "Entity #1 is in green, so I will not reduce my speed; as Entity #2 moves slowly without knowing my speed, my car will collide with it.",
317
+ "the Entity #1 was green, a Entity #2 starts running in front of me. so, that Entity #2 move in my way, my car will definitely smash the Entity #2. because i am driving at high speed on the road."
318
+ ],
319
+ "annotated_hazard": "the Entity #1 was green, a Entity #2 starts running in front of me. so, that Entity #2 move in my way, my car will definitely smash the Entity #2. because i am driving at high speed on the road.",
320
+ "annotated_rank": 1.0
321
+ },
322
+ "0e861c60-30da4fb2": {
323
+ "key": [
324
+ "10af5310-a3e93daa",
325
+ "9f20d1b9-faff5a29",
326
+ "9fd82c31-b6de6f52",
327
+ "5ab4b4dd-5ef6422b",
328
+ "0e861c60-30da4fb2"
329
+ ],
330
+ "rank": [
331
+ 4.0,
332
+ 2.0,
333
+ 5.0,
334
+ 3.0,
335
+ 1.0
336
+ ],
337
+ "chatgpt_score": [
338
+ 0.2,
339
+ 0.1,
340
+ 0.6,
341
+ 0.4,
342
+ 1.0
343
+ ],
344
+ "hazard": [
345
+ "Entity #1 pulls out of the parking spot, but due to Entity #2, Entity #1 does not see my car coming and hits it.",
346
+ "driving with Entity #1 and Entity #2, going forward my car would slide when applying brakes and crash into Entity #3 passenger side due to Entity #1.",
347
+ "Entity #1 leaves parking spot but does not see my car due to Entity #2, with my speed my car hits Entity #1",
348
+ "Entity #1 brakes, due to Entity #1 and speed, my car slides into back of Entity #1",
349
+ "my car slids to the right due to my high speed and Entity #1 and won't stop in time thus crashing into Entity #2"
350
+ ],
351
+ "annotated_hazard": "my car slids to the right due to my high speed and Entity #1 and won't stop in time thus crashing into Entity #2",
352
+ "annotated_rank": 1.0
353
+ },
354
+ "8248d053-ae2a7446": {
355
+ "key": [
356
+ "8218ae24-9e43171b",
357
+ "61c9998c-f413580c",
358
+ "0fe850c9-6c8dc241",
359
+ "72558a98-bdecec6e",
360
+ "8248d053-ae2a7446"
361
+ ],
362
+ "rank": [
363
+ 5.0,
364
+ 3.0,
365
+ 4.0,
366
+ 2.0,
367
+ 1.0
368
+ ],
369
+ "chatgpt_score": [
370
+ 0.4,
371
+ 0.6,
372
+ 0.5,
373
+ 0.7,
374
+ 1.0
375
+ ],
376
+ "hazard": [
377
+ "Entity #2 change his lane from right-side to left-side and come front of Entity #1. seeing that, Entity #1 is slowing down but at the 75+ km/h speed i can't stop my car in time and hit the Entity #1.",
378
+ "Entity #1 comes into my lane due to Entity #2 in front, does not check mirror and collides with my car",
379
+ "Entity #1 slows down to meet Entity #2, my car is travelling fast and above Entity #2, due to this my car hits Entity #1",
380
+ "Entity #1 slows down due to Entity #2, i'm not paying attention ahead, due to this my car slams into back of Entity #1",
381
+ "Entity #1 comes into my lane but suddenly brakes due to Entity #2, my car don't slow down and hits Entity #1"
382
+ ],
383
+ "annotated_hazard": "Entity #1 comes into my lane but suddenly brakes due to Entity #2, my car don't slow down and hits Entity #1",
384
+ "annotated_rank": 1.0
385
+ },
386
+ "130add4f-d6b8cd0a": {
387
+ "key": [
388
+ "0e861c60-30da4fb2",
389
+ "9f20d1b9-faff5a29",
390
+ "540f5aa8-b723232d",
391
+ "1a05ea87-806084c3",
392
+ "130add4f-d6b8cd0a"
393
+ ],
394
+ "rank": [
395
+ 4.0,
396
+ 3.0,
397
+ 2.0,
398
+ 5.0,
399
+ 1.0
400
+ ],
401
+ "chatgpt_score": [
402
+ 0.2,
403
+ 0.5,
404
+ 0.9,
405
+ 0.2,
406
+ 1.0
407
+ ],
408
+ "hazard": [
409
+ "my car slids to the right due to my high speed and Entity #1 and won't stop in time thus crashing into Entity #2",
410
+ "driving with Entity #1 and Entity #2, going forward my car would slide when applying brakes and crash into Entity #3 passenger side due to Entity #1.",
411
+ "Entity #1 may brake and with Entity #2 on the road, our car may skid and hit with Entity #1.",
412
+ "in two side of the road snow was melting. at that moment in front of my car Entity #1 is very close to my car. so, my car was skid the snow and hit the Entity #1.",
413
+ "at the given speed, our car might skid while slowing down because of Entity #2 and hit the back of Entity #1."
414
+ ],
415
+ "annotated_hazard": "at the given speed, our car might skid while slowing down because of Entity #2 and hit the back of Entity #1.",
416
+ "annotated_rank": 1.0
417
+ },
418
+ "potsdam_00356": {
419
+ "key": [
420
+ "roma_00531",
421
+ "pisa_00143",
422
+ "ulm_00832",
423
+ "7bc6abdd-6a5c7b75",
424
+ "potsdam_00356"
425
+ ],
426
+ "rank": [
427
+ 2.0,
428
+ 5.0,
429
+ 4.0,
430
+ 3.0,
431
+ 1.0
432
+ ],
433
+ "chatgpt_score": [
434
+ 0.2,
435
+ 0.4,
436
+ 0.1,
437
+ 0.3,
438
+ 1.0
439
+ ],
440
+ "hazard": [
441
+ "Entity #1 would turn right with the right signal indicator while Entity #2 would enter the center lane. At this speed, our car would not stop; we would hit Entity #2 while it slowing down for Entity #1.",
442
+ "there is a possibility that Entity #1 and Entity #2 might crash at each other in front of us, at 45km/h speed we might not stop on time and might hit Entity #1 and Entity #2.",
443
+ "both Entity #1 and Entity #2 would cross on the intersection and we would crash Entity #1 in the back",
444
+ "both Entity #1 and Entity #2 might stop due to traffic along the road. we could crash with Entity #1 or Entity #2 at this speed probably",
445
+ "we are in the need to turn to the left side. as we are close to Entity #1 and with the high speed of 75+km/h our car could overlap the Entity #1 and lose control. ultimately, our car could crash on Entity #2 back side."
446
+ ],
447
+ "annotated_hazard": "we are in the need to turn to the left side. as we are close to Entity #1 and with the high speed of 75+km/h our car could overlap the Entity #1 and lose control. ultimately, our car could crash on Entity #2 back side.",
448
+ "annotated_rank": 1.0
449
+ },
450
+ "a95ddb27-e0594fd7": {
451
+ "key": [
452
+ "04dd75bb-9507acc4",
453
+ "roma_01440",
454
+ "1a92ac6f-4bc71beb",
455
+ "79606cb4-a589dfb8",
456
+ "a95ddb27-e0594fd7"
457
+ ],
458
+ "rank": [
459
+ 2.0,
460
+ 4.0,
461
+ 5.0,
462
+ 3.0,
463
+ 1.0
464
+ ],
465
+ "chatgpt_score": [
466
+ 0.4,
467
+ 0.3,
468
+ 0.6,
469
+ 0.2,
470
+ 1.0
471
+ ],
472
+ "hazard": [
473
+ "the Entity #1 was green, a Entity #2 starts running in front of me. so, that Entity #2 move in my way, my car will definitely smash the Entity #2. because i am driving at high speed on the road.",
474
+ "the Entity #2 do not know whether our car is on the left lane. as the Entity #1 is showing green, our car could come closer to the crossway. at that juncture, the Entity #2 could turn to the left and crash our car.",
475
+ "Due to Entity #1 showing green, Entity #2 would move from the right to our lane to go straight without signaling. So my car hits Entity #2 due to unexpectation.",
476
+ "Entity #1 is in green, so I will not reduce my speed. At this time, as Entity #2 moves slowly for its left turn, my car will hit Entity #2.",
477
+ "I am driving at 75+ km/h with Entity #1 on green. As Entity #2 suddenly enters my lane, I won't be able to control my car at the given speed and will smash into Entity #2."
478
+ ],
479
+ "annotated_hazard": "I am driving at 75+ km/h with Entity #1 on green. As Entity #2 suddenly enters my lane, I won't be able to control my car at the given speed and will smash into Entity #2.",
480
+ "annotated_rank": 1.0
481
+ },
482
+ "8dc90ad0-f2a21273": {
483
+ "key": [
484
+ "7b98a859-fe1928c8",
485
+ "88a8e32c-8f33ece5",
486
+ "0a5b3a25-81c3be4d",
487
+ "98dbf2f0-2dcdc33f",
488
+ "8dc90ad0-f2a21273"
489
+ ],
490
+ "rank": [
491
+ 4.0,
492
+ 2.0,
493
+ 3.0,
494
+ 5.0,
495
+ 1.0
496
+ ],
497
+ "chatgpt_score": [
498
+ 0.4,
499
+ 0.2,
500
+ 0.6,
501
+ 0.3,
502
+ 1.0
503
+ ],
504
+ "hazard": [
505
+ "not paying attention, i proceed at intersection and don't see Entity #1, Entity #1 collides with my car",
506
+ "i proceed at intersection due to Entity #2, Entity #1 decides to make an abrupt left turn without signaling and looking for oncoming traffic, due to speed will crash into Entity #1",
507
+ "due to Entity #2, obscurbes my vision and misjudge how far Entity #1 to my car, due to this, i stop late and hits Entity #1",
508
+ "Entity #1 not paying attention to Entity #2, crosses into my lane, at given speed won't stop fast enough and crash into Entity #1 head on.",
509
+ "driving forward, due to Entity #1 obscurbing my vision, i don't see Entity #2 and go through intersection and get hit by unexpected car."
510
+ ],
511
+ "annotated_hazard": "driving forward, due to Entity #1 obscurbing my vision, i don't see Entity #2 and go through intersection and get hit by unexpected car.",
512
+ "annotated_rank": 1.0
513
+ },
514
+ "roma_01440": {
515
+ "key": [
516
+ "1a92ac6f-4bc71beb",
517
+ "roma_00531",
518
+ "ulm_00541",
519
+ "9d9c971c-69c1dc36",
520
+ "roma_01440"
521
+ ],
522
+ "rank": [
523
+ 2.0,
524
+ 5.0,
525
+ 4.0,
526
+ 3.0,
527
+ 1.0
528
+ ],
529
+ "chatgpt_score": [
530
+ 0.4,
531
+ 0.3,
532
+ 0.2,
533
+ 0.1,
534
+ 1.0
535
+ ],
536
+ "hazard": [
537
+ "Due to Entity #1 showing green, Entity #2 would move from the right to our lane to go straight without signaling. So my car hits Entity #2 due to unexpectation.",
538
+ "Entity #1 would turn right with the right signal indicator while Entity #2 would enter the center lane. At this speed, our car would not stop; we would hit Entity #2 while it slowing down for Entity #1.",
539
+ "as the Entity #1 shows red, the Entity #2 slows down the speed. since our car is well near to Entity #2, we could make a hit with Entity #2 at the given speed.",
540
+ "Entity #1 is moving in front of me to the left direction connecting road. at the time, Entity #2 is coming from that road, due to this, i will collide at the Entity #1 sure.",
541
+ "the Entity #2 do not know whether our car is on the left lane. as the Entity #1 is showing green, our car could come closer to the crossway. at that juncture, the Entity #2 could turn to the left and crash our car."
542
+ ],
543
+ "annotated_hazard": "the Entity #2 do not know whether our car is on the left lane. as the Entity #1 is showing green, our car could come closer to the crossway. at that juncture, the Entity #2 could turn to the left and crash our car.",
544
+ "annotated_rank": 1.0
545
+ },
546
+ "198cfa25-f7b54297": {
547
+ "key": [
548
+ "97fdd307-1725c18e",
549
+ "roma_01440",
550
+ "679dc3eb-d4971f54",
551
+ "bologna_00316",
552
+ "198cfa25-f7b54297"
553
+ ],
554
+ "rank": [
555
+ 4.0,
556
+ 2.0,
557
+ 5.0,
558
+ 3.0,
559
+ 1.0
560
+ ],
561
+ "chatgpt_score": [
562
+ 0.2,
563
+ 0.0,
564
+ 0.3,
565
+ 0.5,
566
+ 1.0
567
+ ],
568
+ "hazard": [
569
+ "driving forward due to Entity #2, Entity #1 disobeys Entity #2 and crosses, due to this my car won't stop in time and hits Entity #1",
570
+ "the Entity #2 do not know whether our car is on the left lane. as the Entity #1 is showing green, our car could come closer to the crossway. at that juncture, the Entity #2 could turn to the left and crash our car.",
571
+ "Entity #1 is in green and ready to move; at this time, Entity #2 may move slowly due to turning; due to speed, my car will hit Entity #2.",
572
+ "Entity #2 doesn't alter its sign as expected, and Entity #1 also doesn't relocate before we get there, so we hit with Entity #1.",
573
+ "Entity #1 is red, we are braking almost stopped, walk in to my car."
574
+ ],
575
+ "annotated_hazard": "Entity #1 is red, we are braking almost stopped, walk in to my car.",
576
+ "annotated_rank": 1.0
577
+ },
578
+ "4b9930a7-53e1e6c4": {
579
+ "key": [
580
+ "roma_01440",
581
+ "60ba1de1-c22d2d5c",
582
+ "060731f0-9b7f0cfd",
583
+ "85f890c9-bd8dd2a7",
584
+ "4b9930a7-53e1e6c4"
585
+ ],
586
+ "rank": [
587
+ 3.0,
588
+ 5.0,
589
+ 2.0,
590
+ 4.0,
591
+ 1.0
592
+ ],
593
+ "chatgpt_score": [
594
+ 0.2,
595
+ 0.1,
596
+ 0.3,
597
+ 0.1,
598
+ 1.0
599
+ ],
600
+ "hazard": [
601
+ "the Entity #2 do not know whether our car is on the left lane. as the Entity #1 is showing green, our car could come closer to the crossway. at that juncture, the Entity #2 could turn to the left and crash our car.",
602
+ "Entity #1 is in green, so I will not reduce my speed; as Entity #2 moves slowly without knowing my speed, my car will collide with it.",
603
+ "Entity #1 was standing on the cycle in front of me, because the Entity #2 is red. I'm not completely stop yet, my car hit Entity #1 at the back.",
604
+ "Entity #1 is in green, so I did not expect a reduction in speed from Entity #2. Due to this, my car will hit Entity #2.",
605
+ "Entity #2 is green, so I will not stop the car. at that moment, Entity #1 crosses my path suddenly. My car will hit Entity #1."
606
+ ],
607
+ "annotated_hazard": "Entity #2 is green, so I will not stop the car. at that moment, Entity #1 crosses my path suddenly. My car will hit Entity #1.",
608
+ "annotated_rank": 1.0
609
+ },
610
+ "3089bf15-f20cf8f2": {
611
+ "key": [
612
+ "24d136c3-88737ebe",
613
+ "6b2f2a07-e7a6f52d",
614
+ "5250cae5-3b49c1bb",
615
+ "a5054b30-1f6e9166",
616
+ "3089bf15-f20cf8f2"
617
+ ],
618
+ "rank": [
619
+ 5.0,
620
+ 2.0,
621
+ 3.0,
622
+ 4.0,
623
+ 1.0
624
+ ],
625
+ "chatgpt_score": [
626
+ 0.4,
627
+ 0.2,
628
+ 0.6,
629
+ 0.3,
630
+ 1.0
631
+ ],
632
+ "hazard": [
633
+ "driving forward, due to Entity #1 on road, don't see them and due to speed, won't stop in time and hit Entity #1",
634
+ "i pull over to park, my car does not have winter tires,, due to this, my car slides into back of Entity #1 due to Entity #2",
635
+ "driving at a high speed, my car may slide on Entity #1 and crash into Entity #2.",
636
+ "as we apply the brakes, our car might skid due to Entity #2 and hit Entity #1.",
637
+ "driving forward, my car slides due to Entity #1, with my speed won't stop in time and hit Entity #2"
638
+ ],
639
+ "annotated_hazard": "driving forward, my car slides due to Entity #1, with my speed won't stop in time and hit Entity #2",
640
+ "annotated_rank": 1.0
641
+ },
642
+ "502aa4a8-eb99514f": {
643
+ "key": [
644
+ "61c9998c-f413580c",
645
+ "1359850e-434de2eb",
646
+ "wuerzburg_00404",
647
+ "7576eef5-02adfff7",
648
+ "502aa4a8-eb99514f"
649
+ ],
650
+ "rank": [
651
+ 2.0,
652
+ 3.0,
653
+ 5.0,
654
+ 4.0,
655
+ 1.0
656
+ ],
657
+ "chatgpt_score": [
658
+ 0.5,
659
+ 0.4,
660
+ 0.3,
661
+ 0.9,
662
+ 1.0
663
+ ],
664
+ "hazard": [
665
+ "Entity #1 comes into my lane due to Entity #2 in front, does not check mirror and collides with my car",
666
+ "Entity #1 changes lane, does not signal, due to speed and Entity #2 will crash into back of Entity #1",
667
+ "Entity #2 moves to my lane without looking due to Entity #1, due to speed, will not stop in time and hits Entity #1",
668
+ "Entity #1 i stopped in front of me, due to my speed, my car slides into Entity #1 rear end due to Entity #2",
669
+ "Entity #1 cuts my car off, due to short stopping distance and Entity #2, my car slides into rear end of Entity #1"
670
+ ],
671
+ "annotated_hazard": "Entity #1 cuts my car off, due to short stopping distance and Entity #2, my car slides into rear end of Entity #1",
672
+ "annotated_rank": 1.0
673
+ },
674
+ "50e0558d-b0077a61": {
675
+ "key": [
676
+ "stuttgart_00385",
677
+ "abeb1a69-3dc6b68e",
678
+ "74e49dc1-78165ee3",
679
+ "8c116fa0-8dea62d8",
680
+ "50e0558d-b0077a61"
681
+ ],
682
+ "rank": [
683
+ 4.0,
684
+ 5.0,
685
+ 2.0,
686
+ 3.0,
687
+ 1.0
688
+ ],
689
+ "chatgpt_score": [
690
+ 0.9,
691
+ 0.7,
692
+ 0.8,
693
+ 0.7,
694
+ 1.0
695
+ ],
696
+ "hazard": [
697
+ "Entity #1 turns into my lane, doesn't factor my speed, due to this will crash into Entity #1",
698
+ "Entity #1 decides to merge into my lane after turning right, does not factor my speed, won't stop in time and hits Entity #1",
699
+ "Entity #1 decides to come into my lane, does not signal and factor in my speed, due to this Entity #1 collides with my car",
700
+ "Entity #1 decides to come into my lane, does not check mirror or factor in my speed thus colliding with Entity #1",
701
+ "Entity #1 decides to merge to my lane, does not factor my speed, due to this it will hit my car"
702
+ ],
703
+ "annotated_hazard": "Entity #1 decides to merge to my lane, does not factor my speed, due to this it will hit my car",
704
+ "annotated_rank": 1.0
705
+ },
706
+ "lyon_00135": {
707
+ "key": [
708
+ "budapest_00805",
709
+ "10739276-602cd73b",
710
+ "marseille_00089",
711
+ "marseille_00932",
712
+ "lyon_00135"
713
+ ],
714
+ "rank": [
715
+ 3.0,
716
+ 4.0,
717
+ 5.0,
718
+ 2.0,
719
+ 1.0
720
+ ],
721
+ "chatgpt_score": [
722
+ 0.5,
723
+ 0.2,
724
+ 0.9,
725
+ 0.8,
726
+ 1.0
727
+ ],
728
+ "hazard": [
729
+ "Entity #1 pulls into live lane, no mirror check thus it hits my car",
730
+ "Entity #1 comes into live lane without accelerating, due to this my car hits Entity #1 from behind",
731
+ "Entity #1 pulls into live lane without giving a signal, due to this my car hits Entity #1",
732
+ "Entity #1 pulls out into live lane, with no signal, due to this my car hits Entity #1",
733
+ "Entity #1 comes into live lane with no signal, my car can't stop in time and hits Entity #1"
734
+ ],
735
+ "annotated_hazard": "Entity #1 comes into live lane with no signal, my car can't stop in time and hits Entity #1",
736
+ "annotated_rank": 1.0
737
+ },
738
+ "roma_00475": {
739
+ "key": [
740
+ "9b04d7ed-40fc7de5",
741
+ "barcelona_00946",
742
+ "8dde0dc2-477e4041",
743
+ "hamburg_00642",
744
+ "roma_00475"
745
+ ],
746
+ "rank": [
747
+ 5.0,
748
+ 2.0,
749
+ 3.0,
750
+ 4.0,
751
+ 1.0
752
+ ],
753
+ "chatgpt_score": [
754
+ 0.4,
755
+ 0.2,
756
+ 0.6,
757
+ 0.8,
758
+ 1.0
759
+ ],
760
+ "hazard": [
761
+ "Entity #1 would stop the speed due to the narrow lane, hill, and traffic while being behind the hill. We would hit Entity #1, as we could not see it.",
762
+ "We are going at normal speed. We would hit Entity #1 as it applied the brakes too rapidly.",
763
+ "Entity #1 is slowing down in the front as its brake lights are on. As Entity #1 suddenly stops considering the speed of 45 km/h, I may not be able to slow down my car in time and hit Entity #1 at the back.",
764
+ "Entity #1 has applied its brakes unexpectedly, and we are heading toward it at a speed of 45 km/h. We would reach it and hit Entity #1.",
765
+ "Entity #1 would stop at any time in the way of the tunnel; we would not stop to follow the speed of in-the-front in this situation."
766
+ ],
767
+ "annotated_hazard": "Entity #1 would stop at any time in the way of the tunnel; we would not stop to follow the speed of in-the-front in this situation.",
768
+ "annotated_rank": 1.0
769
+ },
770
+ "070f6b29-17d7c3b0": {
771
+ "key": [
772
+ "85910ac0-6a954012",
773
+ "stuttgart_00344",
774
+ "43e61083-d55e89c2",
775
+ "pisa_00216",
776
+ "070f6b29-17d7c3b0"
777
+ ],
778
+ "rank": [
779
+ 4.0,
780
+ 2.0,
781
+ 5.0,
782
+ 3.0,
783
+ 1.0
784
+ ],
785
+ "chatgpt_score": [
786
+ 0.8,
787
+ 0.5,
788
+ 0.6,
789
+ 0.4,
790
+ 1.0
791
+ ],
792
+ "hazard": [
793
+ "Entity #1 changes into my lane not looking prior to entering my lane thus hits my car merging into my left lane",
794
+ "Entity #1 is turning into my side. Turning too tight, Entity #1 hit my car on the left side.",
795
+ "Entity #1 tries to beat my car at intersection by turning left ahead of my car, due to this, does not judge my speed and hits my car",
796
+ "Entity #1 makes left turn, but turns wide thus it hits my car going forward",
797
+ "making a left turn, Entity #1 decides to to do a left turn same time as me and converge into my lane hitting my car"
798
+ ],
799
+ "annotated_hazard": "making a left turn, Entity #1 decides to to do a left turn same time as me and converge into my lane hitting my car",
800
+ "annotated_rank": 1.0
801
+ },
802
+ "hamburg_00193": {
803
+ "key": [
804
+ "4cc4e7db-26ba602b",
805
+ "6a7eb824-f6c75b30",
806
+ "barcelona_01762",
807
+ "budapest_00043",
808
+ "hamburg_00193"
809
+ ],
810
+ "rank": [
811
+ 2.0,
812
+ 5.0,
813
+ 4.0,
814
+ 3.0,
815
+ 1.0
816
+ ],
817
+ "chatgpt_score": [
818
+ 0.2,
819
+ 0.8,
820
+ 0.7,
821
+ 1.0,
822
+ 1.0
823
+ ],
824
+ "hazard": [
825
+ "i signal to the right lane, Entity #1 goes into right lane without signal, we both converge into the same lane and collide with each other",
826
+ "Entity #1 cuts my car off without factoring my stopping distance, due to this my car gets hit by Entity #1",
827
+ "Entity #1 cuts in front of my car, misjudges my car's speed and gets hit",
828
+ "Entity #1 cuts my car off then brakes, due to this my car hits Entity #1",
829
+ "Entity #1 cuts my car off on left lane and brakes, due to this my car won't stop in time and hits Entity #1"
830
+ ],
831
+ "annotated_hazard": "Entity #1 cuts my car off on left lane and brakes, due to this my car won't stop in time and hits Entity #1",
832
+ "annotated_rank": 1.0
833
+ },
834
+ "torino_00853": {
835
+ "key": [
836
+ "00067cfb-caba8a02",
837
+ "4554dd26-880e133f",
838
+ "berlin_00469",
839
+ "roma_01101",
840
+ "torino_00853"
841
+ ],
842
+ "rank": [
843
+ 2.0,
844
+ 4.0,
845
+ 3.0,
846
+ 5.0,
847
+ 1.0
848
+ ],
849
+ "chatgpt_score": [
850
+ 0.8,
851
+ 0.6,
852
+ 0.7,
853
+ 0.2,
854
+ 1.0
855
+ ],
856
+ "hazard": [
857
+ "We are going at normal speed, but since Entity #1 is closer to our car, we may hit it; we would not be able to stop in the distance.",
858
+ "Entity #1 brakes, which doesn't factor in my car's speed from behind; due to this, my car will hit Entity #1.",
859
+ "Entity #1 in front of me may apply the brakes suddenly. At my current speed of 45 km/h i may not be able to slow down my car in time and hit Entity #1 at the back.",
860
+ "We hope Entity #1 will move in time before we reach it, so we are not reducing speed; we hit Entity #1 even though we were moving at the lowest speed as it failed to do so.",
861
+ "We are going at normal speed, but Entity #1 is in front of our car. We may hit Entity 1 as it applies the brakes."
862
+ ],
863
+ "annotated_hazard": "We are going at normal speed, but Entity #1 is in front of our car. We may hit Entity 1 as it applies the brakes.",
864
+ "annotated_rank": 1.0
865
+ }
866
+ }
visualize_best_val.py ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import json
3
+ import numpy as np
4
+ import matplotlib.pyplot as plt
5
+ from pathlib import Path
6
+ from pprint import pprint
7
+ from omegaconf import OmegaConf
8
+ from PIL import Image, ImageDraw
9
+ import streamlit as st
10
+
11
+ os.environ['ROOT'] = os.path.dirname(os.path.realpath(__file__))
12
+ # print("ROOT", os.environ['ROOT'])
13
+
14
+ class ImageRetriever:
15
+
16
+ def __init__(self, root_path, anno_path):
17
+ self.root_path = Path(root_path)
18
+ self.anno = json.load(open(anno_path))
19
+
20
+ def key2img_path(self, key):
21
+ file_paths = [
22
+ self.root_path / f"images/{key}.jpg",
23
+ self.root_path / f"images/{key}.png",
24
+ self.root_path / f"var_images/{key}.jpg",
25
+ self.root_path / f"var_images/{key}.png",
26
+ self.root_path / f"images/{key}.jpg",
27
+ self.root_path / f"img/train/{key.split('_')[0]}/{key}.png",
28
+ self.root_path / f"img/val/{key.split('_')[0]}/{key}.png",
29
+ self.root_path / f"img/test/{key.split('_')[0]}/{key}.png",
30
+ ]
31
+ for file_path in file_paths:
32
+ if file_path.exists():
33
+ return file_path
34
+
35
+ def key2img(self, key, draw_bbox=True):
36
+ file_path = self.key2img_path(key)
37
+
38
+ image = Image.open(file_path)
39
+ if draw_bbox:
40
+ meta = self.anno[key]['details'][-1]
41
+ bboxes = [meta['bounding_box'].get(str(box_idx + 1), None) for box_idx in range(3)]
42
+ image = self.hide_region(image, bboxes)
43
+ return image
44
+
45
+ def hide_region(self, image, bboxes):
46
+ self.hide_true_bbox = 2
47
+
48
+ image = image.convert('RGBA')
49
+
50
+ if self.hide_true_bbox == 1: # hide mode
51
+ draw = ImageDraw.Draw(image, 'RGBA')
52
+
53
+ if self.hide_true_bbox in [2, 5, 7, 8, 9]: #highlight mode
54
+ overlay = Image.new('RGBA', image.size, '#00000000')
55
+ draw = ImageDraw.Draw(overlay, 'RGBA')
56
+
57
+ if self.hide_true_bbox == 3 or self.hide_true_bbox == 6: #blackout mode or position only mode
58
+ overlay = Image.new('RGBA', image.size, '#7B7575ff')
59
+ draw = ImageDraw.Draw(overlay, 'RGBA')
60
+
61
+ color_fill_list = ['#ff05cd3c', '#00F1E83c', '#F2D4003c'] # Green, Blue, Yellow?
62
+
63
+ for idx, bbox in enumerate(bboxes):
64
+ if bbox == None:
65
+ continue
66
+
67
+ color_fill = color_fill_list[idx]
68
+ x, y = bbox['left'], bbox['top']
69
+
70
+ if self.hide_true_bbox == 1: # hide mode
71
+ draw.rectangle([(x, y), (x + bbox['width'], y + bbox['height'])], fill='#7B7575')
72
+ elif self.hide_true_bbox in [2, 5, 7, 8, 9]: # highlight mode
73
+ draw.rectangle([(x, y), (x + bbox['width'], y + bbox['height'])], fill=color_fill, outline='#05ff37ff',
74
+ width=3) # Fill with Pink 60% ##00F1E8
75
+ elif self.hide_true_bbox == 3: # blackout mode
76
+ draw.rectangle([(x, y), (x + bbox['width'], y + bbox['height'])], fill='#00000000')
77
+ elif self.hide_true_bbox == 6: # position only mode
78
+ draw.rectangle([(x, y), (x + bbox['width'], y + bbox['height'])], fill=color_fill)
79
+
80
+ if self.hide_true_bbox in [2, 3, 5, 6, 7, 8, 9]:
81
+ image = Image.alpha_composite(image, overlay)
82
+ return image
83
+
84
+
85
+ def main(mode='spec', split='val', which='best'):
86
+ result_dict = json.load(open(os.path.join(os.environ['ROOT'], f"{mode}_{split}_demo.json")))
87
+ main_dataset = json.load(open(os.path.join(os.environ['ROOT'], f"anno_{split}_combined.json")))
88
+
89
+ which_keys = {'best': [], 'worst': []}
90
+ message_dict = {}
91
+
92
+ for file_key in result_dict.keys():
93
+ if file_key == 'settings':
94
+ continue
95
+
96
+ annotated_hazard = result_dict[file_key]['annotated_hazard']
97
+ annotated_rank = result_dict[file_key]['annotated_rank']
98
+
99
+ res = result_dict[file_key]
100
+
101
+ message = {'annotated_hazard': f"{int(annotated_rank)} - {annotated_hazard}"}
102
+ message['hazard'] = [f"rank: {int(tup[0])}, score: {tup[1]}, sent: {tup[2]}" for tup in zip(res['rank'], res['chatgpt_score'], res['hazard'])]
103
+ message_dict[file_key] = message
104
+
105
+ if 1 <= annotated_rank <= 20:
106
+ which_keys['best'].append(file_key)
107
+
108
+ if annotated_rank > 100:
109
+ which_keys['worst'].append(file_key)
110
+
111
+ img_retriever = ImageRetriever(
112
+ root_path=os.path.join(os.environ['ROOT'], ''),
113
+ anno_path=os.path.join(os.environ['ROOT'], f'anno_{split}_combined.json'),
114
+ )
115
+
116
+ # st.write(f"Total cases: {len(which_keys[which])}")
117
+ st.write("---")
118
+
119
+ for file_key in which_keys[which]:
120
+ # st.write(f"File key: {file_key}")
121
+
122
+ img = img_retriever.key2img(file_key)
123
+ # img = img.resize((img.width // 3, img.height // 3))
124
+
125
+ st.image(img)
126
+ st.json(message_dict[file_key])
127
+ st.write('---')
128
+
129
+
130
+ if __name__ == '__main__':
131
+ main(mode='spec', split='val', which='best')