You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ssd-mobilenet-v2 (tfl2) object detection output does not match the output required for EdgeTpuTfl detect_raw function. The only accepted output order is [boxes, class_ids, scores, count], so I am getting the below error for my model that outputs [scores, boxes, count, class_ids]. My model works locally when using the following pycoral script to test: https://github.com/google-coral/pycoral/blob/master/examples/detect_image.py.
version: "3.9"services:
frigate:
container_name: frigateprivileged: true # this may not be necessary for all setupsrestart: unless-stoppedimage: ghcr.io/blakeblackshear/frigate:stableshm_size: "256mb"# update for your cameras based on calculation abovedevices:
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardwarevolumes:
- /etc/localtime:/etc/localtime:ro
- ./config/config.yml:/config/config.yml
- ./storage:/media/frigate
- ./models/tflite:/tflite # <-- tflite edgeTPU Google Coral
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card weartarget: /tmp/cachetmpfs:
size: 1000000000ports:
- "5000:5000"
Relevant log output
frigate | 2024-01-24 16:35:02.971151445 Process detector:coral:
frigate | 2024-01-24 16:35:02.971650574 Traceback (most recent call last):
frigate | 2024-01-24 16:35:02.971652692 File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
frigate | 2024-01-24 16:35:02.971653765 self.run()
frigate | 2024-01-24 16:35:02.971654953 File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
frigate | 2024-01-24 16:35:02.971655955 self._target(*self._args, **self._kwargs)
frigate | 2024-01-24 16:35:02.971656982 File "/opt/frigate/frigate/object_detection.py", line 121, in run_detector
frigate | 2024-01-24 16:35:02.971657991 detections = object_detector.detect_raw(input_frame)
frigate | 2024-01-24 16:35:02.971659054 File "/opt/frigate/frigate/object_detection.py", line 71, in detect_raw
frigate | 2024-01-24 16:35:02.971660203 return self.detect_api.detect_raw(tensor_input=tensor_input)
frigate | 2024-01-24 16:35:02.971662224 File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 61, in detect_raw
frigate | 2024-01-24 16:35:02.971663697 count = int(
frigate | 2024-01-24 16:35:02.971665351 TypeError: only size-1 arrays can be converted to Python scalars
Operating system
Debian
Install method
Docker Compose
Coral version
USB
Any other information that may be helpful
No response
The text was updated successfully, but these errors were encountered:
Yes sorry that was my intention here. Not a bug, just requesting a feature. I noticed others in Issue #3437 had the same problem that I believe can be fixed with a small feature.
NickM-27
changed the title
[Detector Support]: EdgeTpuTfl detect_raw function
Ability to customize order of output for custom models
Jan 24, 2024
Describe the problem you are having
ssd-mobilenet-v2 (tfl2) object detection output does not match the output required for EdgeTpuTfl detect_raw function. The only accepted output order is [boxes, class_ids, scores, count], so I am getting the below error for my model that outputs [scores, boxes, count, class_ids]. My model works locally when using the following pycoral script to test: https://github.com/google-coral/pycoral/blob/master/examples/detect_image.py.
Version
0.12.1-367d724
Frigate config file
docker-compose file or Docker CLI command
Relevant log output
Operating system
Debian
Install method
Docker Compose
Coral version
USB
Any other information that may be helpful
No response
The text was updated successfully, but these errors were encountered: