Labels new edge can disappear
Search before asking
- [x] I have searched the Supervision issues and found no similar feature requests.
Description
When using label annotator if the box is close to an edge and the text is on the edge side disappears off frame.
Add an option to ensure it stays fully in the frame
Use case
Suggested approach
in the .annotate function labels near the top can be moved inside the bounding box using something similar to
for i in range(label_properties.shape[0]):
if label_properties[i, 1] < 0:
spacing = 3
offset = spacing + self.text_padding + self.font.size
label_properties[i, :] = label_properties[i, :] + [0,offset,0,offset,0,0]
Additional
No response
Are you willing to submit a PR?
- [ ] Yes I'd like to help by submitting a PR!
Hi @hidara2000 👋🏻! Thanks so much for your interest in supervision. Would you be interested in helping us implement this feature?
https://github.com/roboflow/supervision/pull/1820
@hidara2000 responded ;)
This feature is now merged into develop and will be released tomorrow in supervision-0.26.0