DeepStream-Yolo icon indicating copy to clipboard operation
DeepStream-Yolo copied to clipboard

get output of inference model.

Open imohammadhossein opened this issue 3 years ago • 7 comments

hey, thanks for the nice work. I wonder if there is any way that we can access to the outputs of the Nvinfer directly ? I have trained a custom model in python and it does have a specific custom bbox parse function in Python. Moreover, when I run it in process_mode=1 (primary mode), I get the following error, how should I fix it using Python ?

nvinfer gstnvinfer.cpp:632:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 2]: Error in NvDsInferContextImpl::fillDetectionOutput() <nvdsinfer_context_impl_output_parsing.cpp:735> [UID = 2]: Failed to parse bboxes

While using process_mode=2, has no error with no prediction.

imohammadhossein avatar Aug 15 '22 13:08 imohammadhossein

Are you using an YOLO model?

marcoslucianops avatar Aug 15 '22 14:08 marcoslucianops

Yes for now; but I'm looking for a general solution for any custom model.

imohammadhossein avatar Aug 16 '22 09:08 imohammadhossein

I can help you with the things related to this repo and models supported.

For general models:

  • To access the output tensors from the model directly in Python, you need to use the tensor meta.
  • Custom models have different layers and different outputs, you need to create the kernel to "decode" the outputs to the format you want to receive to parse.

marcoslucianops avatar Aug 16 '22 13:08 marcoslucianops

Thankyou! but the tensor meta is empty. is that necessary to pass .so file or similar config file ?

imohammadhossein avatar Aug 17 '22 05:08 imohammadhossein

You need to use the same config_infer file. The kernel for the yoloLayer is compiled in the so lib.

marcoslucianops avatar Aug 19 '22 11:08 marcoslucianops

Ok. Is there any powerful and complete tutorial ?

imohammadhossein avatar Aug 20 '22 09:08 imohammadhossein

As far as I know, there isn't. There's no good documentation/turoriais for the DeepStream.

marcoslucianops avatar Aug 22 '22 21:08 marcoslucianops