Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add benchmark script #161

Merged
merged 1 commit into from
Sep 14, 2021
Merged

Add benchmark script #161

merged 1 commit into from
Sep 14, 2021

Conversation

gekmihesg
Copy link
Contributor

Ugly script that should help with #160. The script is based on v4l2loopback and creates /dev/video99 and /dev/video100. ffmpeg (or avconv) is used to loop a video at 1920x1080 to /dev/video99 with 60 FPS. fake.py is run for 3 minutes while the FPS counter is collected to calculate average and stdev in the end. Additional parameters like --hologram can be given to the script and will passed to fake.py.

Using a real camera for the benchmark seems unreliable. My USB camera for example claims to deliver images at 30 FPS, which it sometimes does but then suddenly falls back to 15 FPS until I re-plug it.

For 04a4960 my results look like this:

1920x1080@60 for 180 seconds
HEAD: 04a4960dc8daad11ac1d7be15cfe1a591c1fdca2

Linux 5.14.2-arch1-2 #1 SMP PREEMPT Thu, 09 Sep 2021 09:42:35 +0000 x86_64 GNU/Linux
     12 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz

python 3.9.7 (default, Aug 31 2021, 13:28:12) 
[GCC 11.1.0]
virtualenv True

numpy 1.21.2
opencv-python 4.5.3.56
pyfakewebcam 0.1.0
mediapipe 0.8.7.3
inotify_simple 1.3.5
cmapy 0.6.6
ConfigArgParse 1.5.2

avg 11.43, stdev 0.67

For 2f7d698:

1920x1080@60 for 180 seconds
HEAD: 2f7d6988a3275b8aa4cbc73bed8151666c5aedef

Linux 5.14.2-arch1-2 #1 SMP PREEMPT Thu, 09 Sep 2021 09:42:35 +0000 x86_64 GNU/Linux
     12 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz

python 3.9.7 (default, Aug 31 2021, 13:28:12) 
[GCC 11.1.0]
virtualenv True

numpy 1.21.2
opencv-python 4.5.3.56
pyfakewebcam 0.1.0
mediapipe 0.8.7.3
inotify_simple 1.3.5
cmapy 0.6.6
ConfigArgParse 1.5.2

avg 32.74, stdev 4.36

@fangfufu fangfufu merged commit 5f5d90c into fangfufu:master Sep 14, 2021
@fangfufu
Copy link
Owner

Brilliant, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants