FastSAM icon indicating copy to clipboard operation
FastSAM copied to clipboard

[Query] about crop images in CLIP prompts

Open gasharper opened this issue 1 year ago • 1 comments

In the text_promt function, the first return value cropped_boxes is used in post retrieve function. However, the first return value comes from _segment_image, which leaves a large white padding for most small bboxs.

Why not crop the image by the bounding box, then put them into CLIP? Does white padding affect CLIP results?

gasharper avatar Aug 10 '23 09:08 gasharper

I just getting take a look in the cropped_boxes and wonder if it some solution, bug or essential for something. I think It might be better if we change their function _crop_image to just use PIL.Image.crop ?

AtiChetsurakul avatar Nov 16 '23 13:11 AtiChetsurakul