duanzhiihao / RAPiD

RAPiD: Rotation-Aware People Detection in Overhead Fisheye Images (CVPR 2020 Workshops)
http://vip.bu.edu/rapid/
Other
212 stars 63 forks source link

Is it necessary that adjust the range of angle of ground truth when 'angran' changes? #14

Closed kakusikun closed 4 years ago

kakusikun commented 4 years ago

here force the range of angle of ground truth to be -90 ~ 90 https://github.com/duanzhiihao/RAPiD/blob/master/datasets.py#L93

but here is to predict angle in range of -180 ~ 180 ( I guess what the '360' means ) https://github.com/duanzhiihao/RAPiD/blob/master/models/rapid.py#L302 and here directly use the angle of ground truth https://github.com/duanzhiihao/RAPiD/blob/master/models/rapid.py#L306

does the angle need to be normalized to -90 ~ 90, i.e., 180 -> 90, 90 -> 45 ? or the range of angle of ground truth is changed to be -180 ~ 180 ?

if I missed something, plz let me know.

duanzhiihao commented 4 years ago

Yes, the predicted angle is in (-180,180) degrees, and the ground truth is [-90,90) degrees. The loss is directly calculated between them without normalizing any one of them.

We intentionally made prediction range > GT range. The reason is described in our paper, Figure 4. In short, we expand the prediction range in order to avoid boundary problems.

kakusikun commented 4 years ago

thanks for quick reply

but if the predicted angle is 180, what does it mean? 90?

if i do need -45 and 135 to be different, should i change the range of angle of ground truth ?

duanzhiihao commented 4 years ago

but if the predicted angle is 180, what does it mean? 90?

It means 180 degrees, and in our case, 180 degrees is equivalent to 0 degree, because if you rotate a bounding box by 180 degrees, it remains unchanged.

if i do need -45 and 135 to be different, should i change the range of angle of ground truth ?

Yes. If that's the case, I guess your prediction is not periodic. You can change the range and use a non-periodic loss. For example, Binary Cross Entropy is a typical choice.

kakusikun commented 4 years ago

i just figure it out, this work is for periodic case and i should start work at loss, thanks a lot.