The Student Face Recognition System is a Python application that allows users to manage student information and perform real-time face recognition. The application is built using Flask, OpenCV, and face_recognition library and provides features for adding, viewing, and deleting student records.
Before you can run the Student Face Recognition System, ensure you have the following prerequisites installed:
- Python 3.x
- Flask
- Flask-WTF
- OpenCV (cv2)
- face_recognition library
Before running the Student Face Recognition project, it's essential to set up a Python environment and install the required dependencies. You can follow these steps to get your environment ready:
-
Create a Virtual Environment (Optional): It's a good practice to create a virtual environment to isolate project dependencies. If you don't have
virtualenv
installed, you can install it usingpip
:pip install virtualenv
Then, create a virtual environment for the project:
virtualenv venv
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Clone the Project Repository: You'll need to clone the project's GitHub repository to your local machine. If you haven't already cloned it, you can do so with the following command:
git clone https://github.com/your_username/student-face-recognition.git
-
Navigate to the Project Directory: Change your working directory to the project folder:
cd student-face-recognition
-
Install Dependencies: Additionally, you may need to install the
dlib
library using a specific Wheel file. If necessary, you can installdlib
using the provided Wheel file with the following command:pip install dlib-19.22.99-cp39-cp39-win_amd64.whl
To install the required Python libraries, you can use the provided
requirements.txt
file. Run the following command to install them:pip install -r requirements.txt
With these steps, you'll have a clean and isolated environment for your Student Face Recognition project with all the necessary dependencies installed.
-
Run the application by executing
app.py
.python app.py
-
Access the web interface via a web browser (e.g., http://localhost:8000).
- Click on the "Add Student" link.
- Fill in the student's information, including Student ID, Name, Roll No, and Class.
- Upload a photo of the student.
- Click the "Add Student" button to save the student's information.
- Click on the "Live Page" link to access the live face recognition page.
- The application will automatically detect and recognize faces from your webcam feed.
- Recognized students' names will be displayed in the video frame.
- Click on the "View Students" link to see the list of added students.
- The students' details, including Student ID, Name, Roll No, Class, and photos, will be displayed.
- In the "View Students" page, each student's entry will have a "Delete" button.
- Click the "Delete" button to remove a student from the database.
- The student's photo will also be deleted from the media folder.
- app.py: The main application script.
- templates/: HTML templates used for rendering web pages.
- media/: Directory to store uploaded student photos.
- known_faces/: Directory to store known faces for face recognition.
- requirements.txt: Lists the required Python packages.
Contributions to this project are welcome. To contribute, follow these steps:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix.
- Make your changes and test them.
- Create a pull request to the original repository.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to customize and expand this documentation to fit your project's specific needs. Documenting your project helps both users and potential contributors understand and engage with your work more effectively.