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

Very low framerate #317

Open
Thanh-Binh opened this issue Sep 24, 2021 · 16 comments
Open

Very low framerate #317

Thanh-Binh opened this issue Sep 24, 2021 · 16 comments

Comments

@Thanh-Binh
Copy link

In my very good laptop it runs at 10 Hz in release mode!
Any idea for improvement?
Thanks

@fengyuentau
Copy link
Collaborator

fengyuentau commented Sep 25, 2021

So how good is your computer? Can you provide details on your hardware setup and running environment, such as CPU model, OS and compiler?

Also note that you should turn on high performance mode when running on a laptop.

@Thanh-Binh
Copy link
Author

my computer:
Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz, 8 cores, 64GB RAM
Ubuntu 20.04 LTS 64bits, GCC 9.3

@fengyuentau
Copy link
Collaborator

Looks good. If I understand correctly, '10 Hz' means 10 FPS. But,

  1. Did you turn on high performance mode?
  2. Did you compile with multi-threading enabled? You can post your CMAKE command for building the project.
  3. What is the size of your input images/frames? If your laptop is equiped with a 720P (1280x720) or 1080P (1920x1080) camera, it makes sense to have about 10FPS. Please refer to the table in readme.

@Thanh-Binh
Copy link
Author

yes 10fpd
Yes, it is automatically turn on in high performance mode
My Video with VGA
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -O3 -mavx2 -mfma -fopenmp")

@fengyuentau
Copy link
Collaborator

Did you try our example (https://github.com/ShiqiYu/libfacedetection/blob/master/example/detect-camera.cpp) or compose your own? If you have not try our example, you can change the input from a webcam to your video, and uncomment line84 to verify the input size.

@Thanh-Binh
Copy link
Author

@fengyuentau i tested too your example with video and have the same low FPS!

@fengyuentau
Copy link
Collaborator

  1. Can you confirm the input resolution? Is it 640x480?
  2. Can you confirm that the mutli-threading is enabled when the example is running? You can run htop in terminal to monitor the load of each core when running example.

@Thanh-Binh
Copy link
Author

yes, VGA
Screenshot from 2021-09-26 09-55-50

@Thanh-Binh
Copy link
Author

@fengyuentau is it clear for you to understand my problem?

@tofis-imverse
Copy link

+1; I have a quite similar problem with the performance, I cannot reach the performance reported in the tables. My PC specs are:

Processor: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz 2.21 GHz
Installed RAM: 32.0 GB
System type: 64-bit operating system, x64-based processor
Graphics card: GeForce Nvidia RTX 2080

@Thanh-Binh
Copy link
Author

@tofis-imverse @fengyuentau Did you find any solution for this?

@tofis-imverse
Copy link

@Thanh-Binh I was able to reach almost the reported latency (maybe x1.2) using the .lib built in cmake with the suggested flags instead of adding the source files. Did you try that?

@Thanh-Binh
Copy link
Author

@tofis-imverse I am not sure if I understood you well. Could you pls share your cmakefile.txt? Thanks

@tofis-imverse
Copy link

@Thanh-Binh
Copy link
Author

@tofis-imverse thanks for sharing. I will test it soon

@pinojojo
Copy link

pinojojo commented Nov 3, 2021

@tofis-imverse
same problem here, I used a pretty good i7 9 generation cpu laptop, using the demo: detect-camera, test results: average of 500ms per frame. you mentioned that some cmake flags should be as suggested, BUT after i use your cmake file, the result is same as the default cmake file build version.

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

No branches or pull requests

4 participants