Home-Assistant image tagging with Clarifai https://clarifai.com/developer/guide/
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 %).
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:
image_processing:
- platform: clarifai_general
name: general_classifier
api_key: YOUR_KEY
source:
- entity_id: camera.demo_camera
Had to add:
TEST_REQUIREMENTS = (
'aioautomatic',
'aiohttp_cors',
'aiohue',
'apns2',
'caldav',
'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