Hi, I am having trouble doing transfer learning with mmdetection. I have two datasets:
A - Synthetic dataset. 100k images, 1 class. Used for pretraining
B - Real world dataset. 3k images, 1 class. Used for transfer learning.
I've previously been using TF object detection API. My procedure has been: pretrain on A, then transfer learning on B. This has worked well on TF object detection API. When trying the same thing with mmdetection, I get good convergence for pretraining, but when I do transfer learning, the loss does not converge at all, it begins at 0.2 and rises to around 0.35.
My question: is there something I am forgetting to do in order to switch to transfer learning? Here are the modifications I made to the config for transfer learning:
I've also tried setting frozen_stages to everything from 1-4, with no change. I've tried using learning rates 0.02, 0.002, and 0.0002, with little change, the loss just changes more slowly, but still fails to ever drop.
I feel that I am missing something obvious here in configs, since the same datasets with the same network (Faster RCNN with resnet 101) have worked well using TF api.
Any suggestions? Thanks!! :)
You may just follow what you did with TF, but if you have any specific questions on the apis or configs of mmdetection, we can provide some help.
frozen_stages means freezing the stages of ResNe(X)ts.
pretrained only affects the backbone.
Thank you! When doing transfer learning, is there anything else I should do besides these? I wonder if I'm missing a step and that is why I see poor performance. TF does all these things for you itself when transfer learning.
Most helpful comment
You may just follow what you did with TF, but if you have any specific questions on the apis or configs of mmdetection, we can provide some help.
frozen_stagesmeans freezing the stages of ResNe(X)ts.pretrainedonly affects the backbone.