So I have been trying to get face recognition working for a couple weeks now. I burned up my first LifeCam HD-3000 with a crappy USB Hub, it also took out my Xbox Kinect 360, it was dark days... I was able to get a new Kinect the same day for $25 from a local game store, I had to order a new LifeCam which came yesterday. So I started up this work again. The issue I have been having is that when I attempt to train via the OpenCV feed it does not populate photos into the training folder. It actually will lock up the OpenCV tab I have open and I seem to have to restart MRL to get everything back again. So, I am using a super simple script to start up OpenCV:
opencv = Runtime.createAndStart("opencv","OpenCV")
opencv.addFilter("pdown","PyramidDown")
opencv.setDisplayFilter("pdown")
opencv.capture()
I then add the filter Face Recognition (facerec) from the OpenCV tab. I then select opencv.facerec for input.
I added my name in Name and clicked Train. If I do it fast enough it doesn't lock up OpenCV otherwise it does. This is what my screen looks like:
When I look in the training folder it is empty... I am not sure exactly what format you need to have for the ones you add into that folder so it will properly learn from other photos, but that may be helpful to know.
So when I look at the log this seems to be what is happening behind the curtain:
12:57:32.858 [opencv_videoProcessor] INFO c.myrobotlab.opencv.OpenCVFilter - Training Mode for Kyle.
12:57:33.173 [AWT-EventQueue-0] WARN c.myrobotlab.opencv.OpenCVFilter - No image filter file found. /Users/kyleclinton/Documents/MyRobotLab/src/resource/facerec/Filter.png
12:57:33.173 [AWT-EventQueue-0] INFO c.myrobotlab.opencv.OpenCVFilter - Using /Users/kyleclinton/Documents/MyRobotLab/training for training data.
12:57:33.244 [AWT-EventQueue-0] INFO c.myrobotlab.opencv.OpenCVFilter - No labeled images loaded. training skipped.
If anyone has any pointers on how I can either train with images taken from elsewhere and placed into the training folder OR if there is a step I am missing on training with the openCV video feed. I would really like to be able to have Junior use training when talking to someone. Then be able to recognize their face when they see them again. I am thinking I would have it change the predicate in ProgramAB once it has figured out their name and done the openCV Face Recognition Train. It seems that something is just not flowing right and I can't seem to figure it out what I am missing from watching kwatters how-to video or blog posts.
Any help is appreciated!
Kyle
My Log
09:08:28.008 [main] INFO c.m.s.Runtime [Runtime.java:1205] -service webgui WebGui log Log cli Cli gui GUIService python Python -fromAgent
09:08:28.022 [main] INFO c.m.f.Service [Service.java:988] getMessageSet loading 251 non-sub-routable methods
09:08:28.025 [main] INFO c.m.f.Service [Service.java:1453] cfg file /Users/kyleclinton/Documents/MyRobotLab/.myrobotlab/runtime.json does not exist
09:08:28.102 [main] INFO c.m.f.r.ServiceData [ServiceData.java:78] try #1 loading local file /Users/kyleclinton/Documents/MyRobotLab/.myrobotlab/serviceData.json
09:08:28.129 [main] INFO c.m.s.Runtime [Runtime.java:1675] ============== args begin ==============
09:08:28.134 [main] INFO c.m.s.Runtime [Runtime.java:1687] jvmArgs [-Djava.library.path=libraries/native, -Djna.library.path=libraries/native]
09:08:28.135 [main] INFO c.m.s.Runtime [Runtime.java:1689] args [-service, webgui, WebGui, log, Log, cli, Cli, gui, GUIService, python, Python, -fromAgent]
09:08:28.135 [main] INFO c.m.s.Runtime [Runtime.java:1691] ============== args end ==============
09:08:28.136 [main] INFO c.m.s.Runtime [Runtime.java:1693] ============== env begin ==============
09:08:28.140 [main] INFO c.m.s.Runtime [Runtime.java:1698] DYLD_LIBRARY_PATH='pwd'/libraries/native:'pwd'/libraries/native/x86.64.mac:${DYLD_LIBRARY_PATH}
09:08:28.141 [main] INFO c.m.s.Runtime [Runtime.java:1698] PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
09:08:28.141 [main] INFO c.m.s.Runtime [Runtime.java:1698] JAVA_ARCH=x86_64
09:08:28.141 [main] INFO c.m.s.Runtime [Runtime.java:1698] TERM=xterm-256color
09:08:28.142 [main] INFO c.m.s.Runtime [Runtime.java:1698] LANG=en_US.UTF-8
09:08:28.142 [main] INFO c.m.s.Runtime [Runtime.java:1698] LOGNAME=kyleclinton
09:08:28.142 [main] INFO c.m.s.Runtime [Runtime.java:1698] TERM_PROGRAM_VERSION=361.1
09:08:28.142 [main] INFO c.m.s.Runtime [Runtime.java:1698] PWD=/Users/kyleclinton/Documents/MyRobotLab
09:08:28.143 [main] INFO c.m.s.Runtime [Runtime.java:1698] XPC_SERVICE_NAME=0
09:08:28.143 [main] INFO c.m.s.Runtime [Runtime.java:1698] _=/usr/bin/java
09:08:28.143 [main] INFO c.m.s.Runtime [Runtime.java:1698] JAVA_MAIN_CLASS_9776=org.myrobotlab.service.Agent
09:08:28.144 [main] INFO c.m.s.Runtime [Runtime.java:1698] JAVA_MAIN_CLASS_9777=org.myrobotlab.service.Runtime
09:08:28.144 [main] INFO c.m.s.Runtime [Runtime.java:1698] SHELL=/bin/bash
09:08:28.144 [main] INFO c.m.s.Runtime [Runtime.java:1698] TERM_PROGRAM=Apple_Terminal
09:08:28.145 [main] INFO c.m.s.Runtime [Runtime.java:1698] SECURITYSESSIONID=186a7
09:08:28.145 [main] INFO c.m.s.Runtime [Runtime.java:1698] OLDPWD=/Users/kyleclinton/Documents
09:08:28.145 [main] INFO c.m.s.Runtime [Runtime.java:1698] USER=kyleclinton
09:08:28.146 [main] INFO c.m.s.Runtime [Runtime.java:1698] TMPDIR=/var/folders/vd/vkd5tc_54sj5n1frff8_1b2h0000gn/T/
09:08:28.146 [main] INFO c.m.s.Runtime [Runtime.java:1698] SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.CiybPIUmnf/Listeners
09:08:28.146 [main] INFO c.m.s.Runtime [Runtime.java:1698] XPC_FLAGS=0x0
09:08:28.146 [main] INFO c.m.s.Runtime [Runtime.java:1698] TERM_SESSION_ID=FC4E2B44-ECB6-490C-A153-AD88286A5FE7
09:08:28.147 [main] INFO c.m.s.Runtime [Runtime.java:1698] __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
09:08:28.147 [main] INFO c.m.s.Runtime [Runtime.java:1698] Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.rcIMw9ftZO/Render
09:08:28.148 [main] INFO c.m.s.Runtime [Runtime.java:1698] com.apple.java.jvmTask=CommandLine
09:08:28.149 [main] INFO c.m.s.Runtime [Runtime.java:1698] SHLVL=1
09:08:28.150 [main] INFO c.m.s.Runtime [Runtime.java:1698] HOME=/Users/kyleclinton
09:08:28.152 [main] INFO c.m.s.Runtime [Runtime.java:1700] ============== env end ==============
09:08:28.152 [main] INFO c.m.s.Runtime [Runtime.java:1704] ============== normalized ==============
09:08:28.153 [main] INFO c.m.s.Runtime [Runtime.java:1705] 2016/11/24 09:08:28 - GMT - 2016/11/24 15:08:28
09:08:28.164 [main] INFO c.m.s.Runtime [Runtime.java:1706] Pid 9777
09:08:28.164 [main] INFO c.m.s.Runtime [Runtime.java:1707] ivy [runtime,x86.64.mac]
09:08:28.165 [main] INFO c.m.s.Runtime [Runtime.java:1708] os.name [Mac OS X] getOS [mac]
09:08:28.165 [main] INFO c.m.s.Runtime [Runtime.java:1709] os.arch [x86_64] getArch [x86]
09:08:28.165 [main] INFO c.m.s.Runtime [Runtime.java:1710] getBitness [64]
09:08:28.166 [main] INFO c.m.s.Runtime [Runtime.java:1711] java.vm.name [Java HotSpot(TM) 64-Bit Server VM] getVMName
Hey Kyle, I recognize you !
Hey Kyle,
I recognize you ! Nice OpenCV is running at least.
Geeze, a Mac ? Seems a bit masochistic, but ok..
Did you make any progress, I saw some comments between kwatters and you but don't know if your still stuck.
Mebbe it recognizes you as "null" .. oh hail the mighty /dev/null ! :)
Some Progress has been made
I am able to train Face Recognition when I run MRL through eclipse, but from the latest build or what was the latest build a few weeks ago 1.0.1786 I am not able to do training. The interesting difference I see that in the version that works face detect seems to also see eyes and mouth and adds boxes around those as well as my head in the 1786 version I only get outlines square for my head. Not sure if that will lead me to finding the issue or not but that is what I have found so far. I hope to get a little bandwidth to work on this again in the next couple days but since my vacation is over I have a few other priorities taking up my time.
seccond user
You have to train at least 2 different faces to work with recognition.
Train another user from picture etc..