plemeri / InSPyReNet

Official PyTorch implementation of Revisiting Image Pyramid Structure for High Resolution Salient Object Detection (ACCV 2022)
MIT License
321 stars 61 forks source link

Some confusion about dynamic_resize #38

Closed babyta closed 8 months ago

babyta commented 8 months ago

When to use dynamic_resize and when to use static_resize during inference. Can I understand that dynamic_resize is for compatibility with LR and HR images during inference? But in this case, the large image may burst the gpu memory.

plemeri commented 8 months ago

Hi @babyta, dynamic_resize is used to downsample HR images larger than about 1K pixels. It is fair to use static_resize as you want for LR or HR images. You can set static_resize.size=[1024, 1024] for HR images, while [384, 384] for LR images.

babyta commented 8 months ago

I understand, thank you!