font and color of the annotation box #13518
Unanswered
mmx12345678
asked this question in
Q&A
Replies: 1 comment
-
|
YOLOv5 handles box/label styling in its plotting utilities. Change colour: from utils.plots import Annotator
annotator = Annotator(im, line_width=2, font_size=0.6)
annotator.box_label(box, label, color=(0, 255, 0)) # BGRChange font / thickness: cv2.putText(im, label, (int(x1), int(y1) - 2),
cv2.FONT_HERSHEY_DUPLEX, 0.7, color, 2, cv2.LINE_AA)Supported OpenCV fonts include SIMPLEX, DUPLEX, COMPLEX, TRIPLEX. For full control: skip YOLOv5 plotting and draw boxes manually after inference with OpenCV. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to modify the font and color of the annotation box.
Beta Was this translation helpful? Give feedback.
All reactions