[go: nahoru, domu]

Skip to content
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

Fixed TraceAnnotator to respect the postion argument. #511

Merged
merged 6 commits into from
Dec 6, 2023

Conversation

abhishek7kalra
Copy link
Contributor
@abhishek7kalra abhishek7kalra commented Oct 21, 2023

Description

Added necessary logic in TraceAnnotator so that it now respects the position argument. The update now allows all the predefined positions which when passed to modify the tracing position.

Issue: #420

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How has this change been tested, please provide a testcase or example of how you tested the change?

trace_annotator = sv.TraceAnnotator(position=Position.TOP_LEFT)

trace_topleft.mp4

@abhishek7kalra
Copy link
Contributor Author

@SkalskiP Please review this pr.

@SkalskiP
Copy link
Collaborator

Hi, @abhishek7kalra! 👋🏻 Thanks for your interest in Supervision and solving this issue.

However, the solution for this bug is much simpler. The logic that you made is already part of sv.Detections.get_anchors_coordinates method. That method is called inside Trace class. The problem is that the position argument is not being passed to the Trace constructor.

All you have to do is pass `position here, and it should work.

self.trace = Trace(max_size=trace_length, anchor=position)

@SkalskiP SkalskiP added the bug Something isn't working label Dec 6, 2023
@SkalskiP SkalskiP linked an issue Dec 6, 2023 that may be closed by this pull request
@SkalskiP
Copy link
Collaborator
SkalskiP commented Dec 6, 2023

Hi, @abhishek7kalra! 👋🏻 Unfortunately, I couldn't wait any longer for you to implement the fixes, so I decided to do it myself. Thanks a lot for your help! 🙏🏻 Merging!

@SkalskiP SkalskiP merged commit 1867272 into roboflow:develop Dec 6, 2023
7 checks passed
@abhishek7kalra abhishek7kalra deleted the traceannotator branch December 12, 2023 17:20
@abhishek7kalra
Copy link
Contributor Author

Hey @SkalskiP, thank you for going ahead with the fix. I got super busy, so couldn't do the implementation myself. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Current Release: Done
Development

Successfully merging this pull request may close these issues.

Make sv.TraceAnnotator work with different sv.Position values
2 participants