frigate icon indicating copy to clipboard operation
frigate copied to clipboard

[Camera Support]: Coral not detected in proxmox

Open imatech opened this issue 1 year ago • 6 comments

Describe the problem you are having

1st time set up. Running into issues. 2024-01-15 16:24:37.112612650 [2024-01-15 16:24:37] frigate.video ERROR : EastFenceCam: Unable to read frames from ffmpeg process. 2024-01-15 16:24:37.112614370 [2024-01-15 16:24:37] frigate.video ERROR : EastFenceCam: ffmpeg process is not running. exiting capture thread...

Version

Newest

Frigate config file

mqtt:
  enabled: false
ffmpeg:
  hwaccel_args: preset-vaapi
detectors:
  coral:
    type: edgetpu
    device: usb
#Global Object Settings
objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
cameras:
  EastCam:
    ffmpeg:
      inputs:
        # High Resolution Stream
        - path: rtsp://10.0.0.178:34567
          roles:
            - record
        # Low Resolution Stream
        - path: rtsp://10.0.0.178:34567
          roles:
            - detect
    detect:
      width: 480
      height: 360
      fps: 24
  EastFenceCam:
    ffmpeg:
      inputs:
        # High Resolution Stream
        - path: rtsp://10.0.0.179:34567
          roles:
            - record
        # Low Resolution Stream
        - path: rtsp://10.0.0.179:34567
          roles:
            - detect
    detect:
      width: 480
      height: 360
      fps: 24
  1NewCam:
    ffmpeg:
      inputs:
        # High Resolution Stream
        - path: rtsp://10.0.0.180:34567
          roles:
            - record
        # Low Resolution Stream
        - path: rtsp://10.0.0.180:34567
          roles:
            - detect
    detect:
      width: 480
      height: 360
      fps: 24    
  2NewCam:
    ffmpeg:
      inputs:
        # High Resolution Stream
        - path: rtsp://10.0.0.224:34567
          roles:
            - record
        # Low Resolution Stream
        - path: rtsp://10.0.0.224:34567
          roles:
            - detect
    detect:
      width: 480
      height: 360
      fps: 24

Relevant log output

