[Support]: Updated to 11.0 - Now crashes on trying to get TPU
See original GitHub issueDescribe the problem you are having
Upgraded a moment ago to .11.0 Full Access from 3.1 on HASSos - Uninstalled the previous version as I was having the ‘invalid build’ on upgrade.
Now after upgrading existing HWAccel Arguments are making all the feeds Green - After disabling HWAccel and restarting then I get the issue that no TPU is found, this is on VMWare ESXi 6.7, but was working with me using passthrough of a PCIe USB Controller without issues previously.
Version
.11.0
Frigate config file
mqtt:
host: 192.168.5.229
port: 1883
user: xxxxxxxxxxxxx
password: 'xxxxxxxxxxxxx'
cameras:
Garage: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.220:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.220:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 704
height: 480 # <---- update for your camera's resolution
motion:
mask:
- 499,0,704,0,704,58,494,55
FrontGateDW: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.221:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.221:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 704
height: 480 # <---- update for your camera's resolution
motion:
mask:
- 0,0,704,0,704,58,0,50
BarnDW: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.222:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.222:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 704
height: 480 # <---- update for your camera's resolution
motion:
mask:
- 0,0,704,0,704,114,0,110
BackDoor: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.223:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.223:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 704
height: 480 # <---- update for your camera's resolution
motion:
mask:
- 499,0,704,0,704,58,494,55
SideDoor: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.224:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.224:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 720
height: 576 # <---- update for your camera's resolution
fps: 5
motion:
mask:
- 499,0,704,0,704,58,494,55
- 158,201,56,147,0,150,0,0,227,0,306,218
FrontDoor: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.225:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.225:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 720
height: 576 # <---- update for your camera's resolution
motion:
mask:
- 0,0,704,0,704,58,0,138
- 99,317,0,273,0,66,151,64
Frontgate: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.228:554/12 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.228:554/11 # <----- Add high res stream
roles:
- record
# - path: rtsp://xxxxxxxxxx@192.168.5.228:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
# roles:
# - record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 704
height: 480 # <---- update for your camera's resolution
motion:
mask:
- 704,0,0,0,149,21,252,45,313,23,395,31,481,44,578,57,704,86
DeerFeeder: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://xxxxxxxxxx@192.168.5.227:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://xxxxxxxxxx@192.168.5.227:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 704
height: 480 # <---- update for your camera's resolution
motion:
mask:
- 499,0,704,0,704,58,494,55
BarnDoor: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://admin:xxxxxxxxxx@192.168.5.226:554/cam/realmonitor?channel=1&subtype=1 # <----- Update for your camera
roles:
- detect
- rtmp
- path: rtsp://admin:xxxxxxxxxx@192.168.5.226:554/cam/realmonitor?channel=1&subtype=0 # <----- Add high res stream
roles:
- record
rtmp:
enabled: false # <-- RTMP should be disabled if your stream is not H264
detect:
width: 640
height: 480 # <---- update for your camera's resolution
motion:
mask:
- 0,112,0,0,640,0,640,113
detectors:
coral:
type: edgetpu
device: usb
cpu1:
type: cpu
num_threads: 3
objects:
track:
- person
- car
snapshots:
enabled: True
timestamp: false
bounding_box: true
retain:
default: 3
record:
enabled: True
retain:
days: 3
events:
pre_capture: 10
post_capture: 10
# stationary:
# interval: 0
# threshold: 50
objects:
- person
- car
retain:
default: 10
#ffmpeg:
# input_args: # <----- Add high res stream
# - -avoid_negative_ts # <----- Add high res stream
# - make_zero # <----- Add high res stream
# output_args: # <----- Add high res stream
# record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac # <----- Add high res stream
## hwaccel_args:
## - -hwaccel_output_format
## - yuv420p
## - -hwaccel
## - qsv
## - -qsv_device
## - /dev/dri/renderD128
Relevant log output
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2022-09-23 00:09:25] frigate.app INFO : Starting Frigate (0.11.0-3846a13)
[2022-09-23 00:09:25] frigate.app INFO : Creating directory: /tmp/cache
Starting migrations
[2022-09-23 00:09:25] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-09-23 00:09:25] peewee_migrate INFO : There is nothing to migrate
[2022-09-23 00:09:26] detector.coral INFO : Starting detection process: 232
[2022-09-23 00:09:26] frigate.app INFO : Output process started: 235
[2022-09-23 00:09:26] frigate.edgetpu INFO : Attempting to load TPU as usb
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for Garage: 242
[2022-09-23 00:09:26] ws4py INFO : Using epoll
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for FrontGateDW: 245
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for BarnDW: 246
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for BackDoor: 248
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for SideDoor: 249
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for FrontDoor: 250
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for Frontgate: 252
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for DeerFeeder: 253
[2022-09-23 00:09:26] frigate.app INFO : Camera processor started for BarnDoor: 255
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for Garage: 256
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for FrontGateDW: 257
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for BarnDW: 261
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for BackDoor: 262
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for SideDoor: 267
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for FrontDoor: 271
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for Frontgate: 278
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for DeerFeeder: 284
[2022-09-23 00:09:26] frigate.app INFO : Capture process started for BarnDoor: 294
[2022-09-23 00:09:26] ws4py INFO : Using epoll
[2022-09-23 00:09:44] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57152]
[2022-09-23 00:09:49] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:57152]
[2022-09-23 00:09:26] detector.cpu1 INFO : Starting detection process: 233
[2022-09-23 00:09:26] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
Process detector:coral:
[2022-09-23 00:09:51] frigate.edgetpu ERROR : No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
delegate = Delegate(library, options)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
raise ValueError(capture.message)
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/frigate/frigate/edgetpu.py", line 135, in run_detector
object_detector = LocalObjectDetector(
File "/opt/frigate/frigate/edgetpu.py", line 43, in __init__
edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
raise ValueError('Failed to load delegate from {}\n{}'.format(
ValueError: Failed to load delegate from libedgetpu.so.1.0
[2022-09-23 00:09:56] frigate.watchdog INFO : Detection appears to have stopped. Exiting frigate...
[2022-09-23 00:09:56] frigate.app INFO : Stopping...
[2022-09-23 00:09:56] ws4py INFO : Closing all websockets with [1001] 'Server is shutting down'
[2022-09-23 00:09:56] frigate.events INFO : Exiting event cleanup...
[2022-09-23 00:09:56] frigate.stats INFO : Exiting watchdog...
[2022-09-23 00:09:56] frigate.watchdog INFO : Exiting watchdog...
[2022-09-23 00:09:56] frigate.record INFO : Exiting recording cleanup...
[2022-09-23 00:09:56] frigate.object_processing INFO : Exiting object processor...
[2022-09-23 00:09:57] frigate.record INFO : Exiting recording maintenance...
[2022-09-23 00:10:02] frigate.events INFO : Exiting event processor...
[2022-09-23 00:10:02] peewee.sqliteq INFO : writer received shutdown request, exiting.
[2022-09-23 00:10:02] root INFO : Waiting for detection process to exit gracefully...
[2022-09-23 00:10:02] root INFO : Waiting for detection process to exit gracefully...
/usr/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 30 leaked shared_memory objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '
[cmd] python3 exited 0
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
FFprobe output from your camera
n/a
Frigate stats
No response
Operating system
HassOS
Install method
HassOS Addon
Coral version
USB
Network connection
Wired
Camera make and model
Dahua, Amcrest, Other Chinese Dome camera
Any other information that may be helpful
I tried to revert to the backup made, but without any success, the backup does restore but immediatly fails for a different reason having to do with a python script.
The other strange thing is the addon doesn’t immediatly crash. It takes about 30 seconds and I even still get a few notifications about cars or people seen, etc. Clicking in Debug also shows the coral, but I think it’s just placeholder text since it shows an inference speed of 10 and it’s usually 25-30
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:17 (3 by maintainers)
Top GitHub Comments
i plugged the coral edge TPU into a different USB port, rebooted the server. did a lsusb, first shows as Global Unichip and after first inference showed as google. start up HA and all worked again https://github.com/google-coral/edgetpu/issues/536
yes, please try it. It should be in the frigate addon options page as a toggle switch.