Abijith commited on
Commit
147197f
1 Parent(s): b27da8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -75,8 +75,8 @@ def clipseg_prediction(image):
75
  damage_bbox = segment_to_bbox(damage_inds)
76
  vehicle_bbox = segment_to_bbox(vehicle_inds)
77
 
78
- # Vehicle checking
79
- if bbox_area(vehicle_bbox) > bbox_area(damage_bbox):
80
  return True, [bbox_normalization(damage_bbox, img_w, img_h)]
81
  else:
82
  return False, [[]]
 
75
  damage_bbox = segment_to_bbox(damage_inds)
76
  vehicle_bbox = segment_to_bbox(vehicle_inds)
77
 
78
+ # Vehicle and damage checking
79
+ if bbox_area(vehicle_bbox) > bbox_area(damage_bbox) and bbox_area(damage_bbox)!=0:
80
  return True, [bbox_normalization(damage_bbox, img_w, img_h)]
81
  else:
82
  return False, [[]]