This project implements a face recognition attendance system using VGG19, a popular convolutional neural network architecture, to classify faces. The system is designed to recognize three different persons.
-
Image Capturing:
- The
image_capturing.ipynb
notebook captures 100 images of each person using the Haar Cascade algorithm for face detection. These images serve as the training data for the face recognition model.
- The
-
Model Training:
- The
recognition.ipynb
notebook trains the VGG19 model using the captured images. It preprocesses the data, fine-tunes the VGG19 architecture, and trains the model to classify the faces of the three specified persons.
- The
-
Python Script:
- A Python script
project.ipynb
is provided to perform face recognition in real-time. The script loads the pre-trained VGG19 model, initializes the camera, and captures the faces of individuals. - If the recognized name doesn't exist in the CSV file, it will add the name along with the current timestamp into the CSV file.
- A Python script
- image_capturing.ipynb: The notebook for capturing images of individuals using the Haar Cascade algorithm.
- haarcascade_frontalface_default.xml: This XML file contains the pre-trained Haar Cascade classifier for frontal face detection.
- class_names.txt: This file contains the names of the three persons the model is trained to recognize.
- recognition.ipynb: The notebook for training the VGG19 model with the captured images.
- model.h5: This file contains the pre-trained VGG19 model.
- project.ipynb: The Python script for real-time face recognition and attendance tracking.
- Ensure you have the necessary dependencies installed. You can install them using
pip install -r requirements.txt
. - Run the
image_capturing.ipynb
notebook to capture images of each person. - Run the
recognition.ipynb
notebook to train the VGG19 model with the captured images. - Finally, run the
project.ipynb
script:python project.ipynb
. - The script will open your camera feed. It will recognize faces in real time and update the attendance CSV file accordingly.
Datasets/
│
├── Train/
│ ├── venkat/
│ │ ├── image1.jpg
│ │ ├── image2.jpg
│ │ ├── ...
│ │ └── image80.jpg
│ ├── Aadarsh/
│ │ ├── image1.jpg
│ │ ├── image2.jpg
│ │ ├── ...
│ │ └── image80.jpg
│ └── santhosh/
│ ├── image1.jpg
│ ├── image2.jpg
│ ├── ...
│ └── image80.jpg
│
└── Test/
├── venkat/
│ ├── image1.jpg
│ ├── image2.jpg
│ ├── ...
│ └── image20.jpg
├── Aadarsh/
│ ├── image1.jpg
│ ├── image2.jpg
│ ├── ...
│ └── image20.jpg
└── santhosh/
├── image1.jpg
├── image2.jpg
├── ...
└── image20.jpg
- Python 3.x
- OpenCV
- Keras
- TensorFlow
- Numpy
- MatPlotLib
- Vedurupaka Venkata Sai
- Ponnuru Aadarsh
- Gayathri Vankadoth
We welcome contributions to improve this project! If you'd like to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement
) - Make your changes and commit them (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/improvement
) - Create a new Pull Request