Closed grenoblien closed 4 years ago
Why are you talking about DetectoRS/mmdetv2 when this repo is about mmdetection? Go open an issue on that repo not here.
And mmdetection has detectoRS implementation here:
https://github.com/open-mmlab/mmdetection/tree/master/configs/detectors
Thank you!
I am using DetectoRS/mmdetv2 branch for object detection with my own dataset.
I have edited config files but I am getting errors from masking stage because I don't have mask labels in my dataset.
How could I edit my config file so that I do not use masking part?
I am using detectors_htc_r50_1x_coco.py config file.
detectors_htc_r50_1x_coco.py config
`base = '../htc/htc_r50_fpn_1x_coco.py'
classes = ('_background', 'tree', 'amb_tree', 'long_tree')
model = dict( backbone=dict( conv_cfg=dict(type="ConvAWS"), sac=dict(type='SAC', use_deform=True), stage_with_sac=(False, True, True, True), output_img=True), neck=dict( type='RFP', rfp_steps=2, rfp_backbone=dict( rfp_inp=256, 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, conv_cfg=dict(type='ConvAWS'), sac=dict(type='SAC', use_deform=True), stage_with_sac=(False, True, True, True), style='pytorch'), rfp_pretrained='torchvision://resnet50', )
)
**'htc_r50_fpn_1x_coco.py config**
base = './htc_without_semantic_r50_fpn_1x_coco.py' model = dict( roi_head=dict( semantic_roi_extractor=dict( type='SingleRoIExtractor', roi_layer=dict(type='RoIAlign', out_size=14, sample_num=0), out_channels=256, featmap_strides=[8]), semantic_head=dict( type='FusedSemanticHead', num_ins=5, fusion_level=1, num_convs=4, in_channels=256, conv_out_channels=256, num_classes=183, ignore_label=255, loss_weight=0.2)))data_root = 'data/tree/' dataset_type = 'TreeDataset'
classes = ('_background', 'tree', 'amb_tree', 'long_tree') img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile'), dict( type='LoadAnnotations', with_bbox=True, with_mask=True, with_seg=True), dict(type='Resize', img_scale=(511, 511), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='SegRescale', scale_factor=1 / 8), dict(type='DefaultFormatBundle'), dict( type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']), ] test_pipeline = [ dict(type='LoadImageFromFile'), dict( type='MultiScaleFlipAug', img_scale=(511, 511), flip=False, transforms=[ dict(type='Resize', keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img']), ]) ] data = dict( train=dict( classes=classes, ann_file=data_root+'annotations/train.json', img_prefix=data_root + 'train/', pipeline=train_pipeline), val=dict( classes=classes, ann_file=data_root+'annotations/val.json', img_prefix=data_root + 'val/', pipeline=test_pipeline), test=dict( classes=classes, ann_file=data_root+'annotations/test.json', img_prefix=data_root + 'test/', pipeline=test_pipeline))
`