Closed nikk-nikaznan closed 4 months ago
Attention: Patch coverage is 72.72727%
with 33 lines
in your changes missing coverage. Please review.
Project coverage is 46.16%. Comparing base (
ff59d84
) to head (1d45dd6
).
Files | Patch % | Lines |
---|---|---|
crabs/tracker/evaluate_tracker.py | 80.43% | 18 Missing :warning: |
crabs/tracker/track_video.py | 40.00% | 15 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
hey @nikk-nikaznan, I was just having a look at this and I get a different result:
Similarly, if prev_id = [1, 2, 3] and current_id = [1, 2, 3, 4] with current_gt = 4, n_switches = 0. (A new ID is appear in the current frame)
For me this returns n_switches=1
I think this is not intended right? Otherwise whenever a crab appears in view (exiting a burrow for example) it will be counted as an ID switch.
I think there is some confusion, because as I understand it from the HOTA paper we only check ID switches for the true positives. So we shouldn't be filtering out missed detections or false negatives inside this function, right?
I got this from sections 3 and 4.1 (included). I recommend it, it is very well explained.
I think we could rewrite the count_identity_switches
function to count ID switches as they say in the paper. Following their approach, we could fix the error above and also detect if IDs are swapped between crabs (right now, we don't detect this if all IDs are present in frame f and frame f-1).
I think it would be something like follows:
Let me know thoughts, happy to chat offline if you prefer.
@sfmig I think there is some confusion, because as I understand it from the HOTA paper we only check ID switches for the true positives. So we shouldn't be filtering out missed detections or false negatives inside this function, right?
Thanks Sofia!
It would be nice that if we pass the ground truth and request an output video, both detections and ground truth are plotted in the video. This may be too big for this PR tho, so no worries if it's a faff.
I do have some code somewhere, because I did show them last TI. I did in a rush, + jet lagged. I will open an issue on that, should be not that hard, but a bit messy so will not add in this PR
I think I have address most of your comment. We can go through the changes tomorrow during PP.
I am trying to add more definition to what we consider as ID switches. This PR consider ID switch as a crab been assigned a new ID (re-ID)
prev_id = [1, 2, 3]
andcurrent_id = [1, 2, 4]
then_switches =2
. The new approach will be 1.After some help from @sfmig and @samcunliffe, this is currently what we have:
We create a dict to map the ground_truth ID to tracked ID in every frame.
count_identity_switches
we haveprev_frame_id_map
andcurrent_frame_id_map
.Some changes for the test -- feel free to play around with the value in the test to see any other possibility.