Ez-face

JustinRatliff

USA
robot video thumbnail

EZ-Face is the first in what I plan to develop into a suite of supporting application for ARC and other robotics applications. EZ-Face performs multiple face recognition. It has a interface for training faces and assigning names. When the application sees faces that are recognized the names are displayed and visually you'll see boxes around the faces with the names assigned. If a face is detected but not recognized there will be a display of a box around the face with no name. The more pictures of a face you train, the easier it is for the application to recognize a face.

User-inserted image

This is a stand alone application developed in C# under Visual Studio.NET 2013. You should have .NET framework 4.5 and it is for Windows7 and Windows8.x systems.

This project showcase explains the technology behind the application and highlights development milestones.

Technology: Developed in .NET Visual Studio 2013 (you can use express versions with the source code) Designed to work with ARC but could be integrated into other software or robotic systems Is a standalone application Is open source, source code is included Uses emgu cv wrapper for .NET (Open CV)

Resources: (Things I found helpful in creating the application) ARC Telnet interface tutorial (Enable Telnet as the first part Shows, this is used to test communications manually to ARC via TCP/IP): https://synthiam.com/Tutorials/Help.aspx?id=159 If you do not have Telnet installed on your system go to this site: http://technet.microsoft.com/en-us/library/cc771275 ARC SDK Tutorial 52: https://synthiam.com/Community/Questions/4952&page=1 ARC script for listening to the TCP/IP port for variables: https://synthiam.com/Community/Questions/5255

Acknowledgements: DJ Sures, for making EZ-Robot and ARC so robust Rich, for his help with ARC scripting Sergio, for his emgu cv examples

Basic Usage Direction (after download and install): 1.) Open ARC and load the included EZ-Face example 2.) Click on the Script start button (this sets up the communications from the ARC side of things) 3.) Open the EZ-Face application 4.) Refresh your camera list (click the button) 5.) Select your camera (in the drop down list) 6.) Click the "1. Detect and recognize" button 7.) Train at least one face 8.) Change the local address and port number as needed (the local IP address may not be your computer's address - you can enter "localhost" and leave the port set to 6666 unless you changed that setting in ARC) 9.) Click File and select Save User Settings (to store your changes) 10.) Click Connection (this opens the communication line to ARC from the EZ-Face app side 11.) Allow EZ-Face to recognize the face you trained - then with your computer speakers turned on ARC should speak "Hello (the name of the face you trained)" 12.) If the example work - integrate in your EZ-Robot applications as you see fit

Tips: 1.) If after training several faces if you get false recognition of faces (faces recognized with the wrong name) - to correct this you should train the incorrectly recognized faces with the correct name. After a couple of training pictures are stored the accuracy of the face recognition will improve. 2.) Do not train faces with one camera, then switch to another camera for face recognition - recognition accuracy will drop.

Using Two Cameras: What I found worked best was to start ARC, select the camera I wanted and started the camera feed, then I started EZ-Face. If I reverses the process (even though I was selecting a different camera) I would get a black image in ARC.

2.26.14 Update: I still have several improvements I want to make before I upload the first public version of the application.

3.2.14 Update: The first public version is ready for release and is posted at the link below. This version has many user improvements to allow you store many settings, including http and port address, camera device, logging of faces in a text file (up to 1mb of data before the file auto deletes), face variable output to ARC, face training and more.

