Belgium
Asked — Edited

Cognitive Face And Face Tracking

Im struggling a little with the face recognition controls.

First of all, the cognitive face control works pretty well, but I would need some way to reset or unlearn faces if for no other reason as to test my scripts when my bot sees a new face for the first time. I have resorted to using family pictures, but by now he knows every picture I have at hand and most where recognized even before I trained them (who knew my brother was Johnny depp?) I even used some 3d printed face mask I printed a while ago, and yep, its positively recognized, someone else beat me to it lol.

While this is kinda fun, its also annoying when I cant turn it off, so is there a way to run this "in a sandbox", using only my own data, be able to reset everything it learned, and not have faces recognized submitted by other people?

When using the camera plugin, face tracking works reasonably well (it does struggle with faces at an angle and particularly from the side). But using a face as object for object recognition is useless. So the only way Ive found so far for the robot to recognize who he is talking to, is using face tracking as a trigger and cognitive face for identification. This makes it difficult to detect a new face or multiple faces, if every time tracking is restarted, I would need to perform a cognitive face lookup. There is daily limit to that. And then there are the false positives.

Any other suggestions?


ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

Belgium
#1  

Did some more reading and googling. Adding an omron HVC-P2 would probably be the most powerful solution, but not a cheap one and the ability to have the detection and processing onboard, when I need a wifi connection to my PC anyway, seems a little wasteful.

There are countless API providers for face recognition, but they all impose limits/charge fees, and wont run locally or offline.

So I came across this: https://github.com/ageitgey/face_recognition

I have no tested it yet, but it provides offline/local face recognition from a command line. Seems very simple to use, you just provide it a jpg and it will search for a matching face in a folder with named pictures. Perfect for my purposes. Only mac and linux is offcially supported, but there are windows instructions and they do provide a VM or I could run it on a Pi. Interfacing with EZB should be a breeze, it just reads a jpg (snaphot) from disk, but triggering it and get results back to ezb, as well as adding new faces will require a plugin AFAICS, and Im not sure Im able to pull that off.

PRO
Synthiam
#2  

Use OpenCV in a plugin. There’s a very well supported offline face defect library built in. The OpenCV wrapper I recommend for ARC skill plugin available via nuget is emgucv

Lots of example source available via google

Here’s plugin tutorial: https://synthiam.com/Tutorials/UserTutorials/146/1

Here’s a very detailed emgucv tutorial that pretty much does all the work for you: http://ahmedopeyemi.com/main/face-detection-and-recognition-in-c-using-emgucv-3-0-opencv-wrapper-part-1/

All you’d need to do is create the template of an ARC skill plugin, attach to the camera to receive latest image frame, and process it. Add some buttons so users can customize their configuration, etc.

You can subscribe to the cameras tracking event and have the plugin operate like a tracking method but returning coordinates of the detected object (face). That way the ARC camera control does the heavy lifting for servo tracking and scripts, etc.. Means your plugin would merely only need to detect.

Belgium
#3  

Thanks, that looks interesting, but will take me some time to digest. I had already begun reading the plugin tutorial, and kudo's, its very well written, to the point where I think I might even manage (despite never having programmed much if anything - aside from arduino C, some PHP and well, basic on a trs80:). Oh and cobol back in uni. Am I showing my age ?:)

Adding opencv to that is going to stretch this to my limits, but hey, it seems like a good challenge and opportunity to learn.

PRO
Synthiam
#4  

Haha - nah, age is merely a number. Age++:D

One great thing about the community is no one is alone in their endevour - everyone's listening, even me. So if you start creating that plugin, remember that you can ask me or others (i.e. ptp) for assistance. I'm a decent programmer, but i'm not great. People like PTP are great programmers - i'm merely capable lol

Belgium
#5  

Oh, Im gonna need help. In fact, Im may need a brain upgrade as object oriented anything pretty much always causes syntax errors in my head. I tend to understand the most basic examples, but anything beyond that, my biological interpreter struggles with.. whatever was wrong with procedural programming? . But Ill try:)

PRO
Synthiam
#6  

You know - I had to go through that as well - the object oriented relearn part, years ago. The thing is, once it CLICKS.... it just makes sense and you never want to go back lol. But the breaking point for it to click is the hardest part. I felt dumb and incapable for such a long time when trying to learn object oriented programming until one day i woke up and it all made sense. Now i can't think about it any other way!

Belgium
#7  

Im already stuck on step 4 just trying to follow the tutorial. Probably due to a newer version of VS. In step 4 Im supposed to add a new windows form, but I dont see that option:

User-inserted image

The closest thing is the inherited form, but that fails because there is nothing to inherit from.

Anyway, just found a link to download VS2015 Ill try with that. Might be worth updating the tutorial and either link to VS2015 (https://go.microsoft.com/fwlink/?LinkId=532606&clcid=0x409) or maybe update it for VS2017 one day

Edit: no problems so far using VS2015

PRO
USA
#8  

@vertigo:

User-inserted image

Visual Studio 2017, maybe something is missing on your setup ?

User-inserted image