Spaces:
Running
Running
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 | |
1. Install the required dependencies: | |
```bash | |
pip install -r requirements.txt | |
``` | |
2. Download the required model files and place them in the `models` directory: | |
- `best.pt` - YOLO model for license plate detection | |
- `read_char.pt` - YOLO model for character recognition | |
3. Ensure the configuration file `config/data.yaml` is present with character mappings. | |
## Running the Application | |
To run the application: | |
```bash | |
streamlit run app.py | |
``` | |
The application will be available at `http://localhost:8501` by default. | |
## Usage | |
1. Open the application in your web browser | |
2. Click the "Choose an image..." button to upload an image containing a Thai license plate | |
3. Wait for the processing to complete | |
4. View the results: | |
- Detected license plate number | |
- Detected province name | |
- Visual detection results | |
## Models | |
The application uses three main models: | |
1. YOLO model for license plate detection | |
2. YOLO model for character recognition | |
3. 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 |