r/MachineLearning • u/T7owel_Zx • 5h ago
Project ZX-Codec 1.0: Open-core image/video data loader benchmarked on A100 & RTX 5080 (up to 9.9x vs OpenEXR, 17.2x vs host-routed NVDEC) [P]
I built ZX-Codec 1.0 to fix three data-loading bottlenecks in multimodal and robotics training: OpenEXR scanlines force full-strip decompression on single-pass (Depth Z) GPU reads, flat PNG stalls on high-res random crops, and multi-camera random seeks frequently choke PyAV/FFmpeg. ZXI/ZXIL/ZXF2 are bit-exact lossless and ZXV1 Edit/Grade are 10-bit mezzanine (all-intra working formats for training/studios, not web formats).
Pre-release 4-platform wheel checks (pip install zx-codec) pass across Apple M2 Pro, Arm Neoverse-N2, AMD EPYC 7763, and Intel Xeon Platinum 8573C (38/38 non-CUDA, 37/37 Win), and every ViT-B/16 run below verified 0.0 bit-exact step loss diff across loaders:
| Workload & Hardware | ZX-Codec 1.0 | Baseline Loaders | Result |
|---|---|---|---|
| RTX 5080 (ViT-B/16, 48 steps) / 4K 11-ch 3D float | ZXF2 83.62 ms/step (171.6 MB) |
OpenEXR: 188.29 ms (681.2 MB) / Zarr: 365.05 ms / WDS (unpacked EXR): 567.58 ms | 2.25x-6.79x faster / -74.8% disk size |
| RTX 5080 (ViT-B/16, 64 steps) / 201.3 MP random 512x512 crops | Fast 54.88 ms/step (201.4 MB, -27.8%) / Compact 59.90 ms (152.8 MB, -45.2%) |
tifffile: 60.56 ms (278.8 MB) / C libtiff: 63.38 ms / PNG: 2,199.6 ms | Warm 1T Fast: 0.295 ms vs libtiff 2.318 ms (7.86x) (Compact 1T: 2.686 ms) |
| RTX 5080 (ALOHA 4-cam, 2,800f) / 525-step training (loss diff = 0.0) | ZXV1 0.88 ms seek / 33.25 s total (0 new allocs ep 2-3) |
HEVC PyAV: 2.75 ms / AV1: 1.68 ms / Host-routed NVDEC: 38.48 ms (109.75 s) | 1.9x-43.8x faster seek / 3.30x vs NVDEC (ties PyAV at 640x480) |
| RTX 5080 (3-cam 4K Grade444) / Full ViT-B/16 training step | ZXV1 98.58 ms/step |
PyAV GOP1: 636.98 ms / Host-routed NVDEC GOP1: 1,696.78 ms | 6.46x vs PyAV / 17.21x vs host-routed NVDEC |
| Live Public HTTPS 206 (TLS 1.3) / GitHub CDN ZXF2 companion / HF MP4 (0.8.0) | 4 GETs (128.9 KB) / 4 slices 262.1 KB (2.72s vs 2.17s full) |
Full download: 1.34 MB / 5.22 MB | -90.4% / -94.98% traffic |
| Cloud A100-40GB (0.6 build) / 4K 11-ch Depth+Normal / 2-cam 4K | ZXF2 345.1 crops/s / ZXV1 11.50 steps/s |
EXR ZIP: 35.0 / Zstd: 112.5 / NVDEC: 1.05 / PyAV 4T: 0.44 | 3.1x-9.9x vs EXR / 10.9x-26.4x video |
Trade-offs: all-intra video takes much more disk space than lossy AV1/MP4 (ALOHA clip: 17.2 MB AV1 vs 244 MB ZXV1 vs 360 MB lossless HEVC), and single-thread uncompressed .npy beats ZXF2 on pure CPU speed. Open-core: specs, test vectors, C++20 reference codec, report, and A100 Colab notebook are Apache-2.0; prebuilt wheels are free; multicore encoder source stays closed for now.
- Repo & A100 Colab notebook: https://github.com/7owel/ZX-Codec
- 4-page Technical Report: https://7owel.github.io/ZX-Codec/report/
