Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HW Accel Support]: GPU memory hog + CPU usage too high #9365

Closed
silverbladeg opened this issue Jan 17, 2024 · 7 comments
Closed

[HW Accel Support]: GPU memory hog + CPU usage too high #9365

silverbladeg opened this issue Jan 17, 2024 · 7 comments

Comments

@silverbladeg
Copy link

Describe the problem you are having

Hi, after a lot of trial and error, finally got hwaccel working on frigate. I have a an old server (Dual Xeon's from 2012 i believe), an old AMD GPU (also from 2012) and a PCIE TPU all accessible by the LXC (proxmox) that's running the frigate docker container.

Complete novice on this, i'll provide as much information as I can, see image, it shows very little CPU usage (but proxmox is showing me ~40% usage across 6 cores), its showing 10% GPU usage and a really really massive GPU memory %.

image

I have 6 cameras. Any help much appreciated.

VAINFO:
{"return_code":0,"stderr":"","stdout":"vainfo:VA-APIversion:1.17(libva2.10.0)nvainfo:Driverversion:MesaGalliumdriver22.3.6forPITCAIRN(,LLVM15.0.6,DRM2.50,5.15.30-2-pve)nvainfo:SupportedprofileandentrypointsnVAProfileMPEG2Simple:tVAEntrypointVLDnVAProfileMPEG2Main:tVAEntrypointVLDnVAProfileVC1Simple:tVAEntrypointVLDnVAProfileVC1Main:tVAEntrypointVLDnVAProfileVC1Advanced:tVAEntrypointVLDnVAProfileH264ConstrainedBaseline:tVAEntrypointVLDnVAProfileH264ConstrainedBaseline:tVAEntrypointEncSlicenVAProfileH264Main:tVAEntrypointVLDnVAProfileH264Main:tVAEntrypointEncSlicenVAProfileH264High:tVAEntrypointVLDnVAProfileH264High:tVAEntrypointEncSlicenVAProfileNone:tVAEntrypointVideoProc"}

Version

SYSTEM 0.12.1-367D724

Frigate config file

mqtt:
  enabled: True
  host: 192.168.0.110
  port: 1883
  user: frigate
  password: password

detectors: # <---- add detectors
  coral:
    type: edgetpu
    device: pci:0

# detectors:
#   coral:
#     type: edgetpu
#     device: usb

environment_vars:
  LIBVA_DRIVER_NAME: radeonsi

ffmpeg:
  hwaccel_args: preset-vaapi

birdseye:
  enabled: True
  mode: continuous
  restream: True

go2rtc:
  streams:
    Back2:
      - rtsp://admin:[email protected]:554/cam/realmonitor?channel=6&subtype=2 # <----- The stream you want to use for detection

cameras:
  Porch: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=2 # <----- The stream you want to use for detection
          roles:
            - detect
    detect:
      enabled: False # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 560 # <---- update for your camera's resolution

  Driveway: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=3&subtype=2 # <----- The stream you want to use for detection
          roles:
            - detect
    detect:
      enabled: False # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 560 # <---- update for your camera's resolution

  Stairs: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=2&subtype=2 # <----- The stream you want to use for detection
          roles:
            - detect
    detect:
      # enabled: False # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
      fps: 19
    objects:
      track:
        - person
        - dog
    snapshots:
      enabled: true

  Alley: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=4&subtype=2 # <----- The stream you want to use for detection
          roles:
            - detect
    detect:
      # enabled: False # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
      fps: 19
    objects:
      track:
        - person
        - dog
    snapshots:
      enabled: true

  Backyard: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=5&subtype=2 # <----- The stream you want to use for detection
          roles:
            - detect
    detect:
      enabled: False # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution

  Back2: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=6&subtype=2 # <----- The stream you want to use for detection
          roles:
            - detect
    detect:
      enabled: False # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 560 # <---- update for your camera's resolution

docker-compose file or Docker CLI command

version: "3.9"
services:
  frigate:
    container_name: frigate
    privileged: true # this may not be necessary for all setups
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable
    shm_size: "1gb" # update for your cameras based on calculation above
    devices:
#      - /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>
      - /dev/dri/renderD128:/dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /root/containers/frigate/config.yml:/config/config.yml
      - /root/containers/frigate/media:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    environment:
      FRIGATE_RTSP_PASSWORD: "password"
      LIBVA_DRIVER_NAME: radeonsi

Relevant log output

2024-01-17 00:28:23.895329616  [INFO] Starting Frigate...
2024-01-17 00:28:26.291122797  [2024-01-17 00:28:26] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2024-01-17 00:28:26.366744302  [2024-01-17 00:28:26] peewee_migrate                 INFO    : Starting migrations
2024-01-17 00:28:26.374746392  [2024-01-17 00:28:26] peewee_migrate                 INFO    : There is nothing to migrate
2024-01-17 00:28:26.416642234  [2024-01-17 00:28:26] frigate.app                    INFO    : Output process started: 959
2024-01-17 00:28:26.418691609  [2024-01-17 00:28:26] detector.coral                 INFO    : Starting detection process: 958
2024-01-17 00:28:26.426292166  [2024-01-17 00:28:26] frigate.detectors.plugins.edgetpu_tfl INFO    : Attempting to load TPU as pci:0
2024-01-17 00:28:26.427070914  [2024-01-17 00:28:26] frigate.detectors.plugins.edgetpu_tfl INFO    : TPU found
2024-01-17 00:28:26.431598851  [2024-01-17 00:28:26] frigate.app                    INFO    : Camera processor started for Porch: 979
2024-01-17 00:28:26.432596280  [2024-01-17 00:28:26] frigate.app                    INFO    : Camera processor started for Driveway: 980
2024-01-17 00:28:26.449397030  [2024-01-17 00:28:26] frigate.app                    INFO    : Camera processor started for Stairs: 982
2024-01-17 00:28:26.450786652  [2024-01-17 00:28:26] frigate.app                    INFO    : Camera processor started for Alley: 983
2024-01-17 00:28:26.450943590  [2024-01-17 00:28:26] frigate.app                    INFO    : Camera processor started for Backyard: 985
2024-01-17 00:28:26.457414514  [2024-01-17 00:28:26] frigate.app                    INFO    : Camera processor started for Pool: 986
2024-01-17 00:28:26.462725733  [2024-01-17 00:28:26] frigate.app                    INFO    : Capture process started for Porch: 988
2024-01-17 00:28:26.470001883  [2024-01-17 00:28:26] frigate.app                    INFO    : Capture process started for Driveway: 991
2024-01-17 00:28:26.475039127  [2024-01-17 00:28:26] frigate.app                    INFO    : Capture process started for Stairs: 994
2024-01-17 00:28:26.480813499  [2024-01-17 00:28:26] frigate.app                    INFO    : Capture process started for Alley: 998
2024-01-17 00:28:26.486608489  [2024-01-17 00:28:26] frigate.app                    INFO    : Capture process started for Backyard: 1004
2024-01-17 00:28:26.494132458  [2024-01-17 00:28:26] frigate.app                    INFO    : Capture process started for Pool: 1008
2024-01-17 00:28:33.458651692  [2024-01-17 00:28:33] frigate.http                   ERROR   : Exception on /Alley/latest.jpg [GET]
2024-01-17 00:28:33.458665235  Traceback (most recent call last):
2024-01-17 00:28:33.458677749    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:33.458684532      response = self.full_dispatch_request()
2024-01-17 00:28:33.458689413    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:33.458717214      rv = self.handle_user_exception(e)
2024-01-17 00:28:33.458722069    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:33.458726991      rv = self.dispatch_request()
2024-01-17 00:28:33.458731341    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:33.458777603      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:33.458782214    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:33.458786762      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:33.458792983  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:33.458818412  
2024-01-17 00:28:33.476887710  [2024-01-17 00:28:33] frigate.http                   ERROR   : Exception on /Porch/latest.jpg [GET]
2024-01-17 00:28:33.476900254  Traceback (most recent call last):
2024-01-17 00:28:33.476904891    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:33.476908780      response = self.full_dispatch_request()
2024-01-17 00:28:33.476913068    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:33.476916683      rv = self.handle_user_exception(e)
2024-01-17 00:28:33.476920974    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:33.476924505      rv = self.dispatch_request()
2024-01-17 00:28:33.476928642    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:33.476932632      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:33.476936397    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:33.476940316      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:33.476944972  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:33.476948115  
2024-01-17 00:28:33.481181530  [2024-01-17 00:28:33] frigate.http                   ERROR   : Exception on /Stairs/latest.jpg [GET]
2024-01-17 00:28:33.481189419  Traceback (most recent call last):
2024-01-17 00:28:33.481194107    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:33.481197936      response = self.full_dispatch_request()
2024-01-17 00:28:33.481202264    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:33.481205852      rv = self.handle_user_exception(e)
2024-01-17 00:28:33.481210089    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:33.481213611      rv = self.dispatch_request()
2024-01-17 00:28:33.481217761    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:33.481221603      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:33.481225416    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:33.481229366      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:33.481234060  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:33.481237191  
2024-01-17 00:28:33.483495886  [2024-01-17 00:28:33] frigate.http                   ERROR   : Exception on /Driveway/latest.jpg [GET]
2024-01-17 00:28:33.483508383  Traceback (most recent call last):
2024-01-17 00:28:33.483513117    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:33.483516967      response = self.full_dispatch_request()
2024-01-17 00:28:33.483521324    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:33.483524976      rv = self.handle_user_exception(e)
2024-01-17 00:28:33.483529206    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:33.483532571      rv = self.dispatch_request()
2024-01-17 00:28:33.483536782    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:33.483540631      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:33.483544613    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:33.483548596      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:33.483553234  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:33.483556329  
2024-01-17 00:28:33.493822582  [2024-01-17 00:28:33] frigate.http                   ERROR   : Exception on /Pool/latest.jpg [GET]
2024-01-17 00:28:33.493831296  Traceback (most recent call last):
2024-01-17 00:28:33.493835954    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:33.493839924      response = self.full_dispatch_request()
2024-01-17 00:28:33.493844080    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:33.493847649      rv = self.handle_user_exception(e)
2024-01-17 00:28:33.493851826    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:33.493855321      rv = self.dispatch_request()
2024-01-17 00:28:33.493859454    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:33.493863427      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:33.493867210    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:33.493871195      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:33.493875861  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:33.493878898  
2024-01-17 00:28:33.535112080  [2024-01-17 00:28:33] frigate.http                   ERROR   : Exception on /Backyard/latest.jpg [GET]
2024-01-17 00:28:33.535125652  Traceback (most recent call last):
2024-01-17 00:28:33.535130341    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:33.535133992      response = self.full_dispatch_request()
2024-01-17 00:28:33.535138303    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:33.535141864      rv = self.handle_user_exception(e)
2024-01-17 00:28:33.535145971    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:33.535149339      rv = self.dispatch_request()
2024-01-17 00:28:33.535153452    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:33.535157329      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:33.535161251    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:33.535165215      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:33.535169942  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:33.535173531  
2024-01-17 00:28:58.973393902  [2024-01-17 00:28:58] frigate.http                   ERROR   : Exception on /Alley/latest.jpg [GET]
2024-01-17 00:28:58.973407207  Traceback (most recent call last):
2024-01-17 00:28:58.973411979    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:58.973415835      response = self.full_dispatch_request()
2024-01-17 00:28:58.973420459    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:58.973424299      rv = self.handle_user_exception(e)
2024-01-17 00:28:58.973428592    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:58.973432057      rv = self.dispatch_request()
2024-01-17 00:28:58.973436298    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:58.973440264      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:58.973444039    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:58.973448013      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:58.973452737  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:58.973455818  
2024-01-17 00:28:58.973460085  [2024-01-17 00:28:58] frigate.http                   ERROR   : Exception on /Pool/latest.jpg [GET]
2024-01-17 00:28:58.973463677  Traceback (most recent call last):
2024-01-17 00:28:58.973470300    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:58.973473785      response = self.full_dispatch_request()
2024-01-17 00:28:58.973478021    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:58.973538935      rv = self.handle_user_exception(e)
2024-01-17 00:28:58.973543764    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:58.973547102      rv = self.dispatch_request()
2024-01-17 00:28:58.973551586    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:58.973555425      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:58.973559194    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:58.973596738      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:58.973602115  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:58.973605235  
2024-01-17 00:28:58.977868291  [2024-01-17 00:28:58] frigate.http                   ERROR   : Exception on /Driveway/latest.jpg [GET]
2024-01-17 00:28:58.977876505  Traceback (most recent call last):
2024-01-17 00:28:58.977881229    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:58.977884978      response = self.full_dispatch_request()
2024-01-17 00:28:58.977889402    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:58.977893025      rv = self.handle_user_exception(e)
2024-01-17 00:28:58.977897154    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:58.977900589      rv = self.dispatch_request()
2024-01-17 00:28:58.977904736    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:58.977908602      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:58.977912518    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:58.977916501      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:58.977921223  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:58.977924320  
2024-01-17 00:28:58.985122055  [2024-01-17 00:28:58] frigate.http                   ERROR   : Exception on /Backyard/latest.jpg [GET]
2024-01-17 00:28:58.985130305  Traceback (most recent call last):
2024-01-17 00:28:58.985134973    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:58.985138772      response = self.full_dispatch_request()
2024-01-17 00:28:58.985143149    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:58.985146828      rv = self.handle_user_exception(e)
2024-01-17 00:28:58.985151065    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:58.985154513      rv = self.dispatch_request()
2024-01-17 00:28:58.985158656    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:58.985162643      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:58.985166656    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:58.985170649      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:58.985175404  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:58.985178574  
2024-01-17 00:28:58.997580759  [2024-01-17 00:28:58] frigate.http                   ERROR   : Exception on /Porch/latest.jpg [GET]
2024-01-17 00:28:58.997591008  Traceback (most recent call last):
2024-01-17 00:28:58.997595850    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:58.997599805      response = self.full_dispatch_request()
2024-01-17 00:28:58.997604230    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:58.997607819      rv = self.handle_user_exception(e)
2024-01-17 00:28:58.997612052    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:58.997615537      rv = self.dispatch_request()
2024-01-17 00:28:58.997619690    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:58.997623690      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:58.997627466    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:58.997631489      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:58.997636240  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:58.997639358  
2024-01-17 00:28:59.008625013  [2024-01-17 00:28:58] frigate.http                   ERROR   : Exception on /Stairs/latest.jpg [GET]
2024-01-17 00:28:59.008637794  Traceback (most recent call last):
2024-01-17 00:28:59.008642358    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:28:59.008646361      response = self.full_dispatch_request()
2024-01-17 00:28:59.008650909    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:28:59.008654447      rv = self.handle_user_exception(e)
2024-01-17 00:28:59.008658617    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:28:59.008661949      rv = self.dispatch_request()
2024-01-17 00:28:59.008665962    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:28:59.008669674      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:28:59.008673450    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:28:59.008677212      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:28:59.008681850  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:28:59.008684894  
2024-01-17 00:30:51.153195593  [2024-01-17 00:30:51] frigate.http                   ERROR   : Exception on /Driveway/latest.jpg [GET]
2024-01-17 00:30:51.153209112  Traceback (most recent call last):
2024-01-17 00:30:51.153213934    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:30:51.153217776      response = self.full_dispatch_request()
2024-01-17 00:30:51.153222297    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:30:51.153225923      rv = self.handle_user_exception(e)
2024-01-17 00:30:51.153230039    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:30:51.153233497      rv = self.dispatch_request()
2024-01-17 00:30:51.153237597    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:30:51.153241536      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:30:51.153245516    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:30:51.153249439      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:30:51.153254034  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:30:51.153257121  
2024-01-17 00:30:51.155288233  [2024-01-17 00:30:51] frigate.http                   ERROR   : Exception on /Backyard/latest.jpg [GET]
2024-01-17 00:30:51.155294749  Traceback (most recent call last):
2024-01-17 00:30:51.155298816    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:30:51.155302261      response = self.full_dispatch_request()
2024-01-17 00:30:51.155306471    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:30:51.155309933      rv = self.handle_user_exception(e)
2024-01-17 00:30:51.155313975    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:30:51.155317350      rv = self.dispatch_request()
2024-01-17 00:30:51.155321490    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:30:51.155325300      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:30:51.155329149    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:30:51.155333091      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:30:51.155337629  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:30:51.155340650  
2024-01-17 00:30:51.158849948  [2024-01-17 00:30:51] frigate.http                   ERROR   : Exception on /Alley/latest.jpg [GET]
2024-01-17 00:30:51.158857740  Traceback (most recent call last):
2024-01-17 00:30:51.158862404    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:30:51.158866214      response = self.full_dispatch_request()
2024-01-17 00:30:51.158870491    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:30:51.158874029      rv = self.handle_user_exception(e)
2024-01-17 00:30:51.158878283    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:30:51.158881781      rv = self.dispatch_request()
2024-01-17 00:30:51.158886085    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:30:51.158890081      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:30:51.158893864    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:30:51.158897834      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:30:51.158902515  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:30:51.158905746  
2024-01-17 00:30:51.333101176  [2024-01-17 00:30:51] frigate.http                   ERROR   : Exception on /Pool/latest.jpg [GET]
2024-01-17 00:30:51.333114735  Traceback (most recent call last):
2024-01-17 00:30:51.333119434    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:30:51.333123263      response = self.full_dispatch_request()
2024-01-17 00:30:51.333127526    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:30:51.333131439      rv = self.handle_user_exception(e)
2024-01-17 00:30:51.333135663    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:30:51.333139104      rv = self.dispatch_request()
2024-01-17 00:30:51.333143257    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:30:51.333147194      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:30:51.333151076    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:30:51.333155023      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:30:51.333159667  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:30:51.333162711  
2024-01-17 00:30:51.341012769  [2024-01-17 00:30:51] frigate.http                   ERROR   : Exception on /Porch/latest.jpg [GET]
2024-01-17 00:30:51.341021494  Traceback (most recent call last):
2024-01-17 00:30:51.341026195    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:30:51.341030025      response = self.full_dispatch_request()
2024-01-17 00:30:51.341034328    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:30:51.341037823      rv = self.handle_user_exception(e)
2024-01-17 00:30:51.341042003    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:30:51.341045482      rv = self.dispatch_request()
2024-01-17 00:30:51.341049688    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:30:51.341053698      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:30:51.341057607    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:30:51.341061614      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:30:51.341066392  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:30:51.341069490  
2024-01-17 00:30:51.345092113  [2024-01-17 00:30:51] frigate.http                   ERROR   : Exception on /Stairs/latest.jpg [GET]
2024-01-17 00:30:51.345099216  Traceback (most recent call last):
2024-01-17 00:30:51.345103493    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2529, in wsgi_app
2024-01-17 00:30:51.345107095      response = self.full_dispatch_request()
2024-01-17 00:30:51.345111432    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1825, in full_dispatch_request
2024-01-17 00:30:51.345115001      rv = self.handle_user_exception(e)
2024-01-17 00:30:51.345119141    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1823, in full_dispatch_request
2024-01-17 00:30:51.345122532      rv = self.dispatch_request()
2024-01-17 00:30:51.345126669    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1799, in dispatch_request
2024-01-17 00:30:51.345130548      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-01-17 00:30:51.345173021    File "/opt/frigate/frigate/http.py", line 897, in latest_frame
2024-01-17 00:30:51.345178577      frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
2024-01-17 00:30:51.345183313  cv2.error: OpenCV(4.5.5) /io/opencv/modules/imgproc/src/resize.cpp:4055: error: (-215:Assertion failed) inv_scale_x > 0 in function 'resize'
2024-01-17 00:30:51.345186423

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"25/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":560,"width":1280},{"avg_frame_rate":"0/0","bit_rate":"64000","codec_long_name":"PCMA-law/G.711A-law"}]}}]

