Hi @snowzach
Thank you for your work!
I’m having some problems to make it work: the entity always shows:
matches: {}
summary: {}
total_matches: 0
process_time: 0
friendly_name: Doods camera_1
My setup is an intel nuc with a docker container with Home Assitant and a container with Doods.
The config is the following:
stream:
camera:
- platform: mjpeg
name: Camera 1
still_image_url: "..."
mjpeg_url: "http://192.168....:8081/mjpeg"
#camera is taken from motion eye installed from Supervisor
image_processing:
- platform: doods
url: http://192.168....:8080
detector: tensorflow
source:
- entity_id: camera.camera_1
file_out: /config/www/camera/camera1/doods.jpg
The log from Home Assistant:
Dettagli registro (WARNING)
Logger: homeassistant.components.doods.image_processing
Source: components/doods/image_processing.py:286
Integration: doods (documentation, issues)
First occurred: 12:27:27 (1 occurrences)
Last logged: 12:27:27
Unable to process image, bad data
Logs from DOODS:
sudo docker run -e LOGGER_LEVEL=debug -p 8080:8080 snowzach/doods:latest
2020-11-03T11:25:42.180Z DEBUG detector/detector.go:61 Configuring detector {"package": "detector", "config": {"name":"default","type":"tflite","model_file":"models/coco_ssd_mobilenet_v1_1.0_quant.tflite","label_file":"models/coco_labels0.txt","num_threads":4,"num_concurrent":4,"hw_accel":false,"timeout":120000000000}}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:157 Tensor Output {"package": "detector.tflite", "name": "default", "n": 0, "name": "TFLite_Detection_PostProcess", "type": "Float32", "num_dims": 3, "byte_size": 160, "quant": {"Scale":0,"ZeroPoint":0}, "shape": [1, 10, 4]}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:160 Tensor Dim {"package": "detector.tflite", "name": "default", "n": 0, "dim": 0, "dim_size": 1}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:160 Tensor Dim {"package": "detector.tflite", "name": "default", "n": 0, "dim": 1, "dim_size": 10}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:160 Tensor Dim {"package": "detector.tflite", "name": "default", "n": 0, "dim": 2, "dim_size": 4}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:157 Tensor Output {"package": "detector.tflite", "name": "default", "n": 1, "name": "TFLite_Detection_PostProcess:1", "type": "Float32", "num_dims": 2, "byte_size": 40, "quant": {"Scale":0,"ZeroPoint":0}, "shape": [1, 10]}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:160 Tensor Dim {"package": "detector.tflite", "name": "default", "n": 1, "dim": 0, "dim_size": 1}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:160 Tensor Dim {"package": "detector.tflite", "name": "default", "n": 1, "dim": 1, "dim_size": 10}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:157 Tensor Output {"package": "detector.tflite", "name": "default", "n": 2, "name": "TFLite_Detection_PostProcess:2", "type": "Float32", "num_dims": 2, "byte_size": 40, "quant": {"Scale":0,"ZeroPoint":0}, "shape": [1, 10]}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:160 Tensor Dim {"package": "detector.tflite", "name": "default", "n": 2, "dim": 0, "dim_size": 1}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:160 Tensor Dim {"package": "detector.tflite", "name": "default", "n": 2, "dim": 1, "dim_size": 10}
2020-11-03T11:25:42.183Z DEBUG tflite/detector.go:157 Tensor Output {"package": "detector.tflite", "name": "default", "n": 3, "name": "TFLite_Detection_PostProcess:3", "type": "Float32", "num_dims": 1, "byte_size": 4, "quant": {"Scale":0,"ZeroPoint":0}, "shape": [1]}
2020-11-03T11:25:42.183Z INFO detector/detector.go:79 Configured Detector {"package": "detector", "name": "default", "type": "tflite", "model": "models/coco_ssd_mobilenet_v1_1.0_quant.tflite", "labels": 80, "width": 300, "height": 300}
2020-11-03T11:25:42.183Z DEBUG detector/detector.go:61 Configuring detector {"package": "detector", "config": {"name":"tensorflow","type":"tensorflow","model_file":"models/faster_rcnn_inception_v2_coco_2018_01_28.pb","label_file":"models/coco_labels1.txt","num_threads":4,"num_concurrent":4,"hw_accel":false,"timeout":120000000000}}
2020-11-03 11:25:42.544411: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance-critical operations: SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-11-03T11:25:42.554Z INFO detector/detector.go:79 Configured Detector {"package": "detector", "name": "tensorflow", "type": "tensorflow", "model": "models/faster_rcnn_inception_v2_coco_2018_01_28.pb", "labels": 65, "width": -1, "height": -1}
2020-11-03T11:25:42.555Z INFO server/server.go:284 API Listening {"package": "server", "address": ":8080", "tls": false, "version": "v0.2.5-0-gbf6d7a1-dirty"}
#Here I restarted Home Assistant
2020-11-03T11:27:17.733Z INFO server/server.go:139 HTTP Request {"status": 200, "took": 0.001240918, "request": "/detectors", "method": "GET", "package": "server.request", "request-id": "b675db114025/lfsycSGKr2-000001", "remote": "192.168.188.37:53708"}
2020-11-03T11:27:17.740Z INFO server/server.go:139 HTTP Request {"status": 200, "took": 0.000559914, "request": "/detectors", "method": "GET", "package": "server.request", "request-id": "b675db114025/lfsycSGKr2-000002", "remote": "192.168.188.37:53710"}