[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

Add corner_radius to sv.LabelAnnotator to handle roundness of label edges. #1037

Merged
merged 6 commits into from
Mar 25, 2024

Conversation

xaristeidou
Copy link
Contributor
@xaristeidou xaristeidou commented Mar 24, 2024

Description

Implements #1027

sv.LabelAnnotator has a new attributre corner_radius.

A new custom method draw_rounded_rectangle has been added using almost same arguments with cv2.rectangle but using the new corner_radius attribute.

Examples using corner_radius = 8 | 20, are attached below:

label-annotator-example-all_8

label-annotator-example-all_20

List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

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

Google Colab ready for testing:
https://colab.research.google.com/drive/1sHdjb1bg8aGekj7uaSNQ80VqhgTzASOs?usp=sharing

Any specific deployment considerations

When initializing sv.LabelAnnotator() the corner_radius can be specified using int values.

Docs

  • Docs updated? NO. Update needed

@SkalskiP
Copy link
Collaborator

Hi @xaristeidou 👋🏻 I made small API changes (nothing serious), and we are ready to merge! Thanks a lot for coming up with the idea and executing it!

@SkalskiP SkalskiP merged commit 09a47be into roboflow:develop Mar 25, 2024
9 checks passed
@xaristeidou xaristeidou deleted the round-edge-label-annotator branch May 15, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants