dnth commited on
Commit
3ec3ebe
1 Parent(s): 556d58c

add notebook sample

Browse files
Files changed (1) hide show
  1. exploration.ipynb +880 -0
exploration.ipynb ADDED
@@ -0,0 +1,880 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "import pandas as pd\n",
10
+ "\n",
11
+ "df = pd.read_parquet('object_annotations.parquet')"
12
+ ]
13
+ },
14
+ {
15
+ "cell_type": "code",
16
+ "execution_count": 2,
17
+ "metadata": {},
18
+ "outputs": [
19
+ {
20
+ "data": {
21
+ "text/html": [
22
+ "<div>\n",
23
+ "<style scoped>\n",
24
+ " .dataframe tbody tr th:only-of-type {\n",
25
+ " vertical-align: middle;\n",
26
+ " }\n",
27
+ "\n",
28
+ " .dataframe tbody tr th {\n",
29
+ " vertical-align: top;\n",
30
+ " }\n",
31
+ "\n",
32
+ " .dataframe thead th {\n",
33
+ " text-align: right;\n",
34
+ " }\n",
35
+ "</style>\n",
36
+ "<table border=\"1\" class=\"dataframe\">\n",
37
+ " <thead>\n",
38
+ " <tr style=\"text-align: right;\">\n",
39
+ " <th></th>\n",
40
+ " <th>col_x</th>\n",
41
+ " <th>row_y</th>\n",
42
+ " <th>width</th>\n",
43
+ " <th>height</th>\n",
44
+ " <th>confidence</th>\n",
45
+ " <th>label</th>\n",
46
+ " <th>source</th>\n",
47
+ " <th>caption</th>\n",
48
+ " <th>filename</th>\n",
49
+ " </tr>\n",
50
+ " </thead>\n",
51
+ " <tbody>\n",
52
+ " <tr>\n",
53
+ " <th>0</th>\n",
54
+ " <td>459.0</td>\n",
55
+ " <td>97.0</td>\n",
56
+ " <td>29.0</td>\n",
57
+ " <td>34.0</td>\n",
58
+ " <td>0.888</td>\n",
59
+ " <td>human face</td>\n",
60
+ " <td>VL</td>\n",
61
+ " <td>a man with a white shirt and a black tie</td>\n",
62
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
63
+ " </tr>\n",
64
+ " <tr>\n",
65
+ " <th>1</th>\n",
66
+ " <td>431.0</td>\n",
67
+ " <td>115.0</td>\n",
68
+ " <td>31.0</td>\n",
69
+ " <td>41.0</td>\n",
70
+ " <td>0.864</td>\n",
71
+ " <td>human face</td>\n",
72
+ " <td>VL</td>\n",
73
+ " <td>a woman with a blonde hair and a white shirt</td>\n",
74
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
75
+ " </tr>\n",
76
+ " <tr>\n",
77
+ " <th>2</th>\n",
78
+ " <td>160.0</td>\n",
79
+ " <td>76.0</td>\n",
80
+ " <td>63.0</td>\n",
81
+ " <td>79.0</td>\n",
82
+ " <td>0.377</td>\n",
83
+ " <td>human face</td>\n",
84
+ " <td>VL</td>\n",
85
+ " <td>a close up of a cat's face</td>\n",
86
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
87
+ " </tr>\n",
88
+ " <tr>\n",
89
+ " <th>3</th>\n",
90
+ " <td>446.0</td>\n",
91
+ " <td>85.0</td>\n",
92
+ " <td>173.0</td>\n",
93
+ " <td>203.0</td>\n",
94
+ " <td>0.379</td>\n",
95
+ " <td>human face</td>\n",
96
+ " <td>VL</td>\n",
97
+ " <td>a brown cat with green eyes</td>\n",
98
+ " <td>oxford-iiit-pet/images/Abyssinian_24.jpg</td>\n",
99
+ " </tr>\n",
100
+ " <tr>\n",
101
+ " <th>4</th>\n",
102
+ " <td>-0.0</td>\n",
103
+ " <td>223.0</td>\n",
104
+ " <td>163.0</td>\n",
105
+ " <td>277.0</td>\n",
106
+ " <td>0.822</td>\n",
107
+ " <td>human face</td>\n",
108
+ " <td>VL</td>\n",
109
+ " <td>a man wearing a hat</td>\n",
110
+ " <td>oxford-iiit-pet/images/Abyssinian_94.jpg</td>\n",
111
+ " </tr>\n",
112
+ " <tr>\n",
113
+ " <th>...</th>\n",
114
+ " <td>...</td>\n",
115
+ " <td>...</td>\n",
116
+ " <td>...</td>\n",
117
+ " <td>...</td>\n",
118
+ " <td>...</td>\n",
119
+ " <td>...</td>\n",
120
+ " <td>...</td>\n",
121
+ " <td>...</td>\n",
122
+ " <td>...</td>\n",
123
+ " </tr>\n",
124
+ " <tr>\n",
125
+ " <th>14323</th>\n",
126
+ " <td>0.0</td>\n",
127
+ " <td>66.0</td>\n",
128
+ " <td>320.0</td>\n",
129
+ " <td>262.0</td>\n",
130
+ " <td>0.924</td>\n",
131
+ " <td>dog</td>\n",
132
+ " <td>VL</td>\n",
133
+ " <td>a small dog standing on a rock near a stream</td>\n",
134
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_97.jpg</td>\n",
135
+ " </tr>\n",
136
+ " <tr>\n",
137
+ " <th>14324</th>\n",
138
+ " <td>156.0</td>\n",
139
+ " <td>366.0</td>\n",
140
+ " <td>179.0</td>\n",
141
+ " <td>134.0</td>\n",
142
+ " <td>0.693</td>\n",
143
+ " <td>log</td>\n",
144
+ " <td>VL</td>\n",
145
+ " <td>a bird sitting on a rock next to a stream</td>\n",
146
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_97.jpg</td>\n",
147
+ " </tr>\n",
148
+ " <tr>\n",
149
+ " <th>14325</th>\n",
150
+ " <td>2.0</td>\n",
151
+ " <td>0.0</td>\n",
152
+ " <td>396.0</td>\n",
153
+ " <td>374.0</td>\n",
154
+ " <td>0.938</td>\n",
155
+ " <td>dog</td>\n",
156
+ " <td>VL</td>\n",
157
+ " <td>a small black and brown puppy is being held by...</td>\n",
158
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_58.jpg</td>\n",
159
+ " </tr>\n",
160
+ " <tr>\n",
161
+ " <th>14326</th>\n",
162
+ " <td>0.0</td>\n",
163
+ " <td>224.0</td>\n",
164
+ " <td>230.0</td>\n",
165
+ " <td>151.0</td>\n",
166
+ " <td>0.310</td>\n",
167
+ " <td>person</td>\n",
168
+ " <td>VL</td>\n",
169
+ " <td>a small brown dog is being held by a person</td>\n",
170
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_58.jpg</td>\n",
171
+ " </tr>\n",
172
+ " <tr>\n",
173
+ " <th>14327</th>\n",
174
+ " <td>137.0</td>\n",
175
+ " <td>79.0</td>\n",
176
+ " <td>216.0</td>\n",
177
+ " <td>152.0</td>\n",
178
+ " <td>0.974</td>\n",
179
+ " <td>dog</td>\n",
180
+ " <td>VL</td>\n",
181
+ " <td>a small black and gray dog standing in the grass</td>\n",
182
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_6.jpg</td>\n",
183
+ " </tr>\n",
184
+ " </tbody>\n",
185
+ "</table>\n",
186
+ "<p>14328 rows × 9 columns</p>\n",
187
+ "</div>"
188
+ ],
189
+ "text/plain": [
190
+ " col_x row_y width height confidence label source \\\n",
191
+ "0 459.0 97.0 29.0 34.0 0.888 human face VL \n",
192
+ "1 431.0 115.0 31.0 41.0 0.864 human face VL \n",
193
+ "2 160.0 76.0 63.0 79.0 0.377 human face VL \n",
194
+ "3 446.0 85.0 173.0 203.0 0.379 human face VL \n",
195
+ "4 -0.0 223.0 163.0 277.0 0.822 human face VL \n",
196
+ "... ... ... ... ... ... ... ... \n",
197
+ "14323 0.0 66.0 320.0 262.0 0.924 dog VL \n",
198
+ "14324 156.0 366.0 179.0 134.0 0.693 log VL \n",
199
+ "14325 2.0 0.0 396.0 374.0 0.938 dog VL \n",
200
+ "14326 0.0 224.0 230.0 151.0 0.310 person VL \n",
201
+ "14327 137.0 79.0 216.0 152.0 0.974 dog VL \n",
202
+ "\n",
203
+ " caption \\\n",
204
+ "0 a man with a white shirt and a black tie \n",
205
+ "1 a woman with a blonde hair and a white shirt \n",
206
+ "2 a close up of a cat's face \n",
207
+ "3 a brown cat with green eyes \n",
208
+ "4 a man wearing a hat \n",
209
+ "... ... \n",
210
+ "14323 a small dog standing on a rock near a stream \n",
211
+ "14324 a bird sitting on a rock next to a stream \n",
212
+ "14325 a small black and brown puppy is being held by... \n",
213
+ "14326 a small brown dog is being held by a person \n",
214
+ "14327 a small black and gray dog standing in the grass \n",
215
+ "\n",
216
+ " filename \n",
217
+ "0 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
218
+ "1 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
219
+ "2 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
220
+ "3 oxford-iiit-pet/images/Abyssinian_24.jpg \n",
221
+ "4 oxford-iiit-pet/images/Abyssinian_94.jpg \n",
222
+ "... ... \n",
223
+ "14323 oxford-iiit-pet/images/yorkshire_terrier_97.jpg \n",
224
+ "14324 oxford-iiit-pet/images/yorkshire_terrier_97.jpg \n",
225
+ "14325 oxford-iiit-pet/images/yorkshire_terrier_58.jpg \n",
226
+ "14326 oxford-iiit-pet/images/yorkshire_terrier_58.jpg \n",
227
+ "14327 oxford-iiit-pet/images/yorkshire_terrier_6.jpg \n",
228
+ "\n",
229
+ "[14328 rows x 9 columns]"
230
+ ]
231
+ },
232
+ "execution_count": 2,
233
+ "metadata": {},
234
+ "output_type": "execute_result"
235
+ }
236
+ ],
237
+ "source": [
238
+ "df"
239
+ ]
240
+ },
241
+ {
242
+ "cell_type": "code",
243
+ "execution_count": 3,
244
+ "metadata": {},
245
+ "outputs": [
246
+ {
247
+ "data": {
248
+ "text/html": [
249
+ "<div>\n",
250
+ "<style scoped>\n",
251
+ " .dataframe tbody tr th:only-of-type {\n",
252
+ " vertical-align: middle;\n",
253
+ " }\n",
254
+ "\n",
255
+ " .dataframe tbody tr th {\n",
256
+ " vertical-align: top;\n",
257
+ " }\n",
258
+ "\n",
259
+ " .dataframe thead th {\n",
260
+ " text-align: right;\n",
261
+ " }\n",
262
+ "</style>\n",
263
+ "<table border=\"1\" class=\"dataframe\">\n",
264
+ " <thead>\n",
265
+ " <tr style=\"text-align: right;\">\n",
266
+ " <th></th>\n",
267
+ " <th>col_x</th>\n",
268
+ " <th>row_y</th>\n",
269
+ " <th>width</th>\n",
270
+ " <th>height</th>\n",
271
+ " <th>confidence</th>\n",
272
+ " <th>label</th>\n",
273
+ " <th>filename</th>\n",
274
+ " </tr>\n",
275
+ " </thead>\n",
276
+ " <tbody>\n",
277
+ " <tr>\n",
278
+ " <th>0</th>\n",
279
+ " <td>459.0</td>\n",
280
+ " <td>97.0</td>\n",
281
+ " <td>29.0</td>\n",
282
+ " <td>34.0</td>\n",
283
+ " <td>0.888</td>\n",
284
+ " <td>human face</td>\n",
285
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
286
+ " </tr>\n",
287
+ " <tr>\n",
288
+ " <th>1</th>\n",
289
+ " <td>431.0</td>\n",
290
+ " <td>115.0</td>\n",
291
+ " <td>31.0</td>\n",
292
+ " <td>41.0</td>\n",
293
+ " <td>0.864</td>\n",
294
+ " <td>human face</td>\n",
295
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
296
+ " </tr>\n",
297
+ " <tr>\n",
298
+ " <th>2</th>\n",
299
+ " <td>160.0</td>\n",
300
+ " <td>76.0</td>\n",
301
+ " <td>63.0</td>\n",
302
+ " <td>79.0</td>\n",
303
+ " <td>0.377</td>\n",
304
+ " <td>human face</td>\n",
305
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
306
+ " </tr>\n",
307
+ " <tr>\n",
308
+ " <th>3</th>\n",
309
+ " <td>446.0</td>\n",
310
+ " <td>85.0</td>\n",
311
+ " <td>173.0</td>\n",
312
+ " <td>203.0</td>\n",
313
+ " <td>0.379</td>\n",
314
+ " <td>human face</td>\n",
315
+ " <td>oxford-iiit-pet/images/Abyssinian_24.jpg</td>\n",
316
+ " </tr>\n",
317
+ " <tr>\n",
318
+ " <th>4</th>\n",
319
+ " <td>-0.0</td>\n",
320
+ " <td>223.0</td>\n",
321
+ " <td>163.0</td>\n",
322
+ " <td>277.0</td>\n",
323
+ " <td>0.822</td>\n",
324
+ " <td>human face</td>\n",
325
+ " <td>oxford-iiit-pet/images/Abyssinian_94.jpg</td>\n",
326
+ " </tr>\n",
327
+ " <tr>\n",
328
+ " <th>...</th>\n",
329
+ " <td>...</td>\n",
330
+ " <td>...</td>\n",
331
+ " <td>...</td>\n",
332
+ " <td>...</td>\n",
333
+ " <td>...</td>\n",
334
+ " <td>...</td>\n",
335
+ " <td>...</td>\n",
336
+ " </tr>\n",
337
+ " <tr>\n",
338
+ " <th>14323</th>\n",
339
+ " <td>0.0</td>\n",
340
+ " <td>66.0</td>\n",
341
+ " <td>320.0</td>\n",
342
+ " <td>262.0</td>\n",
343
+ " <td>0.924</td>\n",
344
+ " <td>dog</td>\n",
345
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_97.jpg</td>\n",
346
+ " </tr>\n",
347
+ " <tr>\n",
348
+ " <th>14324</th>\n",
349
+ " <td>156.0</td>\n",
350
+ " <td>366.0</td>\n",
351
+ " <td>179.0</td>\n",
352
+ " <td>134.0</td>\n",
353
+ " <td>0.693</td>\n",
354
+ " <td>log</td>\n",
355
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_97.jpg</td>\n",
356
+ " </tr>\n",
357
+ " <tr>\n",
358
+ " <th>14325</th>\n",
359
+ " <td>2.0</td>\n",
360
+ " <td>0.0</td>\n",
361
+ " <td>396.0</td>\n",
362
+ " <td>374.0</td>\n",
363
+ " <td>0.938</td>\n",
364
+ " <td>dog</td>\n",
365
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_58.jpg</td>\n",
366
+ " </tr>\n",
367
+ " <tr>\n",
368
+ " <th>14326</th>\n",
369
+ " <td>0.0</td>\n",
370
+ " <td>224.0</td>\n",
371
+ " <td>230.0</td>\n",
372
+ " <td>151.0</td>\n",
373
+ " <td>0.310</td>\n",
374
+ " <td>person</td>\n",
375
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_58.jpg</td>\n",
376
+ " </tr>\n",
377
+ " <tr>\n",
378
+ " <th>14327</th>\n",
379
+ " <td>137.0</td>\n",
380
+ " <td>79.0</td>\n",
381
+ " <td>216.0</td>\n",
382
+ " <td>152.0</td>\n",
383
+ " <td>0.974</td>\n",
384
+ " <td>dog</td>\n",
385
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_6.jpg</td>\n",
386
+ " </tr>\n",
387
+ " </tbody>\n",
388
+ "</table>\n",
389
+ "<p>14328 rows × 7 columns</p>\n",
390
+ "</div>"
391
+ ],
392
+ "text/plain": [
393
+ " col_x row_y width height confidence label \\\n",
394
+ "0 459.0 97.0 29.0 34.0 0.888 human face \n",
395
+ "1 431.0 115.0 31.0 41.0 0.864 human face \n",
396
+ "2 160.0 76.0 63.0 79.0 0.377 human face \n",
397
+ "3 446.0 85.0 173.0 203.0 0.379 human face \n",
398
+ "4 -0.0 223.0 163.0 277.0 0.822 human face \n",
399
+ "... ... ... ... ... ... ... \n",
400
+ "14323 0.0 66.0 320.0 262.0 0.924 dog \n",
401
+ "14324 156.0 366.0 179.0 134.0 0.693 log \n",
402
+ "14325 2.0 0.0 396.0 374.0 0.938 dog \n",
403
+ "14326 0.0 224.0 230.0 151.0 0.310 person \n",
404
+ "14327 137.0 79.0 216.0 152.0 0.974 dog \n",
405
+ "\n",
406
+ " filename \n",
407
+ "0 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
408
+ "1 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
409
+ "2 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
410
+ "3 oxford-iiit-pet/images/Abyssinian_24.jpg \n",
411
+ "4 oxford-iiit-pet/images/Abyssinian_94.jpg \n",
412
+ "... ... \n",
413
+ "14323 oxford-iiit-pet/images/yorkshire_terrier_97.jpg \n",
414
+ "14324 oxford-iiit-pet/images/yorkshire_terrier_97.jpg \n",
415
+ "14325 oxford-iiit-pet/images/yorkshire_terrier_58.jpg \n",
416
+ "14326 oxford-iiit-pet/images/yorkshire_terrier_58.jpg \n",
417
+ "14327 oxford-iiit-pet/images/yorkshire_terrier_6.jpg \n",
418
+ "\n",
419
+ "[14328 rows x 7 columns]"
420
+ ]
421
+ },
422
+ "execution_count": 3,
423
+ "metadata": {},
424
+ "output_type": "execute_result"
425
+ }
426
+ ],
427
+ "source": [
428
+ "df = df.drop(columns=['source', 'caption'])\n",
429
+ "df"
430
+ ]
431
+ },
432
+ {
433
+ "cell_type": "code",
434
+ "execution_count": 4,
435
+ "metadata": {},
436
+ "outputs": [
437
+ {
438
+ "data": {
439
+ "text/html": [
440
+ "<div>\n",
441
+ "<style scoped>\n",
442
+ " .dataframe tbody tr th:only-of-type {\n",
443
+ " vertical-align: middle;\n",
444
+ " }\n",
445
+ "\n",
446
+ " .dataframe tbody tr th {\n",
447
+ " vertical-align: top;\n",
448
+ " }\n",
449
+ "\n",
450
+ " .dataframe thead th {\n",
451
+ " text-align: right;\n",
452
+ " }\n",
453
+ "</style>\n",
454
+ "<table border=\"1\" class=\"dataframe\">\n",
455
+ " <thead>\n",
456
+ " <tr style=\"text-align: right;\">\n",
457
+ " <th></th>\n",
458
+ " <th>x_top_left</th>\n",
459
+ " <th>y_top_left</th>\n",
460
+ " <th>width</th>\n",
461
+ " <th>height</th>\n",
462
+ " <th>confidence</th>\n",
463
+ " <th>label</th>\n",
464
+ " <th>filename</th>\n",
465
+ " </tr>\n",
466
+ " </thead>\n",
467
+ " <tbody>\n",
468
+ " <tr>\n",
469
+ " <th>0</th>\n",
470
+ " <td>459.0</td>\n",
471
+ " <td>97.0</td>\n",
472
+ " <td>29.0</td>\n",
473
+ " <td>34.0</td>\n",
474
+ " <td>0.888</td>\n",
475
+ " <td>human face</td>\n",
476
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
477
+ " </tr>\n",
478
+ " <tr>\n",
479
+ " <th>1</th>\n",
480
+ " <td>431.0</td>\n",
481
+ " <td>115.0</td>\n",
482
+ " <td>31.0</td>\n",
483
+ " <td>41.0</td>\n",
484
+ " <td>0.864</td>\n",
485
+ " <td>human face</td>\n",
486
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
487
+ " </tr>\n",
488
+ " <tr>\n",
489
+ " <th>2</th>\n",
490
+ " <td>160.0</td>\n",
491
+ " <td>76.0</td>\n",
492
+ " <td>63.0</td>\n",
493
+ " <td>79.0</td>\n",
494
+ " <td>0.377</td>\n",
495
+ " <td>human face</td>\n",
496
+ " <td>oxford-iiit-pet/images/Abyssinian_149.jpg</td>\n",
497
+ " </tr>\n",
498
+ " <tr>\n",
499
+ " <th>3</th>\n",
500
+ " <td>446.0</td>\n",
501
+ " <td>85.0</td>\n",
502
+ " <td>173.0</td>\n",
503
+ " <td>203.0</td>\n",
504
+ " <td>0.379</td>\n",
505
+ " <td>human face</td>\n",
506
+ " <td>oxford-iiit-pet/images/Abyssinian_24.jpg</td>\n",
507
+ " </tr>\n",
508
+ " <tr>\n",
509
+ " <th>4</th>\n",
510
+ " <td>-0.0</td>\n",
511
+ " <td>223.0</td>\n",
512
+ " <td>163.0</td>\n",
513
+ " <td>277.0</td>\n",
514
+ " <td>0.822</td>\n",
515
+ " <td>human face</td>\n",
516
+ " <td>oxford-iiit-pet/images/Abyssinian_94.jpg</td>\n",
517
+ " </tr>\n",
518
+ " <tr>\n",
519
+ " <th>...</th>\n",
520
+ " <td>...</td>\n",
521
+ " <td>...</td>\n",
522
+ " <td>...</td>\n",
523
+ " <td>...</td>\n",
524
+ " <td>...</td>\n",
525
+ " <td>...</td>\n",
526
+ " <td>...</td>\n",
527
+ " </tr>\n",
528
+ " <tr>\n",
529
+ " <th>14323</th>\n",
530
+ " <td>0.0</td>\n",
531
+ " <td>66.0</td>\n",
532
+ " <td>320.0</td>\n",
533
+ " <td>262.0</td>\n",
534
+ " <td>0.924</td>\n",
535
+ " <td>dog</td>\n",
536
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_97.jpg</td>\n",
537
+ " </tr>\n",
538
+ " <tr>\n",
539
+ " <th>14324</th>\n",
540
+ " <td>156.0</td>\n",
541
+ " <td>366.0</td>\n",
542
+ " <td>179.0</td>\n",
543
+ " <td>134.0</td>\n",
544
+ " <td>0.693</td>\n",
545
+ " <td>log</td>\n",
546
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_97.jpg</td>\n",
547
+ " </tr>\n",
548
+ " <tr>\n",
549
+ " <th>14325</th>\n",
550
+ " <td>2.0</td>\n",
551
+ " <td>0.0</td>\n",
552
+ " <td>396.0</td>\n",
553
+ " <td>374.0</td>\n",
554
+ " <td>0.938</td>\n",
555
+ " <td>dog</td>\n",
556
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_58.jpg</td>\n",
557
+ " </tr>\n",
558
+ " <tr>\n",
559
+ " <th>14326</th>\n",
560
+ " <td>0.0</td>\n",
561
+ " <td>224.0</td>\n",
562
+ " <td>230.0</td>\n",
563
+ " <td>151.0</td>\n",
564
+ " <td>0.310</td>\n",
565
+ " <td>person</td>\n",
566
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_58.jpg</td>\n",
567
+ " </tr>\n",
568
+ " <tr>\n",
569
+ " <th>14327</th>\n",
570
+ " <td>137.0</td>\n",
571
+ " <td>79.0</td>\n",
572
+ " <td>216.0</td>\n",
573
+ " <td>152.0</td>\n",
574
+ " <td>0.974</td>\n",
575
+ " <td>dog</td>\n",
576
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_6.jpg</td>\n",
577
+ " </tr>\n",
578
+ " </tbody>\n",
579
+ "</table>\n",
580
+ "<p>14328 rows × 7 columns</p>\n",
581
+ "</div>"
582
+ ],
583
+ "text/plain": [
584
+ " x_top_left y_top_left width height confidence label \\\n",
585
+ "0 459.0 97.0 29.0 34.0 0.888 human face \n",
586
+ "1 431.0 115.0 31.0 41.0 0.864 human face \n",
587
+ "2 160.0 76.0 63.0 79.0 0.377 human face \n",
588
+ "3 446.0 85.0 173.0 203.0 0.379 human face \n",
589
+ "4 -0.0 223.0 163.0 277.0 0.822 human face \n",
590
+ "... ... ... ... ... ... ... \n",
591
+ "14323 0.0 66.0 320.0 262.0 0.924 dog \n",
592
+ "14324 156.0 366.0 179.0 134.0 0.693 log \n",
593
+ "14325 2.0 0.0 396.0 374.0 0.938 dog \n",
594
+ "14326 0.0 224.0 230.0 151.0 0.310 person \n",
595
+ "14327 137.0 79.0 216.0 152.0 0.974 dog \n",
596
+ "\n",
597
+ " filename \n",
598
+ "0 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
599
+ "1 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
600
+ "2 oxford-iiit-pet/images/Abyssinian_149.jpg \n",
601
+ "3 oxford-iiit-pet/images/Abyssinian_24.jpg \n",
602
+ "4 oxford-iiit-pet/images/Abyssinian_94.jpg \n",
603
+ "... ... \n",
604
+ "14323 oxford-iiit-pet/images/yorkshire_terrier_97.jpg \n",
605
+ "14324 oxford-iiit-pet/images/yorkshire_terrier_97.jpg \n",
606
+ "14325 oxford-iiit-pet/images/yorkshire_terrier_58.jpg \n",
607
+ "14326 oxford-iiit-pet/images/yorkshire_terrier_58.jpg \n",
608
+ "14327 oxford-iiit-pet/images/yorkshire_terrier_6.jpg \n",
609
+ "\n",
610
+ "[14328 rows x 7 columns]"
611
+ ]
612
+ },
613
+ "execution_count": 4,
614
+ "metadata": {},
615
+ "output_type": "execute_result"
616
+ }
617
+ ],
618
+ "source": [
619
+ "df = df.rename(columns={'col_x': 'x_top_left', 'row_y': 'y_top_left'})\n",
620
+ "df"
621
+ ]
622
+ },
623
+ {
624
+ "cell_type": "code",
625
+ "execution_count": 5,
626
+ "metadata": {},
627
+ "outputs": [
628
+ {
629
+ "data": {
630
+ "text/html": [
631
+ "<div>\n",
632
+ "<style scoped>\n",
633
+ " .dataframe tbody tr th:only-of-type {\n",
634
+ " vertical-align: middle;\n",
635
+ " }\n",
636
+ "\n",
637
+ " .dataframe tbody tr th {\n",
638
+ " vertical-align: top;\n",
639
+ " }\n",
640
+ "\n",
641
+ " .dataframe thead th {\n",
642
+ " text-align: right;\n",
643
+ " }\n",
644
+ "</style>\n",
645
+ "<table border=\"1\" class=\"dataframe\">\n",
646
+ " <thead>\n",
647
+ " <tr style=\"text-align: right;\">\n",
648
+ " <th></th>\n",
649
+ " <th>video</th>\n",
650
+ " <th>frame_timestamp</th>\n",
651
+ " <th>filename</th>\n",
652
+ " <th>caption</th>\n",
653
+ " <th>ann_index</th>\n",
654
+ " <th>label</th>\n",
655
+ " <th>class_id</th>\n",
656
+ " <th>vl_label</th>\n",
657
+ " <th>vl_class_id</th>\n",
658
+ " </tr>\n",
659
+ " </thead>\n",
660
+ " <tbody>\n",
661
+ " <tr>\n",
662
+ " <th>0</th>\n",
663
+ " <td>None</td>\n",
664
+ " <td>NaN</td>\n",
665
+ " <td>oxford-iiit-pet/images/Abyssinian_144.jpg</td>\n",
666
+ " <td>a cat standing on a wooden floor next to a glass</td>\n",
667
+ " <td>49.0</td>\n",
668
+ " <td>[cat]</td>\n",
669
+ " <td>[1]</td>\n",
670
+ " <td>None</td>\n",
671
+ " <td>None</td>\n",
672
+ " </tr>\n",
673
+ " <tr>\n",
674
+ " <th>1</th>\n",
675
+ " <td>None</td>\n",
676
+ " <td>NaN</td>\n",
677
+ " <td>oxford-iiit-pet/images/Abyssinian_10.jpg</td>\n",
678
+ " <td>a cat laying on a bed</td>\n",
679
+ " <td>11.0</td>\n",
680
+ " <td>[cat]</td>\n",
681
+ " <td>[1]</td>\n",
682
+ " <td>None</td>\n",
683
+ " <td>None</td>\n",
684
+ " </tr>\n",
685
+ " <tr>\n",
686
+ " <th>2</th>\n",
687
+ " <td>None</td>\n",
688
+ " <td>NaN</td>\n",
689
+ " <td>oxford-iiit-pet/images/Abyssinian_155.jpg</td>\n",
690
+ " <td>a cat yawning on a couch</td>\n",
691
+ " <td>1856.0</td>\n",
692
+ " <td>[cat]</td>\n",
693
+ " <td>[1]</td>\n",
694
+ " <td>None</td>\n",
695
+ " <td>None</td>\n",
696
+ " </tr>\n",
697
+ " <tr>\n",
698
+ " <th>3</th>\n",
699
+ " <td>None</td>\n",
700
+ " <td>NaN</td>\n",
701
+ " <td>oxford-iiit-pet/images/Abyssinian_101.jpg</td>\n",
702
+ " <td>a cat with green eyes is laying on a green bla...</td>\n",
703
+ " <td>2.0</td>\n",
704
+ " <td>[cat]</td>\n",
705
+ " <td>[1]</td>\n",
706
+ " <td>None</td>\n",
707
+ " <td>None</td>\n",
708
+ " </tr>\n",
709
+ " <tr>\n",
710
+ " <th>4</th>\n",
711
+ " <td>None</td>\n",
712
+ " <td>NaN</td>\n",
713
+ " <td>oxford-iiit-pet/images/Abyssinian_156.jpg</td>\n",
714
+ " <td>a cat is sitting on a couch</td>\n",
715
+ " <td>1857.0</td>\n",
716
+ " <td>[cat]</td>\n",
717
+ " <td>[1]</td>\n",
718
+ " <td>None</td>\n",
719
+ " <td>None</td>\n",
720
+ " </tr>\n",
721
+ " <tr>\n",
722
+ " <th>...</th>\n",
723
+ " <td>...</td>\n",
724
+ " <td>...</td>\n",
725
+ " <td>...</td>\n",
726
+ " <td>...</td>\n",
727
+ " <td>...</td>\n",
728
+ " <td>...</td>\n",
729
+ " <td>...</td>\n",
730
+ " <td>...</td>\n",
731
+ " <td>...</td>\n",
732
+ " </tr>\n",
733
+ " <tr>\n",
734
+ " <th>7304</th>\n",
735
+ " <td>None</td>\n",
736
+ " <td>NaN</td>\n",
737
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_99.jpg</td>\n",
738
+ " <td>a small dog standing on a sidewalk</td>\n",
739
+ " <td>7348.0</td>\n",
740
+ " <td>[dog]</td>\n",
741
+ " <td>[2]</td>\n",
742
+ " <td>None</td>\n",
743
+ " <td>None</td>\n",
744
+ " </tr>\n",
745
+ " <tr>\n",
746
+ " <th>7305</th>\n",
747
+ " <td>None</td>\n",
748
+ " <td>NaN</td>\n",
749
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_56.jpg</td>\n",
750
+ " <td>a small dog is standing in the grass</td>\n",
751
+ " <td>7301.0</td>\n",
752
+ " <td>[dog]</td>\n",
753
+ " <td>[2]</td>\n",
754
+ " <td>None</td>\n",
755
+ " <td>None</td>\n",
756
+ " </tr>\n",
757
+ " <tr>\n",
758
+ " <th>7306</th>\n",
759
+ " <td>None</td>\n",
760
+ " <td>NaN</td>\n",
761
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_97.jpg</td>\n",
762
+ " <td>a small dog is standing on a rock</td>\n",
763
+ " <td>7346.0</td>\n",
764
+ " <td>[dog]</td>\n",
765
+ " <td>[2]</td>\n",
766
+ " <td>None</td>\n",
767
+ " <td>None</td>\n",
768
+ " </tr>\n",
769
+ " <tr>\n",
770
+ " <th>7307</th>\n",
771
+ " <td>None</td>\n",
772
+ " <td>NaN</td>\n",
773
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_58.jpg</td>\n",
774
+ " <td>a small black and brown puppy is being held by...</td>\n",
775
+ " <td>7303.0</td>\n",
776
+ " <td>[dog]</td>\n",
777
+ " <td>[2]</td>\n",
778
+ " <td>None</td>\n",
779
+ " <td>None</td>\n",
780
+ " </tr>\n",
781
+ " <tr>\n",
782
+ " <th>7308</th>\n",
783
+ " <td>None</td>\n",
784
+ " <td>NaN</td>\n",
785
+ " <td>oxford-iiit-pet/images/yorkshire_terrier_6.jpg</td>\n",
786
+ " <td>a small black and gray dog standing in the grass</td>\n",
787
+ " <td>7316.0</td>\n",
788
+ " <td>[dog]</td>\n",
789
+ " <td>[2]</td>\n",
790
+ " <td>None</td>\n",
791
+ " <td>None</td>\n",
792
+ " </tr>\n",
793
+ " </tbody>\n",
794
+ "</table>\n",
795
+ "<p>7309 rows × 9 columns</p>\n",
796
+ "</div>"
797
+ ],
798
+ "text/plain": [
799
+ " video frame_timestamp filename \\\n",
800
+ "0 None NaN oxford-iiit-pet/images/Abyssinian_144.jpg \n",
801
+ "1 None NaN oxford-iiit-pet/images/Abyssinian_10.jpg \n",
802
+ "2 None NaN oxford-iiit-pet/images/Abyssinian_155.jpg \n",
803
+ "3 None NaN oxford-iiit-pet/images/Abyssinian_101.jpg \n",
804
+ "4 None NaN oxford-iiit-pet/images/Abyssinian_156.jpg \n",
805
+ "... ... ... ... \n",
806
+ "7304 None NaN oxford-iiit-pet/images/yorkshire_terrier_99.jpg \n",
807
+ "7305 None NaN oxford-iiit-pet/images/yorkshire_terrier_56.jpg \n",
808
+ "7306 None NaN oxford-iiit-pet/images/yorkshire_terrier_97.jpg \n",
809
+ "7307 None NaN oxford-iiit-pet/images/yorkshire_terrier_58.jpg \n",
810
+ "7308 None NaN oxford-iiit-pet/images/yorkshire_terrier_6.jpg \n",
811
+ "\n",
812
+ " caption ann_index label \\\n",
813
+ "0 a cat standing on a wooden floor next to a glass 49.0 [cat] \n",
814
+ "1 a cat laying on a bed 11.0 [cat] \n",
815
+ "2 a cat yawning on a couch 1856.0 [cat] \n",
816
+ "3 a cat with green eyes is laying on a green bla... 2.0 [cat] \n",
817
+ "4 a cat is sitting on a couch 1857.0 [cat] \n",
818
+ "... ... ... ... \n",
819
+ "7304 a small dog standing on a sidewalk 7348.0 [dog] \n",
820
+ "7305 a small dog is standing in the grass 7301.0 [dog] \n",
821
+ "7306 a small dog is standing on a rock 7346.0 [dog] \n",
822
+ "7307 a small black and brown puppy is being held by... 7303.0 [dog] \n",
823
+ "7308 a small black and gray dog standing in the grass 7316.0 [dog] \n",
824
+ "\n",
825
+ " class_id vl_label vl_class_id \n",
826
+ "0 [1] None None \n",
827
+ "1 [1] None None \n",
828
+ "2 [1] None None \n",
829
+ "3 [1] None None \n",
830
+ "4 [1] None None \n",
831
+ "... ... ... ... \n",
832
+ "7304 [2] None None \n",
833
+ "7305 [2] None None \n",
834
+ "7306 [2] None None \n",
835
+ "7307 [2] None None \n",
836
+ "7308 [2] None None \n",
837
+ "\n",
838
+ "[7309 rows x 9 columns]"
839
+ ]
840
+ },
841
+ "execution_count": 5,
842
+ "metadata": {},
843
+ "output_type": "execute_result"
844
+ }
845
+ ],
846
+ "source": [
847
+ "df = pd.read_parquet('image_annotations.parquet')\n",
848
+ "df"
849
+ ]
850
+ },
851
+ {
852
+ "cell_type": "code",
853
+ "execution_count": null,
854
+ "metadata": {},
855
+ "outputs": [],
856
+ "source": []
857
+ }
858
+ ],
859
+ "metadata": {
860
+ "kernelspec": {
861
+ "display_name": "Python 3",
862
+ "language": "python",
863
+ "name": "python3"
864
+ },
865
+ "language_info": {
866
+ "codemirror_mode": {
867
+ "name": "ipython",
868
+ "version": 3
869
+ },
870
+ "file_extension": ".py",
871
+ "mimetype": "text/x-python",
872
+ "name": "python",
873
+ "nbconvert_exporter": "python",
874
+ "pygments_lexer": "ipython3",
875
+ "version": "3.10.12"
876
+ }
877
+ },
878
+ "nbformat": 4,
879
+ "nbformat_minor": 2
880
+ }