Face and person detection with Deepstack - local and free!

My Synology DS218+ also has Intel Celeron J3355. Which docker image should I use?

As people write, in order for deepstack to work on Intel Celeron J3355, you need to deploy this image of deepquestai/deepstack:cpu-x5-beta. It doesn’t work with other images.

it worked. thanks a lot. i will try and implement automations now.
i have frigate and deepstack installed now.

thanks! but that didn’t seem to help. still nothing shows up in the Deepstack console after changing the config to what you suggested (substituting my IP address etc, of course)

I also tried deepstack trainer again but just get this error when trying to train a face:

this is the log from the trainer:

deepstack_trainer    | 2021-09-06 17:19:49.723 | INFO     | __main__:home:235 - loading default page
deepstack_trainer    | INFO:     192.168.1.228:55907 - "GET / HTTP/1.1" 200 OK
deepstack_trainer    | 2021-09-06 17:20:01.991 | INFO     | __main__:teach:140 - Start learning new face for: mike
deepstack_trainer    | 2021-09-06 17:20:01.992 | INFO     | __main__:allowed_file:59 - Validating file type
deepstack_trainer    | 2021-09-06 17:20:01.993 | INFO     | __main__:generate_file_name:87 - Renaming image name in order to avoid overwriting
deepstack_trainer    | 2021-09-06 17:20:01.993 | INFO     | __main__:SaveImage:64 - Saving the image to the file system
deepstack_trainer    | 2021-09-06 17:20:01.995 | INFO     | __main__:SaveImage:68 - File saved
deepstack_trainer    | 2021-09-06 17:20:01.995 | INFO     | __main__:teach:146 - Sending the image to deepstack server
deepstack_trainer    | INFO:     192.168.1.228:50967 - "POST /teach HTTP/1.1" 200 OK

not really sure why it’s not registering anything or what to do about it…

Do you have the deepstack client configured like this? If this is configured and does not work, then try to sort through different images, perhaps this image does not suit you.

image

How did you manage to run Frigate on your DS218+?
Tried myself for a couple week ago, but the CPU was running hot at 50-70% with just 1 camera!

What ffmpeg options do you use?

ok, i was missing the “http://” but after adding that, now i just seem to get a timeout error:

deepstack_trainer    | INFO:     Started server process [1]
deepstack_trainer    | INFO:     Waiting for application startup.
deepstack_trainer    | INFO:     Application startup complete.
deepstack_trainer    | INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
deepstack_trainer    | 2021-09-06 20:35:47.685 | INFO     | __main__:home:235 - loading default page
deepstack_trainer    | INFO:     192.168.1.228:62035 - "GET / HTTP/1.1" 200 OK
deepstack_trainer    | 2021-09-06 20:36:40.095 | INFO     | __main__:teach:140 - Start learning new face for: mike
deepstack_trainer    | 2021-09-06 20:36:40.095 | INFO     | __main__:allowed_file:59 - Validating file type
deepstack_trainer    | 2021-09-06 20:36:40.096 | INFO     | __main__:generate_file_name:87 - Renaming image name in order to avoid overwriting
deepstack_trainer    | 2021-09-06 20:36:40.096 | INFO     | __main__:SaveImage:64 - Saving the image to the file system
deepstack_trainer    | 2021-09-06 20:36:40.104 | INFO     | __main__:SaveImage:68 - File saved
deepstack_trainer    | 2021-09-06 20:36:40.104 | INFO     | __main__:teach:146 - Sending the image to deepstack server
deepstack_trainer    | 2021-09-06 20:37:40.151 | ERROR    | __main__:teach:160 - Unable to learn failed to process request before timeout
deepstack_trainer    | INFO:     192.168.1.228:64944 - "POST /teach HTTP/1.1" 200 OK

not sure if that’s an improvement or not :sweat_smile:

this is what my docker-compose.yml for the deepstack trainer looks like:

version: "3.7"
services:
  deepstack_trainer:
    image: techblog/deepstack-trainer
    container_name: deepstack_trainer
    privileged: true
    restart: always
    environment:
      - DEEPSTACK_HOST_ADDRESS=http://192.168.1.24:5001
      - DEEPSTACK_API_KEY=
      - MIN_CONFIDANCE=0.70
    ports:
      - "8080:8080"
    volumes:
      - ./deepstack-trainer/db:/opt/trainer/db #Database storing the uploaded photos data (Filename, Person name, Date).
      - ./deepstack-trainer/uploads:/opt/trainer/photos/uploads #Phisical path for storing the images

kindly confirm if we can have multiple camera sources connected to image processing? like the below:

image_processing:
  - platform: deepstack_face
    ip_address: 192.168.0.115
    port: 83
    timeout: 10000
    detect_only: False
    save_timestamped_file: True
    show_boxes: True
    save_file_folder: /config/www/deepstack/snapshots/
    save_faces: True
    save_faces_folder: /config/www/deepstack/faces/
    source:
      - entity_id: camera.ip_webcam
      - entity_id: camera.huawei_old
      - entity_id: camera.living_room
      - entity_id: camera.corridor
      - entity_id: camera.master_bed_room
      - entity_id: camera.saisha_s_room

Looking at the source code it seems so. But I’m not a Python dev, so can’t confirm it.


