robustsam / RobustSAM

RobustSAM: Segment Anything Robustly on Degraded Images (CVPR 2024 Highlight)
https://robustsam.github.io/
MIT License
152 stars 15 forks source link

Regarding FGMBlock #7

Closed liuch37 closed 1 month ago

liuch37 commented 1 month ago

Thank you for your great work! As I went through FGMBlock, I don't see IFFT operation being implemented. Should this line https://github.com/robustsam/RobustSAM/blob/eee0a3115c934c28e2dd8bd46bc21d83b9647675/robust_segment_anything/modeling/components.py#L220 be implemented as below?

x = torch.real(torch.fft.ifft2(modified_fft_map, dim=(-2,-1)))
return x

Thanks.

Yi-Heng commented 1 month ago

I also want to ask this question!

robustsam commented 1 month ago

@liuch37 Thanks for pointing out the missing implementation. The related code and the checkpoint link in the README have been updated.

liuch37 commented 1 month ago

Thanks much!