ShangHua-Gao / SOD100K

The official repo of the TPAMI 2021/ECCV 2020 work CSNet: A Highly Efficient Model with 100K Parameters to Study the Semantics of Salient Object Detection
https://mmcheng.net/sod100k/
240 stars 47 forks source link

Question about resize with mode='reflect' for CSNet #18

Closed swoook closed 3 years ago

swoook commented 3 years ago

Hi! First of all, thanks for sharing your great work on salient object detection!

I'd like to ask about skimage.transform.resize in \${REPO_ROOT}/CSNet/test.py.

In the code, it passes 'reflect' to mode for skimage.transform.resize.

                    img = resize(img, (cfg.TEST.IMAGE_H, cfg.TEST.IMAGE_W),
                                 mode='reflect',
                                 anti_aliasing=False)

And I found it means:

Pads with the reflection of the vector mirrored on the first and last values of the vector along each axis.

Is there any reason you choose 'reflect' rather than others like 'empty'?

Actually, I usually handle object detectors and the most repos I've seen just zero-pad to keep aspect ratios.

Have you experienced a performance gap between 'reflect' and others like 'empty'?