An open API service indexing awesome lists of open source software.

https://github.com/askitendo/face-attendence-python

A Facial Recognition attendance taking app working on python flask
https://github.com/askitendo/face-attendence-python

Last synced: 9 months ago
JSON representation

A Facial Recognition attendance taking app working on python flask

Awesome Lists containing this project

README

          

# ๐Ÿ“ธ๐Ÿ‘ค Face Recognition Attendance System

A web-based attendance system that uses face recognition to make attendance fun, fast, and foolproof! Built with ๐Ÿ Flask and ๐Ÿ“ป OpenCV, itโ€™s time to wave goodbye to manual registers and say hello to the future. ๐ŸŒŒ


flask
flask

## ๐ŸŽฏ Features

- ๐Ÿ” **Real-time Face Detection & Recognition** โ€“ Smile, you're on camera!
- ๐Ÿฅ‡ **User-Friendly Registration** โ€“ Add new users effortlessly with live face capture.
- โณ **Automatic Attendance Marking** โ€“ No more roll calls.
- ๐Ÿ•ฎ๏ธ **Glass Morphism UI** โ€“ Itโ€™s not just smart; itโ€™s pretty.
- ๐ŸŒ„ **Real-Time Updates** โ€“ See attendance as it happens.
- ๐Ÿ“„ **CSV-Based Records** โ€“ Attendance data you can trust.
- โŒš **AM/PM Time Format** โ€“ Because we like to keep it classic.
- ๐Ÿ”„ **Responsive Design** โ€“ Looks good on any device.

## ๐Ÿ”ง Tech Stack

| **Component** | **Technology** |
| ----------------------- | ------------------------------- |
| ๐Ÿ”ง **Backend** | Python, Flask |
| ๐Ÿ•ต๏ธ **Computer Vision** | OpenCV, Haar Cascade Classifier |
| ๐Ÿง  **Machine Learning** | scikit-learn (KNN Classifier) |
| ๐ŸŽจ **Frontend** | HTML, CSS, JavaScript |
| ๐Ÿ“Š **Data Handling** | Pandas, NumPy |
| ๐Ÿ›  **Model Storage** | joblib |

## ๐Ÿ”ง Prerequisites

- Python 3.8 or higher ๐Ÿค 
- A webcam ๐Ÿ“ผ
- A modern web browser (preferably Chrome/Firefox) ๐ŸŒ

## ๐Ÿ“– Installation

1. **Clone the repository**:

```bash
git clone https://github.com/AskitEndo/Face-Attendence-python
cd face_recognition_flask
```

2. **Create and activate a virtual environment**:

```bash
python -m venv .venv

# On Windows
.\.venv\Scripts\Activate.ps1

# On Linux/Mac
source .venv/bin/activate
```

3. **Install dependencies**:

```bash
pip install -r requirements.txt
```

## ๐Ÿ†™ Usage

1. **Start the application**:

```bash
python app.py

```

or

```bash
#for direct run

.\venv\Scripts\activate.ps1 && cd face_recognition_flask && python app.py
```

2. **Open your browser** and navigate to:

```
http://127.0.0.1:5000
```

3. **Add a new user**:

- Click on **Add New User**.
- Enter the userโ€™s name and ID.
- Look at the camera โ€“ say cheese! ๐Ÿ˜Ž
- The system will capture 10 images of your face.

#### The face recognition model (`face_recognition_model.pkl`) will be automatically created after the first user registration. This model file is essential for face recognition and will be updated each time a new user is added.

4. **Mark attendance**:
- Click **Take Attendance**.
- Look into the camera ๐Ÿ”.
- Press `SPACEBAR` to exit.

## ๐Ÿ”ฌ Project Structure

```
face_recognition_flask/
โ”œโ”€โ”€ app.py # Main application file
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ haarcascade_frontalface_default.xml # Face detection model
โ”œโ”€โ”€ templates/
โ”‚ โ””โ”€โ”€ home.html # HTML template
โ”œโ”€โ”€ static/
โ”‚ โ”œโ”€โ”€ faces/ # User face images
โ”‚ โ””โ”€โ”€ face_recognition_model.pkl # Trained model
โ””โ”€โ”€ Attendance/ # Daily attendance records
```

## ๐Ÿ™Œ Why Youโ€™ll Love It

- **No more forgetting to mark attendance.** Your face does the work for you!
- **Beautiful UI.** Even attendance can be aesthetically pleasing. ๐Ÿ’ƒ
- **Easy to use.** No steep learning curve.
- **Great for schools, offices, or hackathons.**

## App Demo Live ๐Ÿ‘ค๐Ÿ™‚โ€โ†•๏ธ


App Demo Live

## ๐ŸŒ Contributing

Want to make this system even cooler? Follow these steps:

1. Fork the repository ๐ŸŒ.
2. Create your feature branch:

```bash
git checkout -b feature/AmazingFeature
```

3. Commit your changes:

```bash
git commit -m 'Add some AmazingFeature'
```

4. Push to the branch:

```bash
git push origin feature/AmazingFeature
```

5. Open a Pull Request ๐ŸŒŸ.

## ๐Ÿ‘จโ€๐Ÿ’ป Author

Crafted with ๐Ÿ’ป and โ˜• by **AskitEndo**. Love building cool stuff and sharing knowledge! Found this helpful? Drop a ๐ŸŒŸ or buy me a coffee! Let's inspire, not plagiarize. ๐Ÿ˜‰

## ๐Ÿ”’ License

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