
Predicts tomorrow's congestion at 16 Bengaluru intersections using LightGBM, scores routes against forecasted bottlenecks, and counts vehicles from uploaded images with YOLOv8. Full Django source code included.
Django 5.2 | Python 3.10 | LightGBM | scikit-learn RandomForest | YOLOv8 | Django Channels | Daphne ASGI | SQLite | Leaflet | Chart.js | pandas | OpenRouteService API
IntelliFlow looks at 952 days of real Bengaluru traffic data and answers one question: how bad will tomorrow be at Silk Board, Hebbal Flyover, Sony World Junction, and 13 other intersections?
Two models do the heavy lifting. A LightGBM classifier sorts each intersection into Low, Moderate, High, or Severe congestion for the next day. A RandomForest regressor predicts the actual vehicle count. Both run on 83 engineered features built from just 16 raw columns — lag values, rolling averages, day-of-week sine and cosine encodings, holiday flags, neighbouring-intersection congestion, weather. The feature pipeline lives in a single file called features.py and it's the same file used during training and at inference, so there's no train-serve mismatch to explain away in your viva.
On top of the predictions sits a dark-themed Django dashboard. Live Leaflet map with colour-coded markers. Route planner that takes your source and destination, pulls directions from OpenRouteService, then re-scores the ETA by penalising routes that pass within 500 metres of a predicted-severe intersection. Signal timing recommendations. Emergency vehicle reporting that broadcasts over WebSocket to every open browser tab. And a YOLOv8 module where you drop in a traffic photo and get back an annotated image with cars, buses, trucks and bikes counted separately.
LightGBM hits 73.08% accuracy and 0.871 ROC AUC on a held-out test set that comes from a later time period than training data — a proper time-based split, not a random shuffle. The RandomForest regressor lands at R² 0.588 with MAE around 5,200 vehicles. Those numbers are printed honestly inside the app's own analytics page.
Leaflet with CartoDB dark tiles, circle markers in green, amber, orange and red. Django Channels pushes updates over /ws/traffic/, and if the socket drops there's an exponential-backoff reconnect plus a 60-second polling fallback hitting /api/predictions/. So the map never just sits there dead.
Type "Koramangala" and "Whitefield", the app geocodes both via Nominatim, fetches routes from ORS, then applies a penalty multiplier based on predicted congestion along the path — 1.0x for low, up to 1.8x for severe. Haversine distance decides which intersections a route actually touches. The fastest route on Google Maps isn't always the one this thing recommends, and that difference is the whole demo.
Drag an image onto /vision/, an AJAX call hits /vision/api/detect/, and YOLOv8n runs in a subprocess (needed because Ultralytics and ASGI don't get along in-process). You get back bounding boxes, per-class counts, and a heuristic flag if something looks like an emergency vehicle.
Each intersection gets a recommended green duration — 30s for Low, 45s Moderate, 60s High, 75s Severe. There's a manual override form and every override writes to a SystemLog entry, so the audit trail is visible in Django admin. The page carries a "decision support only" banner because no physical signal hardware is connected, and examiners appreciate that honesty.
Full leaderboards for all 31 trained models (16 regressors, 15 classifiers), a confusion matrix heatmap, top-25 feature importance bars, and a panel that states the model's limitations in plain language. This single page has saved more vivas than any amount of UI polish.
Admin and Operator roles on a custom user model. Operator sees the dashboard, map and intersections; the Django admin panel stays locked. There's a pytest test asserting exactly that.
Traffic police control rooms use dashboards almost exactly like this — the difference is they feed live sensor data instead of a historical CSV. Municipal corporations planning signal retiming schedules need next-day congestion estimates before they commit to a plan. Delivery fleets and cab aggregators route around predicted bottlenecks rather than current ones, which is the entire value of a t+1 forecast.
The vision module maps to camera-based vehicle counting at toll plazas and junction surveys, where somebody currently sits with a clicker counting cars for a manual survey.
If you're a student with a project submission, final-year project, semester project, internship, or academic deadline coming up and you're looking for a genuine machine learning project, this is for you. Whether you're studying BCA, MCA, B.Tech, M.Tech, B.E. CSE/IT, B.Sc. Computer Science, B.Sc. IT, M.Sc. Computer Science, BCS, PGDCA, Diploma in Computer Science, Data Science, Artificial Intelligence, Software Engineering, or a related course, you can use this project as a practical foundation for your academic work. CodeAj is not limited to Indian students — students from universities and colleges around the world can explore and purchase projects that match their requirements.
Students working on major or final-year projects get more mileage from the detailed analysis included here: the 24 EDA and evaluation figures in ml/artifacts/figures/ — including ROC curves, residual diagnostics, ACF/PACF plots, and validation-vs-test generalisation checks — can be useful when preparing your project report, presentation, viva, or results chapter. If you're looking for machine learning projects with source code that go beyond a basic Jupyter notebook, the Django integration makes this project a practical web-based application rather than just a collection of ML experiments.
Not for you if your academic requirements specifically demand a React frontend, mobile application, or a different technology stack. This project uses server-rendered Django templates deliberately, keeping the setup straightforward and reducing unnecessary build steps during development and demonstration. If you need a different type of project, explore our wider Django projects collection and other project categories.
The hard part: the ML artifacts folder is roughly 1 GB — 31 pickled models, encoders, scaler, metadata JSON. It's not inside the repo because Git chokes on it. You download it separately and drop it into ml/artifacts/. Miss that step and the model registry refuses to boot, and the error message won't be obvious at 1 AM.
The easy part: everything else. SQLite, so no PostgreSQL setup. No Redis, because the channel layer is in-memory. Migrate, seed, predict, runserver — four commands and the dashboard is live at localhost:8000 with admin/admin123 already created for you. Even the API keys are optional; without them the app runs in simulated mode off 35 days of seeded data, and the vision module works fully offline regardless.
Add any of these professional upgrades to save time and impress your evaluators.
We'll install and configure the project on your PC via remote session (Google Meet, Zoom, or AnyDesk).
1-hour live session to explain logic, flow, database design, and key features.
Want to know exactly how the setup works? Review our detailed step-by-step process before scheduling your session.
Fully customized to match your college format, guidelines, and submission standards.
Need feature changes, UI updates, or new features added?
Charges vary based on complexity.
We'll review your request and provide a clear quote before starting work.
Reviews