Skip to content

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

Merged
SkalskiP merged 6 commits into
roboflow:developfrom
xaristeidou:round-edge-label-annotator
Mar 25, 2024
Merged

Add corner_radius to sv.LabelAnnotator to handle roundness of label edges.#1037
SkalskiP merged 6 commits into
roboflow:developfrom
xaristeidou:round-edge-label-annotator

Conversation

@xaristeidou

@xaristeidou xaristeidou commented Mar 24, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
@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.

2 participants