openmht icon indicating copy to clipboard operation
openmht copied to clipboard

branches_added initialization location

Open SiddharthDey opened this issue 1 year ago • 1 comments

I think the branches_added variable initialization should be done before the for loop over detections instead of after as done currently: openmht/mht.py

for index, detection in enumerate(detections):
    branches_added = 0  # Number of branches added to the track tree at this frame
    detection_id = str(index)

This causes the loop to only count branches added for the last detection. Instead, we should do the initiliazation before the loop:

branches_added = 0  # Number of branches added to the track tree at this frame
for index, detection in enumerate(detections):
    detection_id = str(index)

SiddharthDey avatar Dec 20 '23 23:12 SiddharthDey