[Detector Support]: New yolov8n config fails to start #10074
-
Describe the problem you are havingTried to run with yolov8n models as described in object_detectors.md but frigate fails to start: "ValueError: Cannot set tensor: Got value of type UINT8 but expected type INT8 for input 0, name: serving_default_images:0" Version0.13.2-6476f8a Frigate config filemodel:
labelmap_path: /config/model_cache/yolov8/labels.txt
model_type: yolov8
path: /config/model_cache/yolov8/yolov8n_320x320_edgetpu.tflite
detectors:
coral1:
type: edgetpu
device: usb:0
ffmpeg:
hwaccel_args: preset-nvidia-h264
input_args: -fflags +genpts+igndts+discardcorrupt
output_args:
record: preset-record-generic-audio-copy
birdseye:
enabled: true
restream: true
mode: motion
height: 1920
width: 1080
layout:
scaling_factor: 1
motion:
#threshold: 22
threshold: 50
objects:
track:
- person
- bicycle
- car
- dog
- cat
record:
enabled: true
retain:
days: 7
mode: motion
events:
pre_capture: 2
post_capture: 2
retain:
default: 60
mode: active_objects
snapshots:
enabled: true
retain:
default: 14
go2rtc:
log:
level: info
api: info
exec: info
ngrok: info
rtsp: info
streams: info
webrtc: info
webrtc:
candidates:
- 127.0.0.1:8555
streams: docker-compose file or Docker CLI commandpodman run -d \
--name frigate \
--privileged \
--memory=8g \
--memory-swap=8g \
--memory-swappiness=0 \
--ipc=private \
--restart unless-stopped \
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1g \
--device /dev/bus/usb:/dev/bus/usb \
--device nvidia.com/gpu=0 \
--security-opt=label=disable \
--cap-add=CAP_PERFMON \
--shm-size 256m \
-v /mnt/Media:/media/frigate \
-v /opt/Frigate/config:/config \
-v /etc/localtime:/etc/localtime:ro \
--ip=172.30.2.2 \
-p 8555:8555/tcp \
-p 8555:8555/udp \
--network=daleks-net \
-e DOWNLOAD_YOLOV8=1 \
ghcr.io/blakeblackshear/frigate:stable Relevant log output2024-02-26T18:09:07.268998-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.268897497 Process detector:coral1:
2024-02-26T18:09:07.271086-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.270976278 Traceback (most recent call last):
2024-02-26T18:09:07.271226-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.270980649 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-02-26T18:09:07.271314-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.270982370 self.run()
2024-02-26T18:09:07.272451-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271056406 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-02-26T18:09:07.272511-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271058349 self._target(*self._args, **self._kwargs)
2024-02-26T18:09:07.272555-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271059895 File "/opt/frigate/frigate/object_detection.py", line 125, in run_detector
2024-02-26T18:09:07.273063-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271061416 detections = object_detector.detect_raw(input_frame)
2024-02-26T18:09:07.273121-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271062913 File "/opt/frigate/frigate/object_detection.py", line 75, in detect_raw
2024-02-26T18:09:07.273161-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271064407 return self.detect_api.detect_raw(tensor_input=tensor_input)
2024-02-26T18:09:07.273197-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271066002 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 59, in detect_raw
2024-02-26T18:09:07.273233-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271067631 self.interpreter.set_tensor(self.tensor_input_details[0]["index"], tensor_input)
2024-02-26T18:09:07.273267-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271069249 File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 572, in set_tensor
2024-02-26T18:09:07.273302-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271070676 self._interpreter.SetTensor(tensor_index, value)
2024-02-26T18:09:07.273341-08:00 testme frigate[1360348]: 2024-02-26 18:09:07.271072473 ValueError: Cannot set tensor: Got value of type UINT8 but expected type INT8 for input 0, name: serving_default_images:0 Operating systemDebian Install methodDocker CLI Coral versionUSB Any other information that may be helpfulAt first I ran with two coral usb units plugged in...then I saw the "multiprocessing" error and thought it didn't like having two. Unplugged one and modified the config...but failed the same. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
This is not supported in 0.13.2 |
Beta Was this translation helpful? Give feedback.
-
I am still having this error on 0.14.1 with a PCI edgetpu. TPU is working properly with stock configuration but has errors with yolov8n. i have downloaded multiple files to try as well ash installed ultralytics and created my own with no success. |
Beta Was this translation helpful? Give feedback.
-
Is there any solution? Same problem with 0.17 as I see: ValueError: Cannot set tensor: Got value of type UINT8 but expected type INT8 for input 0, name: serving_default_images:0 |
Beta Was this translation helpful? Give feedback.
This is not supported in 0.13.2