Custom classification model in Gstreamer pipeline

I am trying to create a simple application on Jetson Nano 2 Gb with DeepStream SDK 5.1.
I have a PyTorch classification model converted to ONNX. This is ResNet18 based custom trained binary classification that I would like to implement to the whole input image. No object detection is required.
I was able to convert it to TRT engine but cannot figure out how to connect it to NVINFER layer.

The overall pipeline should look like: video source → convert to 224x224 with required by ResNet color conversion → inference with custom model → OSD with class lable (0 or 1) → sink

Can you please provide any relevant example? All examples that I can find deal with primary detection and secondary classification. I can substitute the model in config.txt file with my engine file but I do not understand what parameters should be changed to tell that I need to classify the whole frame and there will be two classes.

With my model it still expects to get information on bounding boxes.
ERROR nvinfer gstnvinfer.cpp:613:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::parseBoundingBox() <nvdsinfer_context_impl_output_parsing.cpp:59> [UID = 1]: Could not find output coverage layer for parsing objects

What is you input layers and output layers of your models(name, dimensions, data types,…), what kind of preprocesses (e.g. color format, normalization,…) do the model need, what kind of postprocess does your model needs(the algorithm needed to get the classifications from the output layers)?

There is detailed description of the nvinfer configuration parameters :Gst-nvinfer — DeepStream 6.1.1 Release documentation