Calculation of net-scale-factor and bbox color

I have got 2 questions:

I successfully managed to run my custom trained retinanet on a Jetson TX2 with the default deepstream-app, after a lot trial and error. At the end I had to set the net-scale-factor to some ‘random’ value for the deepstream-app to output usefull predictions. Now my questions is how to precisely caluclate this value.

I exported my model with 512x864 (H x W) and I run it with an mp4 file with resolution 960x1280 (H x W). How do I calculate the correct value for better results?

My 2nd question is about the bbox-border-color attribute. I can not manage to set it. I have 3 classes and I set the colors like this:


But all boxes are rendered in red.

Thanks for some help and greetings,

1 Like

For your second question, I can change the color, not sure where got wrong, guess you run into below if branch code,
if (class_index == -1) {
clr_params = &config->bbox_border_color;
} else {
clr_params = g_malloc (sizeof (NvOSD_ColorParams));
g_hash_table_insert (config->bbox_border_color_table,
class_index + (gchar *) NULL, clr_params);
it will just have one red color parameter,
config->bbox_border_color = (NvOSD_ColorParams) {1, 0, 0, 1};
if set correctly it will create one hash table which includes class number size of NvOSD_ColorParams, key is class id,
you may add some print info to see how it happened.