LP Tracker

What is LicensePlateTracker?

LicensePlateTracker processes video streams with real-time license plate detection, tracking, and recognition. It maintains persistent vehicle identities across frames and uses Bayesian multi-frame text aggregation to improve OCR accuracy.

When to Use LicensePlateTracker

Choose LicensePlateTracker when you need to:

  • Process live camera feeds or RTSP streams in real-time

  • Track vehicles with persistent IDs across video frames

  • Improve OCR accuracy via Bayesian multi-frame text fusion

  • Generate alerts and notifications for detected plates

  • Save video clips with detected vehicles

For simple batch image processing without temporal tracking, use LicensePlateRecognizer instead.

Core Concepts

Configuration

All settings are controlled through LicensePlateTrackerConfig:

import degirum_vehicle

config = degirum_vehicle.LicensePlateTrackerConfig(
    license_plate_detection_model_spec=detection_spec,  # Detection model
    license_plate_ocr_model_spec=ocr_spec,             # OCR model
    video_source="highway.mp4",                        # Video source
    live_stream_mode="LOCAL",                          # Display mode
)

tracker = degirum_vehicle.LicensePlateTracker(config)

See Configuration Guide for all options.

Pipeline Architecture

The tracker uses a multi-stage streaming pipeline:

  1. Video Source - Reads from camera, file, or RTSP stream

  2. License Plate Detection - Detects plate regions in each frame

  3. Vehicle Tracking - Tracks vehicles across frames with unique IDs

  4. Cropping - Extracts detected plate regions

  5. OCR Recognition - Runs text recognition on cropped plates

  6. Bayesian Fusion - Aggregates OCR results across multiple frames per vehicle track

  7. Annotation - Overlays tracking IDs and plate text on video

  8. Output - Display, save to file, or stream via RTSP

The Bayesian fusion uses exponential moving average of character probabilities to improve accuracy over single-frame recognition.

Key Features

Vehicle Tracking

  • Unique track IDs for each vehicle

  • Track persistence across frames

  • Zone-based filtering (optional)

  • Track trail visualization

Multi-Frame Bayesian Text Aggregation

  • Combines OCR results across multiple frames

  • Exponential moving average of character probabilities

  • Improved accuracy vs. single-frame recognition

  • Confidence scoring per track

Video Processing

  • Live camera feeds (webcam, IP camera)

  • Video files (MP4, AVI, etc.)

  • RTSP streams

  • Real-time display or RTSP streaming output

Event Notifications

  • Configurable alert conditions

  • Apprise notification support (email, Slack, Discord, etc.)

  • Video clip storage with alerts

Methods

LicensePlateTracker provides methods for video processing:

See Methods Reference for complete API documentation with examples.

Last updated

Was this helpful?