-
Notifications
You must be signed in to change notification settings - Fork 619
[Refactor] CSL #535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor] CSL #535
Conversation
| Tensor: Angle offset for each scale level. | ||
| Has shape (num_anchors * H * W, 1) | ||
| """ | ||
| angle_cls_inds = torch.argmax(angle_preds, dim=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shape of returns is wrong, i think the return here is (num_anchors * H * W).
In order to support batch input like (B, N, coding_len), the argmax dim can be -1.
In retinanet, csl directly assign the angle into rbox
# `rbbox` has shape (N, 5)
# `ang` has shape (N)
rbbox[..., 4] = ang
In some angle_branch head, such as Rotated FCOS and Rotated YOLOX, they use concat to get final bbox.
# `hbbox` has shape (N, 4)
# `ang` has shape (N, 1)
rbbox = torch.cat([hbbox, ang], dim=-1)
I think we can add a keepdim arg in decode method, and use like this:
angle_cls_inds = torch.argmax(angle_preds, dim=-1, keepdim=keepdim)
When keepdim is true, return (N, 1) or (B, N, 1), otherwise (N,) or (B, N)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
* add UT * fix lint * update * Update test_oriented_reppoints.py * fix UT * init * Update angle_branch_retina_head.py * add ut * Update test_angle_coder.py * add UT * Update test_angle_branch_retina_head.py * fix * fix
Experiments
rotated_retinanet_obb_csl_gaussian_r50_fpn_fp16_1x_dota_le90.py
report AP50: 69.51
AP50: 0.6804708695155224
AP75: 0.39561891292657414
mAP: 0.3920965305629459