2024-01-15 16:30:11.820932985  Process detector:coral:
2024-01-15 16:30:11.825072179  Traceback (most recent call last):
2024-01-15 16:30:11.825077362    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 160, in load_delegate
2024-01-15 16:30:11.825078803      delegate = Delegate(library, options)
2024-01-15 16:30:11.825080324    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 119, in __init__
2024-01-15 16:30:11.825081618      raise ValueError(capture.message)
2024-01-15 16:30:11.825085799  ValueError
2024-01-15 16:30:11.825086933  
2024-01-15 16:30:11.825088512  During handling of the above exception, another exception occurred:
2024-01-15 16:30:11.825106764  
2024-01-15 16:30:11.825108121  Traceback (most recent call last):
2024-01-15 16:30:11.825109589    File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
2024-01-15 16:30:11.825110721      self.run()
2024-01-15 16:30:11.825112055    File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
2024-01-15 16:30:11.825135159      self._target(*self._args, **self._kwargs)
2024-01-15 16:30:11.825136920    File "/opt/frigate/frigate/object_detection.py", line 98, in run_detector
2024-01-15 16:30:11.825138775      object_detector = LocalObjectDetector(detector_config=detector_config)
2024-01-15 16:30:11.825140172    File "/opt/frigate/frigate/object_detection.py", line 52, in __init__
2024-01-15 16:30:11.825155135      self.detect_api = create_detector(detector_config)
2024-01-15 16:30:11.825156817    File "/opt/frigate/frigate/detectors/__init__.py", line 24, in create_detector
2024-01-15 16:30:11.825158080      return api(detector_config)
2024-01-15 16:30:11.825159433    File "/opt/frigate/frigate/detectors/plugins/edgetpu_tfl.py", line 37, in __init__
2024-01-15 16:30:11.825160779      edge_tpu_delegate = load_delegate("libedgetpu.so.1.0", device_config)
2024-01-15 16:30:11.825175966    File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 162, in load_delegate
2024-01-15 16:30:11.825177570      raise ValueError('Failed to load delegate from {}\n{}'.format(
2024-01-15 16:30:11.825178813  ValueError: Failed to load delegate from libedgetpu.so.1.0
2024-01-15 16:30:11.825179900  
2024-01-15 16:30:11.827808909  [2024-01-15 16:30:11] frigate.app                    INFO    : Camera processor started for EastCam: 288
2024-01-15 16:30:11.831894803  [2024-01-15 16:30:11] frigate.app                    INFO    : Camera processor started for EastFenceCam: 289
2024-01-15 16:30:11.835900071  [2024-01-15 16:30:11] frigate.app                    INFO    : Camera processor started for 1NewCam: 290
2024-01-15 16:30:11.840210531  [2024-01-15 16:30:11] frigate.app                    INFO    : Camera processor started for 2NewCam: 291
2024-01-15 16:30:11.846661582  [2024-01-15 16:30:11] frigate.app                    INFO    : Capture process started for EastCam: 292
2024-01-15 16:30:11.852900254  [2024-01-15 16:30:11] frigate.app                    INFO    : Capture process started for EastFenceCam: 294
2024-01-15 16:30:11.860266473  [2024-01-15 16:30:11] frigate.app                    INFO    : Capture process started for 1NewCam: 295
2024-01-15 16:30:11.864965183  [2024-01-15 16:30:11] frigate.app                    INFO    : Capture process started for 2NewCam: 298
2024-01-15 16:30:14.967668544  [2024-01-15 16:30:14] frigate.video                  ERROR   : 2NewCam: Unable to read frames from ffmpeg process.
2024-01-15 16:30:14.967884024  [2024-01-15 16:30:14] frigate.video                  ERROR   : EastFenceCam: Unable to read frames from ffmpeg process.
2024-01-15 16:30:14.968077846  [2024-01-15 16:30:14] frigate.video                  ERROR   : EastFenceCam: ffmpeg process is not running. exiting capture thread...
2024-01-15 16:30:14.968223152  [2024-01-15 16:30:14] frigate.video                  ERROR   : 2NewCam: ffmpeg process is not running. exiting capture thread...
2024-01-15 16:30:17.023737794  [2024-01-15 16:30:17] frigate.video                  ERROR   : 1NewCam: Unable to read frames from ffmpeg process.
2024-01-15 16:30:17.024070337  [2024-01-15 16:30:17] frigate.video                  ERROR   : 1NewCam: ffmpeg process is not running. exiting capture thread...
2024-01-15 16:30:17.027701296  [2024-01-15 16:30:17] frigate.video                  ERROR   : EastCam: Unable to read frames from ffmpeg process.
2024-01-15 16:30:17.027961812  [2024-01-15 16:30:17] frigate.video                  ERROR   : EastCam: ffmpeg process is not running. exiting capture thread...

FFprobe output from your camera

ffprobe is not working

Frigate stats

not sure how to get the stats...

api:
  origin: '*'
log:
  format: text
rtsp:
  default_query: mp4
webrtc:
  candidates:
  - stun:8555

Operating system

Proxmox

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

HiSeeYou

Any other information that may be helpful

No response

imatech avatar Jan 16 '24 02:01 imatech

your coral is not being detected, perhaps it is not being passed to frigate correctly

NickM-27 avatar Jan 16 '24 14:01 NickM-27

i've had good luck passing the entire USB port into frigate since the coral changes HW and Vendor ID's once its initialized. Im currently passing through the USB port to a VM and then running frigate on docker within the VM.

maxfield-allison avatar Jan 16 '24 20:01 maxfield-allison

If it helps, this is what the relevant part of my LXC conf looks like

lxc.mount.entry: /dev/bus/usb/002 dev/bus/usb/002 none bind,optional,create=dir 0, 0

root@pve:/etc/pve/lxc# lsusb 
Bus 002 Device 003: ID 18d1:9302 Google Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

and then in frigate:

detectors:
  coral:
    type: edgetpu

Plawasan avatar Jan 18 '24 16:01 Plawasan

Coral + Proxmox works fine for me. My system setup is below. Hope it helps.

Proxmox host (7.4-17)

# cat /etc/debian_version
11.8
# lsusb
Bus 002 Device 002: ID 18d1:9302 Google Inc.

Proxmox Virtual Machine Settings: Hardware -> USB -> "Use USB Port" host=2-2,usb3=1 (Got host=2-2 from Bus 002 and Device 002)

# cat /etc/redhat-release
Rocky Linux release 8.4 (Green Obsidian)
# lsusb
Bus 003 Device 002: ID 18d1:9302 Google Inc.

Frigate Config

detectors:
  coral:
    type: edgetpu
    device: usb

Frigate version: 0.12.1-367D724 Frigate is running in Docker container.

Vye avatar Jan 20 '24 05:01 Vye

pass your usb coral by usb port and not by id, because at each boot the id changes

ymab76 avatar Jan 31 '24 22:01 ymab76

VM or LXC? LXC was a pain but it is possible. I've since moved to unraid personally but I still have notes in case I ever decided to move back.

AriaGen avatar Feb 12 '24 21:02 AriaGen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Mar 14 '24 00:03 github-actions[bot]