license_plate / README.md
Sompote's picture
Upload README.md
0c49241 verified
|
raw
history blame
1.8 kB
metadata
title: Thai License Plate Detection
emoji: πŸš—
colorFrom: blue
colorTo: green
sdk: streamlit
sdk_version: 1.29.0
app_file: app.py
pinned: false

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

Thai License Plate Detection App πŸš—

This Streamlit application detects and recognizes Thai license plates and provinces from images. It uses YOLOv8 for object detection and TrOCR for text recognition.

Features

  • πŸ“· Upload images containing Thai license plates
  • πŸ” Detect and extract license plate numbers
  • 🏠 Recognize and match province names
  • πŸ–ΌοΈ Display cropped regions of detected plates and provinces
  • 🎯 High accuracy text recognition using TrOCR

How to Use

  1. Upload an image containing a Thai license plate using the file uploader
  2. Wait for the processing to complete
  3. View the results:
    • Detected license plate number
    • Cropped license plate image
    • Detected province name
    • Cropped province image

Technical Details

The application uses:

  • YOLOv8 for license plate and province detection
  • TrOCR (Thai) for text recognition
  • OpenCV for image preprocessing
  • Levenshtein distance for province name matching

Models

  • Object Detection: YOLOv8 (custom trained for Thai license plates)
  • Text Recognition: openthaigpt/thai-trocr

Deployment

This app is deployed on Hugging Face Spaces. The deployment includes:

  • Streamlit web interface
  • Pre-trained YOLO model weights
  • Required Python dependencies

Requirements

All required packages are listed in requirements.txt. The main dependencies are:

  • streamlit
  • opencv-python-headless
  • transformers
  • ultralytics
  • torch
  • python-Levenshtein

License

[Your chosen license]

Credits

Created by [Your Name/Organization]