Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Scene-Image-Classification-Using-Custom-CNN-PyTorch-

This project builds a complete deep‑learning pipeline for scene image classification using a custom Convolutional Neural Network (CNN) trained on a 6‑class natural scene dataset. It covers dataset extraction, preprocessing, augmentation, model design, training with early stopping + checkpointing, evaluation, and inference on new images.

Features Custom CNN built from scratch Six scene classes: buildings, forest, glacier, mountain, sea, street Data augmentation for stronger generalization Dynamic mean/std normalization Early stopping + checkpointing Confusion matrix, precision, and recall evaluation Inference on new images

Preprocessing: Resize → 224×224, ToTensor, Normalize using computed mean/std Augmentations: RandomResizedCrop, HorizontalFlip, Rotation, ColorJitter, RandomErasing

Model A custom CNN with: 4 convolutional blocks ReLU activations MaxPooling Dropout for regularization Fully connected classifier (Flatten → Linear → ReLU → Linear)

Training Optimizer: Adam Loss: CrossEntropy Scheduler: StepLR Early stopping (patience = 5) Best model saved to best_modelnew.pth

Evaluation Confusion matrix Macro precision: 0.93 Macro recall: 0.92

Summary A complete PyTorch workflow for multi‑class scene classification, including preprocessing, augmentation, custom CNN design, training utilities, evaluation metrics, and inference. Ideal for learning and experimentation.

About

This project builds a complete deep‑learning pipeline for scene image classification using a custom Convolutional Neural Network (CNN) trained on a 6‑class natural scene dataset. It covers dataset extraction, preprocessing, augmentation, model design, training with early stopping + checkpointing, evaluation, and inference on new images.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages