[Detector Support]: tensorrt detection issue #15426
-
Describe the problem you are havingwas running with dual coral tpu which worked fine. Version0.14.1-f4f3cfa Frigate config file/opt/frigate/config$ cat config.yaml
timestamp_style:
position: br
detectors:
#coral1:
# type: edgetpu
# device: pci:0
#coral2:
# type: edgetpu
# device: pci:1
tensorrt:
type: tensorrt
device: 0 # Use GPU index 0
model:
path: /config/model_cache/tensorrt/yolov7-320.trt # Path to the YOLOv7 model
input_tensor: nchw
input_pixel_format: rgb
width: 320
height: 320
ffmpeg:
hwaccel_args:
- -hwaccel
- cuda
objects:
track:
- person
- car
- motorcycle
- bicycle
- dog
- cat
- truck
- bird
- umbrella
- handbag
- backpack
filters:
person:
threshold: 0.75
car:
threshold: 0.75
motorcycle:
threshold: 0.75
bicycle:
threshold: 0.75
dog:
threshold: 0.75
cat:
threshold: 0.75
truck:
threshold: 0.75
bird:
threshold: 0.75
umbrella:
threshold: 0.75
handbag:
threshold: 0.75
backpack:
threshold: 0.75
record:
enabled: true # Enable video recording.
retain:
days: 7 # Keep continuous recordings for 7 days.
mode: motion # Only record when motion is detected.
events:
retain:
default: 30 # Keep motion event recordings for 30 days.
mode: motion
cameras:
3F_Hallway:
enabled: true
ffmpeg:
inputs:
- path: "rtsp://username:[email protected]:554/h265Preview_01_main"
roles:
- detect
- record
detect:
enabled: true
width: 2560
height: 1440
fps: 5
snapshots:
enabled: true
timestamp: true
bounding_box: true
retain:
default: 30
objects:
track:
- person
record:
enabled: true
retain:
days: 7
motion:
mask: 0.347,0.005,0.346,0.044,0.646,0.048,0.646,-0.002
version: 0.14 docker-compose file or Docker CLI command/opt/frigate$ cat docker-compose.yml
version: "3.9"
services:
frigate:
container_name: frigate
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable-tensorrt
runtime: nvidia # Use NVIDIA runtime for GPU support
environment:
- NVIDIA_VISIBLE_DEVICES=all # Use all available GPUs
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video # Allow compute, video, and utility capabilities
- CAMERA_USERNAME=${CAMERA_USERNAME} # Pass the variable
- CAMERA_PASSWORD=${CAMERA_PASSWORD} # Pass the variable
- YOLO_MODELS=yolov7-320,yolov7x-640 # Specify YOLOv7 models to generate
- USE_FP16=true # Enable FP16 precision if supported by the GPU
- TRT_MODEL_PREP_DEVICE=0 # Specify GPU index for model optimization
volumes:
- /opt/frigate/config:/config # Frigate configuration
- /mnt/videos:/media/frigate # Video storage on HDD
- /opt/frigate/logs:/var/log/frigate # Persistent logs
- type: tmpfs
target: /tmp/cache # Temporary files in RAM
tmpfs:
size: 15g
shm_size: 10g # Shared memory size
#devices:
# - "/dev/apex_0:/dev/apex_0" # Coral TPU
# - "/dev/apex_1:/dev/apex_1" # Coral TPU
ports:
- "8971:8971" # Web UI
- "8554:8554" # RTSP feeds
healthcheck:
test: ["CMD-SHELL", "curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1"]
interval: 15s
timeout: 5s
retries: 3 Relevant Frigate log outputttps://192.168.0.206:8971/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
2024-12-10 03:52:41.135061866 192.168.0.151 - - [10/Dec/2024:03:52:41 +0000] "GET /api/3F_Hallway/latest.webp?h=240&cache=1733802761117 HTTP/1.1" 200 9706 "https://192.168.0.206:8971/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
2024-12-10 03:52:41.381248940 192.168.0.151 - - [10/Dec/2024:03:52:41 +0000] "GET /api/3F_Hallway/latest.webp?h=240&cache=1733802761360 HTTP/1.1" 200 9586 "https://192.168.0.206:8971/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
2024-12-10 03:52:41.622575433 192.168.0.151 - - [10/Dec/2024:03:52:41 +0000] "GET /api/3F_Hallway/latest.webp?h=240&cache=1733802761607 HTTP/1.1" 200 9664 "https://192.168.0.206:8971/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
2024-12-10 03:52:41.864724678 192.168.0.151 - - [10/Dec/2024:03:52:41 +0000] "GET /api/3F_Hallway/latest.webp?h=240&cache=1733802761848 HTTP/1.1" 200 9620 "https://192.168.0.206:8971/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
2024-12-10 03:52:41.949369172 192.168.0.151 - - [10/Dec/2024:03:52:41 +0000] "GET /live/jsmpeg/3F_Hallway HTTP/1.1" 101 139944 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
2024-12-10 03:52:43.624664686 192.168.0.151 - - [10/Dec/2024:03:52:43 +0000] "GET /api/config HTTP/1.1" 200 11263 "https://192.168.0.206:8971/system" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" "-"
2024-12-10 03:53:36.185962063 127.0.0.1 - - [10/Dec/2024:03:53:36 +0000] "" 400 0 "-" "-" "-"
2024-12-10 03:54:36.213693286 127.0.0.1 - - [10/Dec/2024:03:54:36 +0000] "" 400 0 "-" "-" "-"
2024-12-10 03:55:36.241785154 127.0.0.1 - - [10/Dec/2024:03:55:36 +0000] "" 400 0 "-" "-" "-"
it's up and running, no errors here Install methodDocker Compose Object DetectorTensorRT Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpful/opt/frigate/config/model_cache/tensorrt$ ls |
Beta Was this translation helpful? Give feedback.
Answered by
levski
Dec 10, 2024
Replies: 1 comment
-
turns out model directory was not mounting properly. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
NickM-27
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
turns out model directory was not mounting properly.