Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,16 @@ python run_net.py --config-file=configs/base.py --task=test
| S2ANet-R50-FPN | DOTA1.0|1024/200| flip|-| SGD | 1x | 74.11 | [arxiv](https://arxiv.org/abs/2008.09397)| [config](configs/s2anet/s2anet_r50_fpn_1x_dota.py) | [model](https://cloud.tsinghua.edu.cn/d/918bcbf7a10a40fb8dee/files/?p=%2Fmodels%2Fs2anet_r50_fpn_1x_dota_bs2_steplr_3%2Fckpt_12.pkl&dl=1) |
| S2ANet-R50-FPN | DOTA1.0| 1024/200| flip+ra90+bc|-| SGD | 1x | 76.40 | [arxiv](https://arxiv.org/abs/2008.09397)| [config](projects/s2anet/configs/s2anet_r50_fpn_1x_dota_rotate_balance.py) | [model](https://cloud.tsinghua.edu.cn/d/918bcbf7a10a40fb8dee/files/?p=%2Fmodels%2Fs2anet_r50_fpn_1x_dota_rotate_balance%2Fckpt_12.pkl&dl=1) |
| S2ANet-R50-FPN | DOTA1.0|1024/200| flip+ra90+bc+ms |ms| SGD | 1x | 79.72 | [arxiv](https://arxiv.org/abs/2008.09397)| [config](projects/s2anet/configs/s2anet_r50_fpn_1x_dota_rotate_balance_ms.py) | [model](https://cloud.tsinghua.edu.cn/d/918bcbf7a10a40fb8dee/files/?p=%2Fmodels%2Fs2anet_r50_fpn_1x_dota_rotate_balance_ms%2Fckpt_12.pkl&dl=1) |
| S2ANet-R101-FPN |DOTA1.0|1024/200|Flip|-| SGD | 1x | 74.28 | [arxiv](https://arxiv.org/abs/2008.09397)| [config](projects/s2anet/configs/s2anet_r101_fpn_1x_dota_bs2.py) | [model](https://cloud.tsinghua.edu.cn/d/918bcbf7a10a40fb8dee/files/?p=%2Fmodels%2Fs2anet_r101_fpn_1x_dota_without_torch_pretrained%2Fckpt_12.pkl&dl=1) |
| Gliding-R50-FPN |DOTA1.0|1024/200|Flip|-| SGD | 1x | 72.93 | [arxiv](https://arxiv.org/abs/1911.09358)| [config](projects/gliding/configs/gliding_r50_fpn_1x_dota_with_flip.py) | [model](https://cloud.tsinghua.edu.cn/f/ebeefa1edaf84a4d8a2a/?dl=1) |
| Gliding-R50-FPN |DOTA1.0|1024/200|Flip+ra90+bc|-| SGD | 1x | 74.93 | [arxiv](https://arxiv.org/abs/1911.09358)| [config](projects/gliding/configs/gliding_r50_fpn_1x_dota_with_flip_rotate_balance_cate.py) | [model](https://cloud.tsinghua.edu.cn/f/395ecd3ddaf44bb58ac9/?dl=1) |
| S2ANet-R101-FPN |DOTA1.0|1024/200|flip|-| SGD | 1x | 74.28 | [arxiv](https://arxiv.org/abs/2008.09397)| [config](projects/s2anet/configs/s2anet_r101_fpn_1x_dota_bs2.py) | [model](https://cloud.tsinghua.edu.cn/d/918bcbf7a10a40fb8dee/files/?p=%2Fmodels%2Fs2anet_r101_fpn_1x_dota_without_torch_pretrained%2Fckpt_12.pkl&dl=1) |
| Gliding-R50-FPN |DOTA1.0|1024/200|flip|-| SGD | 1x | 72.93 | [arxiv](https://arxiv.org/abs/1911.09358)| [config](projects/gliding/configs/gliding_r50_fpn_1x_dota_with_flip.py) | [model](https://cloud.tsinghua.edu.cn/f/ebeefa1edaf84a4d8a2a/?dl=1) |
| Gliding-R50-FPN |DOTA1.0|1024/200|flip+ra90+bc|-| SGD | 1x | 74.93 | [arxiv](https://arxiv.org/abs/1911.09358)| [config](projects/gliding/configs/gliding_r50_fpn_1x_dota_with_flip_rotate_balance_cate.py) | [model](https://cloud.tsinghua.edu.cn/f/395ecd3ddaf44bb58ac9/?dl=1) |
| RetinaNet-R50-FPN |DOTA1.0|600/150|-|-| SGD | - | 62.503 | [arxiv](https://arxiv.org/abs/1708.02002)| [config](configs/retinanet_r50v1d_fpn_dota.py) | [model](https://cloud.tsinghua.edu.cn/f/f12bb566d4be43bfbdc7/) [pretrained](https://cloud.tsinghua.edu.cn/f/6b5db5fdd5304a5abf19/) |
| FasterRCNN-R50-FPN |DOTA1.0|1024/200|Flip|-| SGD | 1x | 69.631 | [arxiv](https://arxiv.org/abs/1506.01497)| [config](configs/faster_rcnn_obb_r50_fpn_1x_dota.py) | [model](https://cloud.tsinghua.edu.cn/f/29197095057348d0a392/?dl=1) |
| RoITransformer-R50-FPN |DOTA1.0|1024/200|Flip|-| SGD | 1x | 73.842 | [arxiv](https://arxiv.org/abs/1812.00155)| [config](configs/faster_rcnn_RoITrans_r50_fpn_1x_dota.py) | [model](https://cloud.tsinghua.edu.cn/f/55fe6380928f4a6582f8/?dl=1) |
| FasterRCNN-R50-FPN |DOTA1.0|1024/200|flip|-| SGD | 1x | 69.631 | [arxiv](https://arxiv.org/abs/1506.01497)| [config](configs/faster_rcnn_obb_r50_fpn_1x_dota.py) | [model](https://cloud.tsinghua.edu.cn/f/29197095057348d0a392/?dl=1) |
| RoITransformer-R50-FPN |DOTA1.0|1024/200|flip|-| SGD | 1x | 73.842 | [arxiv](https://arxiv.org/abs/1812.00155)| [config](configs/faster_rcnn_RoITrans_r50_fpn_1x_dota.py) | [model](https://cloud.tsinghua.edu.cn/f/55fe6380928f4a6582f8/?dl=1) |
| FCOS-R50-FPN | DOTA1.0|1024/200| flip|-| SGD | 1x | 70.40 | [ICCV19](https://openaccess.thecvf.com/content_ICCV_2019/papers/Tian_FCOS_Fully_Convolutional_One-Stage_Object_Detection_ICCV_2019_paper.pdf)| [config](configs/fcos_obb_r50_fpn_1x_dota.py) | [model](https://cloud.tsinghua.edu.cn/d/918bcbf7a10a40fb8dee/files/?p=%2Fmodels%2Ffcos_r50%2Fckpt_12.pkl&dl=1) |
| OrientedRCNN-R50-FPN |DOTA1.0|1024/200|Flip|-| SGD | 1x | 75.62 | [ICCV21](https://openaccess.thecvf.com/content/ICCV2021/papers/Xie_Oriented_R-CNN_for_Object_Detection_ICCV_2021_paper.pdf)| [config](configs/oriented_rcnn_r50_fpn_1x_dota_with_flip.py) | [model](https://cloud.tsinghua.edu.cn/f/a50517f7b8e840949d3f/?dl=1) |
| OrientedRCNN-R50-FPN |DOTA1.0|1024/200|flip|-| SGD | 1x | 75.62 | [ICCV21](https://openaccess.thecvf.com/content/ICCV2021/papers/Xie_Oriented_R-CNN_for_Object_Detection_ICCV_2021_paper.pdf)| [config](configs/oriented_rcnn_r50_fpn_1x_dota_with_flip.py) | [model](https://cloud.tsinghua.edu.cn/f/a50517f7b8e840949d3f/?dl=1) |
| OrientedRCNN-R50-FPN |DOTA1.0|1024/200|flip+rr+bc|-| SGD | 1x | 77.76 | [ICCV21](https://openaccess.thecvf.com/content/ICCV2021/papers/Xie_Oriented_R-CNN_for_Object_Detection_ICCV_2021_paper.pdf)| [config](configs/oriented_rcnn_r50_fpn_1x_dota_with_flip_rotate_balance_cate.py) | [model](https://cloud.tsinghua.edu.cn/f/df64dd4980f84433a592/?dl=1) |
| OrientedRCNN-R50-FPN |DOTA1.0|1024/200|ms+flip+rr+bc|-| SGD | 1x | 80.13 | [ICCV21](https://openaccess.thecvf.com/content/ICCV2021/papers/Xie_Oriented_R-CNN_for_Object_Detection_ICCV_2021_paper.pdf)| [config](configs/oriented_rcnn_r50_fpn_1x_dota_ms_with_flip_rotate_balance_cate.py) | [model](https://cloud.tsinghua.edu.cn/f/a3843215d6194ae8823b/?dl=1) |


**Notice**:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
dict(
type="RandomRotateAug",
random_rotate_on=True,
rotate_90=False,
angles=(0, 90),
vert_rate=0.5
),
dict(
type = "Pad",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# model settings
model = dict(
type='OrientedRCNN',
backbone=dict(
type='Resnet50',
frozen_stages=1,
return_stages=["layer1","layer2","layer3","layer4"],
pretrained= True),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=5),
rpn = dict(
type = "OrientedRPNHead",
in_channels=256,
num_classes=1,
min_bbox_size=0,
nms_thresh=0.8,
nms_pre=2000,
nms_post=2000,
feat_channels=256,
bbox_type='obb',
reg_dim=6,
background_label=0,
reg_decoded_bbox=False,
pos_weight=-1,
anchor_generator=dict(
type='AnchorGenerator',
scales=[8],
ratios=[0.5, 1.0, 2.0],
strides=[4, 8, 16, 32, 64]),
bbox_coder=dict(
type='MidpointOffsetCoder',
target_means=[.0, .0, .0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0, 0.5, 0.5]),
loss_cls=dict(type='CrossEntropyLossForRcnn', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0),
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
ignore_iof_thr=-1,
match_low_quality=True,
assigned_labels_filled=-1,
),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False)
),
bbox_head=dict(
type='OrientedHead',
num_classes=15,
in_channels=256,
fc_out_channels=1024,
score_thresh=0.05,
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
ignore_iof_thr=-1,
match_low_quality=False,
assigned_labels_filled=-1,
iou_calculator=dict(type='BboxOverlaps2D_rotated_v1')),
sampler=dict(
type='RandomSamplerRotated',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
bbox_coder=dict(
type='OrientedDeltaXYWHTCoder',
target_means=[0., 0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2, 0.1]),
bbox_roi_extractor=dict(
type='OrientedSingleRoIExtractor',
roi_layer=dict(type='ROIAlignRotated_v1', output_size=7, sampling_ratio=2),
out_channels=256,
extend_factor=(1.4, 1.2),
featmap_strides=[4, 8, 16, 32]),
loss_cls=dict(
type='CrossEntropyLoss',
),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0
),
with_bbox=True,
with_shared_head=False,
with_avg_pool=False,
with_cls=True,
with_reg=True,
start_bbox_type='obb',
end_bbox_type='obb',
reg_dim=None,
reg_class_agnostic=True,
reg_decoded_bbox=False,
pos_weight=-1,
)
)

dataset = dict(
train=dict(
type="DOTADataset",
dataset_dir='/mnt/disk/cxjyxx_me/JAD/datasets/processed_DOTA/trainval_1024_500_0.5-1.0-1.5',
transforms=[
dict(
type="RotatedResize",
min_size=1024,
max_size=1024
),
dict(
type='RotatedRandomFlip',
direction="horizontal",
prob=0.5),
dict(
type='RotatedRandomFlip',
direction="vertical",
prob=0.5),
dict(
type="RandomRotateAug",
random_rotate_on=True,
rotate_90=False,
angles=(0, 90),
vert_rate=0.5,
),
dict(
type = "Pad",
size_divisor=32),
dict(
type = "Normalize",
mean = [123.675, 116.28, 103.53],
std = [58.395, 57.12, 57.375],
to_bgr=False,),
dict(
type = "FliterEmpty",
fliter_list = ["rboxes"],),

],
batch_size=2,
num_workers=4,
shuffle=True,
filter_empty_gt=False,
balance_category=True
),
val=dict(
type="DOTADataset",
dataset_dir='/home/cxjyxx_me/workspace/JAD/datasets/processed_DOTA/trainval_1024_500_0.5-1.0-1.5',
transforms=[
dict(
type="RotatedResize",
min_size=1024,
max_size=1024
),
dict(
type = "Pad",
size_divisor=32),
dict(
type = "Normalize",
mean = [123.675, 116.28, 103.53],
std = [58.395, 57.12, 57.375],
to_bgr=False,),
],
batch_size=2,
num_workers=4,
shuffle=False
),
test=dict(
type="ImageDataset",
images_dir='/mnt/disk/cxjyxx_me/JAD/datasets/processed_DOTA/test_1024_500_0.5-1.0-1.5/images',
transforms=[
dict(
type="RotatedResize",
min_size=1024,
max_size=1024
),
dict(
type = "Pad",
size_divisor=32),
dict(
type = "Normalize",
mean = [123.675, 116.28, 103.53],
std = [58.395, 57.12, 57.375],
to_bgr=False,),
],
num_workers=4,
batch_size=1,
)
)

optimizer = dict(type='SGD', lr=0.005, momentum=0.9, weight_decay=0.0001, grad_clip=dict(max_norm=35, norm_type=2))

scheduler = dict(
type='StepLR',
warmup='linear',
warmup_iters=500,
warmup_ratio=0.001,
milestones=[7, 10])

logger = dict(
type="RunLogger")

# when we the trained model from cshuan, image is rgb
max_epoch = 12
eval_interval = 100
checkpoint_interval = 1
log_interval = 50
8 changes: 5 additions & 3 deletions configs/oriented_rcnn_r50_fpn_1x_dota_with_flip.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
dataset = dict(
train=dict(
type="DOTADataset",
dataset_dir='/home/cxjyxx_me/workspace/JAD/datasets/processed_DOTA/trainval_1024_200_1.0',
dataset_dir='/mnt/disk/cxjyxx_me/JAD/datasets/processed_DOTA/trainval_1024_200_1.0',
transforms=[
dict(
type="RotatedResize",
Expand All @@ -126,6 +126,9 @@
# dict(
# type="RandomRotateAug",
# random_rotate_on=True,
# rotate_90=False,
# angles=(0, 90),
# vert_rate=0.5
# ),
dict(
type = "Pad",
Expand All @@ -135,7 +138,6 @@
mean = [123.675, 116.28, 103.53],
std = [58.395, 57.12, 57.375],
to_bgr=False,)

],
batch_size=2,
num_workers=4,
Expand Down Expand Up @@ -167,7 +169,7 @@
),
test=dict(
type="ImageDataset",
images_dir='/home/cxjyxx_me/workspace/JAD/datasets/processed_DOTA/test_1024_200_1.0/images/',
images_dir='/mnt/disk/cxjyxx_me/JAD/datasets/processed_DOTA/test_1024_200_1.0/images/',
transforms=[
dict(
type="RotatedResize",
Expand Down
Loading