DeepStream-Yolo
DeepStream-Yolo copied to clipboard
Inference limited to 60FPS with YOLOv5n on Jetson Xavier NX
Hello,
I am having a problem at getting limited FPS results running YOLOv5n on Jetson Xavier NX. The inference is run on the default video file provided in the deepstream config. Also, Xavier NX is running at 20W 6CORE mode.
What worked:
- Download YOLOv5n model
- Convert model using default inference size (640)
- Follow the rest of the steps in https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/docs/YOLOv5.md
- FInally, the inference is about 60FPS
What did not work:
- Download YOLOv5n model
- Convert model using default inference size (320)
- Follow the rest of the steps in https://github.com/marcoslucianops/DeepStream-Yolo/tree/master/docs/YOLOv5.md
- FInally, the inference is about 60FPS
So as you can see, the inference performance for both 320 and 640 inference sizes is 60FPS which is weird. Does anyone know why? No matter how I go low in inference size, the FPS stays at 60FPS.
Appreciate any help!
Set [sink] sync=0
in the deepstream_app_config.txt
file.
Thank you for the response @marcoslucianops
I am using the default values under [sink]
inside deepstream_app_config.txt
file which has sync=0
set already.
What is your source ?
When using [sink] type=2
, the framerate is limited to the monitor Hz. You should use [sink] type=1
to get the maximum framerate.
What is your source ?
@Arpit1496 My source is default one provided: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4
When using
[sink] type=2
, the framerate is limited to the monitor Hz. You should use[sink] type=1
to get the maximum framerate.
@marcoslucianops Thank you for this. I will try again and share the results here.
Hi @marcoslucianops,
When I set [sink] type=1
, there is no video preview output. It just shows the inference results on the terminal. Any idea why?
However, the FPS on the terminal shows a higher value at least.
I also tried running with DISPLAY=:0 deepstream-app -c deepstream_app_config.txt
, but no luck.
Hello @lakshanthad,
The [sink] type=1
working on fakesink mode.
This closes the video streaming. That's why, it increases the FPS.
You can check the other types from here: https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_ref_app_deepstream.html#sink-group
Thank you @mdeniz0 for the clarification. So if I want to obtain a video stream without the limitation of the FPS of the monitor, what could be the best way to achieve it?
As @marcoslucianops said that, the [sink] sync=0
setting will work in without FPS limitation.
@mdeniz0 Yeah, that's clear. I mean I want an output video stream (including object detection ) without FPS limitation. with sync=0, there is no video output window.
With nveglglessink window output it's not possible to get more than 60 FPS even using sync=0. It's limited to screen refresh rate.