Operating system

Debian

Install method

Docker Compose

Network connection

Wired

Camera make and model

Dahua

Any other information that may be helpful

No response

@NickM-27
Copy link
Collaborator

the gpu usage is likely a bug with the gpu driver. also some of your cpu usage is likely that you are running multiple cameras at 1280x560 which is not a standard aspect ratio

@silverbladeg
Copy link
Author

Thank you for the quick response - so is the gpu usage not something i should be concerned about it?

I removed all the cameras with 1280x560, the cpu load is a bit less (25-30%) vs 40 but that's because half the cameras are now not being processed at all.

What logs should i be looking at to help figure this out further. any ideas welcome. thanks

@NickM-27
Copy link
Collaborator

what is the actual resolution of those camera streams? I wasn't suggesting that they be removed, just that the detect resolution is something reasonable

@silverbladeg
Copy link
Author

silverbladeg commented Jan 18, 2024

That 1280x560 is one of two options available in the camera interference for substream #2. The main stream has significantly bigger resolutions but this is a 180dedgree camera, 4k-t180.

@NickM-27
Copy link
Collaborator

I see, that is interesting, to be clear is it 128x560 or 1280x560 ?

@silverbladeg
Copy link
Author

1280

Copy link

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 github-actions bot added the stale label Feb 21, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants