AegisLens is a model that can detect vehicle types and read their license plate. It utilizes an object detection model and an Optical Character Recognition (OCR) model to output it’s results.
- Object Detection: The model detects vehicles in the video footage and identifies their bounding boxes.
- License Plate Recognition: For each detected vehicle, the model extracts the license plate region and applies OCR to read the text.
- Expiry Date Extraction: The model processes the license plate text to extract the expiry date, if available.
- Output: The model displays the detected vehicle type, license plate number, and expiry date on the video footage.
- YOLOv8: A object detection model used for detecting vehicles in the video footage.
- EasyOCR: An OCR model used for reading text from the detected license plates.
- Streamlit: A web application framework used to create the user interface for the application.
- Exploratory Data Analysis: View insights and statistics about the dataset used for training the model.
- Prediction: Upload a video file to detect vehicles and read license plates.
.
├── AEGISLENS_EDA_ENG.ipynb # Exploratory Data Analysis in English
├── AEGISLENS_EDA_ID.ipynb # Exploratory Data Analysis in Indonesian
├── Archive/ # Archived files or previous versions
├── data.yaml # YOLO dataset configuration file
├── demo1.avi # Sample demo video for testing
├── Deployment/ # Scripts or configs related to model deployment
├── inference.py # Inference script using trained YOLO model
├── latest.pt # Trained YOLO model weights
├── metrics/ # Evaluation metrics and visualizations
├── ocr_plate.ipynb # OCR pipeline for plate recognition
├── README.md # Project overview and instructions
├── References/ # External references or citations
├── requirements.txt # Python dependencies
├── splitting.py # Script to split dataset/video frames
├── take_frames_from_video.ipynb # Notebook to extract frames from video
├── test.MOV # Test video sample
├── test2.MOV # Another test video sample
└── yolo_implementation.ipynb # YOLOv5 implementation and training notebook
This system combines YOLO (You Only Look Once) object detection with license plate recognition to:
- Detect vehicles in images/video streams
- Identify vehicle classes (car, truck, motorcycle, etc.)
- Optionally recognize license plate details including expiration date
python -m venv venv
source venv/bin/activate # Linux/Mac
.\venv\Scripts\activate # Windowspip install -r requirements.txtpython inference.py \
--model <model_path> \
--source <input_source> \
[--thresh <confidence_threshold>] \
[--resolution <WxH>] \
[--record]| Argument | Description | Required | Default |
|---|---|---|---|
--model |
Path to YOLO model file (e.g., "runs/detect/train/weights/best.pt") | Yes | - |
--source |
Input source: - Image file ("test.jpg") - Image folder ("test_dir") - Video file ("testvid.mp4") - USB camera ("usb0") - Picamera ("picamera") |
Yes | - |
--thresh |
Minimum confidence threshold (0.0 to 1.0) | No | 0.5 |
--resolution |
Display resolution in WxH format (e.g., "640x480") | No | Source resolution |
--record |
Record and save output as "demo.avi" (requires --resolution) | No | False |
Basic image detection:
python inference.py --model latest.pt --source test.jpgWebcam detection with custom threshold:
python inference.py --model latest.pt --source usb0 --thresh 0.7Video processing with recording:
python inference.py --model latest.pt --source traffic.mp4 --resolution 1280x720 --recordBatch process image folder:
python inference.py --model latest.pt --source images/ --thresh 0.6- For recording (
--record), you must specify--resolution - Camera indices start from 0 (e.g., "usb0" for first USB camera)
- Confidence threshold (
--thresh) filters out low-confidence detections - Supported image formats: JPG, PNG, BMP
- Supported video formats: MP4, AVI, MOV
Webcam not working:
- Try different indices ("usb0", "usb1", etc.)
- Verify camera permissions
- Check if OpenCV can access the camera:
import cv2 cap = cv2.VideoCapture(0) print(cap.isOpened())
Run the interactive desktop application with:
python UIApp/main_app.py
- Python 3.8+
- NVIDIA GPU (recommended)
- CUDA/cuDNN (for GPU acceleration)
-
Clone repository:
git clone https://github.com/yourusername/vehicle-plate-detection.git cd vehicle-plate-detection -
Install dependencies:
pip install -r requirements.txt
- Automated vehicle verification systems
- Parking management
- Traffic monitoring
- Insurance fraud detection
- Expired plate detection
Project Link: click here
Deployment Link: click here
This project is licensed under the MIT License - see the LICENSE file for details.
You must:
- Include original license
- Maintain copyright notice
No warranty is provided. Use at your own risk.
- Lis Wahyuni - Data Scientist ([email protected])
- Faishal Kemal - Data Scientist & Data Annotator ([email protected])
- Muhammad Rafi Abhinaya - Data Scientist & Data Annotator ([email protected])
- Ma'ruf Habibie Siregar - Data Analyst & Data Annotator ([email protected])
- Fauzan Rahmat Farghani - Data Engineer & Data Annotator ([email protected])
