Computing FPS samples of deepstream sdk

• Hardware Platform (Jetson / GPU): jetson
• DeepStream Version : 5.0
• JetPack Version (valid for Jetson only) : 4.4
• TensorRT Version : 7.x

Hi all,
Q1- In the samples of deepstream config file one option is interval and this cause skipping consecutive batch for inference, when I set interval to 0, I get 5 FPS and when I set interval to 2, I get 10-12 FPS, I want to know FPS also count for the frames that skipping for inference, right?
My mean is that in the interval=0, FPS is 5 and this is a real fps of system, but in the interval=2, fps is 12, So the real fps can’t 12 fps, this system can’t process 12 frames in every second, right? the real fps for that model is 5.

Q2- I don’t exact understand about interval:

Specifies the number of consecutive batches to be skipped for inference

Suppose I set interval=2, and the RTSP input stream in 25, So the inference only process 25/2 = 12 frames out of 25 frame?
So the inference choose [1th, 4th, 7th, 10th ,…] frames out of 25 frames for processing?

Do you mean the interval for nvinfer or decoder?

@bcao,
for nvinfer.

in the nvv4l2decoder :

drop-frame-interval : Interval to drop the frames,ex: value of 5 means every 5th frame will be given by decoder, rest all dropped

So for interval=2 we have:
[2th, 4th, 6th, 8th, 10th, 12th, …] frames are processed and the rest all dropped. right?

No, should be 0th, 3th, 6th

If source is 10 fps and both nvinfer and decoder interval are 2 then

source: 0,1,2,3,4,5,6,7,8,9
before decode: 0,3,6,9
before infer: 0,9

Its unclear how fps is then calculated.

1 Like

Thanks, @foobar.warren, @bcao,

So, If our source send 10 fps frames, and we set interval=2 for both nvinfer and decoder, then we only process 2 frames (0,9) out of 10 frames?

and in my opinion, The deepstream consider the dropped frames in the calculation of FPS.

frames dropped by decoder are not considered for fps calculation since they are dropped inside the decoder itself

So for a live rtsp camera source with fps 30 and decoder drops alternate frames fps will be 15

If the app is not gpu limited nvinfer interval will not affect fps

If the app is gpu limited nvinfer interval will affect fps since increasing interval will mean less gpu load and hence more fps.