3.3.14 Update: I updated the script, version 3.3.14 has the HTTP server panel (which is not used - you don't need to start it) but it does show you your computer's IP address so you can enter it in EZ-Face. Remember to save your settings under the File Menu. I also changed the script so it will no only speak for variable values greater than "" or NULL.
EZ-Face3.3.14.EZB

3.7.14 Update: I updated the EZ-Face application: "localhost" is now the default address, new option for auto connect, functions to receive commands from ARC or other 3rd party application to stop and start the camera feed within EZ-Face. There is also a new ARC project with several new scripts to test out the functions. Please go to my site to download the latest version. You will also find a video there that demonstrations the new functions and provides directions for setup and usages.

Download: The latest version will be published here: http://www.j2rscientific.com/software For support and reporting any errors please use the ContactUs feature from http://www.j2rscientific.com with the subject line "EZ-Face".

I welcome any and all feedback!
Thank you

By — Last update
Jump to end

ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

Brazil
#97  

when I try that I get a Black screen on the second program I run (in that case EZ-FAce)... no matter if I select different cameras to different programs! I'm wondering if is there a set on Windows that allow both to be used... I could not find that.

I am using a Lifecam, that is HD, and a simple logitec webcam. My last guess is about the system power tho handle both.. because it is an ITX onboard..

I saw your question about Start, Stop camera on EZ-B... I was thinking about that too. If I could Stop the camera on EZ-B, mabe the camera on EZ-face would start automatically, and, as soon as the recognition variable was sent, it would restar the cam on EZ-b (it's not a very fast way.. but, do you think it would work ?!?!)

The other possibility, And I think you have think about that is to grab the JPG on ARC, make it send to EZ-face, Get the recognition and send the $FaceName back... In that way only the cam on EZ-b would be needed... Well, i'm not a programer... so don't mind if my logic fails.. LOL

Brazil
#98  

and, when I try to toggle the programs using the same camera, I get this error message.. ~

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text ************** System.NullReferenceException: Error: Unable to create capture from camera1 at Emgu.CV.Capture..ctor(Int32 camIndex) at MultiFaceRec.FrmPrincipal.button1_Click(Object sender, EventArgs e) in c:\BotBrain\EZ-Face\MainForm.cs:line 94 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5477 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

MultiFaceRec Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/BotBrain/EZ-Face/bin/Debug/MultiFaceRec.exe

System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

Emgu.CV Assembly Version: 2.2.1.1150 Win32 Version: 2.2.1.1150 CodeBase: file:///C:/BotBrain/EZ-Face/bin/Debug/Emgu.CV.DLL

Emgu.Util Assembly Version: 2.2.1.1150 Win32 Version: 2.2.1.1150 CodeBase: file:///C:/BotBrain/EZ-Face/bin/Debug/Emgu.Util.DLL

System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

Emgu.CV.UI Assembly Version: 2.2.1.1150 Win32 Version: 2.2.1.1150 CodeBase: file:///C:/BotBrain/EZ-Face/bin/Debug/Emgu.CV.UI.DLL

DirectShowLib-2005 Assembly Version: 2.1.0.0 Win32 Version: 2.1.0.0 CodeBase: file:///C:/BotBrain/EZ-Face/bin/Debug/DirectShowLib-2005.DLL

System.Core Assembly Version: 3.5.0.0 Win32 Version: 3.5.30729.5420 built by: Win7SP1 CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll

************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

<configuration> <system.windows.forms jitDebugging="true" /> </configuration>

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

#99  

@tevans - The failure would kick out if EZ-Face is trying to use a camera already in use or one no longer connected or one that can not be initialized.

>>and, when I try to toggle the programs using the same camera, I get this error message.. Again, you can not use one camera in the two applications at the same time.

As I previously asked, can you use these your two cameras at the same time in other application?

#100  

Try this, open two instances of ARC with different projects that use the camera. In each project, select a different camera and start it. You should get two separate video feeds, one in each instance of ARC. That just worked for me, here is a picture of my results.

User-inserted image

#101  

3.7.14 Update: I updated the EZ-Face application: "localhost" is now the default address, new option for auto connect, functions to receive commands from ARC or other 3rd party application to stop and start the camera feed within EZ-Face. There is also a new ARC project with several new scripts to test out the functions. Please go to my site to download the latest version. You will also find a video there that demonstrations the new functions and provides directions for setup and usages.

User-inserted image

Download from: http://www.j2rscientific.com/software

Demo and Instructions:

@DJSures - Big thank you for the help with the scripts and receive variable example! :D

Brazil
#102  

well my dear friend... the issue with do not getting image from two cameras on two different programs really seams to be with my week itx onboard computer... I could not put those to work! I'll try to see if some set up in windows is blocking it, but, since i'm more familiar with MAC OS, if someone could help me to find that, i would thanks very very much.

in the meanwhile i'll try to merge the scripts you put together and see if my computer can respond fast enough. if so, I think I will not need of a second camera after all... I'll send you any results, ok ? thanks again, to you and all the masters helping this project ! you ROCK!

Australia
#103  

Hi Justin , Just watched the video , Seen the new functions added and script examples.

Exactly what we needed , this extra control of opening , closing , start , stop , means now we have the flexability with EZ Face to use one camera:)

Totally Awesome Amazing work.

I just wanted to add , THANK YOU FOR SHARING THIS WITH US !

Hais. ps. Could not see a Donate link on your website:)

#104  

Thank you for this update. With all script examples and auto connect, now we can use a one camera. Everything is ok. Thanks for this beautiful job.