-
Notifications
You must be signed in to change notification settings - Fork 6
/
rotated_imted_hb1m_oriented_rcnn_hivitdet_base_1x_dota_ms_rr_le90_stdc_xyawh321v.py
63 lines (60 loc) · 2.04 KB
/
rotated_imted_hb1m_oriented_rcnn_hivitdet_base_1x_dota_ms_rr_le90_stdc_xyawh321v.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
_base_ = './rotated_imted_hb1_oriented_rcnn_hivitdet_base_1x_dota_le90_16h.py'
model = dict(
backbone=dict(
use_checkpoint=False, # True, # False for A100
),
roi_head=dict(
bbox_head=dict(
type='RotatedMAEBBoxHeadSTDC',
dc_mode_str_list = ['', '', '', 'XY', '', 'A', '', 'WH'],
num_convs_list = [0, 0, 3, 3, 2, 2, 1, 1],
am_mode_str_list = ['', '', 'V', 'V', 'V', 'V', 'V', 'V'],
rois_mode = 'rbbox',
use_checkpoint=False, # True, # False for A100
),
),
)
# dota_ms_rr
data_root_ms = 'data/split_ms_dota/'
data_root_ss = 'data/split_ss_dota/'
angle_version = 'le90'
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),
dict(type='RResize', img_scale=(1024, 1024)),
dict(
type='RRandomFlip',
flip_ratio=[0.25, 0.25, 0.25],
direction=['horizontal', 'vertical', 'diagonal'],
version=angle_version),
dict(
type='PolyRandomRotate',
rotate_ratio=0.5,
angles_range=180,
auto_bound=False,
rect_classes=[9, 11],
version=angle_version),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])
]
data = dict(
samples_per_gpu=1,
workers_per_gpu=8, # 4, # 8 for A100
train=dict(
ann_file=data_root_ms + 'trainval/annfiles/',
img_prefix=data_root_ms + 'trainval/images/',
pipeline=train_pipeline, version=angle_version),
val=dict(
ann_file=data_root_ss + 'val/annfiles/',
img_prefix=data_root_ss + 'val/images/',
version=angle_version),
test=dict(
ann_file=data_root_ms + 'test/images/',
img_prefix=data_root_ms + 'test/images/',
version=angle_version))
# optimizer
# optimizer = dict(lr=5e-5) # 4 GPUs for A100