Face and person detection with Deepstack - local and free!

@rs443, Arh yes that could be a solution and then just do the count so it matches 4,5 minute and then if the sensor gets triggered again it will just start over.

Will look into that.

Another way could be to trigger an Input Boolean I guess and turn that on when motion is triggered, then another automation will be triggered every 30 second when the condition of the boolean is “on”:

  trigger:
    platform: time_pattern
    seconds: "/30"

Thanks…

1 Like

Me again…

Have anyone succesfully been able to retrieve only the name from the matched faces dictionary?
I just can’t get it working. I use the following:

{{ states.image_processing.face_recog.attributes.matched_faces }}

Which Returns: {Name; Confidende}

Isn’t it possible to only get the name?

I made a sensor :

  - platform: template
    sensors:
      deepstackface_gezichten_eruit:
        friendly_name: 'gezichten eruit trekken'
        value_template: '{{ states.image_processing.face_counter.attributes.matched_faces }}'

and in my automatsion, i use this : 

  - service: notify.telegram_bericht
    data_template:
      message: ""
      data:
        photo:
          - file: /config/www/deepstack_person_images_voordeur/deepstack_latest_person.jpg
            caption: Nieuwe Gezichten gevonden {{ ( states('sensor.deepstackface_gezichten_eruit').split(',')[0]|replace('}', '') |replace('{', '') |replace('[', '') |replace(']', '') |replace("'", '') ).split(':')[0] }} {{ ( states('sensor.deepstackface_gezichten_eruit').split(',')[1]|replace('}', '') |replace('{', '') |replace('[', '') |replace(']', '') |replace("'", '') ).split(':')[0] }} {{ ( states('sensor.deepstackface_gezichten_eruit').split(',')[2]|replace('}', '') |replace('{', '') |replace('[', '') |replace(']', '') |replace("'", '') ).split(':')[0] }}

This give’s only the names, only the first 3 names, you have to copy some line so if deepstack returns more matched_faces it wil show.

1 Like

I’m still trying to get deepstack running on my Unraid box again and I am still struggling.
I deleted the docker image and ran restarted everything fresh again.

While following the instructions I get to the command: curl -X POST -F image=@development/test-image3.jpg 'http://localhost:5000/v1/vision/detection'

And get the response: curl: (26) couldn't open file "development/test-image3.jpg"

Does anyone know how to resolve it? Other human detection apps are happily seeing local imagines and camera feeds on Home Assistant so I’m not sure why I am getting caught up.

Check this is the correct path from where you are issuing the command

Command is being issued in Unraid terminal.

Well the error is that the file can’t be reached at that path

Hi there - love this component! However I can’t seem toget it to scan periodically per the scan_interval. Current config is as follows:

image_processing:
  - platform: deepstack_object
    ip_address: 192.xxx.xxx.xxx
    port: 5000
    scan_interval: 20000
    save_file_folder: /home/homeassistant/.homeassistant/www/deepstack
    target: car
    confidence: 50
    source:
      - entity_id: camera.drivewaycam
        name: Car_Detection

with deepstack running in docker on my QNAP NAS using the following Docker command:

sudo docker run -e VISION-DETECTION=True -v /share/Container/mounts/deepstack/:/datastore -p 5000:5000 deepquestai/deepstack:noavx

which seems to run fine. When running a manual image processing check, I can see the following appear in the Docker container:


and an image is saved in my local save folder but it never seems to scan periodically per scan interval.

Any ideas? Thanks

Hi all
just released version 1.4 of the Deepstack object integration. This release adds the ability to use an API key to secure Deepstack, and also allows you to configure the timeout for requests.
Cheers

@robmarkcole thank you again for this component. Question: when insterting the API environment variable into the docker I see the deeptstack-object component has a provision to accept it.
How about deepstack-face? Since it’s the same docker will it connect?

I’ve not update the deepstack-face integration yet, but I am happy to receive a PR :slight_smile:

I updated (via HACS) The object component and now on reboot HA complains that Deepstack is not a valid module.

Are there any breaking changes?

as far as i can see deepstack is not a hacs installable thing,

@apt please create an issue on the repo with the full error message. cheers

good day @robmarkcole unfortunately I dont have the skills to tinker with your code. :grinning:

It is if you add it as a custom install :+1:t3:

Will do this evening when I get back from work.

Hi Rob, I managed to get the issue posted here:

https://github.com/robmarkcole/HASS-Deepstack-object/issues/50

Should be fixed in latest release

1 Like

Any plans moving it to HACS?

How do you update the deepstack container in docker - so I assure I run that latest?