ObscuraRT is a GPU-accelerated, privacy-preserving video anonymization system for real-time edge processing. It uses Vulkan compute shaders to anonymize video locally without sending raw frames to the cloud.
Camera/Video Source
↓
FrameGrabber (CPU)
↓ [zero-copy if possible]
GPU Memory
├─ Input Buffer (YUV420/RGB)
├─ Compute Pipeline
│ └─ Pixelation Shader
└─ Output Buffer
↓
Display (GLFW + Vulkan)
| Alternative | Issue |
|---|---|
| OpenCV CPU | 30 FPS @ 1080p = bottleneck |
| CUDA | Vendor lock-in (NVIDIA only) |
| OpenCL | Ecosystem dead |
| Vulkan | ✅ Cross-GPU, low-level, <10ms latency |
ObscuraRT/
├── CMakeLists.txt
├── include/
│ ├── vulkan_context.h # Vulkan instance/device management
│ ├── frame_grabber.h # Input: camera/file
│ ├── compute_pipeline.h # GPU compute shaders
│ └── display_pipeline.h # Output: GLFW window
├── src/
│ ├── main.cpp
│ ├── vulkan_context.cpp
│ ├── frame_grabber.cpp
│ ├── compute_pipeline.cpp
│ └── display_pipeline.cpp
├── shaders/
│ ├── pixelation.comp # Main compute shader
│ ├── display.vert
│ └── display.frag
├── build/ # (generated by CMake)
└── README.md
- ✅ Vulkan context + device selection
- ✅ Test pattern frame generation (FrameGrabber)
- ✅ Compute pipeline skeleton
- ✅ Pixelation compute shader (GLSL)
- ⏳ Display pipeline (GLFW window)
- ⏳ Frame upload/download GPU memory
- ⏳ Full shader execution & synchronization
# Ubuntu/Debian
sudo apt-get install \
vulkan-tools vulkan-headers libvulkan-dev \
libglfw3-dev libglfw3 \
libopencv-dev \
glslc
# macOS (with homebrew)
brew install vulkan-headers glfw opencvcd ObscuraRT
mkdir -p build && cd build
cmake ..
make -j$(nproc)./obscura_rt- Complete display pipeline (swapchain, renderpass)
- GPU buffer allocation & memory barriers
- Compute shader execution + synchronization
- Real-time pixelation on test pattern
- FPS monitoring
Status:
Phase 1 is fully completed. The application has a functional Vulkan render + compute pipeline with real-time processing and performance metrics.
- V4L2 webcam integration
- YUV420 → RGBA conversion (GPU or CPU)
- Frame metadata (width, height, timestamp)
- Haar cascade or lightweight CNN
- Selective pixelation (face region only)
- Multi-face support
- Video file output (H.264/H.265)
- Temporal smoothing (motion-aware blur)
- CLI + config file
- Performance profiling (GPU timestamps)
- Zero-copy goal: V4L2 mmap → GPU via VkBuffer mapped memory
- Fallback: CPU staging buffer → GPU transfer
- Double-buffering: Ping-pong textures for pipeline parallelism
Frame N-1: GPU compute
Frame N: CPU grab + memory barrier
Frame N+1: GPU present
Use:
VkMemoryBarrierbetween compute passesVkFencefor CPU-GPU syncVkSemaphorefor queue submissions
GLSL → SPIR-V (via glslc):
glslc -o shaders/pixelation.comp.spv shaders/pixelation.compCMake does this automatically.
Enable in release builds:
// In vulkan_context.cpp
const char* validationLayers[] = {"VK_LAYER_KHRONOS_validation"};# Use RenderDoc or NVIDIA Nsight
renderdoc ./build/obscura_rtAll components emit [ComponentName] prefixed logs to stdout.
- Latency: <15ms per frame @ 1080p
- Throughput: 60+ FPS @ 1080p
- GPU Memory: <500 MB
- CPU Usage: <20% (frame grab + sync)
- Follow C++20 standard
- Use
vk::prefix for Vulkan types (optional; currently using raw Vulkan) - Validate shaders with
glslangValidator - Test on iGPU + discrete GPU
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
You are free to use, modify, and distribute this software, including for commercial purposes,
provided that any modified version or service using this software is also licensed under AGPL-3.0
and the complete corresponding source code is made available.
If you run this software as a network service (e.g. SaaS, web app, API, hosted service), you are required to provide the complete source code of your modified version to all users interacting with it over the network, as required by the AGPL-3.0.
By contributing to this project, you agree that your contributions will be licensed under the AGPL-3.0, unless explicitly stated otherwise
This software is provided "as is", without warranty of any kind. See the AGPL-3.0 license for details.
If you require a license that does not impose AGPL-3.0 obligations (e.g. closed-source or proprietary use), please contact the author.
Copyright © 2025 Semih Taha Aksoy (aka WlayerX)
Original authorship and copyright notices must be preserved in all copies and derived works, as required by the license.
