Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
T4
• DeepStream Version
5.0
• JetPack Version (valid for Jetson only)
NA
• TensorRT Version
7.0.0.11
• NVIDIA GPU Driver Version (valid for GPU only)
440.64.00
• Issue Type( questions, new requirements, bugs)
I am using deepstream_test1.py. If I run it as-is, it works fine. When I use by own NN, the inference is not happening.
How I know that inference is not happening?
- The labels are not being printed
- print(“bInferDone={}”.format(frame_meta.bInferDone)) in osd_sink_pad_buffer_probe() – this is printing 0 (while it prints 1 with the caffe-resnet).
What is my NN?
It is a simple variant of Resnet created in pytorch using the below code.
model = resnet18(pretrained=True)
model.fc = torch.nn.Linear(512, 4)
model = torch.nn.Sequential(model, torch.nn.Softmax(1))
Then I converted it to TRT format using torch2trt, ran the generated TRT model on one image and verified that the output/labels are fine. Then I saved the engine part of the TRT model into a file and set that as the engine file in deepstream_test1.py config file. Since my NN does not output bboxes, I have changed network-type to 1.
What is my config file?
[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
model-engine-file=../../../../samples/models/pytorch-resnet-to-trt.engine
force-implicit-batch-dim=1
batch-size=1
network-mode=0
network-type=1
num-detected-classes=4
interval=0
gie-unique-id=1
output-blob-names=output_0
[class-attrs-all]
pre-cluster-threshold=0.2
eps=0.2
group-threshold=1
My guess is that the output layer of my network is not amenable to be used by nvinfer OR the engine file I saved is incorrect in some way. There are no error messages or warnings.
• 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)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)