[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Face detection on Parallella

Face detection on Parallella

Face detection on Parallella

Postby leonfg » Thu May 05, 2016 6:07 am

The face detection program now works well. You can get the latest version from https://github.com/leonfg/face_detect.
==========================================================================================================================
I modified the old face detection project(http://www.adapteva.com/white-papers/fa ... -processor) to make it run on parallella and current eSDK. The program can run correctly but still have some problems, please have a look at the code and help me to fix these.
Code addr: https://github.com/leonfg/face_detect

Parallella board model: Embedded Platform
Image: ubuntu-14.04-headless-z7020-20150130
esdk: 15.1.

Remaining problems:
Working principle: resizing the input image into several different sizes, then dividing the resized images into many subimages with a given size window, the cascade classifier will do feature matching calculation to distinguish if a subimage is a human face. We use Epiphany cores to do the feature matching work parallelly to achieve speedup. There are some problems in current code:
1. Core number: When use most of the cores like 16 or 15, the device program always hang. I have to use less cores to prevent this.
2. Number of loop iterations: There are two main "for" loop sequences in the device program, one is dmacopy the subimages from shared memory, the other is classifier calculation. When there are too many dmacopy loop iterations in core the program will hang too. So I have to use more cores to reduce the loop iterations in each core.
The hang situation will happen randomly, but the workflow and logic are definitely correct, I can not figure out the reason of the problem, so I have to use nether too less nor too more cores to balance the core number and the loop iterations, 4~12 cores will get successful execution most time.
t1.jpg
t1.jpg (283.83 KiB) Viewed 71319 times

t2.jpg
t2.jpg (698.61 KiB) Viewed 71319 times
Last edited by leonfg on Mon May 09, 2016 12:58 pm, edited 2 times in total.
leonfg
 
Posts: 18
Joined: Mon Nov 24, 2014 8:31 am

Re: Face detection on Parallella

Postby aolofsson » Thu May 05, 2016 1:55 pm

Before looking at code...
-Which board model?
-What software image/sdk version?
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Face detection on Parallella

Postby leonfg » Thu May 05, 2016 7:28 pm

leonfg
 
Posts: 18
Joined: Mon Nov 24, 2014 8:31 am

Re: Face detection on Parallella

Postby aolofsson » Thu May 05, 2016 9:42 pm

There were some reports of instability for heave multi threaded code with the old elink with heavy use of DMAs. (but we had a very hard time reproducing the bug). The new redesigned the elink "should" solve these kinds of issues. If the problem persists, we will take a look at the code.

Can you try running with the latest image for the 7020? (headless 15.04)

https://www.parallella.org/create-sdcard/
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Face detection on Parallella

Postby leonfg » Fri May 06, 2016 2:45 am

leonfg
 
Posts: 18
Joined: Mon Nov 24, 2014 8:31 am

Re: Face detection on Parallella

Postby aolofsson » Fri May 06, 2016 3:24 pm

Is your mutex initialized to zero per message?
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Face detection on Parallella

Postby leonfg » Fri May 06, 2016 3:59 pm

leonfg
 
Posts: 18
Joined: Mon Nov 24, 2014 8:31 am

Re: Face detection on Parallella

Postby aolofsson » Fri May 06, 2016 6:18 pm

I would really recommend updating the code to something more modern like COPRTHR 2.0 (or MPI, or openMP, or anything else).
Writing your own mutexes is just a bad idea (we did it b/c we didn't have anything better back then)

viewtopic.php?f=13&t=3661

Instinct tells me it's going to be faster to refactor the code and lift the math routines instead of chasing synchronization ghosts. The code was done as a demo 4 years ago for a different platform and has not been brought up to date for parallella. A LOT has changed since then.

Some suspect things in old code:
-I believe the "common go" apprach used here is insufficient (may need to zero out mutex /wait variable explicitly from host?)
-initializtion of variables like mutex (Ola might have some update on the init of variables/mutexes)
-the wait loop around the dma transfer (should not be needed with new code)

Sorry that I can't help more...
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Face detection on Parallella

Postby leonfg » Fri May 06, 2016 6:50 pm

leonfg
 
Posts: 18
Joined: Mon Nov 24, 2014 8:31 am

Re: Face detection on Parallella

Postby olajep » Mon May 09, 2016 10:27 am

_start = 266470723;
olajep
 
Posts: 140
Joined: Mon Dec 17, 2012 3:24 am
Location: Sweden

Next

Return to Image and Video Processing

Who is online

Users browsing this forum: No registered users and 3 guests

cron