Returning previous and updated tracklet IDs from assign_tracklet_ids.#180
Returning previous and updated tracklet IDs from assign_tracklet_ids.#180JoOkuma merged 10 commits intoroyerlab:mainfrom
assign_tracklet_ids.#180Conversation
…turn_tracklet_id_mapping2
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
=======================================
Coverage 88.03% 88.04%
=======================================
Files 50 50
Lines 3444 3454 +10
Branches 596 600 +4
=======================================
+ Hits 3032 3041 +9
Misses 248 248
- Partials 164 165 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # Update the value with the reused IDs | ||
| id_update_df = id_update_df.with_columns(pl.Series(output_key + "_new", tracklet_ids)) | ||
| else: | ||
| tracklet_ids = [int(tid) for tid in tracklet_ids] # type: ignore |
There was a problem hiding this comment.
Would this work?
| tracklet_ids = [int(tid) for tid in tracklet_ids] # type: ignore | |
| tracklet_ids = tracklet_ids.tolist() # type: ignore |
There was a problem hiding this comment.
Thanks for the suggestion! I changed this to tolist, and also moved it before the if blocks as I was missing the case with if previous_id_df is None. (Adds a slight overhead, but I believe it makes the code simpler).
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
…ai/tracksdata into return_tracklet_id_mapping2
|
LGTM! thanks @yfukai |
In order to undo the action of assigning tracklet IDs, it would be useful to have a list of the updated IDs. This PR intends to have the function assign_tracklet_ids return the updated IDs. Since computing the updates has a computational cost, I made it optional, but input is welcome!