-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update * update * fix lint * update * update * Update gliding-vertex-rbox_r50_fpn_1x_dota.py * update ms configs * update hrsc configs * fix lint * Update configs/redet/README.md Co-authored-by: RangiLyu <[email protected]> Co-authored-by: RangiLyu <[email protected]>
- Loading branch information
Showing
149 changed files
with
1,396 additions
and
1,281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# dataset settings | ||
dataset_type = 'DOTADataset' | ||
data_root = 'data/split_ms_dota/' | ||
file_client_args = dict(backend='disk') | ||
|
||
train_pipeline = [ | ||
dict(type='mmdet.LoadImageFromFile', file_client_args=file_client_args), | ||
dict(type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'), | ||
dict(type='ConvertBoxType', box_type_mapping=dict(gt_bboxes='rbox')), | ||
dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True), | ||
dict( | ||
type='mmdet.RandomFlip', | ||
prob=0.75, | ||
direction=['horizontal', 'vertical', 'diagonal']), | ||
dict( | ||
type='RandomRotate', | ||
prob=0.5, | ||
angle_range=180, | ||
rect_obj_labels=[9, 11]), | ||
dict(type='mmdet.PackDetInputs') | ||
] | ||
val_pipeline = [ | ||
dict(type='mmdet.LoadImageFromFile', file_client_args=file_client_args), | ||
dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True), | ||
# avoid bboxes being resized | ||
dict(type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'), | ||
dict(type='ConvertBoxType', box_type_mapping=dict(gt_bboxes='rbox')), | ||
dict( | ||
type='mmdet.PackDetInputs', | ||
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape', | ||
'scale_factor')) | ||
] | ||
test_pipeline = [ | ||
dict(type='mmdet.LoadImageFromFile', file_client_args=file_client_args), | ||
dict(type='mmdet.Resize', scale=(1024, 1024), keep_ratio=True), | ||
# avoid bboxes being resized | ||
dict( | ||
type='mmdet.PackDetInputs', | ||
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape', | ||
'scale_factor')) | ||
] | ||
train_dataloader = dict( | ||
batch_size=2, | ||
num_workers=2, | ||
persistent_workers=True, | ||
sampler=dict(type='DefaultSampler', shuffle=True), | ||
batch_sampler=None, | ||
dataset=dict( | ||
type=dataset_type, | ||
data_root=data_root, | ||
ann_file='trainval/annfiles/', | ||
data_prefix=dict(img_path='trainval/images/'), | ||
img_shape=(1024, 1024), | ||
filter_cfg=dict(filter_empty_gt=True), | ||
pipeline=train_pipeline)) | ||
val_dataloader = dict( | ||
batch_size=1, | ||
num_workers=2, | ||
persistent_workers=True, | ||
drop_last=False, | ||
sampler=dict(type='DefaultSampler', shuffle=False), | ||
dataset=dict( | ||
type=dataset_type, | ||
data_root=data_root, | ||
ann_file='trainval/annfiles/', | ||
data_prefix=dict(img_path='trainval/images/'), | ||
img_shape=(1024, 1024), | ||
test_mode=True, | ||
pipeline=val_pipeline)) | ||
test_dataloader = val_dataloader | ||
|
||
val_evaluator = dict(type='DOTAMetric', metric='mAP') | ||
test_evaluator = val_evaluator | ||
|
||
# inference on test dataset and format the output results | ||
# for submission. Note: the test set has no annotation. | ||
# test_dataloader = dict( | ||
# batch_size=1, | ||
# num_workers=2, | ||
# persistent_workers=True, | ||
# drop_last=False, | ||
# sampler=dict(type='DefaultSampler', shuffle=False), | ||
# dataset=dict( | ||
# type=dataset_type, | ||
# data_root=data_root, | ||
# data_prefix=dict(img_path='test/images/'), | ||
# img_shape=(1024, 1024), | ||
# test_mode=True, | ||
# pipeline=test_pipeline)) | ||
# test_evaluator = dict( | ||
# type='DOTAMetric', | ||
# format_only=True, | ||
# merge_patches=True, | ||
# outfile_prefix='./work_dirs/dota/Task1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,66 @@ | ||
# dataset settings | ||
dataset_type = 'HRSCDataset' | ||
data_root = 'data/hrsc/' | ||
img_norm_cfg = dict( | ||
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) | ||
file_client_args = dict(backend='disk') | ||
|
||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='LoadAnnotations', with_bbox=True), | ||
dict(type='RResize', img_scale=(800, 800)), | ||
dict(type='RRandomFlip', flip_ratio=0.5), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']) | ||
dict(type='mmdet.LoadImageFromFile', file_client_args=file_client_args), | ||
dict(type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'), | ||
dict(type='ConvertBoxType', box_type_mapping=dict(gt_bboxes='rbox')), | ||
dict(type='mmdet.Resize', scale=(800, 512), keep_ratio=True), | ||
dict( | ||
type='mmdet.RandomFlip', | ||
prob=0.75, | ||
direction=['horizontal', 'vertical', 'diagonal']), | ||
dict(type='mmdet.PackDetInputs') | ||
] | ||
val_pipeline = [ | ||
dict(type='mmdet.LoadImageFromFile', file_client_args=file_client_args), | ||
dict(type='mmdet.Resize', scale=(800, 512), keep_ratio=True), | ||
# avoid bboxes being resized | ||
dict(type='mmdet.LoadAnnotations', with_bbox=True, box_type='qbox'), | ||
dict(type='ConvertBoxType', box_type_mapping=dict(gt_bboxes='rbox')), | ||
dict( | ||
type='mmdet.PackDetInputs', | ||
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape', | ||
'scale_factor')) | ||
] | ||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='mmdet.LoadImageFromFile', file_client_args=file_client_args), | ||
dict(type='mmdet.Resize', scale=(800, 512), keep_ratio=True), | ||
# avoid bboxes being resized | ||
dict( | ||
type='MultiScaleFlipAug', | ||
img_scale=(800, 800), | ||
flip=False, | ||
transforms=[ | ||
dict(type='RResize'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='Pad', size_divisor=32), | ||
dict(type='DefaultFormatBundle'), | ||
dict(type='Collect', keys=['img']) | ||
]) | ||
type='mmdet.PackDetInputs', | ||
meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape', | ||
'scale_factor')) | ||
] | ||
data = dict( | ||
samples_per_gpu=2, | ||
workers_per_gpu=2, | ||
train=dict( | ||
type=dataset_type, | ||
classwise=False, | ||
ann_file=data_root + 'ImageSets/trainval.txt', | ||
ann_subdir=data_root + 'FullDataSet/Annotations/', | ||
img_subdir=data_root + 'FullDataSet/AllImages/', | ||
img_prefix=data_root + 'FullDataSet/AllImages/', | ||
pipeline=train_pipeline), | ||
val=dict( | ||
train_dataloader = dict( | ||
batch_size=2, | ||
num_workers=2, | ||
persistent_workers=True, | ||
sampler=dict(type='DefaultSampler', shuffle=True), | ||
batch_sampler=None, | ||
dataset=dict( | ||
type=dataset_type, | ||
classwise=False, | ||
ann_file=data_root + 'ImageSets/test.txt', | ||
ann_subdir=data_root + 'FullDataSet/Annotations/', | ||
img_subdir=data_root + 'FullDataSet/AllImages/', | ||
img_prefix=data_root + 'FullDataSet/AllImages/', | ||
pipeline=test_pipeline), | ||
test=dict( | ||
data_root=data_root, | ||
ann_file='ImageSets/trainval.txt', | ||
data_prefix=dict(sub_data_root='FullDataSet/'), | ||
filter_cfg=dict(filter_empty_gt=True), | ||
pipeline=train_pipeline)) | ||
val_dataloader = dict( | ||
batch_size=1, | ||
num_workers=2, | ||
persistent_workers=True, | ||
drop_last=False, | ||
sampler=dict(type='DefaultSampler', shuffle=False), | ||
dataset=dict( | ||
type=dataset_type, | ||
classwise=False, | ||
ann_file=data_root + 'ImageSets/test.txt', | ||
ann_subdir=data_root + 'FullDataSet/Annotations/', | ||
img_subdir=data_root + 'FullDataSet/AllImages/', | ||
img_prefix=data_root + 'FullDataSet/AllImages/', | ||
pipeline=test_pipeline)) | ||
data_root=data_root, | ||
ann_file='ImageSets/test.txt', | ||
data_prefix=dict(sub_data_root='FullDataSet/'), | ||
test_mode=True, | ||
pipeline=val_pipeline)) | ||
test_dataloader = val_dataloader | ||
|
||
val_evaluator = dict(type='DOTAMetric', metric='mAP') | ||
test_evaluator = val_evaluator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.