ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.27k stars 3.05k forks source link

CPU 14% with 1920x1080 image as input #135

Closed universeroc closed 4 years ago

universeroc commented 5 years ago

memory usage is about 330MB but CPU 14%+ almost all the time processing with 1920x1080 video

I'm not experienced about libfacedetection, only do the formal testing about its performance.

Maybe it's only use CPU do the calculation not using GPU ?

Any suggestion to make it low CPU usage ?

Thank you in advance :)

ShiqiYu commented 5 years ago

Because of it’s a single thread algorithm, only one core is used.

universeroc notifications@github.com于2019年4月1日 周一11:08写道:

memory usage is about 330MB but CPU 14%+ almost all the time processing with 1920x1080 video

I'm not experienced about libfacedetection, only do the formal testing about its performance.

Maybe it's only use CPU do the calculation not using GPU ?

Any suggestion to make it low CPU usage ?

Thank you in advance :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ShiqiYu/libfacedetection/issues/135, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0eHQlLtCuiSdKiHKHQPjafrycM1n9Gks5vcXgggaJpZM4cUwkp .

universeroc commented 5 years ago

Because of it’s a single thread algorithm, only one core is used. universeroc notifications@github.com于2019年4月1日 周一11:08写道: memory usage is about 330MB but CPU 14%+ almost all the time processing with 1920x1080 video I'm not experienced about libfacedetection, only do the formal testing about its performance. Maybe it's only use CPU do the calculation not using GPU ? Any suggestion to make it low CPU usage ? Thank you in advance :) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#135>, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0eHQlLtCuiSdKiHKHQPjafrycM1n9Gks5vcXgggaJpZM4cUwkp .

I have added _OPENMP macro but it not helps too much. Any suggestion to make any improvement?

Thank you in advance :)

ShiqiYu commented 5 years ago

You can call the function in multiple threads to speed up.

universeroc notifications@github.com于2019年4月1日 周一17:10写道:

Because of it’s a single thread algorithm, only one core is used. universeroc notifications@github.com于2019年4月1日 周一11:08写道: … <#m-4909712444721116009> memory usage is about 330MB but CPU 14%+ almost all the time processing with 1920x1080 video I'm not experienced about libfacedetection, only do the formal testing about its performance. Maybe it's only use CPU do the calculation not using GPU ? Any suggestion to make it low CPU usage ? Thank you in advance :) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#135 https://github.com/ShiqiYu/libfacedetection/issues/135>, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0eHQlLtCuiSdKiHKHQPjafrycM1n9Gks5vcXgggaJpZM4cUwkp .

I have added _OPENMP macro but it not helps too much. Any suggestion to make any improvement?

Thank you in advance :)

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ShiqiYu/libfacedetection/issues/135#issuecomment-478499081, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0eHbNHBsGQHv-oaeuc1gDFhJoGJyzoks5vcc0FgaJpZM4cUwkp .

universeroc commented 5 years ago

You can call the function in multiple threads to speed up. universeroc notifications@github.com于2019年4月1日 周一17:10写道: Because of it’s a single thread algorithm, only one core is used. universeroc @.***于2019年4月1日 周一11:08写道: … <#m-4909712444721116009> memory usage is about 330MB but CPU 14%+ almost all the time processing with 1920x1080 video I'm not experienced about libfacedetection, only do the formal testing about its performance. Maybe it's only use CPU do the calculation not using GPU ? Any suggestion to make it low CPU usage ? Thank you in advance :) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#135 <#135>>, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0eHQlLtCuiSdKiHKHQPjafrycM1n9Gks5vcXgggaJpZM4cUwkp . I have added _OPENMP macro but it not helps too much. Any suggestion to make any improvement? Thank you in advance :) — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#135 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0eHbNHBsGQHv-oaeuc1gDFhJoGJyzoks5vcc0FgaJpZM4cUwkp .

Yeah, I'd like to try to use Caffe to load your model and using GPU to accelerate to save CPU

and your suggestion I'll try it :) Thank you