TensorRT6 and Tensorflow Faster RCNN models

The new release of TensorRT supports Tensorflow Faster RCNN models as in https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleUffFasterRCNN.

Is it possible to use the Faster RCNN models from the object detection model zoo as in this sample?
Could you provide a config.py file that maps the layer in the graphs to the correct plugins?
Thanks.

up

I have already posted this on the forums. Still no answer…

I would like to add to this question:
If I wanted to use this tensorRT implementation with Python, is the only approach still to use SWIG to create a wrapper around this FasterRCNN engine?

Same pipeline as : https://github.com/AastaNV/ChatBot

Thank you.

I don’t know what your specific use case is but, in general, you don’t need SWIG to use the engine.
Check the example engine_refit_mnist in /usr/src/tensorrt/samples/python

Your pipeline should be:

frozen_graph ----> uff -----> engine -----> inference in python with engine

The problem is in the first step, as FasterRCNN is not fully supported yet.

Thanks for the reply @nick0lai

You have brought up a good point…To probe a bit more…

I only thought I needed to use SWIG because there isn’t a supported Python API for ARM (jetson devices) as of yet. See this post:
https://devtalk.nvidia.com/default/topic/1043135/jetson-tx2/aboat-tensorrt-python-api-on-tx2/

For using the engine, how would you create on with python?
something like? :

engine = trt.utils.uff_to_trt_engine(G_LOGGER, uff_model, parser, 1, 1 << 20)

I grabbed this from the tutorial on the workflow seen at:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/tensorrt_401/tensorrt-api/python_api/workflows/tf_to_tensorrt.html

If I am able to do this all with python, that would be fantastic!

That was an old post in the forum.
In the recent Jetpack for Jetson you have the python API.

You should be fine for the second part, the examples in /usr/src/tensorrt/ are pretty straightforward.

Issue is fixed in latest version.

@SunilJB is there any official examples of this besides the ones that were talked about earlier ? Or should I just look at the tensorrt examples in the latest install?

Hi,
Please reference the TensorRT sample support guide for examples:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-sample-support-guide/index.html

Regarding TRT 6 support on JetPack:
JetPack 4.3 Developer Preview, which is packaged with TRT6 is available as a beta. https://developer.nvidia.com/jetpack-4_3_DP

Stay tuned for official production release of Jetpack 4.3.

Thanks