supervision icon indicating copy to clipboard operation
supervision copied to clipboard

Unicode Label Support

Open Ucag opened this issue 1 year ago • 4 comments

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!

Ucag avatar Jun 17 '23 13:06 Ucag

Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.

github-actions[bot] avatar Jun 17 '23 13:06 github-actions[bot]

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 :/

SkalskiP avatar Jun 19 '23 05:06 SkalskiP

I've done a primitive version using PIL to render text with unicode support, If you don't mind, I would like to PR.

Ucag avatar Jun 25 '23 02:06 Ucag

Hi @Ucag 👋🏻 Absolutely! Feel free to open PR. I'm happy to take a look.

SkalskiP avatar Jun 26 '23 10:06 SkalskiP

Thi issue is going to be solved via https://github.com/roboflow/supervision/issues/990.

SkalskiP avatar Apr 08 '24 12:04 SkalskiP