Howal/DNL-Object-Detection

change the mask-rcnn to faster-rcnn

tingfengwanxiao opened this issue · 0 comments

Hello,can I change the model in faster-rcnn resnet instead of mask rcnn only by change this demo?
//---------------------------------------------------------------------------------------------------------------------

model settings

model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
#norm_cfg=dict(type='BN', requires_grad=True),
#norm_eval=True,
nlgcb=dict(ratio=1. / 4., downsample=False, whiten_type=['channel'], temp=0.05, with_gc=True, use_out=False,
out_bn=False),
stage_with_nlgcb=[[], [], [-2], [-2, -1, 0]],
style='pytorch'),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_scales=[8],
anchor_ratios=[0.5, 1.0, 2.0],
anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0],
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),