Adversarial Deep-Digital Watermarking with Mojo-Powered Error Correction.
StegaDNA is a high-performance steganography engine designed to "stamp" any medium (Images, Audio, Text) with indestructible digital signatures (DNA). It leverages a hybrid architecture combining the flexibility of PyTorch for neural embedding and the raw speed of Mojo for bit-level error correction.
- Indestructible DNA: Uses Reed-Solomon ECC implemented in Mojo with SIMD optimizations to recover signatures even from partially destroyed media.
- The Analog Hole (v4 Breakthrough): Specialized Multi-Scale Inception Kernels and a Dense Bit Projection Network allow DNA survival under real-world capture conditions (phone cameras, print-and-scan) while maintaining high visual fidelity (20+ dB PSNR).
- Adversarial Robustness: Neural networks trained against a differentiable Noise Layer (Geometric warping, color jitter, variable blur) to survive digital and physical attacks.
- Universal Gateway: A unified FastAPI controller that routes traffic to specialized modality engines.
- Mac Optimized: Native MPS (Metal Performance Shaders) support for lightning-fast training on Apple Silicon.
- Research-Driven: Fully documented architectural evolutions and training experiments available in research.md.
Media Input ───► [ Multi-Scale Encoder ] ───► [ Noise Layer V3 ] ───► [ High-Entropy Decoder ]
▲ (Analog Distortion) │
│ │
[ 128-bit DNA Bits ] <────────────────────────────────────────┘
(Dense Projection)
The v4 architecture utilizes a U-Net style Encoder with triple-path kernels (3x3, 5x5, 7x7) to capture and hide data across multiple spatial frequencies, suppressing the "foggy blob" artifacts common in earlier deep steganography models.
- Core Logic: Mojo (SIMD, GF(2^8) Arithmetic)
- Neural Engine: PyTorch (Modified HiDDeN Architecture)
- API Layer: FastAPI + Uvicorn
- Infrastructure: UV (Fast Python Package Manager)
- Monitoring: Weights & Biases + Loguru
Ensure you have uv and mojo installed on your Mac.
uv syncCompile the high-performance Reed-Solomon module:
uv run mojo build mojo_core/ecc.mojo --emit shared-lib -o dna_ecc.dylibLaunch the robust StegaStamp adversarial training loop which uses InstanceNorm and STN for camera-angle survival:
bash train_stegastamp.shRun the universal gateway and access the premium web dashboard:
uv run python main.pyThen navigate to: http://localhost:8000
- Phase 1: Mojo Reed-Solomon Core (SIMD Optimized).
- Phase 2: Universal FastAPI Gateway & Modality Routing.
- Phase 3: Adversarial Training Pipeline (MPS Enabled).
- Phase 4: Analog Hole Survival (Multi-Scale Pivot).
- Phase 5: STFT-Transformer Engine for Audio Watermarking.
- Phase 6: LLM Logit Processor for Text DNA.
- Phase 7: ONNX Export for Edge Deployment.
Developed as part of the Grably Data Engineering ecosystem. 🛡️