-
Notifications
You must be signed in to change notification settings - Fork 0
/
box_size.py
46 lines (43 loc) · 1.66 KB
/
box_size.py
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
max_area = 0
biggest_box = None
annotations = [
[0, 0.72870, 0.39317, 0.06474, 0.07754],
[0, 0.16133, 0.74495, 0.09979, 0.12686],
[0, 0.56144, 0.40993, 0.06871, 0.08829],
[0, 0.66701, 0.85182, 0.09026, 0.15555],
[0, 0.32887, 0.72966, 0.07373, 0.14594],
[0, 0.18980, 0.94019, 0.10778, 0.11577],
[0, 0.26893, 0.38325, 0.05904, 0.08090],
[0, 0.41898, 0.92559, 0.09409, 0.14525],
[0, 0.14681, 0.42294, 0.07030, 0.08484],
[0, 0.69315, 0.69876, 0.07454, 0.13765],
[0, 0.16125, 0.58555, 0.07286, 0.10664],
[0, 0.66500, 0.48882, 0.05972, 0.10523],
[0, 0.63436, 0.35792, 0.06742, 0.07138],
[0, 0.41144, 0.38000, 0.05863, 0.08313],
[0, 0.27837, 0.47979, 0.07283, 0.08483],
[0, 0.70293, 0.08798, 0.03390, 0.04985],
[0, 0.35755, 0.32322, 0.07169, 0.06767],
[0, 0.32336, 0.23167, 0.06142, 0.06268],
[0, 0.66660, 0.27597, 0.05861, 0.06868],
[0, 0.53758, 0.26614, 0.05476, 0.07118],
[0, 0.62954, 0.14368, 0.04782, 0.05456],
[0, 0.66594, 0.19706, 0.04666, 0.05993],
[0, 0.41430, 0.27133, 0.06407, 0.06134],
[0, 0.56414, 0.21800, 0.05688, 0.06031],
[0, 0.43844, 0.20680, 0.04109, 0.06091],
[0, 0.35490, 0.17228, 0.05365, 0.05186],
[0, 0.54247, 0.07441, 0.04047, 0.04554],
[0, 0.47182, 0.08485, 0.03807, 0.04630],
[0, 0.41519, 0.12163, 0.04115, 0.05406],
[0, 0.43523, 0.49784, 0.65483, 0.99315],
[0, 0.34861, 0.09548, 0.04997, 0.04303]
]
for annotation in annotations:
_, _, width, height = annotation[1:] # Extract width and height
area = width * height
if area > max_area:
max_area = area
biggest_box = annotation
print("The biggest box:")
print(biggest_box)