supervision
supervision copied to clipboard
Unicode Label Support
Search before asking
- [X] I have searched the Supervision issues and found no similar feature requests.
Description
I'm using supervision with unicode label data. When I assign unicode label information to the labels
parameter, supervision
only draw strange squares instead of label text. After search for a moment, I noticed that cv2
only supports ascii text when using putText
. The square block is created by cv2
not supervision
itself.
Use case
Supervision is good and love it so much. There are many label information not in native ascii. I think support it would be good.
Additional
I found a work around way to solve the issue is to use PIL
to draw the text with user defined truetype
font. By this way, I think supervision could avoid the GPL
license problem.
Are you willing to submit a PR?
- [ ] Yes I'd like to help by submitting a PR!
Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.
Hi, @Ucag 👋🏻! Thanks a lot for your interest in supervision 🙏🏻 ! Adding support for PIL
as a text rendering engine is 100% on my TODO list. I really wan to do it but I'm quite busy so I doubt I will be able in upcoming weeks :/
I've done a primitive version using PIL to render text with unicode support, If you don't mind, I would like to PR.
Hi @Ucag 👋🏻 Absolutely! Feel free to open PR. I'm happy to take a look.
Thi issue is going to be solved via https://github.com/roboflow/supervision/issues/990.