Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make sv.LineZone.trigger return bool np.ndarray informing which detections have crossed the line this frame #464

Closed
SkalskiP opened this issue Oct 12, 2023 · 7 comments · Fixed by #482
Assignees
Labels
api: linezone LineZone API enhancement New feature or request good first issue Good for newcomers hacktoberfest Open for contributions during the annual Hacktoberfest event, aimed at encouraging open-source parti

Comments

@SkalskiP
Copy link
Collaborator

SkalskiP commented Oct 12, 2023

Description

Currently, sv.LineZone.trigger updates in_count and out_count values but does not return information on which object crossed the line. Unlike sv.PolygonZone.trigger, which returns such information.

Information about who has crossed the line is needed to update in_count and out_count and is already calculated in the trigger method but does not surface. Let's change that.

@SkalskiP SkalskiP added enhancement New feature or request good first issue Good for newcomers api: linezone LineZone API hacktoberfest Open for contributions during the annual Hacktoberfest event, aimed at encouraging open-source parti labels Oct 12, 2023
@hardikdava
Copy link
Collaborator

Related PR: #264

@abhishek7kalra
Copy link
Contributor

Hey, I would love to work on this issue. From what I could understand, all we need is initialise a bool array of size "detections", and checking where the object's state changes (indicating it has crossed the line), and setting it to True, and finally returning the array, just like in the polygon_zone.py

@SkalskiP
Copy link
Collaborator Author

SkalskiP commented Oct 14, 2023

Hi @abhishek7kalra 👋🏻! Looks like you got it. 🤞🏻 That's exactly what you have to do. The task is assigned to you.

@hardikdava
Copy link
Collaborator

Hey @abhishek7kalra, this part is already implemented. Feel free to look at other open issues. Thank you for taking interest in supervision.

@SkalskiP please review #264

@abhishek7kalra
Copy link
Contributor

No worries. Do let me know @SkalskiP if this needs to be fixed. Thank you @hardikdava for the info.

@SkalskiP
Copy link
Collaborator Author

Hi once again, @abhishek7kalra. #264 is doing a lot of other things. I will handle that update separately. Try to focus on returning that numpy array. You can take some inspiration from #264, made by @hardikdava.

@abhishek7kalra
Copy link
Contributor

Hi @SkalskiP, I have done the changes as discussed above and have created a PR here

@SkalskiP SkalskiP linked a pull request Oct 18, 2023 that will close this issue
2 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
api: linezone LineZone API enhancement New feature or request good first issue Good for newcomers hacktoberfest Open for contributions during the annual Hacktoberfest event, aimed at encouraging open-source parti
Projects
Status: Current Release: Done
Development

Successfully merging a pull request may close this issue.

3 participants