Spaces:
Sleeping
Sleeping
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
- Upload an image containing a Thai license plate using the file uploader
- Wait for the processing to complete
- 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]