marcoslucianops / DeepStream-Yolo

NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models
MIT License
1.4k stars 345 forks source link

bounding box color #378

Open bongpigeon opened 1 year ago

bongpigeon commented 1 year ago

Hello, I'm detecting only two objects but the bounding box has the same color. Is it possible for me to change the bounding box color for each class?

bongpigeon commented 1 year ago

i fixed the problem. Thank you!

aidevmin commented 1 year ago

@PJongBeom How did you do?

bongpigeon commented 1 year ago

go to the deepstream_app_config.txt and edit [primary-gie]

The color of the borders for the objects of a specific class ID, specified in RGBA format. The key must be of format

bbox-border-color. This property can be identified multiple times for multiple class IDs. If this property is

not identified for the class ID, the borders are not drawn for objects of that class-id.

R:G:B:A Float, 0≤R,G,B,A≤1

bbox-border-color0=1;0;0;1 => Red for class-id 0

bbox-border-color1=0;1;1;1

bbox-border-color2=0;0;1;1

bbox-border-color3=0;1;0;1

(https://blog.naver.com/PostView.nhn?blogId=ambidext&logNo=221673421548&from=search&redirect=Log&widgetTypeCall=true&directAccess=false)

aidevmin commented 1 year ago

@PJongBeom thanks

KamranHuseyn11 commented 1 year ago

@PJongBeom could you please share the whole deepstream_app_config.txt and [primary-gie] config files? I have a custom sample so, the configs are a little bit mixed up, I wanna see where exactly I should make modifications.

bongpigeon commented 1 year ago

sorry for the late reply

[primary-gie] enable=1 gpu-id=0 gie-unique-id=1 nvbuf-memory-type=0 config-file=config_infer_primary.txt bbox-border-color=1;0;0;1 bbox-border-color=0;1;1;1

you need to add bbox-border-color part to your custom pipeline