refactor: add info to inpaint_mask_sam_prompt_text, rename variable for dino debugging

This commit is contained in:
Manuel Schmid
2024-06-09 23:09:46 +02:00
parent 57c049858c
commit 09e23f5509
3 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -33,11 +33,11 @@ def generate_mask_from_image(image: np.ndarray, mask_model: str, extras: dict, b
if debug_dino:
from PIL import ImageDraw, Image
image_with_boxes = Image.new("RGB", (image.shape[1], image.shape[0]), color="black")
draw = ImageDraw.Draw(image_with_boxes)
debug_dino_image = Image.new("RGB", (image.shape[1], image.shape[0]), color="black")
draw = ImageDraw.Draw(debug_dino_image)
for box in extras['sam_prompt']:
draw.rectangle(box['data'], fill="white")
return np.array(image_with_boxes)
return np.array(debug_dino_image)
return remove(
image,