Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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, [[]]
|