Video face anonymization tool with GPU acceleration and HIPAA compliance mode
Desktop application for automatic face detection and anonymization in videos. Supports blur, pixelation, and solid black box anonymization methods.
- GPU Accelerated: CUDA support with PyTorch (10x faster than CPU)
- Performance Modes: Original, Quality (3-4x), Balanced (5-8x), Maximum Speed (10-15x faster)
- Three Anonymization Modes: Blur, solid black box, or mosaic pixelation
- Multiple Detection Models: MobileNetV1 (fastest, default), ResNet50 (balanced), DSFD (most accurate)
- Real-time Preview: Side-by-side original and anonymized frames
- Video Playback: Built-in player for processed videos
- Multi-pass detection with configurable thresholds
- Automatic audio removal for voice privacy
- Adjustable mask scale for complete coverage
- Locked settings to prevent accidental changes
- Modern two-pane layout with controls and live preview
- Drag and drop video loading
- Progress tracking with FPS counter and time estimates
- Video player with playback controls
- Input: MP4, AVI, MOV, MKV, WEBM
- Output: MP4 with H.264 encoding
- Optional audio preservation
- OS: Windows 10/11 (64-bit)
- RAM: 4GB minimum, 8GB+ recommended
- GPU: Optional NVIDIA GPU with CUDA support for acceleration
- Python: 3.9 or higher
# Install PyTorch with CUDA support
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
# Install face detection
uv pip install --no-build-isolation git+https://github.com/hukkelas/DSFD-Pytorch-Inference.git
# Install dependencies
uv sync
# Install additional packages
uv pip install opencv-python Pillow imageio imageio-ffmpeg tkinterdnd2 pyinstaller "numpy<2"Or use Makefile:
make devSCRFD models (SCRFD-2.5GF, SCRFD-10GF, SCRFD-34GF) provide high-accuracy GPU-accelerated face detection but require additional setup on Windows:
Requirements:
- Microsoft Visual C++ 14.0 or greater (Download Build Tools)
Installation:
# After installing Visual C++ Build Tools
pip install insightface onnxruntime-gpuNote: If you don't need SCRFD models, you can skip this step and use other detectors:
- MediaPipe (CPU-friendly, default)
- MTCNN (accurate, moderate speed)
- YOLOv8-Face / YOLO11-Face (fast GPU detection)
- RetinaFace-MobileNet (mobile-optimized)
Start the application:
make run
# or
python -m anonator.mainProcess a video:
- Drag and drop video file into the application
- Select anonymization mode (blur, solid, or mosaic)
- Adjust settings as needed
- Click "Start Processing"
- Output saved with "_anonymized" suffix
Test videos included in testData/:
134436-759734820_small.mp4→134436-759734820_small_anonymized.mp441315-429396382_small.mp4→41315-429396382_small_anonymized.mp4
Anonator includes four performance modes for different speed/quality tradeoffs:
| Mode | Speedup | GPU FPS | CPU FPS | Features |
|---|---|---|---|---|
| Original | 1x | 30 | 3 | No optimizations |
| Quality | 3-4x | 90-120 | 9-12 | Batch processing (4-8 frames) |
| Balanced | 5-8x | 150-240 | 15-24 | Batching + frame skipping (every 3rd) |
| Maximum Speed | 10-15x | 300-450 | 30-45 | Full optimization (batch 16, skip 5) |
- Batch Processing: Processes multiple frames simultaneously on GPU for better utilization
- Frame Skipping: Detects faces every N frames, reuses results for skipped frames
- Scene Detection: Forces re-detection after scene cuts to prevent missed faces
- Adaptive Settings: Automatically adjusts batch sizes for CPU vs GPU
Select performance mode from the dropdown in the Processing Settings panel.
Edit src/anonator/core/config.py to customize:
- Detection thresholds and mask scale
- Multi-pass detection settings
- Blur and mosaic effects
- Performance settings (FP16, max resolution)
src/anonator/
├── core/ # Video processing and face detection
├── ui/ # GUI components and widgets
└── main.py # Application entry point
tests/ # Test suite (130+ tests, 80%+ coverage)
# Run tests
make test
# Build executable
make build
# See all commands
make helpmake build # Build executable
make build-onefile # Build single .exeExecutable output: dist/Anonator/Anonator.exe
- Face Detection: RetinaFace (MobileNetV1 default, ResNet50 and DSFD available) via DSFD-Pytorch-Inference
- Deep Learning: PyTorch with CUDA support
- Video Processing: OpenCV with FFmpeg
- GUI: Tkinter with tkinterdnd2
MIT License
Keywords: video face anonymization, face blur, video privacy, HIPAA compliance, face detection, PyTorch, GPU acceleration, medical video anonymization, automatic face blurring
