Explore Each Capstone
Click a tab to deep-dive into the problem statement, datasets, methodology, code, and outcomes of each project.
Autonomous Driving Intelligence
A two-part deep learning system for real-time vehicle detection using YOLOv8 and comprehensive autopilot safety analysis of Tesla accident data.
Problem Statement
Autonomous vehicles (AV) and intelligent transport systems (ITS) are the future of road transport. Automatic detection of vehicles on the road in real-time is essential for vehicle tracking, vehicle counting, and road incident response.
Industry Context
Tesla, Inc. launched its full self-driving (FSD) beta programme in October 2020 in the United States with over 100,000 participants. This project builds the computer vision backbone that such systems rely on, and analyses real-world safety outcomes.
Image Format
Traffic surveillance JPEG images captured from overhead cameras. Numbered sequentially from 00000000. Multi-condition: day, night, rain, motion blur.
Annotation Format
YOLO-format bounding box labels: class_id, x_center, y_center, width, height (all normalised 0–1). One .txt per image.
Vehicle Classes
Four vehicle categories to detect and classify: Car, Truck, Bus, Motorcycle. Train 70% · Val 20% · Test 10%.
Folder Setup & Dataset Extraction
Create project directory structure: AV_Detection/train/, /val/, /test/. Extract Images.zip (large file — plan for compute time). Verify image-label pair integrity for all splits.
data.yaml Configuration
Generate YAML config specifying dataset paths, number of classes (nc: 4), and class names. This is the single source of truth for the YOLOv8 training run.
Load Pre-trained Weights (Transfer Learning)
Load yolov8s.pt — the YOLOv8 Small model pre-trained on COCO (80 classes, ~11M parameters). The backbone's learned feature extraction transfers directly to custom vehicle classes.
Train: 50 Epochs, Early Stopping
Train with Adam optimiser (lr=0.01), batch=16, imgsz=640. Early stopping with patience=10 prevents overfitting. Best checkpoint saved by val mAP@0.5.
Evaluate & Run Inference
Report mAP@0.5, mAP@0.5:0.95, Precision, Recall per class. Run inference on 10+ test images — visualise annotated bounding boxes with class labels and confidence scores.
| Variable | Type | Description |
|---|---|---|
| Case# | Integer | Unique accident case identifier |
| Year / Date | Date | Temporal accident metadata — parsed to Year, Month, DayOfWeek |
| Country / State | String | Geographic location — used for map analysis |
| Deaths | Integer | Total fatalities per accident event |
| Tesla driver | Binary | Whether the Tesla driver was killed in the accident |
| Tesla Occupant | Integer | Number of Tesla occupant fatalities |
| Cyclists / Peds | Integer | Cyclist or pedestrian deaths involved |
| Model | String | Tesla vehicle model: S, 3, X, Y, Cybertruck |
| Autopilot claimed | Binary | Whether autopilot was claimed as a factor |
| Verified Tesla Autopilot Deaths | Integer | Confirmed autopilot-related fatalities ★ |
Temporal
Deaths per year trend, monthly patterns, day-of-week distribution to detect when accidents peak.
Geographic
Country breakdown (USA dominant), US state-level analysis — California leads with most reported events.
Victim Types
Driver deaths, occupant fatalities, cyclist/pedestrian involvement — proportional breakdown across all events.
Autopilot Verified
Verified autopilot deaths vs. total deaths trend over years. Is safety improving? Year-over-year percentage analysis.
Key Insight: Verified autopilot-related deaths represent a subset of total Tesla fatalities. Accident frequency has increased proportionally with growing Tesla fleet size globally — not necessarily indicating declining safety per vehicle. The data requires per-mile normalisation for a fair safety comparison.
- ✓Images.zip extracted, train/val/test split verified
- ✓data.yaml configuration created for YOLO
- ✓YOLOv8s model loaded with COCO pre-trained weights
- ✓Model trained 50 epochs with early stopping
- ✓mAP@0.5 and mAP@0.5:0.95 reported on test set
- ✓10+ inference samples with bounding boxes saved
- ✓Tesla-Deaths.csv cleaned (dashes → NaN, types cast)
- ✓Temporal analysis charts (year, month, day-of-week)
- ✓Geographic breakdown (country + US state)
- ✓Death event characterisation (driver, occupant, cyclist)
- ✓Tesla model distribution analysis
- ✓Autopilot verification trend chart
- ✓Source code: Capstone1_Autonomous_Driving.ipynb
- ✓Writeup: Capstone1_Writeup.docx | Screenshots PNG
Sales Forecasting
A complete data science pipeline for Fresh Analytics — merging restaurant sales data, exploring demand patterns through EDA, and forecasting 12 months of future demand using three competing ML models.
Problem Statement
In ever-changing competitive market conditions, there is a need to make correct business decisions and plan for future events. Demand is the most important aspect of a business's ability to achieve its objectives — decisions on production, sales, and staffing all depend on it.
Objective
Fresh Analytics aims to predict the daily sales count of items across 6 different restaurants over a 12-month forward horizon, enabling smarter procurement, staffing, and inventory management decisions.
Restaurant Master
6 restaurant identities: Bob's Diner, Beachfront Bar, Sweet Shack, Fou Cher, Corner Cafe, Surfs Up. Columns: id, name.
Item Catalogue
Menu items with caloric content and unit cost. Columns: id, store_id, name, kcal, cost.
Daily Transactions
One row per item per date per restaurant. Columns: date, item_id, price, item_count ★ (target variable).
Merged Dataset Target: After joining all 3 tables, the unified dataset includes: date · item_id · price · item_count · item_name · kcal · store_id · store_name — all 8 required columns verified.
Overall Sales Trend
Daily sales time series with 30-day rolling average. Reveals macro growth trend and seasonal cycles across all restaurants.
Day-of-Week Patterns
Sales distribution across Mon–Sun. Identifies peak and trough days — weekends typically show higher demand for food service.
Monthly Seasonality
Average daily sales per month across all years. Line chart per year reveals consistent seasonal peaks and troughs.
Quarterly Distribution
Box plots and bar charts of Q1–Q4 sales averaged across years. Identifies strongest and weakest business quarters.
Restaurant Comparison
Total volume, revenue, YoY trends per restaurant. Scatter: does highest-volume store = highest-revenue? (Volume ≠ Revenue.)
Item Popularity
Top 10 items overall + most popular item per restaurant. Most expensive item per restaurant with its calorie count.
14 features extracted from the date column to capture all temporal patterns relevant to sales forecasting:
Time-based split: Last 6 months of data = test set. All earlier data = training set. No random shuffling to prevent data leakage — strict chronological integrity.
Baseline Model
- Fully interpretable coefficients
- Fastest training time
- Good for linear trend-dominant series
- Struggles with non-linear seasonality
- Sets the performance floor (RMSE baseline)
Ensemble Model
- 200 decision trees via bagging
- Handles non-linearity automatically
- Built-in feature importance ranking
- No feature scaling required
- Medium RMSE — strong mid-tier
Gradient Boosting
- 300 estimators, lr=0.05, depth=6
- L1/L2 regularisation built in
- State-of-the-art on tabular data
- SHAP feature importance support
- Lowest RMSE — used for 12M forecast
- ✓3 CSVs merged into 8-column unified dataset
- ✓Outlier detection (IQR) on item_count column
- ✓Overall sales time series with rolling average
- ✓Day-of-week sales distribution chart
- ✓Monthly trend lines per year
- ✓Quarterly distribution (averaged over years)
- ✓Per-restaurant comparison (volume + revenue)
- ✓Top 10 items + most popular per store
- ✓Most expensive item + calorie count per restaurant
- ✓14 features engineered from date column
- ✓Time-based 6-month test split (no leakage)
- ✓Linear Regression — RMSE reported
- ✓Random Forest — RMSE reported
- ✓XGBoost — RMSE reported (best model)
- ✓12-month 365-day forecast generated + visualised
- ✓Source code: Capstone2_Sales_Forecasting.ipynb
Preserving Heritage: Enhancing Tourism with AI
Two AI systems in one: a TensorFlow CNN that classifies 11 types of historical architectural structures using transfer learning, and a collaborative filtering recommendation engine that personalises tourist destination suggestions across Indonesian cities.
Problem Statement
There are centuries-old historical structures that preserve a country's and community's history. A government agency uses advanced ML to monitor their condition and report if any need maintenance. XYZ Pvt. Ltd. builds the AI classifier.
Tourism Objective
Understanding tourists and their expectations is critical for effective marketing. A recommendation engine is an excellent way to supplement existing outreach — guiding visitors to personalised destinations based on community ratings.
altar
Sacred ceremonial platform inside religious buildings — focal point of worship spaces.
apse
Semi-circular recess at the end of a church nave — characteristic of Romanesque architecture.
bell_tower
Freestanding tower housing church bells — civic and religious landmark across Europe.
column
Load-bearing or decorative vertical pillar — hallmark of Classical Greek and Roman architecture.
dome (inner)
Interior view of a domed ceiling — defining feature of Byzantine and Renaissance churches.
dome (outer)
Exterior dome view — creates iconic skyline silhouettes recognisable worldwide.
flying buttress
External arch supporting cathedral walls — a Gothic structural innovation enabling tall naves.
gargoyle
Carved grotesque figure doubling as a water spout — decorative element of Gothic cathedrals.
portal
Ornate main entrance doorway — richly decorated entry point of medieval churches.
stained glass
Coloured glass window art — narrative pictorial art in Gothic and Romanesque churches.
vault
Arched ceiling or roof structure — structural elegance of Romanesque and Gothic naves.
Plot Sample Images (OpenCV)
Display 8–10 images per class using cv2.imread() and Matplotlib grid. Inspect class balance, image variation, and visual complexity before training.
Load EfficientNetB0 Backbone
EfficientNetB0(include_top=False, weights='imagenet') — loads all convolutional feature extraction layers without ImageNet classifier head.
Freeze Backbone, Build Custom Head
Set base_model.trainable = False. Stack: GlobalAveragePooling2D → Dense(512, relu) → Dropout(0.4) → Dense(256, relu) → Dropout(0.3) → Dense(11, softmax).
Custom StopAtAccuracy Callback
Callback halts training as soon as val_accuracy ≥ 90% — prevents unnecessary epochs and reduces overfitting after the target is met.
Train Without Augmentation (Baseline)
Initial training run with no augmentation. Establishes baseline accuracy and shows the raw learning curve — often reveals early overfitting.
Train With Augmentation
ImageDataGenerator with: rotation_range=20°, width/height_shift=0.2, horizontal_flip=True, zoom_range=0.2, shear_range=0.1, brightness_range=[0.8,1.2]. Improves generalisation.
Plot Accuracy & Loss Curves
Training vs validation accuracy per epoch. Loss curves. Identify overfitting onset — the epoch where train-val accuracy gap exceeds ~10%. Compare augmented vs non-augmented.
User Demographics
| Column | Description |
|---|---|
| User_Id | Unique visitor ID |
| Location | Home city of user |
| Age | Visitor age |
Tourist Places
| Column | Description |
|---|---|
| Place_Id | Unique place ID |
| Place_Name | Name of attraction |
| Category | Tourism category |
| City | City location |
| Price | Entry price (IDR) |
| Rating | Average rating |
User-Place Ratings
| Column | Description |
|---|---|
| User_Id | FK → user.csv |
| Place_Id | FK → places |
| Place_Ratings | 1–5 star rating ★ |
User Age Distribution
Age histogram of tourists who rate places. Most active age groups and home cities identified.
Category per City
Stacked bar: which categories dominate each of the 5 cities? Budaya, Taman Hiburan, Cagar Alam, Bahari, Tempat Ibadah.
Best City for Nature
Which Indonesian city has the most Cagar Alam + Bahari spots? Ideal for nature enthusiast tourists.
Most Loved Spots
Top-rated places by average user score (min 5 ratings). Which city has the most beloved attractions?
Category Preference
Which tourism category do users rate highest on average? Cultural vs nature vs amusement parks.
SVD Recommender
Matrix factorisation (50 latent factors). 5-fold cross-validation. RMSE + MAE reported. Top-N unvisited places per user.
- ✓Structures_dataset.zip extracted, 11 classes verified
- ✓8–10 sample images per class plotted (OpenCV)
- ✓EfficientNetB0 backbone loaded, ImageNet weights
- ✓Backbone frozen, custom Dense+Dropout head added
- ✓Model compiled: Adam, categorical crossentropy
- ✓StopAtAccuracy callback (90% target) implemented
- ✓Trained without augmentation (baseline)
- ✓Trained with augmentation (rotation, flip, zoom)
- ✓Accuracy + loss curves plotted, overfitting epoch found
- ✓3 tourism CSVs loaded and cleaned
- ✓User age + home city analysis charts
- ✓Category distribution per city
- ✓Best city for nature tourism identified
- ✓Most loved spots + category preference analysis
- ✓SVD collaborative filtering model trained + evaluated
- ✓recommend_places() function implemented + tested
- ✓Source code: Capstone3_Heritage_Tourism_AI.ipynb
Deployment Architecture
The three AI models will be deployed as serverless endpoints on public cloud infrastructure, accessible via a unified REST API integrated into agent.viswanext.com/aiml.html.
Target URL
The live portfolio and model playground will be published at https://agent.viswanext.com/aiml.html — publicly accessible for demonstrations and learning.
Step 1 — Object storage: datasets & models
Upload all datasets (restaurants.csv, items.csv, sales.csv, Tesla-Deaths.csv, Structures images), trained model weights (.pt, .h5), and result CSVs to object-storage buckets. Organise into prefixes by capstone.
Step 2 — Serverless inference functions
Package each model's inference logic as a serverless function: (1) vehicle detection endpoint, (2) sales forecast endpoint, (3) structure classifier + tourism recommender endpoint. Use container images for serverless functions for large model files.
Step 3 — API Gateway: REST Endpoints
Expose the functions as REST API endpoints. Implement CORS for browser requests from agent.viswanext.com. Add API key authentication and rate limiting.
Step 4 — Global CDN
Serve the static portfolio HTML through a CDN for low-latency global access. Cache model results and static assets at edge locations worldwide.
Step 5 — agent.viswanext.com/aiml.html
Publish this portfolio page + an interactive model playground. Users can upload images for vehicle detection and structure classification, input restaurant IDs for sales forecasts, and get tourist recommendations — all powered by live serverless endpoints.