[HW Accel Support]: #15867
[HW Accel Support]:
#15867
-
Describe the problem you are havingRunning two Tesla P4 cards, I am able to take advantage of both card however I can't see stats of both cards for GPU Usage, GPU Memory, GPU Encoder and GPU Decoder. Perhaps it's a setting I missed or maybe a but since they both Tesla P4 GPUS? Version0.15.0-87e7b62 Frigate config filemqtt:
enabled: true
host: 192.168.5.60
port: 1883
user: mqtt-user
password: redacted
topic_prefix: frigate
birdseye:
enabled: true
mode: motion
quality: 8
objects:
track:
- person
- car
- dog
- cat
filters:
person:
threshold: 0.7
car:
threshold: 0.8
go2rtc:
ffmpeg:
hwaccel_args: preset-nvidia
# cuda0: "-fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -hwaccel_device 0 -rtsp_transport tcp -i {input}"
#cuda1: "-fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -hwaccel_device 1 -rtsp_transport tcp -i {input}"
streams:
walkway:
- rtsp://192.168.5.39:554/Preview_01_main
# walkway_sub:
# - rtsp://192.168.5.39:554/Preview_01_sub
Front-Door:
- rtsp://192.168.5.35:554/Streaming/Channels/101
Front-Door_sub:
- rtsp://192.168.5.35:554/Streaming/Channels/102
# - "ffmpeg:rtsp://192.168.5.35:554/Streaming/Channels/102#input=cuda1 -gpu 1#hardware=cuda"
Left-Driveway:
- rtsp://192.168.5.36:554/Streaming/Channels/101
Left-Driveway_sub:
- rtsp://@192.168.5.36:554/Streaming/Channels/102
Right-Driveway:
- rtsp://[email protected]:554/Streaming/Channels/101
Right-Driveway_sub:
- rtsp://@192.168.5.37:554/Streaming/Channels/102
Left-House:
- rtsp://192.168.5.33:554/Preview_01_main
#Left-House_sub:
#- rtsp://192.168.5.33:554/Preview_01_sub
Right-House:
- rtsp://192.168.5.30:554/Streaming/Channels/101
#Right-House_sub:
# - rtsp://192.168.5.30:554/Streaming/Channels/102
Backyard:
- rtsp://192.168.5.38:554/Preview_01_main
Backyard_sub:
- rtsp://192.168.5.38:554/Preview_01_sub
#"ffmpeg:rtsp://admin:redacted10.10.10.71:554/media/video0#input=cuda1-gpu 1#hardware=cuda"
record:
enabled: true
retain:
days: 1
mode: all
alerts:
retain:
days: 14
mode: motion
detections:
retain:
days: 14
mode: motion
snapshots:
enabled: true
retain:
default: 14
ffmpeg:
input_args: preset-rtsp-restream
hwaccel_args: preset-nvidia
detectors:
Tesla-P4-GPU1-Tensor1:
type: tensorrt
device: 0 #This is the default, select the first GPU
Tesla-P4-GPU1-Tensor2:
type: tensorrt
device: 0 #This is the default, select the first GPU
Tesla-P4-GPU2-Tensor1:
type: tensorrt
device: 1 #This is the default, select the first GPU
Tesla-P4-GPU2-Tensor2:
type: tensorrt
device: 1 #This is the default, select the first GPU
model:
path: /config/model_cache/tensorrt/yolov7-tiny-416.trt
input_tensor: nchw
input_pixel_format: rgb
width: 416
height: 416
cameras:
Walkway: # <------ Name the camera
enabled: true
ffmpeg:
global_args: -hwaccel_device 1
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/walkway # <----- The stream you want to use for detection
roles:
- record
- detect
detect:
fps: 10
enabled: true # <---- disable detection until you have a working camera feed
width: 1280
height: 720
motion:
mask:
0.233,0,1,0,1,0.406,0.853,0.261,0.371,0.269,0.179,0.642,0.123,0.757,0.446,0.78,0.609,0.841,1,0.958,1,1,0,1,0,0
threshold: 40
contour_area: 15
improve_contrast: true
objects:
track:
- person
- dog
- cat
mask: 0,0.421,0,0.002,0.999,0.001,1,0.285,0.895,0.17,0.246,0.206
Front-Door: # <------ Name the camera
enabled: true
ffmpeg:
output_args:
record: preset-record-generic-audio-copy
#hwaccel_args: preset-nvidia
inputs:
- path: rtsp://127.0.0.1:8554/Front-Door # <----- The stream you want to use for detection
roles:
- record
- path: rtsp://127.0.0.1:8554/Front-Door_sub # <----- The stream you want to use for detection
roles:
- detect
detect:
#fps: 10
enabled: true # <---- disable detection until you have a working camera feed
# width: 1280
# height: 720
motion:
mask:
0,0,0,0.578,0,1,0.314,1,0.115,0.514,0.094,0.342,0.178,0.119,0.256,0.061,0.297,0.027,0.495,0.012,0.522,0
threshold: 40
contour_area: 15
improve_contrast: true
objects:
track:
- person
mask:
0,1,0,0,0.281,0.001,0.28,0.021,0.15,0.111,0.092,0.29,0.084,0.421,0.116,0.67,0.22,0.972,0.226,0.997
Left-Driveway: # <------ Name the camera
enabled: true
ffmpeg:
global_args: -hwaccel_device 1
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/Left-Driveway # <----- The stream you want to use for detection
roles:
- record
- path: rtsp://127.0.0.1:8554/Left-Driveway_sub # <----- The stream you want to use for detection
roles:
- detect
detect:
# fps: 10
enabled: true # <---- disable detection until you have a working camera feed
# width: 1280
#height: 720
motion:
mask: 0,0,0,0.292,0.252,0.256,0.797,0.252,1,0.481,1,0
threshold: 40
contour_area: 15
improve_contrast: true
objects:
track:
- person
- dog
- cat
mask: 0,0.139,0,0,1,0,1,0.233,0.871,0.14,0.775,0.129,0.467,0.118
Right-Driveway: # <------ Name the camera
enabled: true
ffmpeg:
#global_args: -hwaccel_device 1
inputs:
- path: rtsp://127.0.0.1:8554/Right-Driveway # <----- The stream you want to use for detection
roles:
- record
- path: rtsp://127.0.0.1:8554/Right-Driveway_sub # <----- The stream you want to use for detection
roles:
- detect
detect:
#fps: 10
enabled: true # <---- disable detection until you have a working camera feed
# width: 1280
# height: 720
record:
enabled: true
retain:
days: 5
mode: motion
snapshots:
enabled: true
clean_copy: true
timestamp: true
bounding_box: true
retain:
default: 365
motion:
mask: 0,0,0,0.332,0.08,0.28,0.3,0.267,0.798,0.284,0.956,0.791,1,0.929,1,0
threshold: 40
contour_area: 15
improve_contrast: true
objects:
track:
- person
- dog
- cat
mask: 0,0.165,0.001,0,0.999,0.001,1,0.529,0.863,0.182,0.598,0.153,0.281,0.148
Left-House: # <------ Name the camera
enabled: true
ffmpeg:
global_args: -hwaccel_device 1
output_args:
record: preset-record-generic-audio-copy
hwaccel_args: preset-nvidia
inputs:
- path: rtsp://127.0.0.1:8554/Left-House # <----- The stream you want to use for detection
roles:
- record
- detect
detect:
fps: 10
enabled: true # <---- disable detection until you have a working camera feed
width: 1280
height: 720
motion:
mask:
- 0.001,0.275,0.271,0.1,0.345,0.132,0.442,0.142,0.605,0.102,0.713,0.037,0.785,0.04,0.922,0.075,0.917,1,1,1,1,0,0,0
- 0.052,1,0,0.846,0,1
threshold: 40
contour_area: 30
improve_contrast: true
objects:
track:
- person
- dog
- cat
mask:
0.002,0.004,0.001,0.244,0.273,0.085,0.513,0.093,0.743,0.028,0.943,0.065,0.927,1,1,1,1,0
filters:
person:
# Optional: minimum width*height of the bounding box for the detected object (default: 0)
min_area: 3000
Right-House: # <------ Name the camera
enabled: true
ffmpeg:
global_args: -hwaccel_device 1
inputs:
- path: rtsp://127.0.0.1:8554/Right-House # <----- The stream you want to use for detection
roles:
- record
- detect
# - path: rtsp://127.0.0.1:8554/Right-House_sub # <----- The stream you want to use for detection
# roles:
# - detect
detect:
fps: 10
enabled: true # <---- disable detection until you have a working camera feed
# width: 1280
# height: 720
motion:
mask:
0,0,0,0.443,0.417,0.219,0.625,0.104,0.72,0.044,0.803,0.038,0.815,0.19,0.818,0.45,0.792,1,0.911,1,1,1,1,0,0.805,0,0.215,0
threshold: 39
contour_area: 30
improve_contrast: true
objects:
track:
- person
- dog
- cat
mask:
0.002,0.364,0.004,0.007,0.815,0.001,0.998,0.006,0.999,0.996,0.81,0.993,0.829,0.058,0.796,0.022,0.707,0.03
Backyard: # <------ Name the camera
enabled: true
ffmpeg:
#global_args: -hwaccel_device 1
output_args:
record: preset-record-generic-audio-copy
hwaccel_args: preset-nvidia
inputs:
- path: rtsp://127.0.0.1:8554/Backyard # <----- The stream you want to use for detection
roles:
- record
- path: rtsp://127.0.0.1:8554/Backyard_sub # <----- The stream you want to use for detection
roles:
- detect
detect:
# fps: 5
enabled: true # <---- disable detection until you have a working camera feed
#width: 1536
#height: 482
motion:
mask:
0,0,0.278,0,1,0,1,1,0.75,1,0.787,0.327,0.77,0.209,0.736,0.173,0.343,0.114,0.276,0.226,0.243,0.368,0.175,1,0,1,0,0.772
threshold: 50
contour_area: 30
improve_contrast: true
objects:
track:
- person
- dog
- cat
mask:
0,0.953,0.187,0.295,0.294,0.114,0.491,0.116,0.745,0.115,0.809,0.134,0.786,1,1,1,1,0,0.002,0.001
version: 0.15-0
semantic_search:
enabled: true
reindex: true
model_size: large
camera_groups:
Front:
order: 1
icon: LuActivity
cameras:
- Walkway
- Front-Door
- Left-Driveway
- Right-Driveway 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:0.15.0-beta4-tensorrt
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0','1']
#count: 2
capabilities: [gpu]
shm_size: "8gb" # update for your cameras based on calculation above
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/docker/volumes/frigate-config:/config
- /mnt/docker-volumes/Frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 8000000000
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
TZ: "America/Toronto"
FRIGATE_RTSP_PASSWORD: "1234"
YOLO_MODELS: "yolov7-tiny-416"
NVIDIA_VISIBLE_DEVICEs: all
NVIDIA_DRIVER_CAPABILITIES: all Relevant Frigate log output2025-01-07 00:37:23.624752107 [2025-01-06 19:37:23] frigate.app INFO : Camera processor started for Right-House: 632
2025-01-07 00:37:23.624896559 [2025-01-06 19:37:23] frigate.app INFO : Camera processor started for Backyard: 636
2025-01-07 00:37:23.625105959 [2025-01-06 19:37:23] frigate.app INFO : Capture process started for Walkway: 668
2025-01-07 00:37:23.625206500 [2025-01-06 19:37:23] frigate.app INFO : Capture process started for Front-Door: 671
2025-01-07 00:37:23.625310989 [2025-01-06 19:37:23] frigate.app INFO : Capture process started for Left-Driveway: 675
2025-01-07 00:37:23.625422724 [2025-01-06 19:37:23] frigate.app INFO : Capture process started for Right-Driveway: 687
2025-01-07 00:37:23.626144532 [2025-01-06 19:37:23] frigate.app INFO : Capture process started for Left-House: 691
2025-01-07 00:37:23.626244753 [2025-01-06 19:37:23] frigate.app INFO : Capture process started for Right-House: 695
2025-01-07 00:37:23.626341771 [2025-01-06 19:37:23] frigate.app INFO : Capture process started for Backyard: 701
2025-01-07 00:37:23.651585769 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : Loaded engine size: 35 MiB
2025-01-07 00:37:23.651626118 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : Loaded engine size: 35 MiB
2025-01-07 00:37:23.653653141 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : Loaded engine size: 35 MiB
2025-01-07 00:37:23.745863713 [2025-01-06 19:37:23] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-01-07 00:37:23.808052779 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +6, GPU +48, now: CPU 295, GPU 982 (MiB)
2025-01-07 00:37:23.828298827 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +2, GPU +10, now: CPU 297, GPU 992 (MiB)
2025-01-07 00:37:23.843796736 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +6, GPU +10, now: CPU 295, GPU 992 (MiB)
2025-01-07 00:37:23.849068952 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +6, GPU +10, now: CPU 295, GPU 994 (MiB)
2025-01-07 00:37:23.854342048 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +34, now: CPU 0, GPU 34 (MiB)
2025-01-07 00:37:23.870016980 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 262, GPU 984 (MiB)
2025-01-07 00:37:23.875326040 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +6, GPU +16, now: CPU 295, GPU 1002 (MiB)
2025-01-07 00:37:23.890959527 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +0, GPU +8, now: CPU 262, GPU 1000 (MiB)
2025-01-07 00:37:23.896237151 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +13, now: CPU 0, GPU 47 (MiB)
2025-01-07 00:37:23.896346259 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +2, GPU +18, now: CPU 297, GPU 1012 (MiB)
2025-01-07 00:37:23.896636154 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +2, GPU +34, now: CPU 297, GPU 1026 (MiB)
2025-01-07 00:37:23.896695861 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +2, GPU +4, now: CPU 297, GPU 1006 (MiB)
2025-01-07 00:37:23.907223773 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +34, now: CPU 0, GPU 34 (MiB)
2025-01-07 00:37:23.912495332 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +34, now: CPU 0, GPU 34 (MiB)
2025-01-07 00:37:23.917720262 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +34, now: CPU 0, GPU 34 (MiB)
2025-01-07 00:37:23.923013589 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 262, GPU 998 (MiB)
2025-01-07 00:37:23.923043491 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +8, now: CPU 262, GPU 1018 (MiB)
2025-01-07 00:37:23.926746127 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +0, GPU +8, now: CPU 262, GPU 1006 (MiB)
2025-01-07 00:37:23.926769327 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +22, now: CPU 262, GPU 1028 (MiB)
2025-01-07 00:37:23.926917613 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +0, GPU +8, now: CPU 262, GPU 1026 (MiB)
2025-01-07 00:37:23.927092161 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +13, now: CPU 0, GPU 47 (MiB)
2025-01-07 00:37:23.927140930 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +13, now: CPU 0, GPU 47 (MiB)
2025-01-07 00:37:23.927225176 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] Init cuDNN: CPU +0, GPU +10, now: CPU 262, GPU 1038 (MiB)
2025-01-07 00:37:23.927228110 [2025-01-06 19:37:23] frigate.detectors.plugins.tensorrt INFO : [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +13, now: CPU 0, GPU 47 (MiB)
2025-01-07 00:37:23.942876386 [2025-01-06 19:37:23] frigate.api.fastapi_app INFO : FastAPI started
2025-01-07 00:37:25.675073555 [2025-01-06 19:37:25] frigate.embeddings.embeddings INFO : Indexing tracked object embeddings...
2025-01-07 00:37:36.186333603 [2025-01-06 19:37:36] frigate.embeddings.embeddings INFO : Embedded 569 thumbnails and 0 descriptions in 10.5 seconds Relevant go2rtc log output2025-01-07 00:37:01.924215824 [INFO] Preparing new go2rtc config...
2025-01-07 00:37:02.537357728 [INFO] Starting go2rtc...
2025-01-07 00:37:02.691788731 19:37:02.691 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2
2025-01-07 00:37:02.691832520 19:37:02.691 INF config path=/dev/shm/go2rtc.yaml
2025-01-07 00:37:02.692667956 19:37:02.692 INF [rtsp] listen addr=:8554
2025-01-07 00:37:02.692745492 19:37:02.692 INF [api] listen addr=:1984
2025-01-07 00:37:02.692990206 19:37:02.692 INF [webrtc] listen addr=:8555/tcp
2025-01-07 00:37:11.923783658 [INFO] Starting go2rtc healthcheck service... FFprobe output from your cameran/a Install methodDocker Compose Object DetectorTensorRT Network connectionWired Camera make and modelReolink, Hikvision Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Answered by
NickM-27
Jan 8, 2025
Replies: 1 comment 11 replies
-
We will need to see a copy of the stats api response |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have put up a PR to fix this in 0.15