pierreguillou
commited on
Commit
•
2e609f7
1
Parent(s):
5850db4
Update files/functions.py
Browse files- files/functions.py +4 -5
files/functions.py
CHANGED
@@ -646,14 +646,13 @@ def predictions_line_level(dataset, outputs, images_ids_list, chunk_ids, input_i
|
|
646 |
bbox_prev = [-100, -100, -100, -100]
|
647 |
for probs, input_id, bbox in zip(ten_probs_list, ten_input_ids_list, ten_bboxes_list):
|
648 |
bbox = denormalize_box(bbox, width, height)
|
649 |
-
if bbox != bbox_prev and bbox != cls_box:
|
650 |
bboxes_list.append(bbox)
|
651 |
input_ids_dict[str(bbox)] = [input_id]
|
652 |
probs_dict[str(bbox)] = [probs]
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
probs_dict[str(bbox)].append(probs)
|
657 |
bbox_prev = bbox
|
658 |
|
659 |
probs_bbox = dict()
|
|
|
646 |
bbox_prev = [-100, -100, -100, -100]
|
647 |
for probs, input_id, bbox in zip(ten_probs_list, ten_input_ids_list, ten_bboxes_list):
|
648 |
bbox = denormalize_box(bbox, width, height)
|
649 |
+
if bbox != bbox_prev and bbox != cls_box and bbox != sep_box and bbox[0] != bbox[2] and bbox[1] != bbox[3]:
|
650 |
bboxes_list.append(bbox)
|
651 |
input_ids_dict[str(bbox)] = [input_id]
|
652 |
probs_dict[str(bbox)] = [probs]
|
653 |
+
elif bbox != cls_box and bbox != sep_box and bbox[0] != bbox[2] and bbox[1] != bbox[3]:
|
654 |
+
input_ids_dict[str(bbox)].append(input_id)
|
655 |
+
probs_dict[str(bbox)].append(probs)
|
|
|
656 |
bbox_prev = bbox
|
657 |
|
658 |
probs_bbox = dict()
|