when i take a inference in a the weights provided by you great guys ,and i change the backbone=101
why the model also can get a good result? Does this weight support only resnet50?
and what,s happen if i train my own dataset when i use the weights(backbone=resnet101)?
I guess it's because ResNet50 and ResNet101 both have relatively similar performance(maybe 3 or 4% improvement), hence the C3, C4, C5 of them are relatively same, of course that of resnet101 is a little better. But in general, for later FPN, features of 50 and 101 are quite similar. And in this case, a model trained on ResNet50 may also work well on ResNet101.
Thank you for your so quick reply
and, Emmmmmmm.
I still don,t know why I train a model based on resnet50 and I can use a model based on resnet101 to inference ............
Forgive my foolish , because I believe the resnet50 model is smaller than resnet101 and , the resnet50 weights should not be suitable for the resnet101
Ok, I got your point. For this repo, I'm no so sure about his strategy of loading a pre-trained model. Generally, there are two ways of loading a model.
First is to match every variable of a pre-trained model and the model defined by the code, and only all variables match, will it be successfully loading the model. And in this case, if you train a model basing on ResNet50 and store it, then it is not going to work if your change the code into a ResNet101 backbone and restore the previous model, because resnet50 and resnet101 have different variable name/scope and they do not match.
Second is to simply match variables with same name/scope and loading them respectively, and in this case, when you train a model basing on ResNet50 and store it, and even if you change the code into ResNer101, the restoring process will only load variables of FPN and class/box submodules, because they have same name/scope. But for the ResNet101 part, it will not load from the previous model because they have different name/scope, but it is not a failure under this restoring strategy. So your model could still work with the original ResNet101 backbone.
In fact, it is simply my guess. I'm familiar with Tensorflow but not Keras. And in Tensorflow, this is correct. Don't know how about it in Keras.
Wow!!!!!!!!!!!!!!
Thank you so much for your careful and careful answer.
Haha~
Glad to hear it is helpful~~~
Are you Chinese? Can i make a friends with you ?
What makes you think that?
Ok, I am a Chinese...
进你主页看了下,主要是你说了一句'haha'
因吹斯听~
加个KOUKOU呗
2533290439~
你加我把 你的要回答问题。 3487944589
Please do not use github issues for personal conversations.
Most helpful comment
Ok, I got your point. For this repo, I'm no so sure about his strategy of loading a pre-trained model. Generally, there are two ways of loading a model.
First is to match every variable of a pre-trained model and the model defined by the code, and only all variables match, will it be successfully loading the model. And in this case, if you train a model basing on ResNet50 and store it, then it is not going to work if your change the code into a ResNet101 backbone and restore the previous model, because resnet50 and resnet101 have different variable name/scope and they do not match.
Second is to simply match variables with same name/scope and loading them respectively, and in this case, when you train a model basing on ResNet50 and store it, and even if you change the code into ResNer101, the restoring process will only load variables of FPN and class/box submodules, because they have same name/scope. But for the ResNet101 part, it will not load from the previous model because they have different name/scope, but it is not a failure under this restoring strategy. So your model could still work with the original ResNet101 backbone.