supervision
supervision copied to clipboard
Add `corner_radius` to `sv.LabelAnnotator` to handle roundness of label edges.
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:
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)
- [x] New feature (non-breaking change which adds functionality)
- [x] 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