Skip to content
Merged
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
30 changes: 26 additions & 4 deletions configs/sasm_reppoints/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# SASM
> SASM-RepPoints
> [Shape-Adaptive Selection and Measurement for Oriented Object Detection](https://www.aaai.org/AAAI22Papers/AAAI-2171.HouL.pdf)

<!-- [ALGORITHM] -->
## Abstract

Coming soon!
<div align=center>
<img src="https://raw.githubusercontent.com/zytx121/image-host/main/imgs/sasm.jpg" width="800"/>
</div>

The development of detection methods for oriented object detection remains a challenging task. A considerable obstacle
is the wide variation in the shape (e.g., aspect ratio) of objects. Sample selection in general object detection has been
widely studied as it plays a crucial role in the performance of the detection method and has achieved great progress.
However, existing sample selection strategies still overlook some issues: (1) most of them ignore the object shape information;
(2) they do not make a potential distinction between selected positive samples; and (3) some of them can only be applied
to either anchor-free or anchor-based methods and cannot be used for both of them simultaneously. In this paper, we
propose novel flexible shape-adaptive selection (SA-S) and shape-adaptive measurement (SA-M) strategies for oriented
object detection, which comprise an SA-S strategy for sample selection and SA-M strategy for the quality estimation of
positive samples. Specifically, the SA-S strategy dynamically selects samples according to the shape information and
characteristics distribution of objects. The SA-M strategy measures the localization potential and adds quality information
on the selected positive samples. The experimental results on both anchor-free and anchor-based baselines and four publicly
available oriented datasets (DOTA, HRSC2016, UCASAOD, and ICDAR2015) demonstrate the effectiveness of the proposed method

## Results and models

Expand All @@ -18,5 +33,12 @@ DOTA1.0


## Citation
AAAI 2022
Coming soon!
```
@inproceedings{hou2022shape,
title={Shape-Adaptive Selection and Measurement for Oriented Object Detection},
author={Hou, Liping and Lu, Ke and Xue, Jian and Li, Yuqiu},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
year={2022}
}

```
4 changes: 2 additions & 2 deletions mmrotate/models/dense_heads/rotated_reppoints_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def get_targets(self,
gt_bboxes_ignore_list = [None for _ in range(num_imgs)]
if gt_labels_list is None:
gt_labels_list = [None for _ in range(num_imgs)]
all_overlaps_rotate_list = [None] * 4
all_overlaps_rotate_list = [None] * len(proposals_list)
(all_labels, all_label_weights, all_bbox_gt, all_proposals,
all_proposal_weights, pos_inds_list, neg_inds_list,
sampling_result) = multi_apply(
Expand Down Expand Up @@ -518,7 +518,7 @@ def get_cfa_targets(self,
gt_bboxes_ignore_list = [None for _ in range(num_imgs)]
if gt_labels_list is None:
gt_labels_list = [None for _ in range(num_imgs)]
all_overlaps_rotate_list = [None] * 4
all_overlaps_rotate_list = [None] * len(proposals_list)
(all_labels, all_label_weights, all_bbox_gt, all_proposals,
all_proposal_weights, pos_inds_list, neg_inds_list,
sampling_result) = multi_apply(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def forward(self, feats, rois, roi_scale_factor=None):
Returns:
torch.Tensor: Scaled RoI features.
"""
if isinstance(self.roi_layers[0], ops.RiRoIAlignRotated):
from mmrotate import digit_version, mmcv_version
if isinstance(self.roi_layers[0], ops.RiRoIAlignRotated
) or mmcv_version == digit_version('1.4.5'):
out_size = nn.modules.utils._pair(self.roi_layers[0].out_size)
else:
out_size = self.roi_layers[0].output_size
Expand Down