Skip to content

danishadriansyah/FaceRecognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI-Based Face Recognition Attendance System

Progressive Learning - 7 Minggu Pembelajaran Terstruktur

Python OpenCV MediaPipe

Sistem absensi berbasis face recognition yang dikembangkan secara progressive dalam 7 minggu pembelajaran terstruktur. Menggunakan MediaPipe Face Detection + Face Mesh untuk performa real-time yang cepat dan akurat.


๐ŸŽฏ Fitur Utama

  • โœ… MediaPipe Face Recognition: Detection + Face Mesh (1404-dim landmarks)
  • โœ… Super Fast: 60+ FPS real-time (0.01s per face)
  • โœ… High Accuracy: Cosine similarity matching
  • โœ… Lightweight: ~150MB install (no TensorFlow!)
  • โœ… File-Based Storage: Pickle + JSON + CSV (no database needed!)
  • โœ… Real-time attendance tracking via webcam
  • โœ… Desktop GUI dengan Tkinter
  • โœ… Export reports ke CSV/JSON
  • โœ… Support 100-200+ persons
  • โœ… Berjalan offline - no internet needed

๐Ÿš€ Quick Start

Prerequisites

  1. Python 3.11+
python --version  # Harus 3.11 atau lebih

Download: https://python.org/downloads/ (Centang "Add to PATH"!)

  1. Webcam - Built-in atau USB camera

Installation

# 1. Clone/Download project
git clone <repo-url>
cd ExtraQueensya

# 2. Create virtual environment
python -m venv venv
venv\Scripts\activate  # Windows
# source venv/bin/activate  # Mac/Linux

# 3. Install dependencies
pip install -r requirements.txt

# 4. Verify
python -c "import cv2, mediapipe; print('โœ… Ready!')"

Setup per-week dengan Interactive Menu:

# Week 4-7: Auto-setup dataset
cd minggu-X-xxxxx
python setup_weekX.py
# Interactive menu akan muncul dengan pilihan:
#   [1] Copy dataset dari week sebelumnya (otomatis!)
#   [2] Capture faces dengan camera
#   [3] Skip (populate manual nanti)
# Tinggal ketik nomor, no manual commands needed!

Setup All Weeks (4-7) Sekaligus:

python setup_all_weeks.py
# Create folder structure untuk semua week
# Kemudian run setup_weekX.py untuk interactive dataset population

๐Ÿ“š Learning Path (7 Minggu)

minggu-1-python-basics/       โ† START: OpenCV basics
โ”œโ”€โ”€ learning/                 โ† Tutorial & teori
โ”œโ”€โ”€ project/                  โ† Implementation & tests
โ””โ”€โ”€ README.md

minggu-2-face-detection/      โ† Face detection (MediaPipe)
minggu-3-face-recognition/    โ† Face recognition (MediaPipe Face Mesh)
minggu-4-dataset-database/    โ† Dataset management
minggu-5-recognition-system/  โ† Recognition service integration
minggu-6-attendance-system/   โ† Attendance logic & reports
minggu-7-desktop-gui/         โ† Desktop application

Cara Belajar

Setiap minggu:

  1. Baca learning/README.md โ†’ Pahami konsep
  2. Jalankan tutorial files di learning/ โ†’ Praktik
  3. Baca project/README.md โ†’ Understand implementation
  4. Run tests di project/ โ†’ Validasi

Timeline: 2-3 jam/hari ร— 7 minggu = Complete attendance system


๐Ÿ—๏ธ Tech Stack

Core:

  • Python 3.11 - Programming language
  • OpenCV 4.8.1 - Image processing & video capture
  • MediaPipe 0.10.9 - Face Detection + Face Mesh
    • Face Detection: min_detection_confidence=0.3 (configurable)
    • Face Mesh: 468 landmarks ร— 3 coordinates = 1404-dim encoding
  • NumPy 1.26.2 - Cosine similarity matching

Storage & Export:

  • Pickle (face encodings - 1404-dim vectors)
  • JSON (metadata)
  • CSV (attendance logs)
  • Tkinter (GUI)

Why MediaPipe?

  • โœ… Super fast: 60+ FPS real-time (25x faster than DeepFace)
  • โœ… Lightweight: ~150MB install vs ~500MB with TensorFlow
  • โœ… No heavy dependencies
  • โœ… Easy setup: 2-3 min install
  • โœ… Google-maintained, production-ready

๐Ÿ“– Week-by-Week Roadmap

