Depstream’s print wrong symbol of Japanese label in to screen OSD

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU: GTX 1660 Super)
• DeepStream Version: 6.1.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (11.6)
• Issue Type (bugs)

Assume i have working on Japanese car license plate, detect and OCR it.
The problem is when i display the license plate on the OSD screen, it show ਀਀ ਀਀ (yes the forums can not encoding it also). Like image below.
Screenshot from 2023-07-26 17-09-50
The expected text that should be show as “”

I tried to change the font mutiple times, using obj_meta.text_params.font_params.font_name = "Noto Sans" but it doesn’t work.

I tried install Japanese language for my Ubuntu 20.04.

1. Install Chinese Language package . 
   sudo apt-get install language-pack-zh-hans
2. Set the Chinese language enviroment
   export LANG=ja_JP.UTF-8
   export LANGUAGE="ja_JP:ja:en_US:en"

Then restart the PC and rerun pipeline, even change the font again using obj_meta.text_params.font_params.font_name = "Noto Sans" but it doesn’t work.

How can i solve this issue, please let me know. Thanks.
Also, i tried to type in “asdwasdw” but it doesnt print or notice anything that there is no font named “asdwasdw”. And i thing it may good to know what was the choosen font it is.

You install a Chinese Language package, it cannot support Japanese language. You can try to install Japanese Language package and see if it works well.

Sorry my fault. I have installed Japanese language pack.

   sudo apt-get install language-pack-ja
   export LANG=ja_JP.UTF-8
   export LANGUAGE="ja_JP:ja:en_US:en"

But the text show still like the result image above.
Screenshot from 2023-07-27 09-14-15

Could you attach your video source to us? Or you can just message to me.

Sorry i cant send you any source.
But the basic idea is just like the license plate.
My new custom japanese license plate for my civic! - YouTube This is a relevant example.

This video cannot be downloaded. Could you attach a simple video that has Japanese license plate?

Okey this is a better case:
fb_cv_lcspl.mp4

I see OSD work well with Japan label in deepstream-test3
image

1 Like

Yes. I test that with deepstream-test-1. It works well, too. Perhaps there is a problem with the Japanese language output of your model itself. You need to check your code.

1 Like

Thanks very much @PhongNT @yuweiw for letting me know.
I will check it carefully and then report it back later.

Best regards!

Oh wait can you test it on Python please?

Okey after recheck it, i found the reason of my issue.
It turn out my app is run inside a docker container, so there is no font that support japanese character on it.

So i copy a japanese font, then install the font inside docker, and then select the font name using:
py_nvosd_text_params.font_params.font_name

Then it worked.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.