How mohinik7/automatic-number-plate-recognition-python-yolov8 works
Project type and purpose
• This is an open-source, Python-based Automatic Number Plate Recognition (ANPR) system.
• Its primary function is a real-time video-processing pipeline that:
• Detects vehicles and license plates via YOLOv8
• Runs OCR (EasyOCR) on detected plates
• Validates and matches plate text against a SQLite “stolen vehicles” database
• Emits alerts, saves annotated frames, and logs detections
• It also provides CLI tools for database management (add/update/search/list) and for resetting/importing data.
File structure
• Top-level scripts form two logical groups:
a. Core detection pipeline
• main.py (orchestrates video input → detection → OCR → DB matching → output)
• add_missing_data.py, database_utils.py, reset_database.py (DB init/import/reset)
• util.py (plate-format validation, OCR error correction)
• stolen_vehicles.csv, test.csv (sample data)
• requirements.txt, LICENSE, .gitignore
b. CLI management
• manage_vehicles.py (add/list/update/search vehicles & detections)
c. Tests
• test_db_detection.py
• README also references these directories (models/, output/, sort/) where:
• models/ holds YOLOv8 weights
• sort/ contains the SORT tracker code
• output/ stores annotated frames & detection logs
README for additional insights
• The README outlines the 7-step pipeline (vehicle detection → plate detection → OCR → format validation → DB matching → alerting → tracking).
• It lists dependencies: Python 3.8+, Ultralytics YOLOv8, EasyOCR, SORT, SQLite.
• It highlights database-centric design and command-line extensibility.