Smart Mirror AR Fashion Assistant Welcome to Smart Mirror AR Fashion Assistant β an advanced augmented reality (AR) application that merges computer vision, 3D rendering, and AI-driven emotion detection to create a virtual try-on experience.
π Overview The Smart Mirror offers:
Real-time emotion detection through facial expression analysis. AR overlays of fashion items (crowns, glasses, shirts) on live video. Voice compliments based on mood detection. Hand-tracking for seamless interaction with virtual fashion accessories. Daily goal tracking with a modern, gamified UI. This project transforms the retail experience by providing an interactive way to try on outfits and receive personalized fashion advice.
π― Key Features
- Real-time Emotion Detection Detects emotions (happy, sad, neutral, angry) through the webcam. Offers personalized voice compliments and fashion advice.
- AR Fashion Try-On Overlay 3D models of fashion accessories on your reflection. Accurately tracks hand movements to adjust the position of accessories.
- Interactive UI/UX Clean and responsive design using Tailwind CSS. Intuitive controls for selecting fashion items and interacting with AR elements.
- Voice Interaction AI-powered compliments and suggestions via pyttsx3. Real-time voice feedback enhances the user experience.
- Daily Goal Management Track daily tasks within the mirror interface. Visual progress with checklists and animations.
π οΈ Tech Stack Frontend: Next.js 15.1.2 β Core framework. React Three Fiber β 3D rendering library. Tailwind CSS β Styling and layout. Lucide React β Icon set.
Backend:
Project Setup: Emotion Detection App (FER, Flask, MoviePy, TensorFlow)
- Prerequisites: Python 3.11 or 3.12 pyenv or Homebrew (for managing Python versions) (creating virtual environment) Git (for cloning repositories) Virtual environment (venv)
- Setting Up the Project: Step 1: Create the Project Directory bash Copy code mkdir ReflectAI cd ReflectAI Step 2: Set Up a Virtual Environment bash Copy code python -m venv venv source venv/bin/activate # MacOS/Linux
Step 3: Install Required Packages (Add to requirements.txt) Create a requirements.txt:
text Copy code opencv-python-headless numpy fer pyttsx3 Flask flask-cors tensorflow Install from the file:
bash Copy code pip install -r requirements.txt 3. Addressing Common Issues: MoviePy Missing or Errors:
pip install moviepy==1.0.3 #If moviepy.editor is missing:
pip uninstall moviepy pip install moviepy #TensorFlow Installation (if missing):
pip install tensorflow
pip install tensorflow-macos
pip install --upgrade numpy h5py
π How It Works Webcam Activation β The app initializes facial expression tracking. Emotion Analysis β The app detects emotions and responds with voice feedback. AR Accessory Overlay β Selected fashion items are rendered in 3D. Hand Tracking β Position AR items by moving your hand in the video feed. Goal Management β Track and complete daily goals directly on the smart mirror interface.
πΈ Screenshots Live AR Fashion Try-On β Real-time accessory fitting. Emotion-Based Compliments β Mood-driven visual and verbal feedback. Goal Tracker β Mark tasks as complete interactively.
ποΈ Installation Requirements: Python 3.8+ Node.js 18.3+ npm or yarn Setup: bash Copy code
git clone https://github.com/yourusername/smart-mirror-ar.git
cd smart-mirror-ar
cd frontend
npm install
npm run dev
cd backend
pip install -r requirements.txt
python app.py
π Usage Start the Flask server to enable emotion detection. Launch the frontend via Next.js. Position yourself in front of the webcam to interact with virtual fashion items.
π Future Enhancements Expanded AR Wardrobe β More outfits and accessories. Enhanced Emotion Data β Detect more nuanced emotions. E-commerce Integration β Directly purchase tried-on items. Virtual Closet β Save previously tried outfits.
π§βπ» Contributing Want to improve the project? Contributions are welcome!
Report bugs or submit feature requests. Fork the project and submit pull requests. π License This project is licensed under the MIT License.
π Acknowledgements TensorFlow β Emotion detection models. Three.js β 3D rendering engine. Flask β Lightweight and fast backend.
π Contact Author: Sauhard Gupta Email: [Your Email] GitHub: https://github.com/Sauhard74