robmarkcole / HASS-Deepstack-face

Home Assistant custom component for using Deepstack face recognition
https://community.home-assistant.io/t/face-and-person-detection-with-deepstack-local-and-free/92041
MIT License
218 stars 68 forks source link

Teach face service ( home assistance ) #47

Closed malajam closed 3 years ago

malajam commented 3 years ago

hi i am trying to add faces but i am getting this error :

Failed to call service image_processing.deepstack_teach_face. extra keys not allowed @ data['sequence'][0]['file_path']. Got '/config/www/faces/moh_1.jpg' extra keys not allowed @ data['sequence'][0]['name']. Got 'mohammed'

the service code :
service: image_processing.deepstack_teach_face name: mohammed file_path: /config/www/faces/moh_1.jpg

there is no spaces and yamle is typed not copy & paste adding { or " or ' give me the same error

mi4mac commented 3 years ago

It has to look like that ...

service: image_processing.deepstack_teach_face data: name: name file_path: your_path

malajam commented 3 years ago

Hi thanks for your reply and your time

i tried it but i am getting another error related to  Directory ( the path is correct , i do not know where is the mistake ) + extra key not allowed :

Failed to call service image_processing.deepstack_teach_face. expected dict for dictionary value @ data['sequence'][0]['data']. Got None extra keys not allowed @ data['sequence'][0]['file_path']. Got '/config/faces/moh_1.jpg' extra keys not allowed @ data['sequence'][0]['name']. Got 'mohammed'

the code :

service: image_processing.deepstack_teach_face data: name: mohammed file_path: /config/faces/moh_1.jpg

i tried many formats and all returned the same error 

service: image_processing.deepstack_teach_face data: "name": "mohammed" "file_path": "/config/faces/moh_1.jpg"

and also :

service: image_processing.deepstack_teach_face data: name: 'mohammed' file_path: '/config/faces/moh_1.jpg'

and :

service: image_processing.deepstack_teach_face data: name: "mohammed" file_path: "/config/faces/moh_1.jpg"

paulmro commented 3 years ago

same here :(

service: image_processing.deepstack_teach_face data: name: 'paul' file_path: '/media/deepstack/snapshots/paul/paul.jpg'

Failed to call service image_processing.deepstack_teach_face. Unknown error

ASTPlatinum commented 3 years ago

I'm not the only one then, same here.

interbiznw commented 3 years ago

Yea not working here either, but everyone posting YAML in non code blocks is not likely helpful as the formatting can be removed.

to post blocks of code such as yaml use 3 taps on the back ticks key ` and yaml. like this: image (before the number one on top row) then type code, then another 3 taps of the backticks key

it will put the code in proper formatting and look like this image

with an end result of :

service: imaginary_service.run_me
data:
  name: 'name here'
  file_path: '/path/goes/here/image.jpg'
robmarkcole commented 3 years ago

Please tryout the latest release which improves this service