hi all!
I em from Russia.
sorry to my english lanage.
i need help!
my home assistent server link (httpS://192.168.1.81:8123)
and deepstack server link (http://192.168.1.3:5500)
Instal ty intel nuc sinology OS. inel j3450 (deepstack cpu-x5beta)


its my config configuration.yaml.
Deepstack face - no work
Deepstack object - work

You can check this → https://github.com/robmarkcole/deepstack-ui/issues/60

DivanX10 did a good job. :heart_eyes:

This is exactly how i use it, and it works great.
I have also set “name” for each camera, to have a better name on the front:

     - entity_id: camera.baksidan
        name: face_counter_baksidan

As that… this will give me a counter named “face_counter_baksidan” that will hold a number of faces detected… This will be cleared next time image_process is called…

Is there a dataset for Person detection with a specificity like CCTV camera installed on a 3 storeyed building?
Detection needs to be done at night time and people are mostly under the camera… Standard dataset or ExDark does not do the job in the way I want ed.

How would I go about having a tts notification to my Alexa to say welcome home to the persons face it recognizes?

I have tts with Alexa setup already.

hello sir how to send facial recognition image via telegram

Hi all
I am going to write a short article on the applications people have used this integration for. Some interesting examples I have seen:

  • Monitoring truck delivery activity in a brick factory in Latin America
  • Watching for intruding snakes in Thailand
  • Monitoring Amazon parcel deliveries
  • Checking that a motorcycle was locked up
  • Checking when a chicken laid an egg
  • Greeting people when they return home and playing a theme tune
  • Counting visitor numbers at a shop
  • Checking when a parking spot became available

Any more?

4 Likes

If I understand you correctly, I will post my automation options using Deepstack integration.

What can Deepstack do for me?

  1. Turn off the face recognition alarm and greet the hosts. Speech in Russian.

  2. Detect movement. I use it instead of motion sensors in the absence of a person in the house. Motion sensors react to animals, and a camera with a Deep stack allows you to eliminate false alarms on animals and respond only to people.

  3. Control the air conditioner. My wife likes a light coolness, but I like it colder. If there is a wife in the room, the climate will be 24 degrees, if there is me, it will be 21 degrees. If we are together, it will be 23 degrees.

  4. Control the lighting. I like the light less bright, my wife likes the light more bright. When the camera sees me, the light turns on with a brightness of 30%, when the wife, the brightness of the light is 70%, when we are together, then 50%.

In the plans, but not yet done yet. This is turning off the sound on the playing device if I answered an incoming call. I plan to do so. In Russia, we have our own smart speaker with a Yandex Alice voice assistant, an analogue of your Alexa. Our speakers can play the same music in all rooms where there are speakers. If I am in any room and if I answered an incoming call, the music will stop playing in that room.

Текст на русском (Text in Russian)

Если я вас правильно понял, то выложу свои варианты автоматизации с применением интеграции Deepstack.

Что Deepstack у меня умеет делать?

  1. Выключать сигнализацию по распознаванию лицу и приветствовать хозяев

  2. Детектировать движение. Использую вместо датчиков движения в отсутствие человека в доме. Датчики движения реагируют на животных, а камера с Deepstack позволяет исключить ложное срабатывание на животных и реагировать только на людей.

  3. Управлять кондиционером. Жена любит легкую прохладу, а я люблю похолоднее. Если в комнате будет жена, то климат будет 24 градуса, если буду я, то будет 21 градус. Если мы будем вместе, то будет 23 градуса.

  4. Управлять освещением. Я люблю свет менее яркий, жена любит свет более яркий. Когда камера видит меня, то свет включается с яркостью 30%, когда жена, то яркость света 70%, когда мы вместе, то 50%.

В планах, но пока не сделал еще. Это выключение звука на играющем устройстве, если я ответил на входящий вызов. Планирую сделать так. У нас в России есть своя умная колонка с голосовым помощником Яндекс Алиса, аналог вашей Алексы. Наши колонки умеют играть одну музыку и во всех комнатах, где стоят колонки. Если я нахожусь в какой либо комнате и если я ответил на входящий звонок, то музыка прекратит играть именно в этой комнате.

2 Likes

Hey all, I’ve got an issue when I’m running deepstack and do an image processing scan from dev tools it’s taking over a minute for the detection. If I try the detection from say agent nvr it’s 100-200ms. Any ideas?

I’m wanting to use frigate for object detection and when a person is detected run facial recognition.

im running Deepstack on a Jetson Nano and frigate on a Home Assistant VM

Try different versions of the images deepstack. Not always one version can work well on all machines. One image may have drivers for virtual machines, while others do not have the necessary driver and will not work on a virtual machine, and the images are divided into categories: for the processor, for the video processor, for jetson. Search for your working image by brute force

Текст на русском (Text in Russian)

Попробуйте разные версии образов deepstack. Не всегда одна версия может работать хорошо на всех машинах. В одном образе могут быть драйвера для виртуальных машин, а в других нет нужного драйвера и не будет работать на виртуальной машине, а также образы делятся по категориям: для процессора, для видеопроцессора, для jetson. Ищите свой рабочий образ методом перебора

Thank you :heart: . Reading this you left me a bit I say a bit, too impressed, can I also reach these results?