Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

Home Assistant custom integration for using Deepstack scene recognition

License

Notifications You must be signed in to change notification settings

robmarkcole/HASS-Deepstack-scene

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HASS-Deepstack-scene

Home Assistant custom component for Deepstack scene recognition. Deepstack is a service which runs in a docker container and exposes deep-learning models via a REST API. Deepstack scene recognition classifies an image into one of 365 scenes (described in this readme). This integration adds an image processing entity with state that is the most likely scene for the image. The confidence of the classification is available in the entity attributes, and is on a scale from 0 to 1, with 0 being low confidence and 1 being high confidence.

Note that by default the component will not automatically scan images, but requires you to call the image_processing.scan service e.g. using an automation.

Home Assistant setup

Place the custom_components folder in your configuration directory (or add its contents to an existing custom_components folder). Then configure the integration. Add to your Home-Assistant config:

image_processing:
  - platform: deepstack_scene
    ip_address: localhost
    port: 5000
    api_key: mysecretkey
    source:
      - entity_id: camera.local_file

Configuration variables:

  • ip_address: the ip address of your deepstack instance.
  • port: the port of your deepstack instance.
  • api_key: (Optional) Any API key you have set.
  • timeout: (Optional, default 10 seconds) The timeout for requests to deepstack.
  • source: Must be a camera.
  • name: (Optional) A custom name for the the entity.

Scenes info

The 365 scenes are from the Places365 dataset. You can find them in this list.

Tensorflow lite alternative to deepstack

As an experiment I created a drop in replacement for deepstack that uses tensorflow-lite models at https://github.com/robmarkcole/tensorflow-lite-rest-server. Note that the predictions differ from those provided by Deepstack, and are less accurate. However it runs on a raspberry pi without requiring hardware acceleration.

About

Home Assistant custom integration for using Deepstack scene recognition

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages