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

CSF+Res2Net batch size #12

Closed AmberCheng closed 2 years ago

AmberCheng commented 3 years ago

Hi, thanks for your wonderful work! I met a size not match error when I try a bigger batch size. However, when I used my own dataset, it works. Do I ignore something about the DUTs dataset?

gasvn commented 3 years ago

The size of images in DUTs dataset is not the same. You need to resize all images to have the same shape to use bigger batch size.

AmberCheng commented 3 years ago

The size of images in DUTs dataset is not the same. You need to resize all images to have the same shape to use bigger batch size. Thank you very much!!!! By the way, when I try my own dataset, I find it hard to define my model is getting better. Do you have any experienced loss range about this model?

gasvn commented 3 years ago

Indeed it's hard to tell if the model is better when using this training code. I follow the previous work and use their training scheme to train the model with no adjustment. I suggest you to use the testing MAE to eval the model performance as it is quick to test.

AmberCheng commented 3 years ago

Indeed it's hard to tell if the model is better when using this training code. I follow the previous work and use their training scheme to train the model with no adjustment. I suggest you to use the testing MAE to eval the model performance as it is quick to test.

@gasvn Thanks for your kind reply. I wonder will bn work when the batch size equals 1?

gasvn commented 2 years ago

Indeed it's hard to tell if the model is better when using this training code. I follow the previous work and use their training scheme to train the model with no adjustment. I suggest you to use the testing MAE to eval the model performance as it is quick to test.

@gasvn Thanks for your kind reply. I wonder will bn work when the batch size equals 1?

The bn is not working well when bs=1, so we follow most SOD methods to change the bn into eval mode.