This repository contains a Python application that uses YOLO to detect license plates and exports the model to various formats including ONNX and TensorFlow.js.
- Python 3.8 or higher
- pip (Python package installer)
-
Clone this repository or download the source code.
-
Create and activate a virtual environment (recommended):
python -m venv venv # On macOS/Linux source venv/bin/activate # On Windows venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
To run the application, simply execute the app.py script:
python app.py
This will:
- Load the YOLO model (
your-model.pt
) - Export the model to ONNX format
- Attempt to export to TensorFlow SavedModel format
- Convert the model to TensorFlow.js format
After running the application, you should expect the following output files:
your-model.onnx
: The ONNX version of the modelyour-model_saved_model/
: Directory containing the TensorFlow SavedModeltfjs_model/
: Directory containing the TensorFlow.js model
If you encounter any issues:
- Make sure all dependencies are correctly installed
- Check that the model file
your-model.pt
exists in the project directory - Ensure you have sufficient disk space for the exported models
This project is licensed under the ISC License.