Home Identity Engineering Contact
Back to All Projects
FLAGSHIP 01 / 10

RoadCams

Campus-wide AI surveillance system with custom YOLOv11 ANPR model, PaddleOCR text extraction, regex-based plate validation, and geospatial trajectory mining via LCS + QGIS.

YOLOv11PaddleOCRFlask PostgreSQLQGISLeaflet.js PythonOpenCV
View Source
Team of 2 2–3 months 1st Year Internship
95%+
Detection Accuracy
20–30
Models Trained
3–8
Simultaneous Cameras
Real-time
Processing Speed

The Challenge

University campuses process hundreds of vehicle entries daily with zero automated oversight. Security guards manually log license plates onto paper registers — a process prone to human error, impossible to audit, and blind to spatial patterns.

Key problems identified:

  • No detection automation — guards miss plates during rush hours, at night, or in poor weather
  • No spatial coverage analysis — no way to determine if camera placement is optimal or what areas are blind spots
  • No audit trail — paper logs can be lost, tampered with, or simply illegible
  • No blacklist enforcement — unauthorized vehicles can enter and exit without triggering any alert
  • No trajectory insight — campus admin has zero visibility into vehicle movement patterns or most-used routes

Engineering Thinking

This was my first-ever project using YOLO, OCR, and PostgreSQL — built during my 1st year inter-college internship. The core insight was to treat this as a pipeline problem: each stage feeds the next, and each stage must independently validate its output before passing it forward.

The pipeline: Live feed → YOLO plate detection → PaddleOCR text extraction → Regex validation → Character correction → Duplicate check → PostgreSQL logging → QGIS trajectory analysis.

Every detected plate passes through regex validation against Indian number plate formats. If a match fails, the system attempts character substitution from a confusion map (0→O, 8→B, 1→l, ...) and retries. Only finalized plates get logged with a vehicle snapshot captured as identity proof.

CHOSEN

Custom YOLO + PaddleOCR pipeline

Full control over training data, model parameters, and OCR post-processing. Allows offline operation with no API costs.

REJECTED

Cloud ANPR APIs (Google Vision, Plate Recognizer)

Per-request pricing is impractical for 3–8 cameras running 24/7. No control over accuracy on regional Indian plates.

REJECTED

Tesseract OCR

Tested extensively but accuracy on distorted, angled plate text was poor. PaddleOCR outperformed it significantly.

Pipeline Design

┌───────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ Live Feed │───▶│ YOLOv11 ANPR │───▶│ PaddleOCR │───▶│ Regex + │ │ (3-8 Cams)│ │ Detection │ │ Text Read │ │ Char Fix │ └───────────┘ └──────────────┘ └──────────────┘ └──────┬───────┘ │ ┌───────────────────────────────────────┘ │ ▼ ┌──────────────────┐ ┌──────────────┐ ┌──────────────┐ │ Duplicate Check │───▶│ PostgreSQL │───▶│ QGIS + │ │ (5min window) │ │ Audit Log │ │ Leaflet.js │ └──────────────────┘ │ + Blacklist │ │ Trajectory │ │ └──────────────┘ └──────────────┘ ▼ ┌──────────────────┐ │ Vehicle Snapshot │ │ Capture + Store │ └──────────────────┘

Why These Technologies

YOLOv11
Single-stage detection fast enough for real-time multi-camera feeds. Trained on custom Roboflow dataset of Indian plates.
PaddleOCR
Beat Tesseract OCR on angled, dirty, and low-res plate text. Better out-of-box accuracy on non-Latin-heavy fonts.
PostgreSQL
Structured audit logging — every entry queryable by plate, camera, timestamp, and coordinate. First time using a relational DB.
QGIS
Geospatial trajectory mining — visualize vehicle paths across campus. Professional GIS tool for coordinate-based analysis.
Leaflet.js
Interactive web map for vehicle movement visualization and LCS most-used-path overlay. Lightweight alternative to Google Maps.
Python + Flask
Rapid prototyping for a 2-3 month internship timeline. Flask serves the dashboard; Python binds YOLO, OCR, and DB layers.

Key Engineering Decisions

Custom YOLOv11 ANPR Model

Trained on a curated Roboflow dataset of Indian license plates with augmentation for varied lighting, angles, and occlusion conditions.

  • 20–30 model iterations before achieving consistent accuracy
  • Custom anchor tuning for rectangular plate aspect ratios
  • Confidence thresholding with NMS deduplication
  • Multi-camera feed processing with frame-skip optimization

OCR + Regex Validation Pipeline

