Configuration
Configuration Inheritance
LicensePlateTrackerConfig extends LicensePlateRecognizerConfig and inherits all base settings:
Model specifications - License plate detection and OCR models (device_type, inference_host_address)
OCR score threshold - Minimum confidence to display plate text (0.0-1.0)
Show OCR score - Whether to display OCR confidence percentage
See LicensePlateRecognizer Configuration for details on these settings.
Configuration Parameters
LicensePlateTracker adds the following tracking-specific parameters:
Video Source
Parameters:
video_source- Input video source (default: 0 for first webcam):Integer (e.g.,
0,1) - Local webcam indexString path (e.g.,
"highway.mp4") - Video fileRTSP URL (e.g.,
"rtsp://192.168.1.100/stream") - IP camera
video_source_fps_override(optional) - Override frame rate when camera reports incorrect FPS (default: 0.0 = no override)video_source_resolution_override(optional) - Override resolution as(width, height)tuple when camera reports incorrect dimensions (default: (0, 0) = no override)
Credence Count
Controls when a detected license plate is confirmed as a valid track for processing.
Parameter:
credence_count- Number of consecutive frames a plate must appear before being confirmed (default: 4). Reduces false positives from momentary detections or camera noise.
Recommended values:
2-4- Real-time monitoring (quick confirmation)5-10- High-traffic areas (reduce false positives)10+- Critical applications (maximum stability)
Alert Mode and Notifications
Controls when alerts are triggered and how notifications are delivered.
Parameters:
alert_mode- When to trigger alerts (default: AlertMode.NONE):AlertMode.NONE- No alertsAlertMode.ON_UNKNOWNS- Alert when unknown plate detectedAlertMode.ON_KNOWNS- Alert when known plate detectedAlertMode.ON_ALL- Alert for all plates
alert_once(bool) - Alert once per track (True) or every time plate text changes for the given track ID (False) (default: True)clip_duration(int) - Length of video clips in frames (default: 100, e.g., 100 frames ≈ 3.3 seconds at 30 FPS)notification_config(str) - Apprise configuration string for notification deliverynotification_message(str) - Message template with variables:${time},${plate_alerts},${filename},${url}notification_timeout_s(float, optional) - Timeout in seconds for sending notifications
Apprise notification examples:
Email:
"mailto://user:[email protected]"Slack:
"slack://token/channel"Discord:
"discord://webhook_id/webhook_token"SMS (Twilio):
"twilio://account_sid:auth_token@from_phone/to_phone"Console:
"console://"(testing)
See Apprise documentation for all supported services.
Clip Storage
Configuration for saving video clips to S3-compatible storage or local filesystem.
See Object Storage Configuration Reference for complete documentation including:
Parameters (endpoint, bucket, access_key, etc.)
Storage backend examples (AWS S3, MinIO, local filesystem)
Environment-specific configurations
Best practices
Alerting and Storage Combinations
Important: Both notifications and clip recording only trigger when alerts are generated. If alert_mode=AlertMode.NONE, no alerts are generated, so notifications and clip recording will not happen even if configured.
NONE
any
any
No alerts, no clips, no notifications
ON_ALL
> 0
configured
Alert + clip + notification for all plates
ON_UNKNOWNS
0
configured
Alert + notification only (no clips)
Live Streaming
Controls video output display.
Parameters:
live_stream_mode- Output mode:"LOCAL"- Display in local window"WEB"- Stream via RTSP for web viewing"NONE"- No live display
live_stream_rtsp_url(str, optional) - RTSP URL path suffix (used when mode is"WEB")
Zone Filtering
Controls zone-based filtering for license plates.
Parameters:
enable_zone_filter(bool) - Enable zone-based filtering (default: False)zone(list) - Zone polygon as list of [x, y] coordinate pairs. Minimum 3 points required. Example:[[100, 200], [500, 200], [500, 600], [100, 600]]
Configuration Options
Option 1: Python Configuration
Option 1: Python Configuration
Option 2: YAML Configuration
LicensePlateTrackerConfig can be initialized from a YAML file or string using the from_yaml() method. This approach separates configuration from code, making it easier to version control settings, share configurations across teams, and maintain different configs for development, staging, and production environments.
Complete YAML structure:
Loading from YAML
Returns:
config- InitializedLicensePlateTrackerConfigobjectsettings- Raw dictionary (useful for debugging)
Loading from YAML String
Benefits of YAML
Clean separation - Config separate from code
Easy modification - Change hardware without editing code
Version control - Track config changes in git
Team collaboration - Share standardized configs
Multiple environments - dev.yaml, staging.yaml, prod.yaml
Configuration Examples
Example 1: Parking Lot Monitoring
Monitor RTSP camera, alert on all plates, save clips, send email:
Example 2: Local Video File Processing
Process local video file, display locally:
Example 3: High-Traffic Zone Filtering
Reduce false positives with zone filtering and higher credence:
Last updated
Was this helpful?

