LPR Data Classes
Overview
License plate data in degirum-vehicle is represented by two related classes:
PlateOCRResult- Contains OCR data (plate number, confidence)LPRResult- Includes allPlateOCRResultproperties plus detection metadata (bounding box, detection score)
PlateOCRResult
Contains license plate OCR data without detection-specific information. Used primarily for tracking workflows.
Properties
plate_number
str or None
Recognized license plate text
ocr_score
float
OCR confidence score 0.0-1.0
When It's Used
find_plates_in_file() and find_plates_in_clip() return Dict[int, PlateOCRResult] - a mapping of track IDs to plate data. Each PlateOCRResult object contains:
Aggregated plate text - Fused across frames using Bayesian text aggregation
Confidence score - Final OCR confidence after multi-frame fusion
This accumulated data across frames provides robust plate recognition results
Usage Example
LPRResult
Subclasses PlateOCRResult to add detection-specific metadata. Used for real-time recognition results.
Properties
Inherits all PlateOCRResult properties (plate_number, ocr_score) plus:
bbox
list
Bounding box [x1, y1, x2, y2]
detection_score
float or None
Plate detection confidence 0.0-1.0
Important notes:
When using LicensePlateTracker,
track_idis inInferenceResults.results, not as a property. Access viaresult.results[i].get("track_id")
When It's Used
Contained in
InferenceResults.license_platesfrompredict()andpredict_batch()
Usage Examples
Access detection properties:
LicensePlateTracker - Access tracking data:
String representation:
Output:
Return Types by Method
LicensePlateRecognizer
predict()
InferenceResults (.license_plates property yields LPRResult objects)
predict_batch()
Iterator of InferenceResults
LicensePlateTracker
predict_batch()
Iterator of InferenceResults (.license_plates property yields LPRResult objects)
find_plates_in_file()
Dict[int, PlateOCRResult]
find_plates_in_clip()
Dict[int, PlateOCRResult]
Last updated

