-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add ground truth tracking video #216
base: main
Are you sure you want to change the base?
Conversation
…re/crabs-exploration into nikkna/id_switches
Co-authored-by: sfmig <[email protected]> Signed-off-by: nikk-nikaznan <[email protected]>
Co-authored-by: sfmig <[email protected]> Signed-off-by: nikk-nikaznan <[email protected]>
Co-authored-by: sfmig <[email protected]> Signed-off-by: nikk-nikaznan <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
==========================================
+ Coverage 46.68% 47.71% +1.03%
==========================================
Files 24 24
Lines 1476 1486 +10
==========================================
+ Hits 689 709 +20
+ Misses 787 777 -10 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks Nik!
Two main points in this PR:
-
The first one is that I think with the code as is, the ground truth path is in practice a required argument. But we want to be able to run the detector+tracker even if no ground truth is provided (i.e., running inference). If ground truth is provided, we run inference and evaluation, and optionally (if
save_video_output
is True) we can save a video with detections and ground truth. -
The second one is about the
frame_number
vsframe_idx
. Apologies cause I think I may have not been very clear before. The issue is that we shouldn't be using frame numbers as indices to a list, because the frame numbers are extracted from the png filenames, and these may not necessarily start with frame 1 or 0. The safest, most general way imo is to use dictionaries whose keys are frame numbers (not indices), for both predictions and ground truth.At the moment, we use dictionaries with keys = frame numbers for ground truth only. For predictions, the keys are frame indices.
I believe this would cause issues if the ground truth frames start counting from a number different from 1 - I include a specific example in the comments.
I think also some bits from previous PRs got lost? I found some old versions of lines (e.g. line 224 of crabs/tracker/utils/tracking.py
).
Let me know if this makes sense, happy to discuss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Sofia. Sorry for the messy code. I have now add code to deal when we have no gt_path. Sorry about the frame_idx vs frame_number. It was my fault for not checking that, just the bad way of merging happened.
I wasn't try to be a rebellious! 😂
get_ground_truth_data
andget_predicted_data
) moved to utils (tracking
)save_required_output
andsave_required_output