pierreguillou commited on
Commit
cf4785c
1 Parent(s): 2bb6f09

Update files/functions.py

Browse files
Files changed (1) hide show
  1. files/functions.py +4 -5
files/functions.py CHANGED
@@ -711,14 +711,13 @@ def predictions_line_level(dataset, outputs, images_ids_list, chunk_ids, input_i
711
  bbox_prev = [-100, -100, -100, -100]
712
  for probs, input_id, bbox in zip(ten_probs_list, ten_input_ids_list, ten_bboxes_list):
713
  bbox = denormalize_box(bbox, width, height)
714
- if bbox != bbox_prev and bbox != cls_box:
715
  bboxes_list.append(bbox)
716
  input_ids_dict[str(bbox)] = [input_id]
717
  probs_dict[str(bbox)] = [probs]
718
- else:
719
- if bbox != cls_box:
720
- input_ids_dict[str(bbox)].append(input_id)
721
- probs_dict[str(bbox)].append(probs)
722
  bbox_prev = bbox
723
 
724
  probs_bbox = dict()
 
711
  bbox_prev = [-100, -100, -100, -100]
712
  for probs, input_id, bbox in zip(ten_probs_list, ten_input_ids_list, ten_bboxes_list):
713
  bbox = denormalize_box(bbox, width, height)
714
+ if bbox != bbox_prev and bbox != cls_box and bbox != sep_box and bbox[0] != bbox[2] and bbox[1] != bbox[3]:
715
  bboxes_list.append(bbox)
716
  input_ids_dict[str(bbox)] = [input_id]
717
  probs_dict[str(bbox)] = [probs]
718
+ elif bbox != cls_box and bbox != sep_box and bbox[0] != bbox[2] and bbox[1] != bbox[3]:
719
+ input_ids_dict[str(bbox)].append(input_id)
720
+ probs_dict[str(bbox)].append(probs)
 
721
  bbox_prev = bbox
722
 
723
  probs_bbox = dict()