zhang-pengyu / ADRNet

code and results for 'Learning Adaptive Attribute-Driven Representation for Real-Time RGB-T Tracking'
45 stars 4 forks source link

训练过程中如何得到iou的值 #15

Open BianCe123 opened 2 years ago

BianCe123 commented 2 years ago

try: total_miou = sum(total_iou)/len(total_iou) except: total_miou = 0. print ("Mean Precision: %.3f Inter Loss: %.3f IoU: %.3f" % (prec.mean(), totalInterClassLoss.mean(),total_miou)) 作者大佬,你在train_ADRNet.py 代码的196行异常捕捉这部分代码中,total_iou似乎没有定义,这样运行结果中的iou会总是等于0,关于iou的值该如何得到呢?

zhang-pengyu commented 2 years ago

抱歉,因为我在训练的过程中没有参考IoU的值,这部分我没有实现,可以参考Precision(),写一个计算IoU的函数,输出训练过程中的IoU值