DefaceIT
Cross-platform GUI application for blurring faces and license plates in videos using YOLOv11
Install / Use
/learn @therealaleph/DefaceITREADME
DefaceIT
<p align="center"> <a href="#defaceit-فارسی">راهنمای فارسی</a> | <a href="#defaceit-فارسی">Persian Guide</a> </p>DefaceIT is a cross-platform application for blurring faces and license plates in videos using YOLOv11. The app supports both English and Persian languages and is available for desktop (macOS, Linux, Windows) and Android.
Features
- Easy to use graphical interface
- Fast processing with GPU acceleration support (CUDA, MPS, CPU)
- Accurate detection using YOLOv11-based face and license plate detection
- Audio preservation with automatic audio merging
- Audio pitch shifting with preview functionality
- Cross-platform support (macOS, Linux, Windows, Android)
- Bilingual interface (English and Persian)
- Customizable settings (blur strength, confidence, blur type)
- Native Android app with modern Material Design UI
Requirements
- Python 3.8 or higher
- ffmpeg (for audio preservation)
- macOS:
brew install ffmpeg - Linux:
sudo apt-get install ffmpeg(Ubuntu/Debian) orsudo yum install ffmpeg(RHEL/CentOS) - Windows: Download from ffmpeg.org
- macOS:
Installation
macOS / Linux
- Open Terminal
- Navigate to the faceblur_app directory:
cd faceblur_app - Run the setup script:
chmod +x setup.sh ./setup.sh - Run the application:
python run.py
The run.py script will automatically:
- Detect your operating system
- Use the virtual environment if available
- Fall back to system Python if needed
- Handle tkinter detection and errors
Windows
- Open Command Prompt or PowerShell
- Navigate to the faceblur_app directory:
cd faceblur_app - Run the setup script:
setup.bat - Run the application:
python run.py
The run.py script will automatically:
- Detect your operating system
- Use the virtual environment if available
- Fall back to system Python if needed
- Handle tkinter detection and errors
Docker (Web Interface - Recommended)
The easiest way to run DefaceIT is using Docker with a simple web interface. No need to install Python, dependencies, or deal with GUI complications.
Prerequisites
- Docker and Docker Compose installed (Get Docker)
Quick Start
-
Clone the repository:
git clone https://github.com/pourmand1376/DefaceIT.git cd DefaceIT -
Start the application:
docker-compose up -
Open your browser and go to:
http://localhost:8080 -
Upload your video, adjust settings, and process!
The web interface provides:
- Drag-and-drop video upload
- All processing settings (blur strength, confidence, device, etc.)
- Real-time progress tracking
- Direct download of processed videos
Using GPU (NVIDIA)
To enable GPU acceleration for faster processing:
-
Install NVIDIA Container Toolkit
-
Uncomment the GPU section in
docker-compose.yml:deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] -
Restart the application:
docker-compose down docker-compose up
Stopping the Application
docker-compose down
Usage
- Launch the application using the instructions above
- Click "Browse..." next to "Input Video" to select your video file
- Optionally set the output location (auto-generated if not set)
- Adjust settings:
- Blur Strength: Higher values = more blur (21-101)
- Confidence: Lower values = more detections (0.05-0.5)
- Blur Type: Gaussian or Pixelate
- Detect: Choose faces and/or license plates
- Device: Auto-detect, CPU, or GPU
- Audio Pitch Shift: Adjust pitch in semitones (-12 to +12)
- Click "Preview Audio" to test the pitch shift (optional)
- Click "Start Processing"
- Wait for processing to complete
- Your blurred video will be saved with audio preserved
Android App
DefaceIT is also available as a native Android application with a modern Material Design interface.
Download
Download the latest release APK from the Releases page or build it yourself.
Requirements
- Android 7.0 (API level 24) or higher
- Camera permission (optional, for future camera features)
- Storage permission (for reading and saving videos)
Installation
- Download the
DefaceIT-release.apkfrom the releases page - Enable "Install from Unknown Sources" in your Android settings
- Open the downloaded APK file
- Follow the installation prompts
Features
- Modern Material Design 3 UI built with Jetpack Compose
- Face detection using Google ML Kit
- Real-time video processing
- Audio pitch shifting support
- Bilingual interface (English and Persian)
- Same powerful blurring capabilities as the desktop version
Building from Source
To build the Android app from source:
- Open the project in Android Studio
- Sync Gradle dependencies
- Build the release APK:
cd DefaceIT ./gradlew assembleRelease - The APK will be located at
DefaceIT/app/build/outputs/apk/release/
Building Standalone Executable
Using PyInstaller
pip install pyinstaller
pyinstaller --onefile --windowed --name DefaceIT defaceit_gui.py
The executable will be in the dist folder.
Troubleshooting
Tkinter Not Found Error
If you see: ModuleNotFoundError: No module named '_tkinter'
macOS Solutions:
- Option 1: Use System Python (Recommended)
/usr/bin/python3 defaceit_gui.py - Option 2: Install python-tk for Homebrew Python
brew install python-tk - Option 3: Use the macOS launcher script
./run_macos.sh
Linux Solutions:
# Ubuntu/Debian
sudo apt-get install python3-tk
# RHEL/CentOS/Fedora
sudo yum install python3-tk
# or
sudo dnf install python3-tk
Windows Solutions: Tkinter should be included with Python. If not:
- Reinstall Python from python.org
- Make sure "tcl/tk and IDLE" is checked during installation
Virtual Environment Issues
If tkinter doesn't work in your venv:
Option 1: Use system Python directly
python3 defaceit_gui.py
Option 2: Install dependencies globally (not recommended)
pip3 install -r requirements.txt
python3 defaceit_gui.py
Other Common Issues
- No audio in output: Make sure ffmpeg is installed and in your PATH
- Slow processing: Try using GPU acceleration or lower video resolution
- Missing faces: Lower the confidence threshold (try 0.1)
- Too much blur: Reduce blur strength
- App runs but is slow: Make sure GPU acceleration is enabled (select "Auto" or "GPU" in device settings)
- Faces not being detected: Lower the confidence threshold, increase blur strength for better coverage, make sure "Detect Faces" is checked
- librosa not installed: Run
pip install librosa soundfilefor audio pitch shifting features
Notes
- First run will download YOLOv11n model (~5.4MB)
- Processing speed depends on your hardware (GPU recommended)
- Audio preservation requires ffmpeg to be installed
- Large videos may take some time to process
Credits
Developer: Shin
- X (Twitter): @hey_itsmyturn
- Website: https://sh1n.org
- Telegram: https://t.me/itsthealephyouknowfromtwitter
Support the Developer
- Donate (Crypto): https://nowpayments.io/donation/shin
- Donate (Card): https://buymeacoffee.com/hey_itsmyturn
Note: Translation and Readme was generated by Cursor AI
<a id="defaceit-فارسی"></a>
DefaceIT (فارسی)
DefaceIT یک برنامه چند پلتفرمی برای تار کردن چهرهها و پلاکها در ویدیوها با استفاده از YOLOv11 است. این برنامه از زبانهای انگلیسی و فارسی پشتیبانی میکند و برای دسکتاپ (macOS, Linux, Windows) و اندروید در دسترس است.
ویژگیها
- رابط گرافیکی ساده
- پردازش سریع با پشتیبانی از شتاب GPU (CUDA, MPS, CPU)
- تشخیص دقیق با استفاده از YOLOv11
- حفظ صدا با ادغام خودکار صدا
- تغییر زیر و بم صدا با قابلیت پیشنمایش
- پشتیبانی از چند پلتفرم (macOS, Linux, Windows, Android)
- رابط دو زبانه (انگلیسی و فارسی)
- تنظیمات قابل تنظیم
- برنامه اندروید بومی با رابط کاربری Material Design مدرن
نیازمندیها
- Python 3.8 یا بالاتر
- ffmpeg (برای حفظ صدا)
- macOS:
brew install ffmpeg - Linux:
sudo apt-get install ffmpeg(Ubuntu/Debian) یاsudo yum install ffmpeg(RHEL/CentOS) - Windows: از ffmpeg.org دانلود کنید
- macOS:
نصب
macOS / Linux
- Terminal را باز کنید
- به پوشه faceblur_app بروید:
cd faceblur_app - اسکریپت نصب را اجرا کنید:
chmod +x setup.sh ./setup.sh - برنامه را اجرا کنید:
python run.py
اسکریپت run.py به صورت خودکار:
- سیستم عامل شما را تشخیص میدهد
- در صورت وجود از محیط مجازی استفاده میکند
- در صورت نیاز به Python سیستم بازمیگردد
- تشخیص tkinter و خطاها را مدیریت میکند
Windows
- Command Prompt یا PowerShell را باز کنید
- به پوشه faceblur_app بروید:
cd faceblur_app - اسکریپت نصب را اجرا کنید:
setup.bat - برنامه را اجرا کنید:
python run.py
اسکریپت run.py به صورت خودکار:
- سیستم عامل شما را تشخیص میدهد
- در صورت وجود از محیط مجازی استفاده میکند
- در صورت نیاز به Python سیستم بازمیگردد
- تشخیص tkinter و خطاها را مدیریت میکند
Docker (رابط وب - توصیه میشود)
سادهترین راه برای اجرای DefaceIT استفاده از Docker با یک رابط وب ساده است. نیازی به نصب Python، وابستگیها یا مشکلات رابط گرافیکی نیست.
