TF To TRT conversion

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Orin
• DeepStream Version 6.2
• JetPack Version (valid for Jetson only) 5.1
• TensorRT Version 8.5.2
I want to convert Facenet “.h5” keras model to TRT to be used by Deepstream. I have tried to follow ResNet-TF to TRT jupyter notebook available in this link Quick Start Guide :: NVIDIA Deep Learning TensorRT Documentation but too many attributes of resnet are not part of facenet model.
Is there any other documentation which i can follow for this conversion?


This looks like a Jetson issue. Please refer to the below samples in case useful.

For any further assistance, we will move this post to to Jetson related forum.


the first link in not really related to my issue and the 2nd link shows torch2trt not tf2trt. Is there a clear documentation for tf2trt? My post has been already moved from jetson to TensorRT


Which facenet are you using?
Is this one?

If yes, this is a TAO model and can be converted with TAO toolkit.


no facenet the face recognition model available in TF-KERAS


For a custom model, please convert it into ONNX format and then generate the TensorRT engine with trtexec:

$ /usr/src/tensorrt/bin/trtexec --onnx=[model] --saveEngine=[file]

After that, you can use it with Deepstream by following the instructions below: