Files
dataset-yolo-script/sam2-cpu/configs/frigate_mini.yaml
2026-02-04 15:29:36 +07:00

221 lines
5.8 KiB
YAML

# Frigate-Mini-RKNN Configuration
# Minimal Frigate fork for RKNN inference with MP4 input
# Global settings
debug: true # Enable debug mode
log_level: "info" # debug, info, warning, error
# Model / Detector configuration
detector:
type: "rknn" # rknn, onnx, or yolo
model_path: "models/yolov9t.rknn" # Path to model file
input_size: [640, 640] # Model input resolution [width, height]
conf_threshold: 0.25 # Detection confidence threshold
nms_threshold: 0.45 # NMS IoU threshold
# RKNN specific settings
rknn:
target_platform: "rk3588" # rk3588, rk3568, rk3566, rk3562, rv1106, rv1103
core_mask: 7 # NPU core mask (RK3588: 7=all 3 cores, 1/2/4=single core)
async_mode: false # Async inference mode
# Fallback settings (when RKNN not available)
fallback:
enabled: true # Fall back to ONNX/YOLO if RKNN fails
type: "yolo" # onnx or yolo
device: "cpu" # cpu or cuda
# Video sources (cameras)
cameras:
# Example camera 1: Front door
front_door:
enabled: true
source: "input/front_door.mp4" # MP4 file path (acts as camera feed)
fps: 5 # Max processing FPS
loop: true # Loop video when finished
# Detection settings
detect:
enabled: true
width: 1280 # Processing resolution width
height: 720 # Processing resolution height
# Object filtering per camera
objects:
track: # Objects to detect
- person
- car
- dog
- cat
filters:
person:
min_area: 1000 # Minimum bbox area in pixels
max_area: 500000 # Maximum bbox area
min_score: 0.4 # Minimum confidence
car:
min_area: 2000
min_score: 0.35
# Example camera 2: Backyard
backyard:
enabled: false # Disabled by default
source: "input/backyard.mp4"
fps: 5
loop: true
detect:
enabled: true
width: 1280
height: 720
objects:
track:
- person
- dog
- cat
- bird
# Snapshot settings
snapshots:
enabled: true
output_dir: "output/snapshots"
# Trigger settings
trigger:
objects: # Objects that trigger snapshot
- person
- car
min_score: 0.5 # Minimum score to trigger snapshot
cooldown: 2.0 # Seconds between snapshots per object type
# Output settings
format: "jpg" # jpg or png
quality: 95 # JPEG quality (1-100)
clean: true # Save clean snapshots (no bboxes drawn)
crop: false # Crop to detected object bbox
retain_days: 7 # Days to keep snapshots (0 = forever)
# Annotation export settings
annotations:
enabled: true
output_dir: "output/labels"
format: "yolo" # YOLO format (class x_center y_center w h)
# Pairing with snapshots
pair_with_snapshots: true # Create snapshot-label pairs
# Filtering
min_score: 0.3 # Minimum score to include in annotation
classes: null # null = all classes, or list like [0, 2]
# Debug output settings
debug_output:
enabled: true
output_dir: "output/debug"
# Object list display (console output)
object_list:
enabled: true
show_confidence: true # Show confidence scores
show_class: true # Show class names
show_bbox: true # Show bbox coordinates
show_track_id: false # Show tracking ID (if tracking enabled)
# Visualization (debug images)
visualization:
enabled: true
draw_boxes: true # Draw bounding boxes
draw_labels: true # Draw class labels
draw_confidence: true # Draw confidence scores
box_color: [0, 255, 0] # BGR color for boxes
box_thickness: 2 # Line thickness
font_scale: 0.5 # Font scale for labels
save_interval: 10 # Save every N frames (0 = save all)
# Statistics
stats:
show_fps: true # Show FPS counter
show_detection_count: true # Show total detections
log_interval: 100 # Log stats every N frames
# Class name mapping (same as annotator for consistency)
class_names:
0: person
1: bicycle
2: car
3: motorcycle
4: airplane
5: bus
6: train
7: truck
8: boat
9: traffic light
10: fire hydrant
11: stop sign
12: parking meter
13: bench
14: bird
15: cat
16: dog
17: horse
18: sheep
19: cow
20: elephant
21: bear
22: zebra
23: giraffe
24: backpack
25: umbrella
26: handbag
27: tie
28: suitcase
29: frisbee
30: skis
31: snowboard
32: sports ball
33: kite
34: baseball bat
35: baseball glove
36: skateboard
37: surfboard
38: tennis racket
39: bottle
40: wine glass
41: cup
42: fork
43: knife
44: spoon
45: bowl
46: banana
47: apple
48: sandwich
49: orange
50: broccoli
51: carrot
52: hot dog
53: pizza
54: donut
55: cake
56: chair
57: couch
58: potted plant
59: bed
60: dining table
61: toilet
62: tv
63: laptop
64: mouse
65: remote
66: keyboard
67: cell phone
68: microwave
69: oven
70: toaster
71: sink
72: refrigerator
73: book
74: clock
75: vase
76: scissors
77: teddy bear
78: hair drier
79: toothbrush