https://github.com/amid68/mask_social_detection
A computer vision project for detecting face masks and monitoring social distancing violations using deep learning and OpenCV
https://github.com/amid68/mask_social_detection
computer-vision deep-learning mask-detection opencv python social-distancing vgg19
Last synced: 2 months ago
JSON representation
A computer vision project for detecting face masks and monitoring social distancing violations using deep learning and OpenCV
- Host: GitHub
- URL: https://github.com/amid68/mask_social_detection
- Owner: Amid68
- Created: 2025-02-25T19:24:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-25T20:59:19.000Z (over 1 year ago)
- Last Synced: 2025-05-30T23:25:51.203Z (about 1 year ago)
- Topics: computer-vision, deep-learning, mask-detection, opencv, python, social-distancing, vgg19
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mask and Social Distancing Detection
This project implements a computer vision system that detects whether people are wearing face masks and monitors social distancing violations using deep learning (VGG19) and OpenCV’s Haar Cascade for face detection.
## Features
- **Face Detection:** Uses Haar Cascade classifiers to locate faces in images.
- **Mask Detection:** Employs a transfer learning model based on VGG19 to classify whether a person is wearing a mask.
- **Social Distancing Monitoring:** Calculates distances between detected faces to identify potential social distancing violations.
- **Dataset Organization:** Includes scripts to automatically organize your dataset into Train, Validation, and Test splits.
## Installation
1. Clone the repository.
2. Install the required dependencies:
```bash
pip install -r requirements.txt
```
3. Organize your dataset:
- Place your downloaded dataset (with annotations and images folders) in data/face-mask-dataset/.
- Run python split_data.py to automatically organize the dataset into the required folder structure.
4. in the model (if not already trained):
```
python src/train_model.py
```
5. Test the system by running:
```
python src/main.py
```
### License
This project is released under the MIT License.