Face and person detection with Deepstack - local and free!

I was using this to seperate people from cars, etc. And give me different automation options. I have not been following for a while and looks like i have some reading to do. :slight_smile:

     person_in_driveway:
       friendly_name: Person in Drivway
       value_template: >
         {% set m = state_attr('image_processing.front_door', 'ROI person count') %}
         {{ m | float >= 1 }}

Obviously this does not work anymore. I realized some of my automations were failing. Anyone have a quick way to seperate counts based on target?

are sure that port 5000 is correct?
open a browser and point to the deepstack IP
for example: http://10.0.56.100:5000

do you get a website with deepstack image?

if not you are using the wrong port.
running it on nvidia jetson on 10.0.56.100 on port 80:

- platform: deepstack_face
    ip_address: 10.0.56.100
    port: 80
    timeout: 5
    detect_only: false
    save_file_folder: /config/www/faces
    save_timestamped_file: true
    save_faces: true
    save_faces_folder: /config/www/faces
    show_boxes: true
    source:
      - entity_id: camera.wohnzimmer_kamera
        name: face

yeah, no problem loading the webpage on 5000

I would really wanna know if you could train the colour detection / recognition. Have you found anything new on that?

Hi everyone,

I there a way to set file retention? to delete files older than x days?

Thanks!
Didi

You could use my custom component for this :https://community.home-assistant.io/t/imagelist-camera-integration-for-handeling-snapshot-files-camera-browse-move-delete-and-create-mp4-gif/272462

1 Like

I was actually looking at this earlier today :slight_smile: it looks great!! I’ll give it a shot.
Thank you very much sir!

Didi

Hi guys,

more then 1200 comments… What it is?!
Please answer me the simplest question: where is the managing UI? Just show me how to see the pictures of teached persons, how to change one of them if you have made and mistake in teaching?

PS
Hot ot at least remove a person?

Hi,

I’m using Deepstack for a while now, but I keep getting low res pictures for my snapshots :confused:
I’m using 4k cameras and getting horrible quality for the snapshots.
I’m using BI and running the process_imaging on that (so no direct rtsp to HA) could that be a problem? (very few pictures are with full res)

Thanks,
Didi

Hi,

I am running deepstack in a docker on Proxmox and HA in a VM. Deepstack works fine when running manual (using curl and returning the faces), but I am getting a 403 error when calling the image.processing.image command. See below the deepstack log, with the first the manual command and the second the call service command.

What am I missing? The state of image.processing stays unknown.

[GIN] 2021/07/18 - 22:49:19 | 200 | 462.093955ms | 192.168.2.200 | POST /v1/vision/detection
[GIN] 2021/07/18 - 22:49:58 | 403 | 52.38µs | 192.168.2.200 | POST /v1/vision/face/recognize

And when I try to register a face using (with detect_only=false):
service: image_processing.deepstack_teach_face
data:
name: Noor
file_path: /config/www/learn/noor/noor2.jpg

I get an unknown error response while deepstack shows a register:
[GIN] 2021/07/18 - 23:12:47 | 403 | 32.008µs | 192.168.2.200 | POST /v1/vision/face/register

Thanks!

There is no UI. To remove, you need to use the appropriate API commands

https://docs.deepstack.cc/face-recognition/#managing-registered-faces

While I’m here, is anyone actually getting any actual decent face recognition from Deepstack? I have been sending images from my doorbell to it, and basically, it’s a waste of time - most people get detected as me (even females that look absolutely nothing like me), so it’s a bit of a pity!

1 Like

I use docker, there is now command for it… Can i use JS via Node Red Function to manage it?

You can use this docker to manage deepstack.

works well, take a look

My experience has been similar.

Hi,

As far as I understand the activation of Deepstack is not needed anymore if you are using it on CPU or GPU. But I’m using it on NCS2 and now I can’t activate it. I think that the activation process generates some file which is stored locally and I want to find out where that file is or where the code responsible for generating the file is. Is there anyone who knows something about this?

Thanks!

is this component broken in 2021.7.4? I get error when i click check configuration in Home assistant? Anyone facing same issue?

image
EDIT: I removed the folder from custom_componets and reinstalled through HACS, seems to be ok now.

Hi, thanks robmarkcole for such a great custom component!
I have my install of deepscan working well with HA, but I was wondering if it’s possible to have differing detection areas for different targets on the same camera?
My use case is a driveway camera. I currently have the right 45% of image excluded as there is usually a car parked there, but there is a path in front that people will walk down to go to my front door. So essentially, I would like to have 100% of the image scanned for people, but only the left 55% for cars.

My current config looks like this

image_processing:
  - platform: deepstack_object
    ip_address: 192.168.55.252
    port: 80
    api_key: !secret deepstack_key
    confidence: 70
    save_file_folder: /config/www/deepstack/
    save_file_format: jpg
    save_timestamped_file: True
    always_save_latest_file: True
    scale: 0.5
    roi_x_min: 0
    roi_x_max: 0.55
    roi_y_min: 0.1
    roi_y_max: 1
    targets:
      - target: vehicle
      - target: person
      - target: car
        confidence: 60
    source:
      - entity_id: camera.driveway

I’ve tried simply having a second entity using the same camera, but that doesn’t seem to work as I don’t get any hits.

Thanks!

I installed HA in docker on machine 1 and got deepstack with deepstackui working on machine 2.
I also installed hacs component for deepstack_object with below configuration.yaml:
image_processing:

  • platform: deepstack_object
    ip_address: 10.0.0.20
    port: 5000
    timeout: 10
    save_file_folder: /config/www/deepstack
    save_file_format: png
    save_timestamped_file: True
    always_save_latest_file: True
    targets:
    • target: person
      confidence: 70
      source:
      #- entity_id: camera.amcrest_mediaprofile_channel1_mainstream
    • entity_id: camera.garage_cam_wyze

now when i ‘call service’ for image processing and look at state of my deepstack entity its still marked as ‘unknown’, it does not recognize any face, and directory for image file is empty. On machine 2 on deepstack docker log i see a call is made from machine 1 with below entry in logs:

[GIN] 2021/07/27 - 20:26:50 | 401 | 38.901862ms | 10.0.0.50 | POST /v1/vision/detection

what can i be doing wrong here? Thanks

Looks like I managed to work my issue out. By adding a name: field after the source camera, i am able to create two disparate entities using the same camera which outputs two different named images.