LPR error: Failed to parse classification attributes using custom parse function

• Hardware Platform Jetson
• DeepStream Version 6.3
• JetPack Version 5.1
• TensorRT Version 5.1

I’m trying to run license plate recognition in Python. I’m trying to load models from Nvidia example in deepstream_test_3 python example.
Primary and secondary gies load successfully, but I get this error whenever there’s a license plate detected:

2023-11-27 05:28:03.607 | INFO | main:cb_newpad:409 - In cb_newpad
2023-11-27 05:28:03.608 | INFO | main:cb_newpad:420 - gstname=video/x-raw
2023-11-27 05:28:03.608 | INFO | main:cb_newpad:425 - features=<Gst.CapsFeatures object at 0xffff6012d4c0 (GstCapsFeatures at 0xfffebc72f960)>
2023-11-27 05:28:04.106 | INFO | main:osd_sink_pad_buffer_probe:198 - frame processed…
2023-11-27 05:28:04.131 | INFO | main:osd_sink_pad_buffer_probe:198 - frame processed…
2023-11-27 05:28:04.165 | INFO | main:osd_sink_pad_buffer_probe:198 - frame processed…
open dictionary file failed.
0:00:10.069766822 220252 0x1c51de40 ERROR nvinfer gstnvinfer.cpp:676:gst_nvinfer_logger: NvDsInferContext[UID 3]: Error in NvDsInferContextImpl::fillClassificationOutput() <nvdsinfer_context_impl_output_parsing.cpp:803> [UID = 3]: Failed to parse classification attributes using custom parse function
Segmentation fault (core dumped)

The example application in C++ works well, what could be the problem when using custom parser library in Python?

I found the solution, issue was this part in nvinfer_custom_lpr_parser.cpp, in reading dict file:

    if(!dict_ready) {
        fdict.open("dict.txt");
        if(!fdict.is_open())

Because of this you need to have dict.txt file in the same folder as your application, otherwise you will get core dumped error.

Now next question I have is how can I get the parsed result using probe function? I see that license plate is displayed correctly on video, but I need to access this value through code.

It’s similar with the C code deepstream_lpr_app.c. You can refer to our python demo and translate that into python.

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