@fmassa How can we add more resnet backbones to existing mask rcnn model ? Currently it supports only resnet50.
When you call this function to define your model torchvision.models.detection.__dict__['FasterRCNN']
you can set your backbone like this:
torchvision.models.detection.__dict__['FasterRCNN'](backbone, num_classes = 2, anchor_generator) of course you can set your own anchor_generator as well.
The most simple way to put other backbone is
using torchvision supported model. Ex) backbone = torchvision.models.mobilenet_v2(pretrained=pretrained).features
backbone.out_channels = 1280 like this.
Most helpful comment
When you call this function to define your model
torchvision.models.detection.__dict__['FasterRCNN']you can set your backbone like this:
torchvision.models.detection.__dict__['FasterRCNN'](backbone, num_classes = 2, anchor_generator)of course you can set your own anchor_generator as well.The most simple way to put other backbone is
using torchvision supported model. Ex)
backbone = torchvision.models.mobilenet_v2(pretrained=pretrained).featuresbackbone.out_channels = 1280like this.