LifeEcho is a digital memorial system that automatically plays memorial videos through face recognition. It provides an interactive memorial space where uploaded memorial videos automatically play when a user stays in front of the camera for 5 seconds.
- Real-time face detection using OpenCV
- Automatic video playback after 5 seconds of continuous face recognition
- Automatic camera connection and reconnection functionality
- Photo and video upload functionality
- Input for name, birth date, death date, epitaph, and last words
- Intuitive editing interface
- 3-second countdown before automatic playback
- Memorial information overlay display
- Automatic return to main page after video ends
- Desktop and mobile optimization
- Intuitive user interface
- Smooth animation effects
- Flask: Python web framework
- OpenCV: Computer vision and face recognition
- PIL: Image processing
- Werkzeug: File upload handling
- HTML5: Web page structure
- CSS3: Styling and animations
- JavaScript: Dynamic interactions
- MJPEG Streaming: Real-time video streaming
- Raspberry Pi: Main server
- USB Webcam: Face recognition camera
raspberry-DMG/
βββ app.py # Flask main application
βββ templates/ # HTML templates
β βββ index.html # Main page (face recognition)
β βββ edit.html # Memorial information edit page
β βββ video.html # Video playback page
βββ static/ # Static files
β βββ style.css # Main stylesheet
β βββ script.js # Main page JavaScript
β βββ edit.js # Edit page JavaScript
β βββ video.js # Video page JavaScript
β βββ uploads/ # Uploaded files
β βββ photos/ # Uploaded photos
β βββ videos/ # Uploaded videos
βββ memorial_data.json # Memorial information data
βββ README.md # Project documentation
# Create Python virtual environment
python -m venv lifeecho_env
# Activate virtual environment
# Windows:
lifeecho_env\Scripts\activate
# macOS/Linux:
source lifeecho_env/bin/activate
# Install required packages
pip install flask opencv-python ffmpeg-python requests Pillow numpy werkzeug- Connect Raspberry Pi 5
- Connect USB webcam
- Power supply (USB-C, 5V 5A)
# Run main application
python app.pyThe application runs at http://localhost:3002.
- Access
http://localhost:3002/editin browser - Upload photo (required)
- Upload video (required)
- Enter name, birth date, death date, epitaph, and last words
- Click save button
- Position yourself in front of the camera on the main page (
http://localhost:3002) - After 5 seconds of continuous face recognition, automatically move to video page
- 3-second countdown before automatic memorial video playback
- Automatic return to main page after video ends
- ESC Key: Immediate return to main page during video playback
- Double-click: Immediate return to main page during video playback
- Edit Icon: Navigate to memorial information edit page
GET /video_feed: Real-time camera stream (MJPEG)GET /api/state: Current face recognition statusPOST /api/reset_detection: Reset face recognition system
GET /api/memorial_data: Retrieve saved memorial informationPOST /api/save_memorial: Save memorial informationPOST /upload: Upload photo/video files
GET /: Main page (face recognition)GET /edit: Memorial information edit pageGET /video: Video playback page
- Real-time camera feed display
- Face recognition progress indicator
- Memorial information overlay
- Responsive layout
- Drag and drop file upload
- Real-time form validation
- Preview functionality
- Intuitive interface
- Fullscreen video playback
- 3-second countdown animation
- Memorial information overlay
- Mute control
- Only allowed file formats can be uploaded
- Secure filename generation (with timestamp)
- File size limitations
- Automatic camera detection and connection
- Automatic reconnection on connection failure
- Resource cleanup and memory management
- File upload failure handling
- Camera connection failure handling
- Video playback error handling
- Check if USB webcam is properly connected
- Check if camera is being used by another program
- Check if camera drivers are installed
- Check if file format is supported (photos: png, jpg, jpeg, gif / videos: mp4, avi, mov)
- Check if file size exceeds limits
- Check if there's sufficient storage space
- Check if video file is not corrupted
- Check if browser supports HTML5 video
- Check if video file path is correct
This project is developed for educational purposes.
Suggestions for project improvement or bug reports are always welcome.
Please feel free to contact us with any questions about the project.
LifeEcho - Life's Echo Returns to Loved Ones
Preserving memories digitally, forever