[Detector Support]: Getting " ValueError: Cannot set tensor: Dimension mismatch. Got 300 but expected 320 for dimension 1 of input 7." #10577
-
Describe the problem you are havingI can use OpenVino as a detector no problem, but I just installed a Coral M.2 a&e TPU and tried to set it up as a detector and get this error in the logs "ValueError: Cannot set tensor: Dimension mismatch. Got 300 but expected 320 for dimension 1 of input 7." Version0.13.2-6476F8A Frigate config file#GLOBAL PARAMETERS
database:
path: /config/frigate.db
mqtt:
enabled: true
host: 192.168.1.2
port: 1883
user: frigate
password: NicRob2011
topic_prefix: frigate
#detectors:
#ov:
#type: openvino
#device: AUTO
#model:
#path: /openvino-model/ssdlite_mobilenet_v2.xml
detectors:
coral:
type: edgetpu
device: pci:0
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
# CAMERA PARAMETERS
cameras:
#FRONT PORCH CAMERA
Front_Porch: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://192.168.1.2:8553/front-porch-cam-sub # <----- The stream you want to use for detection
roles:
- record
- detect
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-aac
record:
enabled: true
retain:
days: 0
mode: all
events:
retain:
default: 30
mode: motion
detect:
enabled: true # <---- disable detection until you have a working camera feed
objects:
track:
- person
- dog
filters:
person:
threshold: 0.75
mask:
- 513,182,545,193,546,148,519,144
- 289,44
motion:
mask:
- 195,38,424,67,640,153,640,0,0,0,0,36
- 456,360,640,360,640,337,459,333
#BACKYARD CAMERA
Backyard: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://192.168.1.2:8553/back-yard-cam-sub # <----- The stream you want to use for detection
roles:
- record
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-aac
record:
enabled: true
retain:
days: 1
mode: all
detect:
enabled: false # <---- disable detection until you have a working camera feed docker-compose file or Docker CLI commandUsing HA Addon Relevant log output2024-03-21 11:19:51.568113956 [INFO] Starting NGINX...
2024-03-21 11:19:51.578536858 [INFO] Starting Frigate...
s6-rc: info: service legacy-services successfully started
2024-03-21 11:19:51.612709083 [INFO] Got IP address from supervisor: 192.168.1.2
2024-03-21 11:19:51.625900880 2024/03/21 08:19:51 [error] 146#146: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.2, server: , request: "GET /ws HTTP/1.1", upstream: "http://127.0.0.1:5002/", host: "ha.spierenburg.ca"
2024-03-21 11:19:51.626320164 172.30.32.2 - - [21/Mar/2024:08:19:51 -0300] "GET /ws HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:19:51.662363342 [INFO] Got WebRTC port from supervisor: 8666
2024-03-21 11:19:51.892832799 2024/03/21 08:19:51 [error] 148#148: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.1, server: , request: "GET /api/stats HTTP/1.1", upstream: "http://127.0.0.1:5001stats", host: "ccab4aaf-frigate:5000"
2024-03-21 11:19:51.955613166 [INFO] Starting go2rtc...
2024-03-21 11:19:52.046758715 08:19:52.046 INF go2rtc version 1.8.4 linux/amd64
2024-03-21 11:19:52.047278863 08:19:52.047 INF [api] listen addr=:1984
2024-03-21 11:19:52.047336626 08:19:52.047 INF [rtsp] listen addr=:8554
2024-03-21 11:19:52.047506816 08:19:52.047 INF [webrtc] listen addr=:8555
2024-03-21 11:19:53.203641591 [2024-03-21 08:19:53] frigate.app INFO : Starting Frigate (0.13.2-6476f8a)
2024-03-21 11:19:53.203725016 [2024-03-21 08:19:53] frigate.app INFO : Creating directory: /tmp/cache
2024-03-21 11:19:56.425936241 2024/03/21 08:19:56 [error] 149#149: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /api/version HTTP/1.1", upstream: "http://127.0.0.1:5001version", host: "127.0.0.1:5000"
2024-03-21 11:19:56.892837937 2024/03/21 08:19:56 [error] 148#148: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.30.32.1, server: , request: "GET /api/stats HTTP/1.1", upstream: "http://127.0.0.1:5001stats", host: "ccab4aaf-frigate:5000"
2024-03-21 11:19:58.809566957 [2024-03-21 08:19:58] peewee_migrate.logs INFO : Starting migrations
2024-03-21 11:19:58.814464152 [2024-03-21 08:19:58] peewee_migrate.logs INFO : There is nothing to migrate
2024-03-21 11:19:58.822116708 [2024-03-21 08:19:58] frigate.app INFO : Recording process started: 321
2024-03-21 11:19:58.825206339 [2024-03-21 08:19:58] frigate.app INFO : go2rtc process pid: 89
2024-03-21 11:19:58.854436898 [2024-03-21 08:19:58] detector.coral INFO : Starting detection process: 331
2024-03-21 11:19:58.855801909 [2024-03-21 08:19:58] frigate.app INFO : Output process started: 333
2024-03-21 11:19:58.877017592 [2024-03-21 08:19:58] frigate.app INFO : Camera processor started for Front_Porch: 342
2024-03-21 11:19:58.884595554 [2024-03-21 08:19:58] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:0
2024-03-21 11:19:58.884600164 [2024-03-21 08:19:58] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-03-21 11:19:58.888241306 [2024-03-21 08:19:58] frigate.app INFO : Camera processor started for Backyard: 343
2024-03-21 11:19:58.889655989 [2024-03-21 08:19:58] frigate.app INFO : Capture process started for Front_Porch: 357
2024-03-21 11:19:58.896107860 [2024-03-21 08:19:58] frigate.app INFO : Capture process started for Backyard: 361
2024-03-21 11:20:00.137802812 Process detector:coral:
2024-03-21 11:20:00.139660765 Traceback (most recent call last):
2024-03-21 11:20:00.139665708 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-03-21 11:20:00.139668234 self.run()
2024-03-21 11:20:00.139671062 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-03-21 11:20:00.139677119 self._target(*self._args, **self._kwargs)
2024-03-21 11:20:00.139679716 File "/opt/frigate/frigate/object_detection.py", line 125, in run_detector
2024-03-21 11:20:00.139706010 detections = object_detector.detect_raw(input_frame)
2024-03-21 11:20:00.139709436 File "/opt/frigate/frigate/object_detection.py", line 75, in detect_raw
2024-03-21 11:20:00.139711917 return self.detect_api.detect_raw(tensor_input=tensor_input)
2024-03-21 11:20:00.139714485 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 59, in detect_raw
2024-03-21 11:20:00.139754461 self.interpreter.set_tensor(self.tensor_input_details[0]["index"], tensor_input)
2024-03-21 11:20:00.139757238 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 572, in set_tensor
2024-03-21 11:20:00.139760692 self._interpreter.SetTensor(tensor_index, value)
2024-03-21 11:20:00.139763378 ValueError: Cannot set tensor: Dimension mismatch. Got 300 but expected 320 for dimension 1 of input 7.
2024-03-21 11:20:01.564172401 [INFO] Starting go2rtc healthcheck service...
2024-03-21 11:20:01.636631007 172.30.32.2 - - [21/Mar/2024:08:20:01 -0300] "GET // HTTP/1.1" 200 6694 "https://ha.spierenburg.ca/ccab4aaf_frigate/ingress" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:01.710583879 172.30.32.2 - - [21/Mar/2024:08:20:01 -0300] "GET /api/config HTTP/1.1" 200 11473 "https://ha.spierenburg.ca/api/hassio_ingress/8VXuLV0jiq0KIDIp-xF-3vu_jvoVY3KpYluitjL9lLI//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:01.801973394 172.30.32.2 - - [21/Mar/2024:08:20:01 -0300] "GET /api/Backyard/latest.jpg?h=100 HTTP/1.1" 200 4785 "https://ha.spierenburg.ca/api/hassio_ingress/8VXuLV0jiq0KIDIp-xF-3vu_jvoVY3KpYluitjL9lLI//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:01.843085287 172.30.32.2 - - [21/Mar/2024:08:20:01 -0300] "GET /api/Front_Porch/latest.jpg?h=100 HTTP/1.1" 200 1815 "https://ha.spierenburg.ca/api/hassio_ingress/8VXuLV0jiq0KIDIp-xF-3vu_jvoVY3KpYluitjL9lLI//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:01.855937506 172.30.32.2 - - [21/Mar/2024:08:20:01 -0300] "GET /api/Backyard/latest.jpg?h=382 HTTP/1.1" 200 48824 "https://ha.spierenburg.ca/api/hassio_ingress/8VXuLV0jiq0KIDIp-xF-3vu_jvoVY3KpYluitjL9lLI//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:01.860738231 172.30.32.2 - - [21/Mar/2024:08:20:01 -0300] "GET /api/Front_Porch/latest.jpg?h=382 HTTP/1.1" 200 11138 "https://ha.spierenburg.ca/api/hassio_ingress/8VXuLV0jiq0KIDIp-xF-3vu_jvoVY3KpYluitjL9lLI//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:01.918255801 [2024-03-21 08:20:01] frigate.util.services ERROR : Unable to poll intel GPU stats: Failed to initialize PMU! (Permission denied)
2024-03-21 11:20:01.918258990
2024-03-21 11:20:04.230973311 172.30.32.2 - - [21/Mar/2024:08:20:04 -0300] "GET /api/config HTTP/1.1" 200 11473 "https://ha.spierenburg.ca/api/hassio_ingress/8VXuLV0jiq0KIDIp-xF-3vu_jvoVY3KpYluitjL9lLI//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:04.309825505 172.30.32.2 - - [21/Mar/2024:08:20:04 -0300] "GET /api/go2rtc/api HTTP/1.1" 200 147 "https://ha.spierenburg.ca/system" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:19.208485429 [2024-03-21 08:20:19] frigate.watchdog INFO : Detection appears to be stuck. Restarting detection process...
2024-03-21 11:20:19.219941854 [2024-03-21 08:20:19] detector.coral INFO : Starting detection process: 460
2024-03-21 11:20:19.225342555 [2024-03-21 08:20:19] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:0
2024-03-21 11:20:19.230180090 [2024-03-21 08:20:19] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-03-21 11:20:19.230990126 Process detector:coral:
2024-03-21 11:20:19.232116472 Traceback (most recent call last):
2024-03-21 11:20:19.232142532 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-03-21 11:20:19.232144210 self.run()
2024-03-21 11:20:19.232145826 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-03-21 11:20:19.232147235 self._target(*self._args, **self._kwargs)
2024-03-21 11:20:19.232162242 File "/opt/frigate/frigate/object_detection.py", line 125, in run_detector
2024-03-21 11:20:19.232172678 detections = object_detector.detect_raw(input_frame)
2024-03-21 11:20:19.232174241 File "/opt/frigate/frigate/object_detection.py", line 75, in detect_raw
2024-03-21 11:20:19.232175661 return self.detect_api.detect_raw(tensor_input=tensor_input)
2024-03-21 11:20:19.232177179 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 59, in detect_raw
2024-03-21 11:20:19.232178682 self.interpreter.set_tensor(self.tensor_input_details[0]["index"], tensor_input)
2024-03-21 11:20:19.232180299 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 572, in set_tensor
2024-03-21 11:20:19.232181609 self._interpreter.SetTensor(tensor_index, value)
2024-03-21 11:20:19.232194581 ValueError: Cannot set tensor: Dimension mismatch. Got 300 but expected 320 for dimension 1 of input 7.
2024-03-21 11:20:27.855750476 172.30.32.2 - - [21/Mar/2024:08:20:27 -0300] "GET /api/go2rtc/api HTTP/1.1" 200 147 "https://ha.spierenburg.ca/system" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:27.860359881 172.30.32.2 - - [21/Mar/2024:08:20:27 -0300] "GET /api/config HTTP/1.1" 200 11473 "https://ha.spierenburg.ca/system" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:27.915151196 172.30.32.2 - - [21/Mar/2024:08:20:27 -0300] "GET /ws HTTP/1.1" 101 4 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" "142.134.158.213, 172.21.0.2, 172.30.32.1"
2024-03-21 11:20:29.214726428 [2024-03-21 08:20:29] frigate.watchdog INFO : Detection appears to have stopped. Exiting Frigate...
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service nginx: stopping
s6-rc: info: service go2rtc-healthcheck: stopping
2024-03-21 11:20:29.250150194 [INFO] The go2rtc-healthcheck service exited with code 256 (by signal 15)
s6-rc: info: service go2rtc-healthcheck successfully stopped
2024-03-21 11:20:29.316627090 [INFO] Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service nginx-log: stopping
s6-rc: info: service frigate: stopping
2024-03-21 11:20:29.324484460 [2024-03-21 08:20:29] frigate.app INFO : Stopping...
s6-rc: info: service nginx-log successfully stopped
2024-03-21 11:20:29.332446472 [2024-03-21 08:20:29] frigate.ptz.autotrack INFO : Exiting autotracker...
2024-03-21 11:20:29.332886967 [2024-03-21 08:20:29] frigate.events.cleanup INFO : Exiting event cleanup...
2024-03-21 11:20:29.332968720 [2024-03-21 08:20:29] frigate.stats INFO : Exiting stats emitter...
2024-03-21 11:20:29.333207883 [2024-03-21 08:20:29] frigate.storage INFO : Exiting storage maintainer...
2024-03-21 11:20:29.333323908 [2024-03-21 08:20:29] frigate.record.cleanup INFO : Exiting recording cleanup...
2024-03-21 11:20:29.333583733 [2024-03-21 08:20:29] frigate.watchdog INFO : Exiting watchdog...
2024-03-21 11:20:29.521428230 [2024-03-21 08:20:29] frigate.object_processing INFO : Exiting object processor...
2024-03-21 11:20:29.907664880 [2024-03-21 08:20:29] frigate.comms.ws INFO : Exiting websocket client...
2024-03-21 11:20:30.252226910 [2024-03-21 08:20:30] frigate.events.maintainer INFO : Exiting event processor...
2024-03-21 11:20:30.851835706 [2024-03-21 08:20:30] peewee.sqliteq INFO : writer received shutdown request, exiting. Operating systemHassOS Install methodHassOS Addon Coral versionM.2 Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Answered by
NickM-27
Mar 21, 2024
Replies: 1 comment 1 reply
-
You're trying to use the openvino model with a coral, this will not work |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
NickM-27
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're trying to use the openvino model with a coral, this will not work