A personal emotion tracking application that captures your face and logs your emotional state over time. Like checking your emotional pulse - the app runs automatically every 2 hours via Windows Task Scheduler and includes a web dashboard to visualize your emotional patterns.
- Automated Face Capture - Launches every 2 hours via Windows Task Scheduler
- Face Detection - Uses OpenCV's Haar Cascade classifier to detect and crop only your face
- Emotion Selection - Choose from 12 emotions: Neutral, Stressed, Happy, Sad, Angry, Depressed, Fear, Disgust, Excited, Nervous, Surprised, Worried
- Data Logging - Saves timestamped face images and emotions to CSV
- Web Dashboard - Flask-based dashboard with interactive charts to visualize emotional trends
Face_emotion/
├── camera-emotion-logger.py # Main application for capturing face and logging emotions
├── emotion_log.csv # CSV file storing all emotion entries
├── images/ # Stored face images with timestamps
├── RunApp.bat # Batch file to run the web dashboard
├── Captureface-ScheduleTask.xml # Windows Task Scheduler configuration
└── Web_app/
└── emotion_dashboard/
├── app.py # Flask web server
├── templates/ # HTML templates for dashboard
└── static/ # Static assets (CSS, JS)
- opencv-python
- tkinter (included with Python)
- Pillow
- numpy
- flask
- pandas
- plotly
Install dependencies:
pip install -r requirements.txtRun manually or let Task Scheduler trigger it:
python camera-emotion-logger.py- A camera preview window appears with face detection overlay
- Click Capture when your face is detected (green rectangle)
- Select your current emotion from the dropdown
- Click Save to log the entry, Retake to try again, or Cancel to exit
Start the dashboard to view your emotion analytics:
python Web_app/emotion_dashboard/app.pyThen open http://localhost:5000 in your browser.
The dashboard displays:
- Emotion distribution pie/bar charts
- Daily patterns by hour
- Weekly trends by day of week
- Monthly evolution
- Summary statistics
The included MoodPulse-ScheduleTask.xml can be imported into Windows Task Scheduler to run the face capture app every 2 hours automatically.
- Open Task Scheduler
- Click Import Task...
- Select
MoodPulse-ScheduleTask.xml - Important: Edit the task and update these paths to match your system:
- Program/script: Path to your
python.exe - Arguments: Path to
camera-emotion-logger.py - Start in: Path to the project folder
- Program/script: Path to your
- Enable the task
The emotion_log.csv stores entries with the following columns:
| Column | Description |
|---|---|
| DateTime | Timestamp of capture (YYYY-MM-DD HH:MM:SS) |
| Image Name | Filename of saved face image |
| Image Path | Full path to image file |
| Emotion | Selected emotion |
- The app opens your webcam and displays a live preview
- Face detection identifies your face and draws a bounding box
- When you capture, only the detected face (with 20% padding) is cropped and saved
- You select your emotion and the data is logged to CSV
- The web dashboard reads the CSV and generates interactive visualizations
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
This means you can use, modify, and distribute this software, but any derivative works must also be open source under the same license.