-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 LineZone unit tests #1206
Add LineZone unit tests #1206
Conversation
Thank you for the changes, @tc360950 ! Would you have some time to add a few extra cases? What I'm thinking of is the following:
Does that sound like something you'd have time for, by any chance? |
@LinasKo Ok, I will add the changes. Could you clarify what you mean by "diagonal line" - there are already test cases for lines which are not horizontal or vertical. Do you want more (e.q. with different slope)? |
Ah, indeed non-vertical and non-horizontal is what I meant. If we have it, we don't need any additional tests for it. |
…zone-unit-tests # Conflicts: # test/detection/test_line_counter.py
@LinasKo I've added changes you had requested |
Thank you @tc360950, this looks great! I'll verify over the weekend, potentially push a tiny stylistic update, but otherwise, it looks good to go 😉 |
…o line-zone-unit-tests
The class names were descriptive enough
Hey @tc360950, Apologies for the delay! To save time, I've pushed a few updates to the branch. @SkalskiP, This is ready to merge, but your review is outstanding. When you have the time, please resolve it ;) |
* Add Colab for visuals: https://colab.research.google.com/drive/179sq8joJ-7JSYMqYNBQlMIPYEClq1PDi?usp=sharing * Need to visualise other cases - not sure if all are necessary
Hey @tc360950, We've had a chat with @SkalskiP - we really want to make sure that if we merge this, it needs to be thorough. You've done a lot of work already. To make life a bit easier, I'll take this one over, get the tests to the point we're happy. There might be internal discussion yet to come and I don't want to force minor back-and-fourth changes on you 🙂 @SkalskiP: For our records, here's some visuals. My plan is to visualise the multi-detection cases too, check if those are needed. |
I've added additional tests but found a case where LineZone does not work. This is an issue for large jumps or short lines. I did not test cases with multiple lines present, for I don't see how they would interact. Happy to merge this, ahead of the vectorized solution. |
@LinasKo Isn't it an intended result? LineZone is "dumb" in the sense that it does not look at trajectories, there's no correlation between subsequent positions of an object. |
@tc360950 potentially intended, potentially not. If we assume small time increments, we're also in many cases assuming direct motion. I can imagine an algo where we check for whether each anchor displacement line crosses the LineZone (well, only a line in this case), which would work for motions coming from outside the limits. I think it's more intuitive for the users as well. However, that's a long-term thought. For now, we're 100% sticking with your vectorized solution. |
Hi @SkalskiP, I believe this is ready to merge. When you have time, please have a look. |
Description
Added unit tests for LineZone.
Type of change
Please delete options that are not relevant.