CoolFace
Modelpublic

autolane/rfdetr-alpr

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
0likes104downloads
Model Card

RF-DETR License Plate Detector

A fine-tuned RF-DETR Medium model for license plate detection, optimized for edge deployment.

Model Details

  • —Base Model: RF-DETR Medium
  • —Task: License plate detection (single class)
  • —Input Resolution: 576x576
  • —Training Framework: PyTorch

Available Formats

FileFormatSizeUse Case
rfdetr_alpr.onnxONNX117MBCross-platform inference
rfdetr_alpr_optimized.onnxONNX (optimized)115MBOptimized for TensorRT
rfdetr_alpr_int8.onnxONNX INT834MBEdge inference (ARM/NPU)
license_plate_detector_fp16.engineTensorRT FP1664MBGPU inference (balanced)
license_plate_detector_int8.engineTensorRT INT882MBGPU inference (fastest)
calibration.cacheCalibration data103KBINT8 calibration cache

Deployment Paths

  • —NVIDIA GPU: Use TensorRT engines (.engine) for fastest inference
  • —Edge/ARM (i.MX8M Plus, i.MX93): Use INT8 ONNX with ONNX Runtime or convert to TFLite

TensorRT Engine Details

  • —TensorRT Version: 10.14.1
  • —Target GPU: NVIDIA GB10 (Compute Capability 12.1)
  • —Input Shape: 1x3x576x576 (fixed batch size)
  • —Precision: FP16 / INT8

Usage

ONNX Inference

python
import onnxruntime as ort
import numpy as np

session = ort.InferenceSession("rfdetr_alpr_optimized.onnx")
# Input: (1, 3, 576, 576) normalized to [0, 1]
outputs = session.run(None, {"images": input_tensor})
boxes, scores = outputs[0], outputs[1]

TensorRT Inference

python
import tensorrt as trt
import pycuda.driver as cuda

# Load engine
with open("license_plate_detector_int8.engine", "rb") as f:
    engine = trt.Runtime(trt.Logger()).deserialize_cuda_engine(f.read())

Edge Inference (INT8 ONNX)

For ARM/edge devices without NVIDIA GPU:

python
import onnxruntime as ort

# Use INT8 quantized model for edge deployment
session = ort.InferenceSession(
    "rfdetr_alpr_int8.onnx",
    providers=['CPUExecutionProvider']  # or platform-specific NPU provider
)

# Input: (1, 3, 576, 576) with ImageNet normalization
outputs = session.run(None, {"images": input_tensor})
boxes, scores = outputs[0], outputs[1]

License

Apache 2.0 (same as RF-DETR)