[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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(annotator): 馃殌 introduce circle annotator #386

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

onuralpszr
Copy link
Collaborator

Description

We have box annotator and for support different shape I added circle annotator

List any dependencies that are required for this change.

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?

from ultralytics import YOLO
import supervision as sv
import cv2

circle_annotator = sv.CircleAnnotator()

model = YOLO("yolov8n.pt") 
results = model("bus.jpg")
detections = sv.Detections.from_ultralytics(results[0])
frame = cv2.imread("bus.jpg")
annotated_frame = circle_annotator.annotate(
                scene=frame.copy(), 
                detections=detections, 
            )

cv2.imshow("frame", annotated_frame)
cv2.waitKey(0)

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@onuralpszr onuralpszr added enhancement New feature or request api:annotator Annotators hacktoberfest Open for contributions during the annual Hacktoberfest event, aimed at encouraging open-source parti labels Oct 1, 2023
@onuralpszr onuralpszr self-assigned this Oct 1, 2023
@onuralpszr onuralpszr added hacktoberfest-accepted Contribute to the notion of open-source this October! documentation Improvements or additions to documentation version: 0.15.0 Feature to be added in `0.15.0` release labels Oct 1, 2023
@onuralpszr onuralpszr added this to the version: 0.15.0 milestone Oct 1, 2023
@SkalskiP
Copy link
Collaborator
SkalskiP commented Oct 2, 2023

Hi, @onuralpszr 馃憢馃徎! Would you be so kind as to update this colab or duplicate it and show case how annotator works? It would make my life a lot simpler! 馃檹馃徎

@onuralpszr
Copy link
Collaborator Author

Of course

@SkalskiP
Copy link
Collaborator
SkalskiP commented Oct 2, 2023

Thank you! 馃檹馃徎 Let me know once you are done ;)

@onuralpszr
Copy link
Collaborator Author

@SkalskiP
Copy link
Collaborator
SkalskiP commented Oct 2, 2023

@onuralpszr, you know you don't need to work on your fork. You can create branches directly in supervision.

@onuralpszr
Copy link
Collaborator Author
onuralpszr commented Oct 2, 2023

@onuralpszr, you know you don't need to work on your fork. You can create branches directly in supervision.

Habits :=) I will use here more okey 馃憤 :)

... scene=image.copy(),
... detections=detections
... )
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this link to an example annotated frame in docs? https://media.roboflow.com/supervision-annotator-examples/circle-annotator-example.png In a similar way, we have done it for other annotators.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SkalskiP I was going to ask that, awesome thank you !!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries ;) let me know once you update it. ;)

@SkalskiP
Copy link
Collaborator
SkalskiP commented Oct 2, 2023

Habits :=) I will use here more okey 馃憤 :)

Cool. One comment, and we can merge.

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@onuralpszr
Copy link
Collaborator Author

@SkalskiP all done you can merge

@SkalskiP
Copy link
Collaborator
SkalskiP commented Oct 2, 2023

@onuralpszr One more thing. I see that you marked it as Hacktoberfest task. I'm all in favor. Small question: do we need to do anything else? Do you need issue associated with the PR? Is there anything else we need to do to make that PR count to Hacktoberfest?

@onuralpszr
Copy link
Collaborator Author

@onuralpszr One more thing. I see that you marked it as Hacktoberfest task. I'm all in favor. Small question: do we need to do anything else? Do you need issue associated with the PR? Is there anything else we need to do to make that PR count to Hacktoberfest?

"hacktoberfest-accepted" is enough to make it count.

@SkalskiP
Copy link
Collaborator
SkalskiP commented Oct 2, 2023

Awesome! In that case, merging! 馃殌

@SkalskiP SkalskiP merged commit e6e1397 into roboflow:develop Oct 2, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:annotator Annotators documentation Improvements or additions to documentation enhancement New feature or request hacktoberfest Open for contributions during the annual Hacktoberfest event, aimed at encouraging open-source parti hacktoberfest-accepted Contribute to the notion of open-source this October! version: 0.15.0 Feature to be added in `0.15.0` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants