csuhan / ReDet

Official code of the paper "ReDet: A Rotation-Equivariant Detector for Aerial Object Detection" (CVPR 2021)
https://redet.csuhan.com
Apache License 2.0
389 stars 79 forks source link

The role of "with_module" in the first and the second box head. #39

Closed Richardych closed 3 years ago

Richardych commented 3 years ago

Hi, thanks for the excellent work and the source code.

I have some questions about the role of "with_module" in the config. i.e., in the first stage, since 'with_module=False', you use 'delta2dbbox_v3' to get the new_rois in rbbox_head.py, while use 'delta2dbbox' for the second stage.

I found that the difference between 'delta2dbbox_v3' and 'delta2dbbox' is the calculation of the 'gangle'. That is, in the first stage, you just use to calc the gangle: gangle = dangle + Rroi_angle

But in the second stage, you use: gangle = (2 * np.pi) * dangle + Rroi_angle gangle = gangle % ( 2 * np.pi)

Thanks!

csuhan commented 3 years ago

Good question!

For the first stage, wo do not limit the range of angle, while in the two stage, we limit it the [0, 2pi]. Here are some reasons:

Besides, this setting makes minor effect, and either one works well.

Richardych commented 3 years ago

@csuhan Thanks for the reply, I have another question: why did you limit the angle in [0, 2pi] instead of [0, pi]?

csuhan commented 3 years ago

Indeed, we can limit the angle to [0, pi/2], [0, pi], [0, 2pi] etc. For example, our S2A-Net defines the angle [-pi/4, 3*pi/4].

In this repo, we set it to [0, 2pi] because our rotation-equivariance lies in the 2D circle, which means we want to cover as many as angles in [0, 2pi].