Spaces:
Runtime error
Runtime error
Commit
·
db51c0a
1
Parent(s):
c2a6c29
Update app.py
Browse files
app.py
CHANGED
@@ -663,6 +663,7 @@ def run_anything_task(input_image, text_prompt, task_type, inpaint_prompt, box_t
|
|
663 |
boxes_filt[i][:2] -= boxes_filt[i][2:] / 2
|
664 |
boxes_filt[i][2:] += boxes_filt[i][:2]
|
665 |
|
|
|
666 |
boxes_filt = boxes_filt.to(sam_device)
|
667 |
transformed_boxes = sam_predictor.transform.apply_boxes_torch(boxes_filt, image.shape[:2])
|
668 |
|
@@ -702,6 +703,9 @@ def run_anything_task(input_image, text_prompt, task_type, inpaint_prompt, box_t
|
|
702 |
mask_pil = input_mask_pil
|
703 |
mask = input_mask
|
704 |
else:
|
|
|
|
|
|
|
705 |
masks_ori = copy.deepcopy(masks)
|
706 |
if inpaint_mode == 'merge':
|
707 |
masks = torch.sum(masks, dim=0).unsqueeze(0)
|
|
|
663 |
boxes_filt[i][:2] -= boxes_filt[i][2:] / 2
|
664 |
boxes_filt[i][2:] += boxes_filt[i][:2]
|
665 |
|
666 |
+
logger.info(f'boxes_filt={boxes_filt}')
|
667 |
boxes_filt = boxes_filt.to(sam_device)
|
668 |
transformed_boxes = sam_predictor.transform.apply_boxes_torch(boxes_filt, image.shape[:2])
|
669 |
|
|
|
703 |
mask_pil = input_mask_pil
|
704 |
mask = input_mask
|
705 |
else:
|
706 |
+
logger.info(f'masks_shape={masks.shape}')
|
707 |
+
logger.info(f'masks={masks}')
|
708 |
+
|
709 |
masks_ori = copy.deepcopy(masks)
|
710 |
if inpaint_mode == 'merge':
|
711 |
masks = torch.sum(masks, dim=0).unsqueeze(0)
|