Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize dists #194

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

mikel-brostrom
Copy link

@mikel-brostrom mikel-brostrom commented Jul 4, 2024

Initialize dists to avoid UnboundLocalError when calculating HOTA.
Fixes this error: #193

Initialize dists to avoid UnboundLocalError when calculating HOTA
@yjoer
Copy link

yjoer commented Sep 18, 2024

I faced another issue for frames without detections driving me towards the same solution. If dists is not re-initialized to an empty matrix per iteration, the matrix from the previous frame is reused in the next iteration because the following block does not run when the ground truth or detections are absent. This leads to using the valid_j of the preceding frame to index empty hids.

if len(oids) > 0 and len(hids) > 0:
    ...
    dists = compute_dist(...)
    ...

image

Edit 1: We see a different exception because the OP has the first frame without detections while I have missing detections in the 72nd frame out of 750.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants