Back to Projects

Smart Mirror With Voice & Face Detection

Built a Raspberry Pi smart mirror with real-time face detection, voice control, personalized widgets, and energy-saving motion activation.

Technologies

HTML
CSS
JavaScript
Python
Raspberry Pi
OpenCV

Introduction

The Smart Mirror project integrates daily information into a household setting through an interactive user interface. It uses OpenCV with Python for real-time facial detection and classification, creating a personalized experience for each user.

The custom interface was built with HTML, CSS, and JavaScript to display widgets such as weather forecasts and calendar events. Voice control through the Amazon Alexa API allows users to access information and control smart home devices using voice commands. The project also used a 27-inch display, Raspberry Pi 4, and PIR motion sensor to create a practical and energy-conscious smart home device.

Features and Functionality

  • Real-time facial detection: Used OpenCV with Python for facial detection and classification.
  • Personalized user experience: Displays different modules depending on whether a recognized face is detected.
  • Custom user interface: Built with HTML, CSS, and JavaScript to show weather, calendar, and other daily widgets.
  • Voice control integration: Integrated with the Amazon Alexa API for voice commands and smart home control.
  • Energy efficiency: Used a PIR motion sensor so the display activates only when motion is detected, reducing electricity running costs by 20%.

How It Works

The system starts with the monitor on standby. When the PIR sensor detects motion, the Raspberry Pi checks whether the face captured by the Pi camera is saved on file.

If the face is recognized, the monitor displays personalized smart mirror modules. If the face is not recognized, it displays basic generic modules. After the modules are shown, the system allows voice detection through the microphone. The logic is implemented with Python and JavaScript running on the Raspberry Pi.

The Raspberry Pi acts as the hub that processes input from the sensors and camera, runs the software, and controls the display. The Pi camera supports multi-user recognition and security, while the voice control layer adds an extra level of convenience.

The remote-control view shows how the mirror can interact with a mobile device on the same or a different network, while the energy comparison shows how the PIR sensor supports lower electricity usage.

Smart mirror design methodology
Raspberry Pi components connected to the smart mirror
Smart mirror widget interface
PIR sensor energy consumption comparison

Future Improvements

  • Improve facial recognition accuracy and speed with advanced machine learning algorithms and an infrared camera for poorly lit environments.
  • Add video-playing functionality so the mirror can play YouTube videos.
  • Add anti-fog technology so the mirror can be used in a bathroom without visibility issues.

Conclusion

The Smart Mirror combines modern smart home technology with everyday convenience. By using OpenCV and Python for real-time facial detection, a custom web interface for information widgets, and Amazon Alexa voice control, the project provides a personalized and interactive experience.

The hardware setup and energy-efficient design show how smart home technology can improve daily routines while reducing unnecessary power usage. The project also provides a foundation for future improvements such as stronger facial recognition, more widgets, mobile app support, and advanced energy management.

Smart Mirror final year project presentation at Brunel University London
Smart Mirror poster
GitHub
LinkedIn