mmdetection replacement backbone example

Let me explain here first, I replaced "ResNet1", and I used "ResNet" before.

This is the place that needs to be modified. Remember that you only need to modify the two files " init.py " and "backbone_new.py".

insert image description here

I used the original "resnet.py" code directly, and then created a new "backbone_new.py" file myself, just call it. Of course, remember to add on the class you call

@BACKBONES.register_module()

This part is displayed as follows:
insert image description here

Because, in order to distinguish whether it is called "ResNet" or my own "ResNet1", I renamed "ResNet" in all "backbone_new.py" files to "ResNet1", and remember to modify my own network structure code
. Call your own "ResNet1" backbone structure, the content is as follows:
insert image description here
At the same time, remember to recompile your own code:

python setup.py develop

It seems that there is no other place that needs to be modified.

Guess you like

Origin blog.csdn.net/qq_44666320/article/details/129667015