Skip to content

sandesha21/HelmNet-AI-Computer-Vision-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HelmNet Helmet Detection

Python TensorFlow Keras OpenCV NumPy Pandas Matplotlib Jupyter Notebook

License Project Status Computer Vision Safety


🏷️ Keywords & Topics

Primary Keywords: Computer Vision β€’ Deep Learning β€’ Safety Monitoring β€’ Image Classification β€’ Workplace Safety
Technical Stack: TensorFlow/Keras β€’ OpenCV β€’ CNN β€’ Transfer Learning β€’ VGG-16 β€’ Python β€’ NumPy
Business Focus: Safety Compliance β€’ Risk Management β€’ Automated Monitoring β€’ Industrial Safety β€’ Accident Prevention
Industry: Construction β€’ Manufacturing β€’ Industrial Safety β€’ Mining β€’ Oil & Gas β€’ Workplace Safety
Project Type: Computer Vision & Deep Learning | Industry: Industrial Safety | Focus: Automated Safety Compliance & Risk Reduction


Overview

This project focuses on building a deep learning–based computer vision system to automatically detect whether workers are wearing safety helmets in industrial or construction environments. The solution improves workplace safety monitoring by automating compliance checks and reducing reliance on manual supervision.

Objective

The primary goal was to develop an image classification model capable of distinguishing between workers with and without helmets. Such a system enhances safety enforcement, reduces accident risks, and supports real-time safety monitoring at scale.


Dataset

  • Source: Provided as part of the project coursework
  • Size: 631 labeled images
  • Categories:
    • With Helmet – Workers wearing helmets
    • Without Helmet – Workers without helmets

Workflow

  1. Data Preprocessing – Converted images to grayscale, normalized pixel values, and split data into training, validation, and test sets.
  2. Model Development – Built and trained CNN-based classifiers, including a baseline CNN and transfer learning models (VGG-16).
  3. Model Enhancement – Applied data augmentation, fine-tuned architectures, and compared model performances.
  4. Evaluation & Insights – Selected the best-performing model for deployment in real-world safety applications.

Results & Key Insights

  • Delivered a highly accurate model for helmet detection across diverse real-world conditions.
  • Enabled scalable, automated safety compliance monitoring.
  • Demonstrated the potential of computer vision in workplace safety and industrial automation.

Tech Stack

  • Language: Python
  • Libraries: TensorFlow/Keras, OpenCV, NumPy, Matplotlib, Seaborn
  • Tools: Jupyter Notebook / Google Colab

πŸš€ Quick Start

Prerequisites

  • Python 3.7+
  • Jupyter Notebook or Google Colab
  • Required libraries (see requirements below)

Installation & Setup

# Clone the repository
git clone https://github.com/sandesha21/helmnet-helmet-detection.git
cd helmnet-helmet-detection

# Install required packages
pip install tensorflow opencv-python numpy pandas matplotlib seaborn scikit-learn

# Launch Jupyter Notebook
jupyter notebook HelmNet_Full_Code_sbadwaik_Final.ipynb

Usage

  1. Open the main notebook: HelmNet_Full_Code_sbadwaik_Final.ipynb
  2. Run all cells to reproduce the complete analysis
  3. The notebook includes data preprocessing, model training, and evaluation
  4. Pre-processed data (images_proj.npy) and labels (Labels_proj.csv) are ready to use

πŸ“Š Model Performance

The trained CNN model achieves:

  • High accuracy in helmet detection across diverse conditions
  • Robust performance with data augmentation techniques
  • Transfer learning optimization using VGG-16 architecture
  • Real-world applicability for industrial safety monitoring

Detailed performance metrics and evaluation results are available in the notebook.


πŸ”§ Troubleshooting

Common Issues & Solutions

Issue: ModuleNotFoundError for TensorFlow/OpenCV

  • Solution: Ensure all dependencies are installed: pip install -r requirements.txt

Issue: Memory error when loading images_proj.npy

  • Solution: The dataset is large (~631 images). Ensure you have at least 4GB RAM available or use Google Colab for cloud processing

Issue: Notebook kernel crashes during model training

  • Solution: Reduce batch size in the notebook or use GPU acceleration (Google Colab with GPU runtime)

Issue: CUDA/GPU not detected

  • Solution: Install GPU-enabled TensorFlow: pip install tensorflow[and-cuda] or use CPU-only version

Getting Help

  • Check the PROJECT_DESCRIPTION.md for detailed technical documentation
  • Review the Jupyter notebook for inline comments and explanations
  • Open an issue on GitHub for bugs or feature requests

πŸ“ File Structure

β”œβ”€β”€ HelmNet_Full_Code_sbadwaik_Final.ipynb              # Complete CNN model implementation and analysis notebook
β”œβ”€β”€ images_proj.npy                                     # Preprocessed image dataset (631 helmet/no-helmet images)
β”œβ”€β”€ Labels_proj.csv                                     # Image classification labels (helmet detection ground truth)
β”œβ”€β”€ PROJECT_DESCRIPTION.md                              # Detailed technical documentation and business context
β”œβ”€β”€ README.md                                           # Project overview and setup guide
└── LICENSE                                             # Project license information

🀝 Contributing

Contributions are welcome! If you have suggestions for improvements:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Sandesh S. Badwaik
Applied Data Scientist & Machine Learning Engineer

LinkedIn GitHub

🌟 If you found this project helpful, please give it a ⭐!


πŸ“š Related Resources & References

About

Computer vision model for detecting whether workers are wearing safety helmets in images. Useful for automated safety monitoring in industrial environments.

Topics

Resources

License

Stars

Watchers

Forks

Contributors