Spaces:
Sleeping
Sleeping
π₯ Removed debugging image saving code
Browse files- models/misc_utils.py +1 -2
models/misc_utils.py
CHANGED
@@ -20,10 +20,9 @@ def get_images_using_bbox(payload: PayloadModel):
|
|
20 |
print(f"Bbox: {payload.bbox}")
|
21 |
images_bboxes = payload.bbox
|
22 |
image_bboxes = images_bboxes[0]
|
23 |
-
for
|
24 |
x1, y1, x2, y2 = bbox
|
25 |
image = cv2_image[y1:y2, x1:x2]
|
26 |
-
cv2.imwrite(f"image_{idx}.png", image)
|
27 |
pil_image = convert_cv2_to_pil(image)
|
28 |
images.append(pil_image)
|
29 |
return images
|
|
|
20 |
print(f"Bbox: {payload.bbox}")
|
21 |
images_bboxes = payload.bbox
|
22 |
image_bboxes = images_bboxes[0]
|
23 |
+
for _, bbox in enumerate(image_bboxes):
|
24 |
x1, y1, x2, y2 = bbox
|
25 |
image = cv2_image[y1:y2, x1:x2]
|
|
|
26 |
pil_image = convert_cv2_to_pil(image)
|
27 |
images.append(pil_image)
|
28 |
return images
|