Ok, I’m sure I have a weird typo or am missing something very simple. Just to rule out my front door camera, I created a local file camera using a snapshot of my front door. It also fails to process, nothing happens.
I guess I have a question about the order of processing. If the image is analyzed and nothing is there, will it still output a picutre, but with no boxes?
Edit: Nevermind, It was that there really was nothing to process. It’s cold out so I did not want to go out and stand in front of the camera, but I did, and it did process a person.
So… If there is nothing to process, and snapshot will not be taken
Edit2: more questions
Couple of quick questions about tensorflow and configuration.
So, if I have multiple cameras but I want to exclude an area from one of the cameras and not the other how can I do that. Here is my configuration
image_processing:
- platform: tensorflow
scan_interval: 20000
source:
- entity_id: camera.front_door
- entity_id: camera.back_gate
file_out:
- "/home/homeassistant/.homeassistant/www/tmp/{{ camera_entity.split('.')[1] }}_latest.jpg"
- "/home/homeassistant/.homeassistant/www/tmp/{{ camera_entity.split('.')[1] }}_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg"
model:
graph: /home/homeassistant/.homeassistant/tensorflow/faster_rcnn_inception_v2_coco_2018_01_28/frozen_inference_graph.pb
area:
# Exclude top 13% of image
top: 0.13
# Exclude left 15% of image
left: 0.30
# Exclude right 15% of image
right: 0.10
I really just want to exclude the area’s from one camera.
Also I was curious about the categories, is there a list somewhere. Other than people, car, truck
edit3:
I’ve been using this for a couple weeks now and have really enjoyed it. For me the most useful for better alerts for my camera. I used to get a good amount of “false” alerts with motion, or “alerts” for things I did not care about. Now, I get alerts for things that I actually want alerts for, and it’s been nearly flawless. I trigger the scan based on motion, but I trigger my alerts based on the results. here are a few sensors I’ve created with some help
objects_in_driveway:
friendly_name: Objects in driveway
value_template: "{{ states('image_processing.tensorflow_front_door') | float >= 1 }}"
entity_id: image_processing.tensorflow_front_door
person_in_driveway:
friendly_name: Person in Drivway
value_template: >
{% set m = state_attr('image_processing.tensorflow_front_door', 'matches') %}
{{ m.person is defined and (m.person[0].score) | float >= 80 }}
entity_id: image_processing.tensorflow_front_door
vehicle_in_driveway:
friendly_name: Vehicle in Driveway
value_template: >
{% set m = state_attr('image_processing.tensorflow_front_door', 'matches') %}
{{ m.truck is defined and (m.truck[0].score) | float >= 80 or m.car is defined and (m.car[0].score) | float >= 80 or m.bike is defined and (m.bike[0].score) | float >= 80 }}
entity_id: image_processing.tensorflow_front_door