ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

#97  

The "Data Load" has always been one of the hottest questions of any vision recognition because once you have something that works like ARC with it's object recognition or back in the day with my old EZ-Face or RoboRealm or with the Omron camera now, it sounds so handy to load a data set instead of the manual training interface.

While things like ARC, EZ-Face, RoboRealm are all examples of software the Omron camera is really a hardware solution, so that plays a part in if it would be doable or not.

When you run the demo program for the Omron the software is communicating with the Camera and the Camera is doing all the work, not the software, so when it recognizes a face it is actually the hardware of the camera doing the work and answering back telling the software on the computer what it saw.

So when you train a face with the Omron the hardware of the Omron has to be able to say "I understood what I saw and I accept what I saw" otherwise the Omron would report something like "Ptt, error, try again" (obviously that is not verbatim).

And it's the Omron camera hardware that does the math to make the picture that gets stored in the software database that is also synced with the Omron camera hardware.

I think it would technology possible to create a new software or plugin that could control the Omron Camera to do that tasks. I think it would be a complex project to undertake as well.

#98  

Hi Justin,

Thanks for the explanation. For now I will plan on loading faces manually using the Omron software. Hopefully with Boris' suggestions, I will be able to use scripting in the ARC. I will then use separate scripting to work with unknown faces based on gender and age. This way I will still get the interaction I want.

Ron

#99  

Hi Andy,

with this stranges "folder-copy" is funny way working.

So it´s also for me really interessting if it works also for you.

Boris

#100  

Hi Boris,

I will be trying your "folder-copy" soon. Work has me busy again.

I will definitely get back to you with the results. I will at least try the changing to the new version as soon as I can.

Thanks, Ron

#101  

Hi Andy,

no Problem!

Meanwhile i will play also a little bit the camera.

Boris

#102  

EDIT AGAIN! Boris, what you did in post #92 is correct but I think you listed the steps incorrectly. Because it makes it sounds like you are directing people to edit the file in the primary folder of: C:\Users\Public\Documents\EZ-Builder\Plugins\a9bdf8cb-7beb-4dc6-96cf-2fadfaaba8eb\EvaluationSoftware_v1.2.0\HVC-P\0\RegistData\000

And the data in the "UserInfo.dat" file is the stored results of your captured faces.


0
Boris
0,1,2,3,4,5,6,7

The information contained in the file as as follows: User ID: = 0 User Name you provided: = Boris The stored reference pictures you took: = 0,1,2,3,4,5,6,7

EDIT There is a new UserInfo.dat file created for each user trained. The first is in folder 000, the next is 001, the next would be 002 and each user get their own folder and their own UserInfo.dat file in each folder.

If you edit the last line to reflect "Boris" you will create an error and force the first picture stored and only that one to be used. This will lower your recognition rate.

#103  

So, what Boris said to do in post #91 and then in #92 is correct, but I think in post #92 Boris did not list the steps clearly. I'm going to re-write his directions here to update the plugin so that it works with the EvaluationSoftware_rev.2.4.1 version of the Omron software.

I have the older HVC-P1 and these steps works for me and my HVC-P1 as well. In fact it provides me with greatly improved results over the older EvaluationSoftware in the plugin because I was encountering a lot of recognition failures with the older software.

**HVC-P1 Owners - if you are not encountering issues, I would not bother with upgrading if you are happy with the results you have. These steps are for those that want to upgrade and or want the variable in ARC $Omron_Recognized_Name to display correctly for their HVC-P2 camera.

Step 1. Download the updated EvaluationSoftware_rev.2.4.1 software if you do not have it. You can get it from the Omron site here under Product Information tab and Evaluation Software: https://www.components.omron.com/mobile/hvc_p2?nodeId=40701010

Step 2. Extract the .zip file and try out the new HVCDemoE.exe program. You will also find an application called HVCDemo.exe which you can delete if you want because it is an Asian language version.

Step 3. Install the PlugIn for the Omron if you have not already done so. Make sure you install are required drivers for the Plugin. If you have already completed this, move to step 4.

Step 4. Locate the plugin folder, which should be located here under your Users\Public\Documents folder, depending on your version of Windows the location path might be a little different, under Windows 10 is should be: C:\Users\Public\Documents\EZ-Builder\Plugins\a9bdf8cb-7beb-4dc6-96cf-2fadfaaba8eb

Step 5. In the plugin folder, locate the folder named "EvaluationSoftware_v1.2.0", open this folder and delete all of the contents of it.

Step 6. Locate your folder named EvaluationSoftware_rev.2.4.1, open it and COPY all of the contents of this folder and then PASTE the contents in the now empty EvaluationSoftware_v1.2.0 folder which is in your plugin folder.

Step 7. Open the HVCDemoE.exe application which should now be in your plugin folder under the EvaluationSoftware_v1.2.0 folder.

Step 8. Set your options and do a test camera click to make sure you get good results. You may need to select the Transfer Image Size in the drop down if nothing is select. If your picture is sideways, the default camera view was set to 0 instead of 270, you will need to click on Setting in the application to adjust that.

Step 9. Under Settings in the application, click on the Maintenance tab click "Delete All Data" if you previously trained any face, this will clear out any data between the application and camera so all fresh data can be used.