Week Topic Files Output Time
1 Python & OpenCV 5 tutorials image_utils.py 6-7 hari
2 Face Detection 4 tutorials face_detector.py 6-7 hari
3 Face Recognition 3 tutorials face_recognizer.py (MediaPipe) 7-8 hari
4 Dataset Management 3 tutorials dataset_manager.py 6-7 hari
5 System Integration 2 tutorials recognition_service.py 6-7 hari
6 Attendance System 2 lessons attendance_system.py 6-7 hari
7 Desktop GUI 2 lessons main_app.py 5-6 hari

Total: ~50 hari pembelajaran terstruktur


๐ŸŽฎ Running the Application

Week 1-3: Learning Mode

cd minggu-X-xxxxx/learning
python lesson-X/main.py

Week 4+: Project Mode

# Setup dataset first
cd minggu-X-xxxxx
python setup_weekX.py

# Run learning
cd learning/lesson-1
python main.py

Week 7: Desktop App

cd minggu-7-desktop-gui/project
python main_app.py

โ“ FAQ

Q: Harus mulai dari Week 1?
A: Pemula โ†’ Ya. Intermediate โ†’ Skip ke Week 3. Advanced โ†’ Week 5.

Q: Berapa lama per minggu?
A: Flexible! 2-3 jam/hari santai, atau 1-2 hari intensif.

Q: Kenapa pakai MediaPipe?
A: Super fast (60+ FPS), lightweight (~150MB), no heavy dependencies, Google-maintained.

Q: Bisa offline?
A: Ya! Semua berjalan lokal, no cloud/internet needed.

Q: Face detection tidak akurat?
A: Check lighting, distance (50-100cm), frontal face. Atau tuning confidence di Week 6 README.

Q: Cara tuning sensitivity/confidence?
A: Lihat section "โš™๏ธ Configuration & Tuning" di minggu-6-attendance-system/README.md.


๐Ÿ“‚ Progressive Modules Architecture

Setiap minggu standalone dengan copy modules dari minggu sebelumnya:

  • Week 1: image_utils.py
  • Week 2: Week 1 + face_detector.py
  • Week 3: Week 2 + face_recognizer.py (MediaPipe Face Mesh)
  • Week 4: Week 3 + dataset_manager.py
  • Week 5: Week 4 + recognition_service.py
  • Week 6: Week 5 + attendance_system.py
  • Week 7: Week 6 + GUI (main_app.py)

Why Duplicate? Student bisa langsung run tanpa import issues atau dependency ke folder lain. Setiap week bisa dibuka sebagai standalone project.


๐ŸŽฏ Expected Results

Setelah 7 minggu, kamu akan punya:

  • โœ… Working attendance system dengan face recognition
  • โœ… Desktop application dengan GUI
  • โœ… Super fast real-time recognition (60+ FPS)
  • โœ… Report export (CSV/JSON)
  • โœ… Portfolio-ready project
  • โœ… Understanding of confidence tuning & optimization
  • โœ… Skills: Python, OpenCV, MediaPipe, AI, Computer Vision, GUI

๐Ÿ“ž Resources

Documentation

  • Main README (ini) - Overview & quick start
  • Weekly READMEs - 14 detailed READMEs (learning + project per minggu)
  • KUNCI_JAWABAN_TUGAS.md - Answer keys untuk tugas (after trying!)
  • Setup Scripts - setup_week4.py sampai setup_week7.py dengan interactive menus
  • Configuration Guide - Week 6 README section "โš™๏ธ Configuration & Tuning"

External

Need Help?

  1. Baca README di week yang sedang dikerjakan
  2. Run python setup_weekX.py untuk interactive setup
  3. Check Week 6 README untuk confidence tuning
  4. Google error message
  5. Review tutorial files di learning/

๐Ÿ’ช Tips untuk Sukses

  1. Consistency > Intensity - 2 jam/hari lebih baik dari 14 jam/weekend
  2. Understand > Memorize - Pahami konsep, jangan hafal code
  3. Test Everything - Run test setelah setiap perubahan
  4. Take Notes - Catat konsep penting & insights
  5. Build Portfolio - Screenshot, demo video, write blog
  6. Ask for Help - Stuck > 1 jam? Take break atau cari bantuan

๐Ÿš€ Ready to Start?

Complete Beginner:

cd minggu-1-python-basics/learning
python lesson-1/main.py

Intermediate:

cd minggu-3-face-recognition/learning
python lesson-1/main.py

Want Quick Demo:

# Setup Week 6 first
cd minggu-6-attendance-system
python setup_week6.py  # Pilih [1] Copy dari Week 5

# Run attendance demo
cd learning/lesson-1
python main.py

Happy Learning! ๐ŸŽ‰

Remember: Everyone starts from zero. Keep learning, don't give up!


Last Updated: December 13, 2025
Version: 3.0
License: Educational purposes

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors