BenjiELCA commited on
Commit
90908a1
·
1 Parent(s): 6ded4f7
Files changed (1) hide show
  1. modules/toXML.py +3 -0
modules/toXML.py CHANGED
@@ -84,6 +84,9 @@ def align_boxes(pred, size):
84
  if len(keep_elements) != 0:
85
  min_x, min_y, max_x, max_y = calculate_pool_bounds(modified_pred['boxes'],modified_pred['labels'], keep_elements, size_elements)
86
  else:
 
 
 
87
  min_x, min_y, max_x, max_y = modified_pred['boxes'][pool_index]
88
  pool_width = max_x - min_x
89
  pool_height = max_y - min_y
 
84
  if len(keep_elements) != 0:
85
  min_x, min_y, max_x, max_y = calculate_pool_bounds(modified_pred['boxes'],modified_pred['labels'], keep_elements, size_elements)
86
  else:
87
+ if pool_index >= len(modified_pred['boxes']):
88
+ print("Problem with the index")
89
+ continue
90
  min_x, min_y, max_x, max_y = modified_pred['boxes'][pool_index]
91
  pool_width = max_x - min_x
92
  pool_height = max_y - min_y