A web-based interface for managing student attendance using face recognition technology.
- Add new students with photos (upload or webcam capture)
- Take attendance using face recognition
- Automatic attendance marking
- Google Sheets integration for attendance records
- Install the required dependencies:
pip install -r requirements.txt- Create a
facesdirectory in the project root:
mkdir faces-
Set up Google Sheets API:
- Create a Google Cloud Project
- Enable Google Sheets API
- Create a service account and download the credentials
- Save the credentials as
google_sheets_credentials.jsonin the project root - Share your Google Sheet with the service account email
-
Run the application:
python app.py- Open your web browser and navigate to:
http://localhost:5000
- Enter the student's name
- Choose between uploading a photo or using the webcam
- If using webcam:
- Click "Capture Photo" when ready
- Preview the captured photo
- Click "Add Student" to save
- Click "Start Attendance" button
- The system will open your webcam
- Students should look at the camera
- Attendance will be automatically marked
- Press 'q' to quit the attendance session
- Photos are automatically converted to WebP format for optimal storage
- Face recognition threshold is set to 0.7 (70% similarity)
- Attendance records are saved both locally and to Google Sheets
- The system requires a webcam for attendance taking