Skip to content

[LineZone] - flip in/out line crossing directions #838

@harshaneo17

Description

@harshaneo17

Description

Between supervision-0.17.0 and supervision-0.18.0, releases in/out of the direction of the crossing were accidentally changed. Given that LineZone is one of the oldest features we have we do not want to make life difficult for users and want to restore the previous behavior. The change made in this PR, most likely in this line, is responsible for the change in behavior.

self.vector.cross_product(point=anchor) > 0 for anchor in box_anchors

Minimal Reproducible Example

You can easily confirm the crossing direction change between supervision-0.17.0 and supervision-0.18.0 releases using this notebook. Here are example results.

supervision-0.17.0

vehicle-counting-result-with-counter-0.17.0.mp4

supervision-0.18.0

vehicle-counting-result-with-counter-0.18.0.mp4

Additional

  • Note: Please share a Google Colab with minimal code to test the new feature. We know it's additional work, but it will speed up the review process. The reviewer must test each change. Setting up a local environment to do this is time-consuming. Please ensure that Google Colab can be accessed without any issues (make it public). Thank you! 🙏🏻

Metadata

Metadata

Labels

Q1.2024Tasks planned for execution in Q1 2024.bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions