项目作者: robmarkcole

项目描述 :
Home-Assistant image tagging with Clarifai https://clarifai.com/developer/guide/
高级语言: Jupyter Notebook
项目地址: git://github.com/robmarkcole/HASS-Clarifai.git
创建时间: 2017-11-28T05:13:13Z
项目社区:https://github.com/robmarkcole/HASS-Clarifai

开源协议:MIT License

下载


HASS-Clarifai

Home-assistant custom component for image processing with Clarifai using the general model and the Clarifai-python-api. The component creates an entity with a state that is the most likely concept (objects or ideas) within a camera image. The entities attributes contains a dictionary of all identified concepts and their probability (in %).

  • Place the custom_components folder in your configuration directory (or add its contents to an existing custom_components folder).
  • The maximum image file size supported is 195 KB.
  • For interval control, adjust the scan_interval. The default is 20 seconds since the number of API requests available on the free plan is limited to 5000 per month (approx 1 every 10 minutes). Therefore the free plan is really only useful for testing the service.

To setup authentication with Clarifai, first generate an API key (YOUR_KEY) as per the Clarifai docs then add the following to you Home-assistant config:

  1. image_processing:
  2. - platform: clarifai_general
  3. name: general_classifier
  4. api_key: YOUR_KEY
  5. source:
  6. - entity_id: camera.demo_camera



Note on tests

Had to add:

  1. TEST_REQUIREMENTS = (
  2. 'aioautomatic',
  3. 'aiohttp_cors',
  4. 'aiohue',
  5. 'apns2',
  6. 'caldav',
  7. 'clarifai',

in gen_requirements_all.py

Run tests with (home-assistant) Robins-Air:home-assistant robincole$ ./bin/py.test tests/components/image_processing/test_clarifai_general.py