Nvinferbin ignores changes to class-attrs-* and class-attrs-all on model update

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson & dGPU
• DeepStream Version <= 6.4
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
Change any of the values in the class-attrs-* or class-atters-all fields of an nvinferbin config file in yaml or txt form, write the results to a new config file, update the nvinferbin element in gstreamer so that the config-file-path now points to the new config file, triggering a change, and notice that model is reloaded, but the changes are ignored. Specifically, I was trying to dynamically update the pre-cluster-threshold value in an app, and noticed that these changes are not parsed/updated in the runtime.

Is there some specific reason to ignore changes to these values? I did confirm that the behavior was at least consistent between yaml/txt config file, so it seems maybe intentional.

I can modify the source locally to apply this change, but just wondering is there some reason it being ignored when the model is reloaded?

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

It seems that a simple change to just remove the break; statement from gstnvinfer.cpp/line472 allows updates to work properly; I can now see the updated threshold values passed into my custom nvinfer parsers.

I’ll report back if some negative side-effects occur.

I’m still interested to know if this was specifically prevented for some reason (like possible race-condition), or just an oversight…

Do you mean you set a new config file to the nvinfer plugin at the runtime?

Yeah; the nvinferbin gstreamer element says that the config-file-path can be updated in any state including Playing, and this works; it’s just that when this new config file is parsed, it looks like the purpose was just to support the new on-the-fly-model-reloading feature (just found that), and I can see in the last assumption #3, that these other attributes I’m interested in would not be updated.

Though there is no mention of why they couldn’t be updated–I suppose there could be some scenarios where you’d want to block this, but in my case, I actually want to allow adjusting the pre-cluster-threshold parameter dynamically in the live feed so that the “sensitivity” can be tuned for a given scene (this works, btw, with the patch I mentioned).

OK. Updating all the parameters in the config file may not be considered in our code. You can customize it according to your needs in our open source code. But keep in mind that this feature assumes that the model being updated has the same network parameters.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

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