google-coral / examples-camera

Small code snippets that show how to stream camera images to a Coral device.
Apache License 2.0
357 stars 115 forks source link

Model performance difference between pygame and gstreamer. #78

Closed SunBeenMoon closed 3 years ago

SunBeenMoon commented 3 years ago

Hi, I'm testing the examples-camera with Coral mini dev board.

As shown in the figure below, the same task, the same model, performs differently on gstreamer and pygame examples (https://github.com/google-coral/examples-camera).

For example, in 'image classification' example, 'mobilenet_v2_1.0_224_quant_edgetpu.tflite' model, inference time of gstreamer is 19.46[ms], pygame is 16.00[ms] fps of gstreamer is 30[fps], pygame is 10[fps]

image image

I want to know why there is a difference in performance between pygame and gstreamer.

Regards,

manoj7410 commented 3 years ago

As discussed over Skyvine, we cannot expect both pygame and gstreamer to perform exactly same. There will always be some difference among the performances of pygame, gstreamer and opencv.