Face Anonymizer is a real-time face detection and blurring application designed for video conferencing platforms like Zoom, Microsoft Teams, Discord, and more. It captures video from your webcam, detects faces using advanced AI models, applies customizable blur effects, and outputs the anonymized video stream to a virtual camera device that any video call application can use.
- π― Real-time Face Detection - Powered by YuNet (OpenCV) for accurate face detection
- π¨ Modern GUI - Beautiful, intuitive interface with live preview and controls
- ποΈ Adjustable Blur Intensity - Control blur density from 0-100% with an interactive slider
- πΉ Virtual Camera Output - Seamless integration with Zoom, Teams, Discord, and other video apps
- β‘ Low Latency - Optimized for real-time video processing
- π Live Statistics - Real-time FPS counter and face detection count
- π Elliptical Blur - Natural-looking anonymization that preserves video quality
- π±οΈ Interactive Controls - Click-and-drag slider for instant blur adjustment
Note: Add screenshots of your GUI here to showcase the interface
[Preview Window] [Control Panel]
βββββββββββββββββββ ββββββββββββββββ
β β β Blur: 75% β
β [Video Feed] β β ββββββββββ β
β β β β
β Blur: 75% β β Faces: 1 β
β Faces: 1 β β FPS: 30.0 β
β FPS: 30.0 β β β
βββββββββββββββββββ ββββββββββββββββ
- Linux (Ubuntu/Debian, Arch, Fedora, or similar)
- OpenCV 4.x with face detection support
- CMake 3.10+
- C++17 compatible compiler (GCC/Clang)
- ffmpeg (for virtual camera output)
- v4l2loopback kernel module
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install build-essential cmake libopencv-dev ffmpeg v4l2loopback-dkmsArch Linux:
sudo pacman -S base-devel cmake opencv ffmpeg v4l2loopback-dkmsFedora:
sudo dnf install gcc-c++ cmake opencv-devel ffmpeg v4l2loopbackmkdir -p assets
cd assets
wget https://github.com/opencv/opencv_zoo/raw/master/models/face_detection_yunet/face_detection_yunet_2023mar.onnx
cd ..mkdir -p build
cd build
cmake ..
make# Run the setup script
sudo ./setup_virtual_camera.sh
# Or manually load the kernel module
sudo modprobe v4l2loopback devices=1 video_nr=2 card_label="FaceAnonymizer" exclusive_caps=1Make it persistent across reboots:
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo "options v4l2loopback devices=1 video_nr=2 card_label=\"FaceAnonymizer\" exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf./build/LiveFaceAnonymizer./build/LiveFaceAnonymizer [options]
Options:
--camera <index> Camera index (default: 0)
--device <path> Virtual camera device path (default: auto-detect)
--no-preview Disable preview window
--help, -h Show help messageUse a different camera:
./build/LiveFaceAnonymizer --camera 1Specify virtual camera device:
./build/LiveFaceAnonymizer --device /dev/video3Run without GUI (headless mode):
./build/LiveFaceAnonymizer --no-preview-
Start Face Anonymizer:
./build/LiveFaceAnonymizer
-
Adjust Blur Intensity:
- Use the interactive slider in the control panel
- Click and drag to adjust blur density (0-100%)
- Changes apply instantly to the preview
-
Select Virtual Camera:
- Open your video conferencing app
- Go to Settings β Video (or Camera settings)
- Select "FaceAnonymizer" or "/dev/video2" from the camera list
-
Start Your Call:
- Your face will be automatically anonymized in real-time! π
The application features a modern, unified interface:
-
Preview Area (70%) - Large video feed showing anonymized output
- Live statistics overlay (blur %, face count, FPS)
- Real-time face detection visualization
-
Control Panel (30%) - Interactive controls and information
- Blur intensity slider with visual feedback
- Face detection statistics
- FPS counter
- Virtual camera status indicator
- Usage instructions
deepfaker/
βββ CMakeLists.txt # Build configuration
βββ README.md # This file
βββ QUICKSTART.md # Quick start guide
βββ setup_virtual_camera.sh # Virtual camera setup script
βββ assets/ # Model files directory
β βββ face_detection_yunet_2023mar.onnx
βββ src/ # Source code
β βββ main.cpp # Main application entry point
β βββ FaceAnonymizer.hpp # Face detection and blurring class
β βββ FaceAnonymizer.cpp
β βββ VirtualCamera.hpp # Virtual camera output handler
β βββ VirtualCamera.cpp
β βββ ModernGUI.hpp # Modern GUI interface
β βββ ModernGUI.cpp
βββ build/ # Build directory (generated)
βββ LiveFaceAnonymizer # Compiled executable
- Capture - Reads video frames from your webcam using OpenCV
- Detect - Uses YuNet face detection model to identify faces in real-time
- Anonymize - Applies elliptical Gaussian blur to detected face regions
- Output - Streams anonymized frames to virtual camera via ffmpeg
- Display - Shows preview window with live statistics (optional)
The virtual camera device (/dev/video2) appears as a standard camera to video applications, enabling seamless integration without additional plugins or software.
# Check if module is loaded
lsmod | grep v4l2loopback
# Check if device exists
ls -l /dev/video*
# Reload the module
sudo modprobe -r v4l2loopback
sudo modprobe v4l2loopback devices=1 video_nr=2# List available cameras
v4l2-ctl --list-devices
# Try a different camera index
./build/LiveFaceAnonymizer --camera 1# Add user to video group
sudo usermod -a -G video $USER
# Log out and log back in for changes to take effect- Close other applications using the camera
- Reduce camera resolution (modify
width/heightinmain.cpp) - Check CPU usage - face detection can be CPU intensive
- Ensure you're using hardware-accelerated OpenCV if available
# Install ffmpeg
sudo apt-get install ffmpeg # Ubuntu/Debian
sudo pacman -S ffmpeg # Arch
sudo dnf install ffmpeg # Fedoragit clone <your-repo-url>
cd deepfaker
mkdir build && cd build
cmake ..
make- OpenCV 4.x - Computer vision library
- CMake 3.10+ - Build system
- C++17 - Programming language standard
- ffmpeg - Video streaming
- v4l2loopback - Virtual video device
- FaceAnonymizer - Handles face detection and blurring
- VirtualCamera - Manages virtual camera output via ffmpeg
- ModernGUI - Provides modern user interface
This project uses OpenCV and the YuNet face detection model. Please refer to their respective licenses:
- OpenCV - Apache 2.0 License
- YuNet Model - Apache 2.0 License (from OpenCV Zoo)
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- OpenCV - Computer vision library
- YuNet - Face detection model
- v4l2loopback - Virtual video loopback device
- Issues - GitHub Issues
- Discussions - GitHub Discussions
Made with β€οΈ for privacy-conscious video conferencing
β Star this repo if you find it useful!