simple-faster-rcnn-pytorch icon indicating copy to clipboard operation
simple-faster-rcnn-pytorch copied to clipboard

Performance on Resnet101 network

Open twtygqyy opened this issue 6 years ago • 7 comments

Hi, I've implemented the resnet101 structure on the top of vgg16 network, while the mAP on VOC datasets could only reach 0.62 after 20 epochs. Do you have any idea what the problem would be? You can find the code here. Thank you.

twtygqyy avatar Apr 06 '18 14:04 twtygqyy

I think maybe resnet101 is difficult to train.

This maybe helpful.

For Resnets, we fix the first block (total 4) when fine-tuning the network, and only use crop_and_resize to resize the RoIs (7x7) without max-pool (which Xinlei finds useless especially for COCO). The final feature maps are average-pooled for classification and regression. All batch normalization parameters are fixed. Learning rate for biases is not doubled.

chenyuntc avatar Apr 06 '18 14:04 chenyuntc

@chenyuntc Thanks, I also fixed the weights for top layers, but the result didn't improve. As you mentioned, it might be the reason of BN and biases. I'll have another try.

twtygqyy avatar Apr 06 '18 15:04 twtygqyy

Hi @chenyuntc, I've trained the model with:

  1. Fix the first block.
  2. Learning rate for biases is not doubled.
  3. All batch normalization parameters are fixed.
  4. Use 1e-4 as weight decay.

And I restrictedly followed the way of training as I did in caffe, while it seems the performance cannot be improved. Have you tried to train the model on networks other than VGG16?

twtygqyy avatar Apr 09 '18 18:04 twtygqyy

Actually, I only tried VGG16.

chenyuntc avatar Apr 14 '18 11:04 chenyuntc

I recently also want to implement resnet structure based on this project. And I found your @twtygqyy codes are very helpful to me. But I have a question about batch normalization. Why we need to fix batch normalization parameters here?

blateyang avatar Jan 26 '19 11:01 blateyang

@blateyang BN only work when batch_size>1 and only work well when batch_size>=16.You can see this paper https://arxiv.org/abs/2002.05712.However,@chenyuntc code only surport batch_size==1

stickOverCarrot avatar Oct 17 '20 11:10 stickOverCarrot

Thanks for your reply!

stickOverCarrot [email protected] 于2020年10月17日周六 下午7:48写道:

@blateyang https://github.com/blateyang BN only work when batch_size>1 and only work well when batch_size>=16.You can see this paper https://arxiv.org/abs/2002.05712.However,@chenyuntc code only surport batch_size==1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chenyuntc/simple-faster-rcnn-pytorch/issues/32#issuecomment-710858410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGHYD4MAIDOBBVEXAMFTZETSLF77NANCNFSM4EZIVDVA .

blateyang avatar Oct 19 '20 11:10 blateyang