-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
sv.Detections has exactly N of each member, except for tracker_id
.
#1092
Comments
I'm heavily in favour of 1. The steps for this would be:
This would be a draft PR until #1076 is merged. This PR new should remove the |
Example: line_zone.py:trigger() checks if iterating over Related: Test case in #1206 checks it too. |
Example: smoother.py:update_with_detections() checks if iterating over |
I was wrong about the When the related PR is merged, this can be closed. |
Search before asking
Bug
Found in: #1044, #1076.
This is a sub-issue of #943 and should be solved before starting that one.
sv.Detections has a list of numpy arrays as its members:
xyxy
,mask
,confidence
,class_id
,trackier_id
WhenN
detections are made, all of these excepttracker_id
will have a shape(N, ...)
.For example: When there are no tracks,
update_with_detections
will return detections, withdetections.tracker_id
set to[]
.BUT, a few lines above, it only returns those detections where
tracker_id
was not-1
. Many places in the codebase, e.g. theTraceAnnotator
expect len(tracker_id) to match len(detections). There's many zips in examples, zipping withtracker_id
.So there's 2 paradigms:
-1
, already used in some places.tracker_id
different than other members ofsv.Detections
, keep the current implementation, but root out incorrect usage.Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: