Versi: 1.0 Last Updated: 8 Januari 2026 Application: EAGLEARN Focus Monitoring
- Tentang Aplikasi
- Persyaratan Sistem
- Instalasi
- Menjalankan Aplikasi
- Panduan Penggunaan
- Fitur-Fitur
- Konfigurasi
- Troubleshooting
- FAQ
EAGLEARN adalah aplikasi focus monitoring berbasis AI yang mendeteksi:
- Emotion - 7 jenis emosi (happy, sad, angry, surprised, neutral, fear, disgust)
- Head Pose - Posisi kepala (pitch, yaw, roll)
- Eye Tracking - Arah pandangan mata
- Body Posture - Postur tubuh dan fokus
- Blink Rate - Frekuensi kedipan mata
- Yawning Detection - Deteksi mengantuk
- Stress & Confusion - Level stress dan kebingungan
Teknologi:
- MediaPipe untuk face & pose detection
- DeepFace untuk emotion recognition
- Flask + SocketIO untuk real-time communication
- PyTorch & TensorFlow untuk model AI
- OS: Windows 10/11, Linux (Ubuntu 20.04+), macOS 10.15+
- Python: 3.9 - 3.11 (recommended: 3.11.9)
- RAM: 8 GB (16 GB recommended)
- Processor: Intel Core i5 / AMD Ryzen 5 ke atas
- Storage: 5 GB free space
- Webcam: Built-in atau external (640x480 minimum)
- Browser: Chrome, Firefox, Edge (WebSocket support)
- GPU: NVIDIA GTX 1650 ke atas (RTX 3050+ recommended)
- VRAM: 4 GB minimum
- CUDA: 11.8 atau 12.x
git clone <repository-url>
cd Eaglearn-Project# Buat virtual environment
python -m venv .venv_gpu
# Activate virtual environment
# Windows:
.venv_gpu\Scripts\activate
# Linux/macOS:
source .venv_gpu/bin/activate# Upgrade pip
python -m pip install --upgrade pip
# Install semua dependencies
pip install -r requirements.txt
# Install PyTorch dengan CUDA (jika ada GPU)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118# Cek Python
python --version # Expected: 3.9-3.11
# Cek PyTorch GPU (jika ada GPU)
python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
# Expected: CUDA available: True
# Cek MediaPipe
python -c "import mediapipe as mp; print('MediaPipe:', mp.__version__)"
# Expected: MediaPipe: 0.10.8# Activate virtual environment
source .venv_gpu/Scripts/activate # Windows
source .venv_gpu/bin/activate # Linux/macOS
# Jalankan aplikasi
python app.pyAplikasi akan berjalan di:
- Local: http://127.0.0.1:8080
- Network: http://192.168.x.x:8080 (IP address lokal)
Buat file run_eaglearn.bat:
@echo off
call .venv_gpu\Scripts\activate
python app.py
pauseKlik dua kali file tersebut untuk menjalankan aplikasi.
# Jalankan di background
nohup python app.py > eaglearn.log 2>&1 &
# Cek logs
tail -f eaglearn.log- Buka browser (Chrome/Firefox/Edge)
- Navigate ke: http://localhost:8080
- Allow camera access ketika diminta
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EAGLEARN β
β β
β [Start Session] [Stop Session] [Calibrate] β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β CAMERA FEED ββ
β β ββ
β β [Your face will appear here] ββ
β β ββ
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Status: FOCUSED β
β Focus Score: 85% β
β Emotion: Happy (95%) β
β FPS: 27.5 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- 85-100% π’ = Focused
- 50-84% π‘ = Need Attention
- 0-49% π΄ = Distracted/Drowsy
- π Happy = Engagement good
- π Neutral = Normal state
- π Angry = Frustration/struggle
- π¨ Fear/Surprise = Confusion/uncertainty
- π’ Sad = Lack of motivation
- Head Pose = Posisi kepala (harus menghadap depan)
- Eye Gaze = Arah pandangan (harus ke screen)
- Posture = Postur tubuh (harus tegak)
- Blink Rate = Kedipan normal (12-25 per minute)
- Yawning = Deteksi mengantuk (tanda fatigue)
Untuk akurasi terbaik, lakukan calibration:
- Klik tombol [Calibrate]
- Ikuti instruksi:
- Dudur tegak di depan kamera
- Pandang lurus ke screen
- Posisi wajah terlihat jelas
- Tahan 5-10 detik
- Klik [Save Calibration]
Calibration data akan disimpan di user_calibration.json
- Live Video Feed - Webcam stream dengan overlay
- Face Detection - Bounding box dan landmarks
- Emotion Detection - Update real-time (5-10 FPS)
- Focus Tracking - Score focus 0-100%
- Performance Metrics - FPS, frame skip, processing time
- Start/Stop - Kontrol monitoring session
- Auto-save - Session data disimpan otomatis
- History - Review session sebelumnya
- Export - Download session data (CSV/JSON)
- Gaze Estimation - Prediksi arah pandangan (x, y coordinate)
- Attention Score - 0-100, seberapa fokus ke screen
- Distraction Alerts - Notifikasi jika loss of focus
- Fatigue Detection - Yawning dan drowsiness
- Stress Analysis - Level stress dari micro-expressions
camera:
width: 640 # Resolution lebar
height: 480 # Resolution tinggi
fps: 30 # Target FPS
backend: dshow # Windows: dshow, Linux: v4l2performance:
frame_skip_mode: adaptive
frame_skip_base: 3 # Process setiap N frame
adaptive_quality:
enabled: true
target_fps: 25 # FPS target
min_skip: 1
max_skip: 7
gpu_acceleration:
enabled: true
fallback_to_cpu: trueemotion:
min_confidence: 0.3 # Threshold confidence
yawning_mar_threshold: 0.6
blink_ear_threshold: 0.21
stress_high_threshold: 0.7Buat file .env:
# Camera
CAMERA_ID=0
CAMERA_WIDTH=640
CAMERA_HEIGHT=480
# Server
HOST=127.0.0.1
PORT=8080
DEBUG=False
# Privacy
RETENTION_DAYS=30Symptoms:
- Error: "Cannot open webcam"
- Black screen
- "No camera found"
Solutions:
-
Check camera connection:
# Windows python -c "import cv2; cap = cv2.VideoCapture(0); print('Open:', cap.isOpened())"
-
Try different backends:
- Edit
config.yaml:backend: default - Atau gunakan camera ID lain:
CAMERA_ID=1
- Edit
-
Close other apps:
- Close Zoom, Teams, Skype, etc.
- Only one app can access camera at a time
Symptoms:
- Choppy video
- Laggy interface
- FPS counter shows < 15
Solutions:
-
Reduce resolution:
camera: width: 320 height: 240
-
Increase frame skip:
frame_skip_base: 5
-
Disable face mesh:
visual_feedback: show_face_mesh: false show_skeleton: false
-
Use CPU-only mode:
gpu_acceleration: enabled: false
Symptoms:
- Emotion always "neutral"
- Low confidence scores
- Error logs from DeepFace
Solutions:
-
Check DeepFace installation:
python -c "from deepface import DeepFace; print('OK')" -
Verify TensorFlow:
python -c "import tensorflow as tf; print(tf.__version__)" # Expected: 2.15.0
-
Check lighting:
- Pastikan wajah terilluminasi dengan baik
- Hindar backlighting
- Gunakan lighting tambahan jika perlu
-
Adjust confidence threshold:
emotion: min_confidence: 0.2 # Lower untuk lebih sensitive
Symptoms:
- High CPU usage, low GPU usage
nvidia-smishows 0% GPU utilization- TensorFlow/PyTorch using CPU
Solutions:
-
Verify CUDA installation:
nvidia-smi # Check CUDA Version column -
Check PyTorch CUDA:
python -c "import torch; print('CUDA:', torch.cuda.is_available())" # Expected: CUDA: True
-
Reinstall PyTorch with CUDA:
pip uninstall torch torchvision pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
Symptoms:
- "Address already in use"
- "Port 8080 already occupied"
- Connection refused
Solutions:
-
Kill existing process:
# Windows taskkill /f /im python.exe # Linux/macOS pkill -f "python app.py"
-
Change port:
# Edit app.py line ~215 socketio.run(app, host='0.0.0.0', port=8081) # Use 8081
-
Check firewall:
- Windows: Allow Python through Windows Firewall
- Linux:
sudo ufw allow 8080
A: TIDAK. EAGLEARN melakukan local processing only. Tidak ada video atau gambar yang di-upload ke cloud. Semua processing terjadi di komputer Anda.
A:
- Video feed: ~50-100ms (camera ke browser)
- Emotion detection: 100-200ms (DeepFace inference)
- Total latency: ~150-300ms
- Dengan temporal smoothing, ada tambahan 150-300ms untuk stabilisasi
A: YA. EAGLEARN bekerja 100% offline. Koneksi internet hanya diperlukan saat pertama kali untuk mendownload model AI (DeepFace weights).
A:
- DeepFace (SSD backend): ~85-90% accuracy
- DeepFace (RetinaFace): ~95% accuracy (dengan GPU)
- F1-score: 0.87-0.93 tergantung dataset
A: Saat ini EAGLEARN dirancang untuk single user (one face di frame). Untuk multiple users, perlu modifikasi kode.
A:
- CPU: 30-60% (Intel i5/Ryzen 5)
- RAM: 1-2 GB (Python + models)
- GPU: 2-3 GB VRAM (jika ada GPU)
- Storage: 500 MB untuk models
A:
- Lakukan calibration sebelum session
- Pencahayaan baik - wajah terlihat jelas
- Posisi proper - wajah langsung menghadap kamera
- Gunakan GPU untuk RetinaFace backend
- Adjust thresholds di
config.yaml
A: YA. Semua data diproses secara lokal. Tidak ada data yang dikirim ke server eksternal. Session data disimpan di lokal komputer Anda.
- Lighting - Gunakan pencahayaan diffuse, hindar shadows di wajah
- Position - Dudur pada jarak 50-80 cm dari kamera
- Background - Gunakan background solid/bersih
- Calibration - Lakukan kalibrasi sebelum sesi penting
- Breaks - Ambil break setiap 45-60 menit untuk hasil terbaik
- Close unused apps - Free up resources
- Use wired connection - Untuk network session (jika applicable)
- Disable visual feedback - Untuk low-end devices
- Adjust FPS target - Set ke 20-25 untuk battery saving
- Stable position - Hindar excessive movement
- Direct gaze - Pandang lurus ke kamera/screen
- Neutral expression - Untuk baseline calibration
- Multiple sessions - Rata-ratakan dari beberapa session
- Issues: GitHub Issues
- Email: [project-email@example.com]
- Discord: [server-invite-link]
- β Initial release
- β Focus monitoring with 85-95% accuracy
- β Real-time emotion detection (7 emotions)
- β Head pose, eye tracking, posture analysis
- β Temporal smoothing untuk stabilisasi
- β Calibration system
- β Privacy-first design (local processing only)
- β GPU acceleration support (PyTorch CUDA)
This project is licensed under the MIT License - see the LICENSE file for details.
End of User Guide
Untuk pertanyaan lebih lanjut, hubungi development team atau lihat dokumentasi teknis di repository ini.
Happy Learning with EAGLEARN! ππ