Person and face detection using image_processing with Sighthound

@StefanoGiu You must be using quite an old version of the custom integration? draw_box import was changed a while back

@droidblast you need to force home assistant to update its dependencies

@robmarkcole
I have the latest version of HA… 0.108.6… how can I force the update of image_processing ?

I fixed it. Your custom component now loads properly (I had an old version of it).

However, I cannot get any face/person recognized and I don’t have errors in the log… :frowning:

What’s wrong with images coming from my cameras?

Any help/Idea? @robmarkcole

Rob, how are you. Thank you for the magic repositories :slight_smile:

I tested aws and sighthound integrations, and does´nt work

The same error:

[homeassistant.components.image_processing] Error on receive image from entity: Unable to get image

I am running ubuntu 18.04.3 LTS with docker in a i7 with 8gb of memory. Hassio version 0.108.8. HACS version 0.24.2

I tried with 2 different cameras. This cameras work well because I can see in a picture entity

What could be the issue?

Regards!

@robmarkcole getting some mixed results with sighthound now that its part of home assistant, was working ok as a community add on. Have rechecked the config and cant find any issues photo attached is the logs with a error. Using ffmpeg_motion to triggered which it does then a automation

- id: '1582962910089'
  alias: 7 Motion Trigger SightHound
  description: ''
  trigger:
  - entity_id: binary_sensor.study_camera_motion
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: image_processing.sighthound_study_cctv
    entity_id: image_processing.sighthound_study_cctv
    service: image_processing.scan
  - data:
      entity_id: counter.people_counter
    entity_id: counter.people_counter
    service: counter.increment

Logger: homeassistant.helpers.entity
Source: components/sighthound/image_processing.py:99
First occurred: 7:09:22 PM (9 occurrences)
Last logged: 7:19:12 PM

Update for image_processing.sighthound_study_cctv fails

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/image_processing/__init__.py", line 132, in async_update
    await self.async_process_image(image.content)
  File "/usr/src/homeassistant/homeassistant/components/image_processing/__init__.py", line 112, in async_process_image
    return await self.hass.async_add_job(self.process_image, image)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/sighthound/image_processing.py", line 99, in process_image
    people = hound.get_people(detections)
  File "/usr/local/lib/python3.7/site-packages/simplehound/core.py", line 70, in get_people
    for obj in detections["objects"]:
TypeError: 'NoneType' object is not subscriptable

Issue is its not updating the photo?

This is actually an issue on the simplehound dependency. Its a couple of hours work to fix it, if your interesed?

Sure Rob I think the Sighthound is a great addition to have running.

Rob what happens when you exceed the 5000/month?

Developer 5,177 / 5,000 Active May 19, 2020 6AM

I’ve never reached that limit. I assume you will get an error message (should show in the logs), please let me know

Is this CC or the official integration working? Was this CC still the only one doing facial recognition or is that now also in the official integration somehow using folder watcher?

Ive archived the CC. It was putting a box around faces, but not doing recognition. There are several integrations that focus on recognition

Yes ii saw your statement there. Thanks for the clarification and thanks for your hard work on other CC’s. I did see an interesting long thread on a frigate docker for pattern recog but that seemed to prefer a Corel machine learning stick which isn’t that easy to acquire here. I think my old 2011 sandy bridge and old Nvidia card might be a limitation. Not a necessary component for me but it would have been nice to set up a"ring"style door bell.

Well the benefit of cloud is there is no dependency on hardware, and most cloud services offer quite a generous ‘free’ tier (as they make most of their income from enterprise).

Yes that’s why I was looking at your CC and the official integration. Let Somebody else do the heavy lifting. Although I suppose the free tier is helping them train their own machine learning/models. I will search around for the other integrations you mentioned

Thanks again for your help and work on the Hue CC

Hi Rob, granted this is an old thread but i’ve got a question. I’m looking at the easiest/most efficient way to read a number plate from a camera object.

Based on your work and comments I’m thinking that Sighthound might be the way to go, especially as you’ve said here that you get the plate - but the Sighthound integration looks like it only returns people. How do you make it recognise plates as well?

I’ve also seen your Google-Vision custom component, that looks that it will definitely do the trick but setting up a GCP environment seems like overkill - what do you think?

andy

Number plates are a different api endpoint, so that would require modifications to the integration. Several people asked about this already and one guy even emailed me some code, but appears nobody is motivated enough to do this properly. Happy to review any PR adding this functionality

Hi I’m definitely interested in the licence plate recognition.
I was unable to openalpr working in my unraid docker as I had no way of installing the required commandline tool.

How can I help testing to get licence plate recognition?

Thanks in advance,
Roger

The simplehound dependency now supports Vehicle and License Plate recognition, so just need some dev work to add to the HA integration

OK I just published v0.9 of the custom integration for sighthound which includes vehicle detection with number plates :slight_smile:

Example payload from a sighthound.vehicle_detected event:

 {
    "event_type": "sighthound.vehicle_detected",
    "data": {
        "entity_id": "image_processing.sighthound_vehicle_local_file_1",
        "plate": "CV67CBU",
        "vehicle_type": "car",
        "make": "Ford",
        "model": "Ranger",
        "color": "black",
        "region": "UK"
} 

An image is also saved:

2 Likes