Deploy .engine file in python

I used Transfer Learning Toolkit to train resnet18detectnetv2 for custom dataset. I then used the tlt-converter to convert the .etlt model into an .engine file. I am able to deploy both the .etlt and .engine file in DeepStream and it works.
But now I need to deploy the model in python and I am not able to find how to load the .engine model in python.

Hi sharanssundar,
For " deploy the model in python ", it is not the deploy way in current version of TLT.
See for reference.

For “how to load the .engine model in python”, if you already generate a trt engine from etlt model, then your question becomes a TensorRT topic.
See doc:
There are many python examples, especially under /usr/src/tensorrt/samples/python/

Hi @sharanssundar,
I have some question about train the resnet18detectnetv2 for custom my own dataset.

1- You converted your dataset to kitti dataset format? If so, you resize your images and boxes for fixed size like kitti dataset size?
2- for converting the dataset to tfrecord, tlt-tfrecord-converter expected to have 16 fields in labels text files, you filled other fields any value like zeros?
3- In the detectnet_v2_train_resnet18_kitti.txt, there are all config about classes of kitti, like this:

  target_class_config {
    key: "pedestrian"
    value {
      clustering_config {
        coverage_threshold: 0.00749999983236
        dbscan_eps: 0.230000004172
        dbscan_min_samples: 0.0500000007451
        minimum_bounding_box_height: 20

  target_classes {
    name: "pedestrian"
    class_weight: 4.0
    coverage_foreground_weight: 0.0500000007451
    objectives {
      name: "cov"
      initial_weight: 1.0
      weight_target: 1.0
    objectives {
      name: "bbox"
      initial_weight: 10.0
      weight_target: 10.0

There are many such config about claases of kitti, I need to modify all of this to my custom dataset classes?

4- Could you run trt engine like .engine file with python code without deep stream sdk? if so, please share your code if possible.

5- How to you deploy both the .etlt and .engine file in DeepStream? on jetson nano or PC? using deep stream docker image or tar file or deb file?

See TLT for custom dataset and deploy .engine file