py-motmetrics
py-motmetrics copied to clipboard
Why idp and idr samein result?
idp and idr value is same, also idp and precision or idr and recall value is same too. I don't understand this issue.
I used this code snippet:
track_lines = np.loadtxt(track_txt_path, delimiter=" ")
ground_ids = []
track_ids = []
for frame in range(len(ground_lines)):
gt_dets = [ground_lines[frame, :]] # select all detections in gt
t_dets = [track_lines[frame, :]] # select all detections in t
C = mm.distances.iou_matrix(gt_dets, t_dets, \
max_iou=0.5) # format: gt, t
#Normally, there is must include ids of object in txt file
ground_ids.append(frame)
track_ids.append(frame)
acc.update([ground_ids[frame]], [track_ids[frame]], C)
mh = mm.metrics.create()
summary = mh.compute(acc, metrics=['num_frames', 'idf1', 'idp', 'idr', \
'recall', 'precision', 'num_objects', \
'mostly_tracked', 'partially_tracked', \
'mostly_lost', 'num_false_positives', \
'num_misses', 'num_switches', \
'num_fragmentations', 'mota', 'motp' \
], \
name='acc')
strsummary = mm.io.render_summary(
summary,
#formatters={'mota' : '{:.2%}'.format},
namemap={'idf1': 'IDF1', 'idp': 'IDP', 'idr': 'IDR', 'recall': 'Rcll', \
'precision': 'Prcn', 'num_objects': 'GT', \
'mostly_tracked' : 'MT', 'partially_tracked': 'PT', \
'mostly_lost' : 'ML', 'num_false_positives': 'FP', \
'num_misses': 'FN', 'num_switches' : 'IDsw', \
'num_fragmentations' : 'FM', 'mota': 'MOTA', 'motp' : 'MOTP', \
}
)
print(strsummary)