Skip to content

Dhairya008/Shinde-AutoVision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shinde AutoVision — Smart Explainable Car Price Prediction System

Shinde AutoVision is a premium, industry-level used car price valuation and explanation platform. It uses advanced machine learning algorithms (such as XGBoost, CatBoost, and LightGBM) to estimate the fair market value of used cars in India, and implements Explainable AI (SHAP) to explain why the valuation changed in real-time.

The user interface features a dark, futuristic glassmorphic design system using CSS, custom Lottie animations, interactive visualization filters, side-by-side vehicle comparison sheets, and downloadable PDF/HTML report summaries.


🚀 Key Features

  1. High-Accuracy ML Ensembles: Compares 7 machine learning models (Linear Regression, Decision Tree, Random Forest, Gradient Boosting, XGBoost, CatBoost, and LightGBM) to auto-select the best performer (LightGBM at 74.83% R²).
  2. Explainable AI (SHAP): Generates Waterfall and Force plots on-the-fly to show how each input feature (e.g., Year, Mileage, Engine displacement, Brand value) shifts the predicted valuation relative to the market baseline.
  3. Natural Language Explanations: Converts complex mathematical Shapley values into plain English (e.g. "Year of Manufacture pushed the price up by ₹1.16 Lakhs").
  4. Interactive Market EDA: Filter and plot price distributions, correlation matrices, and scatter trends dynamically using Plotly.
  5. Comparison Mode: Input specs for two cars side-by-side to compare their estimated valuations and confidence intervals in a grid.
  6. Valuation History: Logs and stores prediction queries locally for session comparisons.
  7. Exportable Reports: Generate and download HTML-formatted pricing reports for buyers/sellers.
  8. Futuristic Dark Glassmorphism UI: Backdrop filters, glowing neon buttons/borders, custom Google Fonts (Orbitron and Rajdhani), and smooth slide-up hover effects.

🛠️ Technology Stack

  • Core: Python 3.14+
  • Data Engineering: Pandas, NumPy
  • Machine Learning: Scikit-Learn, XGBoost, CatBoost, LightGBM
  • Explainability: SHAP (Shapley Additive exPlanations), Matplotlib
  • Web App UI: Streamlit, Streamlit-Option-Menu, Streamlit-Lottie, Plotly
  • Serialization: Joblib
  • Experiment Tracking: MLflow
  • Version Control: Git, DVC (Data Version Control)

📂 Project Structure

Shinde-AutoVision/
│── data/
│   │── car_data.csv            # Unified cleaned database (Car Dekho v3 source)
│   │── train_cleaned.csv       # Preprocessed training dataset splits
│   │── test_cleaned.csv        # Preprocessed test dataset splits
│   │── train_scaled.csv        # Scaled splits (for linear models)
│   │── test_scaled.csv         # Scaled splits (for linear models)
│   │── prediction_history.csv  # Log of user valuation history
│── notebooks/                  # Notebook sandboxes (optional)
│── assets/
│   │── lottie/
│   │   │── car_intro.json      # Splash loading animations
│   │   │── ai_processing.json  # Valuation spinner animation
│   │   │── success.json        # Completion success mark
│   │   │── loading.json        # Startup background loader
│   │── css/
│   │   │── style.css           # Futuristic glassmorphism styling
│   │── images/
│   │   │── hero_car.png        # AI-generated sleek sportscar visual
│   │   │── dashboard_bg.jpg    # Neon dark grid wallpaper
│   │   │── luxury_car_1.jpg    # Premium sedan visual
│   │   │── luxury_car_2.jpg    # Luxury SUV sunset visual
│── models/
│   │── preprocessor.pkl        # Categorical encoders and scaler objects
│   │── best_model.pkl          # Trained LightGBM ensemble object
│   │── model_comparison.csv    # Performance comparison table (R², MAE, RMSE)
│   │── columns_ref.pkl         # Feature column ordering alignment reference
│── utils/
│   │── download_assets.py      # Lottie loader utility script
│── app.py                      # Multi-page Streamlit Dashboard app
│── train.py                    # 7-model training and MLflow tracking script
│── preprocess.py               # Feature cleaning and engineering pipeline
│── predict.py                  # Pricing prediction and interval bounds engine
│── explain.py                  # SHAP plots and NLP reasoning pipeline
│── verify.py                   # Automated integration test runner
│── requirements.txt            # Package dependencies list
│── README.md                   # Documentation file

⚙️ How to Setup & Run

1. Initialize Virtual Environment

Open terminal inside the project directory and run:

# Create virtual environment
python -m venv .venv

# Activate virtual environment (Windows)
.venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

2. Prepare Assets (Images and Animations)

Ensure all images and animations are stored in their folders under assets/. If they are not found, run the Lottie download utility script:

python utils/download_assets.py

3. Run Preprocessing & Train Models

Execute the verification script to run the pipelines end-to-end, compile preprocessors, compare classifiers, and serialize the best ML model:

python verify.py

Alternatively, run each pipeline step separately:

python preprocess.py
python train.py

4. Launch the Interactive Dashboard

Boot up the Streamlit frontend locally:

streamlit run app.py

Open the local server URL (usually http://localhost:8501) in your browser.


📈 Experiment Tracking & Version Control

  • MLflow Tracking: Training runs log parameters and accuracy values locally to the mlruns/ experiment folder. Launch the dashboard using:
    mlflow ui
  • DVC Dataset Track: Track and lock your dataset splits:
    dvc init
    dvc add data/car_data.csv
    git add data/car_data.csv.dvc

👩‍💻 Authorship & Presentation

Created as a premium portfolio-quality Machine Learning project. Showcases robust ML pipelines, modular code quality, Explainable AI, and advanced front-end designs.

About

Smart Explainable Used Car Price Prediction System using LightGBM, XGBoost, CatBoost, and SHAP.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors