# Increasing fps on Jetson TX2 for a Tensorflow algorithm

**URL:** <https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562>\
**Category:** Jetson TX2\
**Created:** [January 29, 2018, 5:45am UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562 "2018-01-29T05:45:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pratosha](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Pratosha](https://forums.developer.nvidia.com/u/Pratosha)\
**Post date:** [January 29, 2018, 5:45am UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/1 "2018-01-29T05:45:54Z")

</div>

Hi ,

I am working on a Real time Object detection algorithm using Tensorflow with GPU support v1.0.1 on Jetson TX2.  
After using the below commands:  
$ sudo nvpmodel -m 0  
$ sudo ./jetson\_clocks.sh

The algorithm is taking 0.8 to 0.9 seconds to detect one frame.

How can I increase the fps to 17-19?

Kindly help.

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [January 29, 2018, 9:12am UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/2 "2018-01-29T09:12:24Z")

</div>

Hi,

We have an object detection sample with DetectNet and TensorRT:

> **[GitHub - dusty-nv/jetson-inference: Hello AI World guide to deploying deep-learning...](https://github.com/dusty-nv/jetson-inference)**
>
> Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.

It can reach around 11-fps with TX2 maximized frequency.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Pratosha](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Pratosha](https://forums.developer.nvidia.com/u/Pratosha)\
**Post date:** [January 29, 2018, 9:19am UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/3 "2018-01-29T09:19:13Z")

</div>

Hi AastaLLL,

Thanks for your response.  
I am concentrating on increasing the fps of my current working algorithm as it is fine tuned for automotive on-road object detection.

Is there any other way I can increase the fps?

Kindly help

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [January 30, 2018, 9:26am UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/4 "2018-01-30T09:26:14Z")

</div>

Hi,

Suppose you want to use a TensorFlow model on Jetson.  
Here are some advices for you:

1. Try TensorRT:

> **[NVIDIA TensorRT](https://developer.nvidia.com/tensorrt)**
>
> An SDK with an optimizer for high-performance deep learning inference.

2. Profile your model first.  
If an op run slowly on GPU(ex. tf.where), try to place it on CPU.

Thanks.

---

<div class="post-metadata">

**Author:** ![Pratosha](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Pratosha](https://forums.developer.nvidia.com/u/Pratosha)\
**Post date:** [January 30, 2018, 9:50am UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/5 "2018-01-30T09:50:04Z")

</div>

Hi AastaLLL,

It take 17 seconds per frame while placed on the CPU whereas 0.8 seconds/frame when run on the GPU.  
The code is written in python. I have tensorRT v3.0 installed on Jetson TX2. How do I use UFF format to make it compatible with tensorRT?

I did run the detectnet code from the link shared - [GitHub - dusty-nv/jetson-inference: Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.](https://github.com/dusty-nv/jetson-inference)  
Is there anyway to train the model using our own dataset and checkpoint file ?  
For instance -(VGGnet\_fast\_rcnn\_iter\_70000.ckpt)

Thanks,  
Pratosha

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [February 8, 2018, 9:32am UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/6 "2018-02-08T09:32:06Z")

</div>

Hi,

To launch TensorRT with a TensorFlow model on Jetson, it requires following steps:

**1.** Convert TensorFlow model to UFF format

- Require x86 Linux platform
- Python interface
- Sample is located at '/usr/local/lib/python2.7/dist-packages/tensorrt/examples/tf\_to\_trt/'

**2.** Create an TensorRT engine with UFF file

- Can be applied on Jetson
- C++
- Sample is located at '/usr/src/tensorrt/samples/sampleUffMNIST/'

You can re-train the detectNet model with DIGITs and tutorial can be found here:  
[https://github.com/dusty-nv/jetson-inference#digits-workflow](https://github.com/dusty-nv/jetson-inference#digits-workflow)

Please noticed that detectNet is a caffe-based model and use nvcaffe\_parser rather than uff\_parser.

Thanks.

---

<div class="post-metadata">

**Author:** ![Pratosha](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Pratosha](https://forums.developer.nvidia.com/u/Pratosha)\
**Post date:** [February 8, 2018, 12:34pm UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/7 "2018-02-08T12:34:00Z")

</div>

Hi AastaLLL,

Thanks :) will surely try

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:28pm UTC](https://forums.developer.nvidia.com/t/increasing-fps-on-jetson-tx2-for-a-tensorflow-algorithm/57562/8 "2021-10-18T18:28:06Z")

</div>

Closed on October 18, 2021, 6:28pm UTC


