mAP recorded during training
This commit is contained in:
parent
45c5567723
commit
a17280ac72
8
test.py
8
test.py
|
@ -119,10 +119,10 @@ def main(opt):
|
||||||
|
|
||||||
# Append image mAP to list
|
# Append image mAP to list
|
||||||
mAPs.append(mAP)
|
mAPs.append(mAP)
|
||||||
|
mean_mAP = np.mean(mAPs)
|
||||||
|
|
||||||
# Print image mAP and running mean mAP
|
# Print image mAP and running mean mAP
|
||||||
print(
|
print('Image %d/%d AP: %.4f (%.4f)' % (len(mAPs), len(dataloader) * opt.batch_size, mAP, mean_mAP))
|
||||||
'+ Sample [%d/%d] AP: %.4f (%.4f)' % (len(mAPs), len(dataloader) * opt.batch_size, mAP, np.mean(mAPs)))
|
|
||||||
|
|
||||||
# Print mAP per class
|
# Print mAP per class
|
||||||
classes = load_classes(opt.class_path) # Extracts class labels from file
|
classes = load_classes(opt.class_path) # Extracts class labels from file
|
||||||
|
@ -130,8 +130,8 @@ def main(opt):
|
||||||
print('%15s: %-.4f' % (c, AP_accum[i] / AP_accum_count[i]))
|
print('%15s: %-.4f' % (c, AP_accum[i] / AP_accum_count[i]))
|
||||||
|
|
||||||
# Print mAP
|
# Print mAP
|
||||||
print('Mean Average Precision: %.4f' % np.mean(mAPs))
|
print('Mean Average Precision: %.4f' % mean_mAP)
|
||||||
return mAP
|
return mean_mAP
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue