Overview
Image mode captures a single JPEG snapshot each time a person enters the camera frame. The snapshot is annotated with bounding boxes and confidence scores, making it ideal for entry logging, visitor tracking, and event-based monitoring.How It Works
When running in image mode (--save image):
- Detection: The system analyzes every Nth frame (configurable via
frame_skip) for person presence - Entry Detection: When a person is first detected after being absent, an “entry event” is triggered
- Snapshot Capture: An annotated JPEG is saved immediately with:
- Green bounding boxes around detected persons
- Confidence scores for each detection
- Sequential entry numbering
- Waiting State: The system continues monitoring but won’t save another snapshot until the person exits and re-enters
Image mode saves one snapshot per entry event, not one per frame. This prevents hundreds of duplicate images when a person remains in frame.
Basic Usage
- Single Stream
- Multiple Streams
- From File
Output Files
File Naming Convention
Single Stream:person_entry_1_20260309_143022_1741528222.jpg
Multiple Streams:
output/stream_1/person_entry_1_20260309_143022_1741528222.jpg
File Structure
Use Cases
Visitor Entry Logging
Monitor building entrances and capture a photo each time someone enters:Higher thresholds reduce false positives from distant or partial detections.
Multi-Zone Surveillance
Monitor multiple areas simultaneously with live preview:Press ‘q’ in the grid window to stop all streams.
Low-Storage Monitoring
Minimize disk usage by capturing only entry events:Process fewer frames (
frame-skip 30) and disable display for headless operation.Customizing Detection Thresholds
Confidence Threshold
Controls the minimum detection confidence score (0.0 to 1.0):Lower values (0.3-0.4): More detections, more false positives
Default (0.5): Balanced accuracy
Higher values (0.7-0.8): Fewer false positives, may miss some persons
Default (0.5): Balanced accuracy
Higher values (0.7-0.8): Fewer false positives, may miss some persons
Area Threshold
Controls the minimum bounding box area in pixels:- Close-range cameras (< 5 meters): 2000-5000 pixels
- Medium-range cameras (5-15 meters): 1000-2000 pixels
- Long-range cameras (> 15 meters): 500-1000 pixels
Frame Skip
Controls how many frames to skip between detections:Lower
frame-skip values increase CPU/GPU usage but detect entries faster. Higher values reduce resource usage but may miss brief appearances.Advanced Configuration
Using a Custom Config File
Createcustom.cfg:
Override Config Values
Command-line flags always take precedence over config file values:Troubleshooting
Too many false positive snapshots
Too many false positive snapshots
Increase detection thresholds:
Missing person entries
Missing person entries
Lower thresholds or reduce frame skip:
Capturing multiple snapshots for same person
Capturing multiple snapshots for same person
This is expected behavior. Each time a person exits and re-enters the frame, a new snapshot is saved. If a person remains continuously in frame, only one snapshot is captured at entry.
No images saved
No images saved
Check:
- Output directory permissions
- Detection thresholds (try lowering
--confidence) - Use
--test-imageto verify detection works