Snowy-VGG

Overview

Snowy-VGG is a convolutional neural network (CNN) built on the VGG-19 architecture, designed to classify snowy and snow-free pavements. This model aims to enhance pedestrian safety during winter and forms part of the research published in the paper "Image Classification for Snow Detection to Improve Pedestrian Safety," presented at the Midwest Association for Information Systems (MWAIS) Conference in May 2024 (Read the paper on Conference site or Arxiv).

Snowy-VGG leverages transfer learning to fine-tune the VGG-19 model for snow classification, addressing the challenges of limited datasets and light reflection properties.


Features

  • Pretrained Architecture: Built on VGG-19, pretrained on ImageNet.
  • Transfer Learning: Fine-tuned for snow classification using a custom dataset.
  • Ensemble Capability: Combines with ResNet-50 in the research to improve accuracy and F1 scores.
  • Custom Dataset: Trained and validated on a dataset of 98 images of pavements captured via smartphone.
  • Optimized for Accuracy: Designed to handle challenging classification scenarios with limited data.

Dataset

The dataset used for training consists of:

  • 98 Images: Captured in Minnesota, USA, using a Google Pixel 6a smartphone.
  • Resolution: 3024 x 3024 pixels, resized to 128 x 128 for training.
  • Labels: Balanced categories of snow and no-snow images.
  • Test Set: Includes 22 unseen images from distinct locations to evaluate generalization.

The dataset is also available at Neatherblok/Snowy_Sidewalk_Detection.


Implementation

  • Framework: PyTorch
  • Training:
    • Optimizer: Adam
    • Learning Rate: 0.0001
    • Batch Size: 4
    • Epochs: 15-25 (best results at epoch 15)
    • Normalization: Based on ImageNet mean ([0.485, 0.456, 0.406]) and standard deviation ([0.229, 0.224, 0.225]).
  • Evaluation Metrics:
    • Accuracy: 72.7% (ensemble)
    • F1 Score: 71.8% (ensemble)

Usage

To use Snowy-VGG for snow detection, follow these steps:

  1. Installation:

    • Install PyTorch and dependencies: pip install torch torchvision
  2. Load the Model:

    import torch
    from torchvision import models
    
    model = models.vgg19(pretrained=True)
    # Modify the classification layer for binary output (snow vs no-snow)
    model.classifier[-1] = torch.nn.Linear(model.classifier[-1].in_features, 2)
    model.load_state_dict(torch.load('Best_Model_VGG19.pt'))
    model.eval()
    
  3. Inference:

    • Preprocess the input image to 128x128 pixels.
    • Normalize using ImageNet statistics.
    • Pass the image through the model for predictions:
      with torch.no_grad():
          output = model(image_tensor)
          prediction = torch.argmax(output, dim=1)
          print("Snow detected" if prediction.item() == 1 else "No snow detected")
      

Results

  • Performance:
    • Ensemble of Snowy-VGG and ResNet-50 achieves an F1 Score of 71.8% and an accuracy of 72.7% on unseen test data.
    • Focuses on reducing false negatives to enhance pedestrian safety.

Limitations

  • Limited Dataset: Only 98 images for training, which may affect generalization.
  • Light Reflection Sensitivity: Difficulty in detecting subtle changes in light wave reflections on snow.
  • False Negatives: High-risk misclassification when snow is not detected.

Future Directions

  • Dataset Expansion: Include more diverse images from different locations, lighting conditions, and camera types.
  • Model Enhancements: Incorporate custom layers to better handle light reflection variations.
  • Real-Time Applications: Adapt Snowy-VGG for mobile deployment to provide real-time alerts for pedestrians.

Citation

If you use Snowy-VGG in your work, please cite the following paper:

Ricardo de Deijn and Rajeev Bukralia, "Image Classification for Snow Detection to Improve Pedestrian Safety," Midwest Association for Information Systems (MWAIS) 2024. Link to Paper


Acknowledgments

Snowy-VGG was developed as part of a collaborative effort at Minnesota State University, Mankato, with guidance from Dr. Rajeev Bukralia.

For questions or inquiries, please contact:

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Neatherblok/Snowy-VGG

Base model

keras-io/VGG19
Finetuned
(3)
this model

Dataset used to train Neatherblok/Snowy-VGG