RPi, OpenCV and face recognition.

13 views
Skip to first unread message

shykitten55

unread,
Oct 23, 2017, 6:56:08 PM10/23/17
to Robots & Dinosaurs
I missed an earlier lesson on that and am interested in parts of that.

Though face recognition is handy/good, what I am also interested in is "object" detection.

I'll explain.

Yonks ago someone was telling me that they had an Arduino (I think) and a system to deter critters from entering the yard.

If it was a cat, it would activate.  But other things it would let be.

It was explained that it sometimes detected the wrong thing and so the code was modified and the problem fixed.


I fear that is a massive over simplification of what really happened, but anyway.

Given an Arduino can do it, a Pi should be able to easily do it.

I downloaded a face recognition python script for the Pi, but what wasn't explained/declared what that you needed a directory full of face pictures as a base line.
Then another directory of "not face" pictures.

Or something like that.

So I sat there for a few tries, trying to get it working and wondering what was going on.  (Silly me.)

Anyway, I was just wondering if there will be another class similar (or same) soon?

I've for my RPIZ(W) with camera and would like to get some lessons on what to do.


Thanks in advance.

Finnian Lattimore

unread,
Oct 26, 2017, 9:10:49 PM10/26/17
to sydney-h...@googlegroups.com
Object detection is still a challenging problem. There are two basic approaches:

1) Process images on the device - probably with some pre-filter ie looking for cat sized differences in the current images to the long term average, followed by machine learning based scoring. 
2) Send images to an image recognition API for processing (will still require on device/your own server filtering as you can't just stream video to an API).

The Rasberry pi 3 can run run basic filtering algorithms at reasonable frame rates (ie ~10 frames per second). Most machine learning algorithms will not run at real time - hence need for a pre-filter. You do not have to train the machine learning models on the Pi - it is better to use a pre-trained network. There are various one around online or you can train your model on a more powerful computer/AWS and then stick the trained model on the Pi. However, getting something to even roughly work will probably take months of mucking around - and even then it will not be 100% accurate. Although there has been huge progress in ML for object detection - there's still a pretty steep learning curve to get these models working well (unless your application can be solved by just calling one of the existing APIs). 

I'd be up to run the OpenCV workshop again if there is enough interest probably sometime after Christmas though. I'm currently in the midst of submitting my thesis.

cheers,

Finn

--
You received this message because you are subscribed to the Google Groups "Robots & Dinosaurs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sydney-hackspace+unsubscribe@googlegroups.com.
To post to this group, send email to sydney-hackspace@googlegroups.com.
Visit this group at https://groups.google.com/group/sydney-hackspace.
For more options, visit https://groups.google.com/d/optout.

Cat

unread,
Oct 26, 2017, 10:15:45 PM10/26/17
to sydney-h...@googlegroups.com
Thanks very much for the reply and information.

(This is but one of many Yaks I am attacking just now)

As I have a RPIZero(W) with camera I am wanting to do a bit of "that kind of stuff" as it has tweaked my curiosity/interest.  (Not sure which one)
But in saying that, I am interested.

Good luck with your thesis.

I'll wait until after that is done and there is another class/workshop.



--
You received this message because you are subscribed to a topic in the Google Groups "Robots & Dinosaurs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sydney-hackspace/gFO6u9z8aKw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sydney-hackspace+unsubscribe@googlegroups.com.

Iain Chalmers

unread,
Oct 26, 2017, 10:48:04 PM10/26/17
to sydney-h...@googlegroups.com
The second half of this article has some useful discussion about optimisations to improve image recognition rates:


Basically his newer approach is to not try to run his object recognition code at full speed continuously, but to use a much simpler object detection algorithm targeting a specific region in the camera's field of view - then push individual "interesting frames" out into an async queue to run the slower object recognition algorithm on only the selected frames...

big

On 27 October 2017 at 12:10, Finnian Lattimore <finnla...@gmail.com> wrote:



--
"I say we take off and nuke the entire site from orbit.
That's the only way to be sure." - Ellen Ripley
Reply all
Reply to author
Forward
0 new messages