KdaiP / MobileSAM-fast-finetuning

Finetune MobileSAM with Less Than 4GB RAM!
Apache License 2.0
11 stars 3 forks source link

请教下:dataset中compute_bbox找不到前景色为什么返回[0, 0, 0, 0],而不是图片[0,0,w,h]? #3

Open YangKa opened 2 months ago

YangKa commented 2 months ago
if rows_white.nelement() == 0 or cols_white.nelement() == 0:
        # No white pixels, return zeros
        return torch.tensor([0, 0, 0, 0])