Spaces:
Running
Running
A newer version of the Streamlit SDK is available:
1.42.2
metadata
title: Thai License Plate Detection V1.2
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 Recognition App
This Streamlit application performs Thai license plate detection and recognition using deep learning models.
Features
- License plate detection using YOLO
- Character recognition for Thai license plates
- Province name detection and recognition
- Real-time processing with visual feedback
- User-friendly web interface
Setup
- Install the required dependencies:
pip install -r requirements.txt
Download the required model files and place them in the
models
directory:best.pt
- YOLO model for license plate detectionread_char.pt
- YOLO model for character recognition
Ensure the configuration file
config/data.yaml
is present with character mappings.
Running the Application
To run the application:
streamlit run app.py
The application will be available at http://localhost:8501
by default.
Usage
- Open the application in your web browser
- Click the "Choose an image..." button to upload an image containing a Thai license plate
- Wait for the processing to complete
- View the results:
- Detected license plate number
- Detected province name
- Visual detection results
Models
The application uses three main models:
- YOLO model for license plate detection
- YOLO model for character recognition
- TrOCR model for province text recognition (automatically downloaded)
Directory Structure
streamlitapp/
βββ app.py
βββ requirements.txt
βββ README.md
βββ models/
β βββ best.pt
β βββ read_char.pt
βββ config/
βββ data.yaml
Notes
- The application requires an internet connection for the first run to download the TrOCR model
- Supported image formats: JPG, JPEG, PNG
- For optimal results, ensure the license plate is clearly visible in the image