-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
209 lines (198 loc) · 8.41 KB
/
Copy pathconfig.yaml
File metadata and controls
209 lines (198 loc) · 8.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
paths:
# Whole project lives on the 2TB drive (stable fstab mount at /mnt/wildlife),
# so every move is a same-filesystem rename — no cross-drive copying.
root: /mnt/wildlife/wildlife-pipeline
inbox: /mnt/wildlife/wildlife-pipeline/inbox # per-camera subdirs inside
filler_audio: /mnt/wildlife/wildlife-pipeline/filler_audio
standby: /mnt/wildlife/wildlife-pipeline/standby/loop.mp4
state_db: /mnt/wildlife/wildlife-pipeline/state/sightings.db
highlights: /mnt/wildlife/wildlife-pipeline/highlights
compilations: /mnt/wildlife/wildlife-pipeline/compilations
archive: /mnt/wildlife/wildlife-pipeline/archive # every processed clip, kept by date
cameras: # each entry is an AREA / stream (may be fed by several physical cameras)
- id: wcc
name: "Backyard Feeder"
sd_import:
enabled: true
mount_root: /media/bryan # where udisks2 auto-mounts removable media
ignore: [images, clonezilla, 2TB, 2TB1] # mountpoint names to NEVER touch (fixed drives)
require_removable: true # only act on removable/SD devices, never internal disks
import_dir: "" # where SD videos land (absolute, or relative to inbox/). Empty = first camera's inbox folder
video_exts: [.mp4, .avi, .mov, .mkv, .mts, .m2ts]
delete_after: true # delete originals from the card after a verified copy
eject_after: true # unmount + power-off the card when done (only if no errors)
poll_interval_s: 3
resmon:
interval_s: 2 # how often to sample CPU/mem/GPU for the dashboard header
gpu: # GPU offload for ffmpeg (NVDEC decode + NVENC encode). See ffmpeg_ops.py
hwaccel: cuda # cuda | none (none = force CPU software decode everywhere)
encoder: h264_nvenc # h264_nvenc | hevc_nvenc | libx264
fallback_encoder: libx264 # used if NVENC is unavailable for a clip
max_encoders: 3 # max concurrent NVENC sessions (GeForce cap measured at 4 on driver 535.309.01; keep headroom). nvidia-patch has no build for this driver yet — raise this if/when patched.
nvenc_preset: p4 # NVENC preset p1(fast)..p7(slow)
x264_preset: veryfast # CPU-fallback x264 preset
encoder_retries: 4 # backoff attempts on a busy GPU before CPU fallback
retry_base_s: 0.5
max_encode_width: 3840 # cap clips wider than this (e.g. 5K=5120) so H.264 NVENC/NVDEC (<=4096) engages instead of CPU; 0 = no cap
gate:
sample_fps: 4 # frames/sec scanned by MegaDetector; 4 = dense enough that a visible person can't slip between samples (people must NEVER reach the output)
detector_batch: 8 # frames per MegaDetector inference batch on the GPU (1 = per-frame; ~8 measured fastest, identical detections)
conf: 0.35 # MegaDetector min confidence (raise to cut false positives)
trailing_buffer_s: 4 # seconds kept AFTER the last detection (was 15 — big source of empty footage)
leading_buffer_s: 2 # seconds kept BEFORE the first detection
min_keep_s: 3
min_detections: 2 # a kept segment needs >= this many animal frames (drops single-frame blips)
person_conf: 0.15 # LOW: detect people aggressively so they're never in the output
person_buffer_s: 4 # cut this many seconds around every person detection
person_bridge_s: 6 # merge person cuts within this gap (a person flickering in/out of detection)
crops_per_segment: 4 # animal crops kept per segment for species ID / timed captions
stability: # per-FRAME gate: don't let a shaky frame SEED an animal segment
enabled: true
max_shift_frac: 0.05 # max global frame-to-frame shift (fraction of width); higher = more tolerant
min_sharpness: 0 # 0 = off; raise (e.g. 40) to also reject motion-blurred frames
shake: # cut out only the SHAKY SECTIONS (handheld jitter); keep the stable parts
enabled: true # calibrated on real clips at sample_fps=4
max_jerk: 0.02 # smoothed camera-jitter above which a moment is "too shaky" (fraction of width):
# steady/tripod < 0.008, mild handheld ~0.012, bad handheld > 0.045
smooth_s: 0.75 # average jerk over this window before thresholding (ignores 1-frame spikes)
buffer_s: 1.0 # cut this many seconds around each shaky moment
bridge_s: 2.0 # merge shaky cuts separated by <= this gap (one continuous shaky stretch)
audio:
conf: 0.4
labels: [Speech, Dog, Aircraft, Helicopter, "Motor vehicle (road)", Car, Truck, Engine]
crossfade_ms: 50
donor_search_strategy: in_clip_first # in_clip_first | filler_only | in_clip_only
species:
visual_conf: 0.5
audio_conf: 0.5
# BioCLIP is constrained to these candidates (Central Texas / Austin greenbelt).
# Constraining to local species is far more accurate than open tree-of-life.
# Tune freely; if empty, falls back to the full BioCLIP tree of life.
candidates:
- Northern Cardinal
- Carolina Chickadee
- Black-crested Titmouse
- Tufted Titmouse
- Carolina Wren
- Bewick's Wren
- Blue Jay
- Northern Mockingbird
- White-winged Dove
- Mourning Dove
- Inca Dove
- House Finch
- Lesser Goldfinch
- American Goldfinch
- Red-bellied Woodpecker
- Golden-fronted Woodpecker
- Downy Woodpecker
- Ladder-backed Woodpecker
- House Sparrow
- Great-tailed Grackle
- European Starling
- Cedar Waxwing
- Yellow-rumped Warbler
- Orange-crowned Warbler
- Blue-gray Gnatcatcher
- Eastern Phoebe
- Ruby-throated Hummingbird
- Black-chinned Hummingbird
- Painted Bunting
- Chipping Sparrow
- White-throated Sparrow
- White-tailed Deer
- Eastern Fox Squirrel
- Eastern Gray Squirrel
- Raccoon
- Virginia Opossum
- Nine-banded Armadillo
- Eastern Cottontail
- Coyote
- Gray Fox
- Striped Skunk
- Ringtail
- Green Anole
- Texas Spiny Lizard
- Bobcat
- Red Fox
- Rock Squirrel
- Eastern Screech-Owl
- Great Horned Owl
- Barred Owl
- Red-shouldered Hawk
- Red-tailed Hawk
- Cooper's Hawk
- Black Vulture
- Turkey Vulture
- Great Blue Heron
- Green Heron
- Yellow-crowned Night-Heron
- Greater Roadrunner
- Wild Turkey
- Belted Kingfisher
- American Robin
- Northern Flicker
- Red-winged Blackbird
- Common Grackle
- Brown Thrasher
- Blue-winged Teal
- Mallard
highlights:
enabled: true
# Always highlight these notable Austin animals (predators, raptors, owls,
# uncommon visitors). Must be names species-visual can output (i.e. in
# species.candidates). Common feeder birds/squirrels are intentionally absent
# so highlights stay selective (first-seen still catches a species' debut).
allowlist:
- Bobcat
- Coyote
- Gray Fox
- Red Fox
- Ringtail
- Striped Skunk
- Virginia Opossum
- Nine-banded Armadillo
- White-tailed Deer
- Barred Owl
- Great Horned Owl
- Eastern Screech-Owl
- Red-shouldered Hawk
- Red-tailed Hawk
- Cooper's Hawk
- Great Blue Heron
- Green Heron
- Greater Roadrunner
- Wild Turkey
- Painted Bunting
- Belted Kingfisher
first_seen_window_days: 14
region: "US-TX"
rarity_conf: 0.7
lead_s: 5
tail_s: 10
render_vertical: true
stream:
enabled: false # false = save local files only (archive), no RTMP push
rtmp_url: rtmp://a.rtmp.youtube.com/live2/STREAM-KEY-HERE
resolution: 1920x1080
fps: 30
bitrate_kbps: 6000
idle_grace_s: 5
burn_captions: true
order: arrival
camera_overlay: false
crossfade_s: 0.5 # per-clip fade in/out for smooth transitions (0 = hard cuts)
file_output:
default_duration_s: 3600 # 1 hour
default_output_dir: /mnt/wildlife/wildlife-pipeline/compilations
default_source: archive # archive | 05_ready
resolution: 1920x1080
fps: 30
bitrate_kbps: 6000
caption_overlay: true
crossfade_s: 0.75 # dissolve between clips (0 = hard cuts)
models:
megadetector: /mnt/wildlife/wildlife-pipeline/models/md_v5a.0.0.pt
inaturalist: /mnt/wildlife/wildlife-pipeline/models/inat_2021_taxa.pt
yamnet: /mnt/wildlife/wildlife-pipeline/models/yamnet.tflite
birdnet: /mnt/wildlife/wildlife-pipeline/models/BirdNET_GLOBAL_6K_V2.4.tflite