PaddleOCR extracts text, then regex validates against Indian plate format. A character confusion map handles common OCR misreads.

  • PaddleOCR selected after testing Tesseract and TrOCR
  • Confusion map: 0↔O, 8↔B, 1↔l, 5↔S
  • Auto-retry with character substitution on match failure
  • Vehicle snapshot captured on finalized plate recognition

Duplicate Detection + Blacklist

Same vehicle detected by the same camera within a 5-minute window is flagged as duplicate. Blacklisted plates trigger immediate alerts.

  • 5-minute dedup window prevents redundant log entries
  • Blacklist lookup on every finalized plate read
  • Alert system for unauthorized vehicle detection
  • Cross-camera tracking identifies entry → exit patterns

LCS Trajectory Mining

Longest Common Subsequence algorithm applied to camera-ordered vehicle sightings to find the most-used paths on campus.

  • Camera coordinates logged with every entry — GPS lat/lng
  • LCS finds common movement sequences across vehicles
  • QGIS renders trajectory heatmaps on campus map
  • Leaflet.js displays path overlay in browser dashboard

What Broke & What I Learned

Challenge 01
20–30 YOLO Models Before Getting It Right
This was my first time training a YOLO model. We exhausted ourselves iterating on dataset quality, augmentation parameters, and hyperparameters. The custom dataset didn't produce correct results for weeks. We tried different YOLO versions, adjusted anchor boxes, modified learning rates — nothing worked consistently until we refined the training data with stricter annotation standards and proper augmentation diversity.
Lesson: Model accuracy is 80% data quality, 20% architecture. Clean annotations matter more than hyperparameter tuning.
Challenge 02
OCR Character Confusion — 0 vs O, 8 vs B
PaddleOCR would consistently misread 0 as O, 8 as B, 1 as l, and 5 as S. This caused valid plates to fail regex validation. We built a character confusion map and an auto-retry system: if the initial regex match fails, the system substitutes commonly confused characters and re-checks. This recovered ~15% of plates that would have been lost.
Lesson: OCR is never 100% accurate — always build a fallback correction layer. Post-processing is as important as the model itself.
Challenge 03
Choosing the Right OCR Engine
We tested Tesseract OCR, TrOCR, and PaddleOCR extensively. Tesseract performed poorly on angled, dirty, or partially occluded plates. TrOCR had better accuracy but was too slow for real-time feeds. PaddleOCR struck the right balance between speed and accuracy, especially on non-standard Indian plate fonts.
Lesson: The "best" tool depends on your constraints. In real-time systems, speed matters as much as accuracy — benchmark before committing.
Challenge 04
Duplicate Entry Edge Cases
The 5-minute dedup window seemed simple, but edge cases surfaced: vehicles parked near a camera kept triggering re-detections. We had to distinguish between a vehicle "passing through" vs "parked in view." The fix was combining plate ID + camera ID + time window to define uniqueness, preventing stationary vehicles from flooding the log.
Lesson: Simple rules break on real-world edge cases. Always test with actual deployment conditions, not just clean lab data.

What It Achieved

Outcome
95%+ Detection Accuracy
After training 20–30 models, the final YOLOv11 model achieved consistent 95%+ accuracy on Indian license plates across varying lighting and angles.
Outcome
3–8 Camera Simultaneous Processing
System tested with up to 8 concurrent camera feeds processing plate detection, OCR, and logging in real-time without dropping frames.
Outcome
Campus Trajectory Mapping
LCS algorithm successfully identified the most-used vehicle paths across campus, displayed as interactive heatmaps on Leaflet.js and QGIS.
Impact
Complete Digital Audit Trail
Every vehicle entry logged with: plate number, timestamp, camera name, GPS coordinates, and snapshot image — replacing unreliable paper registers entirely.
Personal Growth
First Real Engineering Project
First exposure to YOLO, OCR, PostgreSQL, and GIS tooling. Learned the hard way that production systems require far more than "it works in a notebook."

Screenshots & Demo

RoadCams ANPR Dashboard — real-time detection feed with log sidebar
Dashboard Overview — Live Detection Feed
*Note: These images are generated by AI, the images will be replaced new very soon
Multi-camera surveillance grid showing 6 campus feeds
Multi-Camera Monitor — 3–8 Simultaneous Feeds
*Note: These images are generated by AI, the images will be replaced new very soon
ANPR detection close-up with bounding box and OCR result
ANPR Detection — YOLOv11 + PaddleOCR Output
*Note: These images are generated by AI, the images will be replaced new very soon
Campus trajectory heatmap showing most-used vehicle paths
Campus Trajectory Map — LCS Path Analysis
*Note: These images are generated by AI, the images will be replaced new very soon
Next Project
TITAN-V2 Rover