line_thickness and show_labels arguements don't seem to work. #2032
-
I've integrated yolo8 into my security system and it is working very well. Problem is on the annotated images the thickness of the lines drawing the boxes and the object labels are too large and obscure needed details. basically I do: The conf= and verbose= do what i expected, while the show_labels= and line_thickness= seem to have no effect. Any clues as to what I am misunderstanding or doing wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This part of the documentation seems incorrect in places. Playing around I got it to work with:
|
Beta Was this translation helpful? Give feedback.
-
When I use model.predict(verbose=False, show_labels=False, line_width=1, save=True) I added code to make the resulting image available even when the python program is running. Beforeresults = model.predict(verbose=False)
annotated_image = results[0].plot(labels=False, line_width=1)
cv2.imwrite('output.png', annotated_image) Afterresults = model.predict(verbose=False, show_labels=False, line_width=1)
annotated_image = results[0].plot()
cv2.imwrite('output.png', annotated_image) If the code is merged, you'll be able to use it the way you thought. #2373 |
Beta Was this translation helpful? Give feedback.
This part of the documentation seems incorrect in places. Playing around I got it to work with: