yijingru / BBAVectors-Oriented-Object-Detection

[WACV2021] Oriented Object Detection in Aerial Images with Box Boundary-Aware Vectors
MIT License
462 stars 87 forks source link

您好,关于base.py 中代码问题 #73

Closed Eliclx closed 3 years ago

Eliclx commented 3 years ago

我在调试代码时发现base.py文件以下语句的返回值没有使用:

draw_umich_gaussian(hm[annotation['cat'][k]], ct_int, radius)https://github.com/yijingru/BBAVectors-Oriented-Object-Detection/blob/12fb6d60bab69c81650fde72291a2c8177c2e338/datasets/base.py#L184 请问下是怎么回事呢?看注释认为是生成heatmap的代码,但却没有使用其返回值 并且得到最后ret['hm']也只是初始化后的[[[0. 0. 0.....]]]值: image

期待您的回复!

yijingru commented 3 years ago

应该是引用传递,你可以打印maximum value或者unique value看看

Eliclx commented 3 years ago

不好意思,但我发现该值确实没有使用,因为在进行预测时,该值还是为[0,0,0...],下面几张图是我调试的情况,分别时在进行预测时,真实'hm'的值,以及计算hm_loss时'hm'的值:

train.py文件: https://github.com/yijingru/BBAVectors-Oriented-Object-Detection/blob/12fb6d60bab69c81650fde72291a2c8177c2e338/train.py#L166 image

loss.py文件: https://github.com/yijingru/BBAVectors-Oriented-Object-Detection/blob/12fb6d60bab69c81650fde72291a2c8177c2e338/loss.py#L113 image

非常抱歉,因为代码上的问题,持续打扰~ 期待得到您的回复

yijingru commented 3 years ago

Can you print the maximum value of hm?