I am working with a classification model using nvinferserver.
My config looks like this (example):
postprocess {
labelfile_path: "./configs/labels.txt"
classification {
threshold: 0.6
custom_parse_classifier_func: NvDsInferParseClassification
}
}
With the built-in parser, the labels from labelfile_path are automatically applied.
But when I switch to a custom parser (based on the sample code in:
/opt/nvidia/deepstream/sources/libs/nvdsinfer_customparser), I only get the raw outputs — the labels are not available.
From what I see, the function signature (NvDsInferParseClassification) does not provide access to config parameters like labelfile_path.
Question:
How can I access the labels defined in labelfile_path inside a custom parser?
If that is not possible, what is the recommended way to load labels (or the label path) in a custom parser?
Platform Details:
-
Hardware Platform: Jetson Orin Nano
-
DeepStream Version: 7.1
-
JetPack Version: 6.2
-
TensorRT Version: 10.3.0.30
-
NVIDIA GPU Driver Version: 540.4.0