mqtt:
enabled: True
host: 10.0.0.10
port: 1883
user: frigate
password: yourpassword
detectors:
ov:
type: openvino
device: AUTO
model:
path: /openvino-model/ssdlite_mobilenet_v2.xml
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
cameras:
your_camera:
enabled: true
ffmpeg:
hwaccel_args: preset-vaapi
inputs:
- path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
roles:
- detect
detect: #偵測設定
enabled: true
fps: 25
width: 1920
height: 1080
stationary:
interval: 30 #靜態偵測持續偵測影格
threshold: 150 #靜態偵測影格
snapshots: #快照
enabled: true
retain:
default: 10
objects:
track:
- person
- cat
#- cell phone
#- car
#mask: 0,0,1000,0,1000,200,0,200
# Optional: filters to reduce false positives for specific object types
filters:
person:
# Optional: minimum width*height of the bounding box for the detected object (default: 0)
#min_area: 5000
# Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
#max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
#min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
#max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
#threshold: 0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
docker启动frigate
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: "256mb" # update for your cameras based on calculation above
devices:
- /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/docker/frigate/config:/config
- /opt/docker/frigate/storage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
network_mode: "host"
environment:
FRIGATE_RTSP_PASSWORD: "password"
LIBVA_DRIVER_NAME: "i965