danfenghong / IEEE_TIP_UIU-Net

Xin Wu, Danfeng Hong, Jocelyn Chanussot. UIU-Net: U-Net in U-Net for Infrared Small Object Detection, IEEE Trans. Image. Process., 2022, 32: 364-376.
Apache License 2.0
136 stars 15 forks source link

test.py代码的问题 #17

Open guoxueqiang opened 8 months ago

guoxueqiang commented 8 months ago

你好,因为test输出的结果中平均值只有零点零几,所以我发现了几个问题:

   if IoU > best_iou:
        best_iou = IoU
    if nIoU > best_nIoU:
        best_nIoU = nIoU

    total_iou = total_iou + IoU
    total_niou = total_niou + nIoU`

这一部分代码是不是应该放到for循环里呀。 还有

IoU=total_iou/20
nIoU=total_niou/20

用新的名字结果就对了:

avg_IoU=total_iou/20
avg_nIoU=total_niou/20