Skip to content

This project implements a deep learning pipeline for car image classification using ResNet-based Convolutional Neural Networks (CNNs)

Notifications You must be signed in to change notification settings

jacons/cnn_webapp

Repository files navigation

Car Classifier Web Application

This project implements a deep learning pipeline for car image classification using ResNet-based Convolutional Neural Networks (CNNs).
The model is built with PyTorch and leverages transfer learning from pretrained ImageNet weights (resnet18 or resnet34).

The repository also includes a web application that allows interactive training and inference directly from the browser.

🚀 Features

  • CNN classifier built on ResNet18 / ResNet34 architectures.
  • Transfer learning with optional pretrained weights.
  • Configurable number of frozen layers for fine-tuning.
  • Training and inference modes accessible via command-line or web interface.
  • Logging of training metrics and model checkpoints.

⚙️ Installation

1. Clone the repository

git clone https://github.com/jacons/cnn_webapp
conda env create -f environment.yml
conda activate car-classifier

📂 Dataset

The dataset can be downloaded from Google Drive: Car Dataset (Google Drive Link) After downloading, extract it and place it under the datasets/ folder (e.g., datasets/car_dataset/).

🌐 Running the Web Application

The application supports both training and inference modes.

Training Mode

python app.py --train

Inference Mode

python app.py --inference

🖥️ Running Training from Command Line

You can also train the model directly from the terminal with full configuration options.

Example:

python car_classifier.py \
    --dataset_path "datasets/car_dataset" \
    --metric_history "results/r18_pretrained_fre0.json" \
    --new_hist \
    --model_cache "results/r18_pretrained_fre0.pth" \
    --batch_size 150 \
    --model_name "resnet18" \
    --pretrained \
    --freeze_layers 0 \
    --num_epochs 15 \
    --device "cuda:2"

📊 Training & Inference Interface

Below are examples of the training dashboard and inference interface:

🔹 Training Interface

Logo

🔹 Inference Interface

Logo

License

MIT

Authors

📝 Notes

  • Code is written entirely by the author.
  • Documentation is generated by ChatGPT and later reviewed and validated by the author.

About

This project implements a deep learning pipeline for car image classification using ResNet-based Convolutional Neural Networks (CNNs)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published