Step 10. Under the Album tab of the application, go through the steps to train user faces. You can train up to 10 pictures per user stored. When you are finished click Save, when you are prompted for a location, save the .hac file as "EvaluationSoftware_v1.2.0.hac" in the root path of the plugin folder: C:\Users\Public\Documents\EZ-Builder\Plugins\a9bdf8cb-7beb-4dc6-96cf-2fadfaaba8eb You will also be asked to sync the data with the camera and you should do that as well.

Step 11. Click on the Main tab in the application and click on the camera to test recognition to see if it now displays names correctly for trained faces.

Step 12. Close the application.

Steps 13 and 14 will make a copy of the trained faces data and put them in a location so the plugin can make use of the name value, while step 15 through 17 edits the file(s) so the name will display in ARC.

Step 13. Locate the folder RegistData in the plugin folder and COPY the entire folder. The path is here: C:\Users\Public\Documents\EZ-Builder\Plugins\a9bdf8cb-7beb-4dc6-96cf-2fadfaaba8eb\EvaluationSoftware_v1.2.0\HVC-P\0\RegistData

Step 14: Paste the "RegistData" folder into the DB folder which is located here: C:\Users\Public\Documents\EZ-Builder\Plugins\a9bdf8cb-7beb-4dc6-96cf-2fadfaaba8eb\EvaluationSoftware_v1.2.0\DB

This makes a copy of the trained faced. **If you ever update any of the trained faces you will need to duplicate Steps 13 and 14 so the contents of the RegistData folder can be recopied.

Step 15: Locate the file named "UserInfo.dat" inside of your newly copied .EvaluationSoftware_v1.2.0\DB\RegistData\000 folder. The full path is C:\Users\Public\Documents\EZ-Builder\Plugins\a9bdf8cb-7beb-4dc6-96cf-2fadfaaba8eb\EvaluationSoftware_v1.2.0\DB\RegistData\000 Open this copy of UserInfo.dat by right clicking on it, select Open With then select Notepad as the application. If you are asked if you "ALWAYS" want to use this application for this file type do NOT check that option!

Step 16. You will see in the file the user ID, the name you gave the user and the number of picture you saved for the user. My file listed:


0
Justin
0,1,2,3,4,5,6,7,8,9

If you do nothing else, in ARC the values of last line are what would be read for the variable in ARC $Omron_Recognized_Name, in this case the variable would = 0,1,2,3,4,5,6,7,8,9

But it is important to note the variable $Omron_User_ID would still show the value of 0 because for me I was the first person or user I train so I get the ID of 0 so even without going further it would be possible to use the $Omron_User_ID value to recognize someone with IF THEN logic, which I believe David C. had previously stated would be possible (I'm just restating this for clarity).

So to correct the value for the variable $Omron_Recognized_Name, we need to edit the last lime of the file so that is reads:


0
Justin
Justin

After you edit the file, in Notepad, save it and close Notepad.

Step 17. Repeat steps 15 through 16 if you have additional trained users. Instead of folder 000, in .\EvaluationSoftware_v1.2.0\DB\RegistData\000 you would have folders named DB\RegistData\001, DB\RegistData\002, etc. And in each older would be a file named UserInfo.dat which would need to be edited.

Step 18. Open the HVCDemoE.exe program from your plugin folder to test the recognition again, it should work just the same because we did not alter the primary RegistData folder or UserInfo.dat file(s), we altered copied of them which the HVCDemoE.exe program should not be using directly.

Step 19. Open ARC, create a new project and add the Omron camera Control. Click on Configure button of the Omron Camera control in ARC to insure it is set correctly.

Step 20. Create a script to test the camera in ARC. You should add a Variable Watcher to your project as well, so you can see all the variables returned from the camera. You can refer to the test example from the plugin page or you can use mine which will continue to poll the camera for data until you end the script.

If you run my script below, the camera will be polled every 10 seconds to get a picture. It will keep a counter of how many time it has been polled as well as return a simple print statement for who is saw and their emotional state. If the camera saw no one it recognized by name, the print statement will say it saw no one.


$sCounter = 0

:loop

ControlCommand("Omron HVC-P", Omron_Detect_All)
 $sCounter = $sCounter + 1
 Print("Omron Camera Polled " + $sCounter + " Times.")

  If($Omron_Recognized_Name > "")
    Print("I saw " + $Omron_Recognized_Name + ". They were " + $Omron_expression + ".") 
  Else 
    Print("I saw no one.")
  EndIf 

 sleep(10000)
goto(loop)

Step 21. Special Optional Step If you ADD new users after the fact, you can either COPY the either start at Step 13 and copy the ENTIRE contents of the RegistData folder and follows the steps all the way through Step 17 to update the names

  • OR - you can locate the ./EvaluationSoftware_v1.2.0\HVC-P\0\RegistData folder and then locate the "User.dat" file and COPY it and PASTE a copy of it in the ./EvaluationSoftware_v1.2.0\DB\RegistData folder (this file holds a master copy of all the user IDs stored, if there is only one the file would include a single line of 000, if there was a second user the next number would be 001, etc).

Then go back to the ./EvaluationSoftware_v1.2.0\HVC-P\0\RegistData folder and COPY only the new users you have added such as folders 004, 005, 006, etc. (what every the folder names may be for you) and then PASTE a copy of only those missing folders in ./EvaluationSoftware_v1.2.0\DB\RegistData folder.

Then in each of those newly copied folders follow Steps 15 and 16 to update the names. That way you don't have to edit files you previously edited.

#104  

Boris and Justin thank you both for the procedure to get the face recognition info into ARC. This will now allow me to proceed with my Antonn projects. I appreciate your help.