throughput fps vs inference fps #1274
-
When i run the benchmarking script, there are 2 throughput fps. One is shown as throughput(batch size =32)=2.06 fps and then there is one when bechmarking is complete (around 9 fps). My question is which one is correct? How can i make the inference speed reach the speed that the benchmarking script returned? I want to run it image by image (not batches) and get the desired speed. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I have a similar question. Trying to infer directly on a webcam so any insights here would be helpful. Thank you for the amazing library btw |
Beta Was this translation helpful? Give feedback.
-
The As for the difference in throughput from benchmarking, I am still trying to debug the issue. One major factor is that benchmarking uses |
Beta Was this translation helpful? Give feedback.
-
it is also possible to write a custom inferencer as mention in #1183. |
Beta Was this translation helpful? Give feedback.
The
throughput (batch size) ...
is computed from theTimerCallback
. It is calculated based on batch inference called bytrainer.test
. The one computed when benchmarking is complete uses theMockDataloader
and callingpredict
for each image. Hope this is clear.As for the difference in throughput from benchmarking, I am still trying to debug the issue. One major factor is that benchmarking uses
MockDataloader
which creates a dataset of random tensors with the same length as testing set. Performance numbers based on this are misleading as preprocessing time varies for each real test image. So the benchmarking script is showing a more optimistic value. Second, for some reason when the model …