A super simple prototype of a license plate detection application.
Built with:
- PySide6 - GUI
- OpenCV - For image transformations
- YoloV5 - For detections (Might upgrade to YoloV8)
- EasyOCR - for OCR detection
- Firebase - For cloud data storage.
- Install Git - On Mac it's already installed.
- Install Python 3.12.2
Open your terminal and do the following:
- Git clone and go to directory
git clone https://github.com/Blankeos/license-plate-detection
cd license-plate-detection
- Create Virtual Env:
python -m venv .venv
- Activate Virtual Env:
# macOS/Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activate
- Install Deps
# Install deps for the project.
pip install -r requirements.txt
# Install deps for the model.
git clone https://github.com/ultralytics/yolov5
pip install -r yolov5/requirements.txt
-
Create a file called
serviceAccount.json
in the root and paste your Firebase Project Service CredentialsThis data is sensitive. Protect it or you risk getting spammed on Firebase.
π‘ How to generate it.
-
Rename it to
serviceAccount.json
// Example `serviceAccount.json` { "type": "service_account", "project_id": "project-id-here", "private_key_id": "private-key-id-here", "private_key": "private-key-here", "client_email": "license-plate-detection-v1-ser@project-id-here.iam.gserviceaccount.com", "client_id": "123456789101112131415", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/subdomain.iam.gserviceaccount.com", "universe_domain": "googleapis.com" }
-
Run the app (It will take a while the first run)
python main.py
https://realpython.com/python-pyqt-gui-calculator/
- We use an existing YoloV5 model
best.pt
from this repo: here.