cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

mainul
Journeyman III

Facedetection on video: System freezes after processing some frames

I am trying to run face detection on a 5 minute 720P video. I am using opencv API and opencl kernels to do my job. When I try to run the program, it runs fine for intial few number of frames. But after some frames, the full system freezes. I am using a desktop with AMD A10-6800K APU with Radeon(tm) HD Grap which contains devastator GPU.

I also applied clFInish after each kernel to make sure the synchronization. But that did not help either. The system freezes.

Whenever the system freezes I restarts teh machine.

Please suggest me what could be the possible cause of the error? Any help would be appreciated.

Here is my psuodo code:


Main()
{
for (;;)
{
  grab a frame;
  detectface(frame);
  writing the frame to output;
}
}

  detectface(frame)
{
  tranfer frame to oclMatrix; //the error occurs at this point, my guess.

  while some conditions are true:
  while some conditions are true:
   kernel1; //parameter: one oclmatrix for source, one for output, two temporary ocl matrix for calculation
   kernel2;//parameter: one oclmatrix for source, one for output, one temporary ocl matrix for calculation
   kernel3;//parameter: one oclmatrix for source, one for output, two temporary ocl matrix for calculation
   kernel4;//parameter: one oclmatrix for source, one for output, one temporary ocl matrix for calculation
  end;
  kernel5; //this does the detection and gives a output. parameter: one oclmatrix for source, one for output, 4 temporary ocl matrix for cascade classifier.
  end;

}


0 Likes
1 Reply
dipak
Big Boss

Hi mainul,

It is difficult to point out where the error could be just from the information you have posted. What can I say that, I faced a similar problem as system stopped responding after sometime of program execution. Later I found that the problem was due to some wrong memory management.

So, my suggestion would be please revisit your program specially the code area related to memory management and synchronization.

Regards,

0 Likes