BlendingToolKit
BlendingToolKit copied to clipboard
Linear sum assignment matching failure
This is a failure that should be very rare so it's not necessary to fix this right now but it can happen that the linear sum assignment matching fails to return the appropriate match between predicted and ground truth sources.
Let's consider the case below:
If a false detection like pred2 is far enough, it can happen that: $dist(pred1, gal2) + dist(pred2, gal1) < dist(pred1, gal1) + dist(pred2, gal2)$, in which case the solution is to assign pred1 to gal2 and pred2 to gal1. Then, applying the distance criterion, we will likely end up with no predictions matching any ground truth, which is not what we would expect.
A simple solution is to check the matches: if there are no matches at all, we may be in that case and we can just to loop through predicted and ground truth objects to manually match them when the distance criterion is respected, in which case we will end up matching pred1 to gal1 and leaving pred2 as a false detection and gal2 as a false negative.
Consider DC2 matching -> check magnitude of objects (something like a safety check)
Or use a different distance metric