Dear Yermalayeu Ihar and other experts on SIMD project,
I am trying to use SIMD for face detection as Yermalayeu Ihar metioned the SIMD makes face detection 2~3 times faster than opencv version.
But I got a "BUSY BUG" as shown in below code, once we initialize the Detection, then 100% CPU will be used, no matter whether we do face detection or not.
Can you fix this bug ? Because we want do face detection at any time and release the CPU when stop it.
It is a short sample of using Simd::Detection and it doesn't check correctness of input data. I would check the result of execution of functions Test::Load() and Detection::Load(). Might be the paths to the files are not correct.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My current platform is Windows 10 (VS 2015). Could you tell me about your platform?
Because this bug depends on used OS or Compiler.
Your solution of the problem isn't general because it uses Windows' specific function ::Sleep().
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have reproduced this bug. There is a problem: if we insert sleep(1) it will lead to decreasing of performance (about 20%). Now I am seeking better solution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Yermalayeu Ihar, I tested your updated version, and it runs really faster than simply adding a Sleeping, Well done! My platform is Windows 10 (VS 2012 Express).
By the way, could you let me know why SIMD does not support TreeBased .xml model file, only support StumpBased .xml model file ?
Harley@HK,China
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Because there isn't any effective way to optimize (with using SIMD) calculation of these cascades. Also because using of stump based cascedes is default behevior of trainig utiltities in OpenCV (and there isn't any tree based cascades in standard OpenCV samples of HAAR and LBP cascades).
Last edit: Yermalayeu Ihar 2016-08-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Yermalayeu Ihar and other experts on SIMD project,
I am trying to use SIMD for face detection as Yermalayeu Ihar metioned the SIMD makes face detection 2~3 times faster than opencv version.
But I got a "BUSY BUG" as shown in below code, once we initialize the Detection, then 100% CPU will be used, no matter whether we do face detection or not.
Can you fix this bug ? Because we want do face detection at any time and release the CPU when stop it.
Best regards.
Harley@HK
#include "Simd/SimdDetection.hpp"
#include "Test/TestUtils.h"
#include "windows.h"
int main()
{
typedef Simd::Detection<Simd::Allocator> Detection;
Detection::View image;
Test::Load(image, "../../data/image/lena.pgm");
Detection detection;
detection.Load("../../data/cascade/lbp_face.xml");
}
It is a short sample of using Simd::Detection and it doesn't check correctness of input data. I would check the result of execution of functions Test::Load() and Detection::Load(). Might be the paths to the files are not correct.
Dear Yermalayeu Ihar, thanks for your prompt reply.
Waiting for your solution :)
I can't check path to files on your computer. At my computer the example works fine.
Dear Yermalayeu Ihar, I set a sleeping here:
My current platform is Windows 10 (VS 2015). Could you tell me about your platform?
Because this bug depends on used OS or Compiler.
Your solution of the problem isn't general because it uses Windows' specific function ::Sleep().
I have reproduced this bug. There is a problem: if we insert sleep(1) it will lead to decreasing of performance (about 20%). Now I am seeking better solution.
I have fixed this bug. Thank you for your bug report.
Last edit: Yermalayeu Ihar 2016-08-26
Dear Yermalayeu Ihar, I tested your updated version, and it runs really faster than simply adding a Sleeping, Well done! My platform is Windows 10 (VS 2012 Express).
By the way, could you let me know why SIMD does not support TreeBased .xml model file, only support StumpBased .xml model file ?
Harley@HK,China
Because there isn't any effective way to optimize (with using SIMD) calculation of these cascades. Also because using of stump based cascedes is default behevior of trainig utiltities in OpenCV (and there isn't any tree based cascades in standard OpenCV samples of HAAR and LBP cascades).
Last edit: Yermalayeu Ihar 2016-08-29