Coral: ValueError: Cannot set tensor: Dimension mismatch. Got 300 but expected 320 for dimension 1 of input 7. #14990
-
Describe the problem you are havingWith adding Coral USB TPU, frigate Web UI is hanging and not showing the video. Version0.14.1 Frigate config filemqtt:
enabled: false
cameras:
test:
ffmpeg:
#hwaccel_args: preset-vaapi
inputs:
- path: /media/frigate/person-bicycle-car-detection.mp4
input_args: -re -stream_loop -1 -fflags +genpts
roles:
- detect
- rtmp
- record
detect:
height: 1080
width: 1920
fps: 5
motion:
threshold: 30
contour_area: 10
improve_contrast: 'true'
detectors:
coral:
type: edgetpu
device: usb
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
version: 0.14
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
- dog
- cup
- shoe
- teddy bear
- sports ball
- fork
- knife
- spoon
- cell phone
- toothbrush
record:
enabled: true
expire_interval: 60
sync_recordings: false
retain:
days: 1
mode: motion docker-compose file or Docker CLI commandbash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/frigate.sh)" Relevant Frigate log output2024-11-14 21:31:06.368147 [2024-11-14 21:31:06] detector.coral INFO : Starting detection process: 509
2024-11-14 21:31:06.368214 [2024-11-14 21:31:06] frigate.app INFO : Output process started: 511
2024-11-14 21:31:06.397332 [2024-11-14 21:31:06] frigate.app INFO : Camera processor started for test: 525
2024-11-14 21:31:06.397547 [2024-11-14 21:31:06] frigate.app INFO : Capture process started for test: 528
2024-11-14 21:31:09.021076 [2024-11-14 21:31:06] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2024-11-14 21:31:09.031054 [2024-11-14 21:31:09] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-11-14 21:31:09.042294 Process detector:coral:
2024-11-14 21:31:09.044925 Traceback (most recent call last):
2024-11-14 21:31:09.045021 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-11-14 21:31:09.045075 self.run()
2024-11-14 21:31:09.045115 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-11-14 21:31:09.045154 self._target(*self._args, **self._kwargs)
2024-11-14 21:31:09.045189 File "/opt/frigate/frigate/object_detection.py", line 125, in run_detector
2024-11-14 21:31:09.045223 detections = object_detector.detect_raw(input_frame)
2024-11-14 21:31:09.045256 File "/opt/frigate/frigate/object_detection.py", line 75, in detect_raw
2024-11-14 21:31:09.045290 return self.detect_api.detect_raw(tensor_input=tensor_input)
2024-11-14 21:31:09.045325 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 60, in detect_raw
2024-11-14 21:31:09.045358 self.interpreter.set_tensor(self.tensor_input_details[0]["index"], tensor_input)
2024-11-14 21:31:09.045392 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 572, in set_tensor
2024-11-14 21:31:09.045426 self._interpreter.SetTensor(tensor_index, value)
2024-11-14 21:31:09.045460 ValueError: Cannot set tensor: Dimension mismatch. Got 300 but expected 320 for dimension 1 of input 7.
2024-11-14 21:31:26.545363 [2024-11-14 21:31:26] frigate.watchdog INFO : Detection appears to be stuck. Restarting detection process...
2024-11-14 21:31:26.567820 [2024-11-14 21:31:26] detector.coral INFO : Starting detection process: 605
2024-11-14 21:31:29.191138 [2024-11-14 21:31:26] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2024-11-14 21:31:29.200558 [2024-11-14 21:31:29] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-11-14 21:31:29.202549 Process detector:coral:
2024-11-14 21:31:29.204098 Traceback (most recent call last):
2024-11-14 21:31:29.204184 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-11-14 21:31:29.204243 self.run()
2024-11-14 21:31:29.204288 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-11-14 21:31:29.204324 self._target(*self._args, **self._kwargs)
2024-11-14 21:31:29.204358 File "/opt/frigate/frigate/object_detection.py", line 125, in run_detector
2024-11-14 21:31:29.204392 detections = object_detector.detect_raw(input_frame)
2024-11-14 21:31:29.204425 File "/opt/frigate/frigate/object_detection.py", line 75, in detect_raw
2024-11-14 21:31:29.204458 return self.detect_api.detect_raw(tensor_input=tensor_input)
2024-11-14 21:31:29.204492 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 60, in detect_raw
2024-11-14 21:31:29.204526 self.interpreter.set_tensor(self.tensor_input_details[0]["index"], tensor_input)
2024-11-14 21:31:29.204579 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 572, in set_tensor
2024-11-14 21:31:29.204614 self._interpreter.SetTensor(tensor_index, value)
2024-11-14 21:31:29.204647 ValueError: Cannot set tensor: Dimension mismatch. Got 300 but expected 320 for dimension 1 of input 7. Install methodProxmox via TTeck Script Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesIs not sowing. Any other information that may be helpfulFrigate is running under Proxmox in in privileged LCX |
Beta Was this translation helpful? Give feedback.
Answered by
NickM-27
Nov 14, 2024
Replies: 1 comment 1 reply
-
you are trying to use the openvino model with a coral, these are not compatible. Delete the model section |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tobiaskitsune
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you are trying to use the openvino model with a coral, these are not compatible. Delete the model section