NoelShin / selfmask

[CVPRW'22] Unsupervised Salient Object Detection With Spectral Cluster Voting
https://www.robots.ox.ac.uk/~vgg/research/selfmask/
MIT License
59 stars 7 forks source link

AssertionError: torch.Size in compute_iou #1

Closed Vadim2S closed 2 years ago

Vadim2S commented 2 years ago

I am try test DUTS or ECSSD with pre-trained weight. Result always the same. ~2x difference in tensor size.

ious = compute_iou(pred_mask=pred_mask, gt_mask=gt_mask) File "e:_Vadim_Work\selfmask\metrics\iou.py", line 19, in compute_iou assert pred_mask.shape == gt_mask.shape, f"{pred_mask.shape} != {gt_mask.shape}" AssertionError: torch.Size([20, 152, 200]) != torch.Size([20, 302, 400])

NoelShin commented 2 years ago

Hi, thanks for the enquiry!

Are you using evaluator.py? If so, I can confirm it doesn't raise the same assertion error on my side. Could you please provide the image file name that raises the error?

Vadim2S commented 2 years ago

Sorry! My mistake. I was am confused by "clustering" name of config section and set scale to 1 along with GPU off.