OBBDetection
OBBDetection copied to clipboard
How to load gt_mask in Oriented RPN for DOTA dataset (from BBoxToolkit)
@jbwang1997 How can I edit the below config to load gt_masks
for DOTA dataset?
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadOBBAnnotations', with_bbox=True,
with_label=True, obb_as_mask=True),
dict(type='LoadDOTASpecialInfo'),
dict(type='Resize', img_scale=(1024, 1024), keep_ratio=True),
dict(type='OBBRandomFlip', h_flip_ratio=0.5, v_flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='RandomOBBRotate', rotate_after_flip=True,
angles=(0, 0), vert_rate=0.5, vert_cls=['roundabout', 'storage-tank']),
dict(type='Pad', size_divisor=32),
dict(type='DOTASpecialIgnore', ignore_size=2),
dict(type='FliterEmpty'),
dict(type='Mask2OBB', obb_type='obb'),
dict(type='OBBDefaultFormatBundle'),
dict(type='OBBCollect', keys=['img', 'gt_bboxes', 'gt_obboxes', 'gt_labels'])
]
I assume, I just need to add:
dict(type='LoadOBBAnnotations', with_bbox=True,
with_label=True, with_mask=True, obb_as_mask=True),
dict(type='MaskType', mask_type='bitmap'),
dict(type='OBBCollect',
keys=['img', 'gt_bboxes', 'gt_obboxes', 'gt_masks', 'gt_labels'])
If I'm correct, the mask_type
should be bitmap
or polygon
.
I'm using DOTA dataset
which is split using BBoxToolkit
.