Correct config. Yes I will also use automations to only classify images when needed
Thank you. I updated to HA 0.69 and put back your un-modified v0.2 facebox.py.
working fine.
First of all great work. I am finding my way now in home assistent after using domoticz. What i ve been searching for for like 20 hours of browsing, i think this will help me to do what i want. I have a danalock v3 zigbee protocol. Working fine. So i can use my phone to open the lock, or by HA, and i ve ordered two zigbee remotes. But thats not what home automation is about ;-). I explored two options: for my kids during some hours of the day face detection for home entry and fingerprint entry. Fingerprint entry (reader to HA) waterproof and under 100 euro is possible only very ancient and hackable protocols (i know nobody will hack my system at 3 o clock in the afternoon when i am home). So option two, but after exploring rekocnition from amazon, and checking all possible videobells compatible with HA and 1000 other possibilities. Here it is. Keep up the good work!
For those setting up āmanual scanningā the config is:
- service: image_processing.scan (as opposed to image_processing.service_scan)
entity_id: image_processing.facebox_saved_images
@robmarkcole Rob, as you probably already know (since you created the teach.py script - thank you) when you re-start the container whilst using the free tier the taught faces are lost.
To address this I created this automation to try and auto-load the faces on container restart.
https://hastebin.com/utaboruhuy.bash
However, container re-start is so fast that sensor off state isnāt captured. Any Ideas?
Thank you.
Iām pretty sure you can save a faces file and then load that at restart, rather than performing the training again
Yes you can on the paid tier. This is the variable
MB_FACEBOX_STATE_URL
It reloads the faces file, but you canāt download it on free tier
@juan11perez yes appears FacePrints arenāt available on free tier.
If Iāve understood correctly, youāve setup an automation which you want triggered when the sensor state is none
, as happens when the FaceBox API is unavailable?
@robmarkcole yes thatās right. I set up a simple ping, but doesnāt do the job.
The command sensor doesnāt turn off.
Is there another event that can trigger it?
Yes I see the problem. Iāve searching the docs to see if theres a way to query the number of trained faces or query the container uptime, but I donāt seen anything. You?
Might be worth querying the FacePrint endpoints to see what response you get (Iām on holiday with only a work laptop and no Machinebox access)
Rob, apologies. This can obviously wait.
I think I found the solution. There is a curl command for āsimilar facesā which returns a json. All we have to do is point it to our own file with one of the faces weāre teaching and if the face is there it returns the name of the face. Since weāre comparing to the actual face weāve taught it then itās either there or not.
This is my command with the output:
Problem solved Btw are you restarting your Machinebox often for a particular reason?
@robmarkcole again thank you for your help. Created the workaround based on your suggestion to query the container. (faceprint is not accessible in any way on free tier)
I have documented my process for reference - https://hastebin.com/tecatuhani.http
Not frequently restarting the container; however, In the event of reboot docker-compose is restarting everything and facebox will loose its content. I usually reboot once a week on a cron.
Thanks for the share. Are you happy to add your helper script to the same repo as the training script? I think it will be useful to group helpful scripts together
@juan11perez would you be interested in writing up your TTS/face detection setup as a project on Hackster.io? Iād be happy to help, and would be great to have a good write up of use to coincide with release of component in 0.70.
Ok Rob, have a look at the draft. No sure if we add the re-load faces process.
Thanks @juan11perez great start, I would suggest adding a section on why we do this, what problem we are trying to solve. Also some images and backstory are always nice. I suggest we move this conversation off this thread now. If you have an account on Hackster you can continue the work there and invite me as a collaborator.
Cheers
Rob, added the draft and sent you a note
Hi there, i have some performance / stability issues. Here we go: i have a synology ds218+ running home assistant 0.69.1 stable on docker. Running yardstick-facebox1 (other version had port issues - mentioned above by peteonus - with port 8080 i could not resolve, remapped them several times tried a lot of things, but still not working). Yardstick-facebox-1 runs smooth so no problems on my synology. I have a Dahua camera above my front door with face recognition (call it face tracking) it makes a photo of a persons face when in the specified facial area. It then puts the jpg file on the synology server. With Robās great manual on github I installed folder watcher, the input text ālast added fileā, the automation template action: data template etc, the shell command and the last automation action in the HA files works flawless. Every (last) face is presented in HA. Last stap facebox authentication proces. As I pointed out facebox working, with Robās script uploaded a few faces and checked them in the console. Working again got 0 % on the beatles ;-). Somehow uploading large jpgās did not work had to downsize them. Now I installed HASS 0.70 0.b1 beta and entered Robs component in the config.yaml after a reboot (and copying the old configuration file) i got huge performance issues. Donāt know if it is because of the facebox interactions or the beta version of hassā¦ but I am allmost there so i would appreciate a little advice. Is there a way to get this working in 0.69 is there a complete pythonscript for 0.69? Thanx all