{"id":742,"date":"2018-05-22T21:44:19","date_gmt":"2018-05-22T11:14:19","guid":{"rendered":"http:\/\/parablog-wordpress.dockerbox.rei.moe\/?p=742"},"modified":"2018-05-22T22:02:53","modified_gmt":"2018-05-22T11:32:53","slug":"image-recognition-for-home-assistant","status":"publish","type":"post","link":"https:\/\/blog.lewys.eu\/?p=742","title":{"rendered":"Image Recognition for Home Assistant"},"content":{"rendered":"<p>I was browsing the Home Assistant Community Forums earlier today, when I <a href=\"https:\/\/community.home-assistant.io\/t\/custom-component-image-classification-via-tagbox\/49034\">noticed a post<\/a> by&nbsp;<a href=\"https:\/\/www.hackster.io\/robin-cole\">Robin Cole!<\/a><\/p>\n<p>Rob has created a custom component for Home Assistant that allows us to use image classification via <a href=\"https:\/\/machinebox.io\/docs\/tagbox\/recognizing-images\">Tagbox<\/a>, on a camera feed that Home Assistant has access to.<\/p>\n<p>Following the instructions on <a href=\"https:\/\/github.com\/robmarkcole\/HASS-Machinebox-Tagbox\">github<\/a> was pretty straight forward, the only thing I changed was to reference an external image_procesing.yaml rather than having it all in my configuration.yaml as I&#8217;m trying to be a bit cleaner.<\/p>\n<p><a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2018\/05\/172.16.0.60configimage_processing.yaml_-_Notep_2018-05-22_21-07-29.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-743 alignleft\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2018\/05\/172.16.0.60configimage_processing.yaml_-_Notep_2018-05-22_21-07-29.png\" alt=\"\" width=\"314\" height=\"125\" srcset=\"https:\/\/blog.lewys.eu\/wp-content\/uploads\/2018\/05\/172.16.0.60configimage_processing.yaml_-_Notep_2018-05-22_21-07-29.png 314w, https:\/\/blog.lewys.eu\/wp-content\/uploads\/2018\/05\/172.16.0.60configimage_processing.yaml_-_Notep_2018-05-22_21-07-29-300x119.png 300w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>In this case, my docker is running on Windows, the <a href=\"https:\/\/machinebox.io\/docs\/tagbox\/recognizing-images\">Tagbox instructions<\/a> were fine for this, I didn&#8217;t realise you can just run the image and if its not installed, it will download it \ud83d\ude42&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>So now that it&#8217;s all setup it appears to be working great!&nbsp;<br \/>\n<a href=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2018\/05\/Home_Assistant_-_Google_Chrome_2018-05-22_21-12-31.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-744\" src=\"http:\/\/172.16.0.6:8683\/wp-content\/uploads\/2018\/05\/Home_Assistant_-_Google_Chrome_2018-05-22_21-12-31.png\" alt=\"\" width=\"968\" height=\"205\" srcset=\"https:\/\/blog.lewys.eu\/wp-content\/uploads\/2018\/05\/Home_Assistant_-_Google_Chrome_2018-05-22_21-12-31.png 968w, https:\/\/blog.lewys.eu\/wp-content\/uploads\/2018\/05\/Home_Assistant_-_Google_Chrome_2018-05-22_21-12-31-300x64.png 300w, https:\/\/blog.lewys.eu\/wp-content\/uploads\/2018\/05\/Home_Assistant_-_Google_Chrome_2018-05-22_21-12-31-768x163.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/a><\/p>\n<p>As you can see, the component creates a new entity called image_processing.tagbox_name, with a state of the most likely item in the image, and then some attributes of the next most likely, and a count of any specific tags from the config.<\/p>\n<p>I&#8217;ll play around with it to see what I can use it for more practically,&nbsp; I can think of all sorts of things this component will be useful for! From identifying if a car spot is free or taken, to seeing if the bins were already taken out!&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>I just wish I could specify a region within a camera feed for it to analyse.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was browsing the Home Assistant Community Forums earlier today, when I noticed a post by&nbsp;Robin Cole! Rob has created a custom component for Home Assistant that allows us to use image classification via Tagbox, on a camera feed that Home Assistant has access to. Following the instructions on github was pretty straight forward, the &hellip; <a href=\"https:\/\/blog.lewys.eu\/?p=742\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Image Recognition for Home Assistant<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,41,19,18],"tags":[],"class_list":["post-742","post","type-post","status-publish","format-standard","hentry","category-educational","category-home-assistant","category-home-automation-2","category-projects"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/742","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=742"}],"version-history":[{"count":5,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/742\/revisions"}],"predecessor-version":[{"id":749,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/742\/revisions\/749"}],"wp:attachment":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=742"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=742"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}