--- license: other license_name: apple-amlr license_link: https://huggingface.co/AXERA-TECH/sharp-ax8860/blob/main/LICENSE_MODEL pipeline_tag: image-to-3d tags: - gaussian-splatting - 3dgs - novel-view-synthesis - axera - ax8860 - npu --- # SHARP on AX8860 Single image → 3D Gaussian Splatting **on the AX8860 NPU in ~1.6 s**: Apple's [SHARP](https://github.com/apple/ml-sharp) model converted for the AXERA AX8860. 单张照片 → 3D 高斯(3DGS),**AX8860 端侧约 1.6 秒**。 Code (C++ / C API / Python / web demo): **[github.com/AXERA-TECH/sharp-ax8860](https://github.com/AXERA-TECH/sharp-ax8860)**

left: input photo, right: 3D Gaussians generated on AX8860, rendered from moving viewpoints

Left: input photo · Right: 3D Gaussians generated on the AX8860 board, rendered from new viewpoints

## Performance | Stage | Time (ms) | Where | |---|---:|---| | JPEG decode (hardware JDEC) | 20–60 | VDEC | | Pre-process | ~70 | CPU | | ViT ×36 (DINOv2-L, FP8) | ~760 | NPU | | Tail (DPT + Gaussian decoder, U16) | ~490 | NPU | | Depth head last layer (FP32) | ~50 | CPU | | Post-process | ~160 | CPU | | Write SPZ / PLY | ~170 / ~65 | CPU | | **End-to-end** | **~1600–1700** | | AX8860, 4 NPU cores, SDK V0.6.0. Model loading (once): ~0.8 s. Output: 1,179,648 Gaussians, SPZ 12–17 MB or PLY 66 MB. Quality vs. the official FP32 model on GPU (renderings from 4 shifted viewpoints, photos not used for calibration): median PSNR **41.9 dB** on 29 COCO photos, **33.9 dB** on 50 DIV2K photos. ## Files ``` models/ ├── fp8vit/ # DINOv2-L ViT (patch + image encoder): FP8 kernels + weight banks ├── sharp_tail.axmodel # DPT decoder + Gaussian decoder, U16 └── h4_wb.bin # last 1x1 conv of the depth head (fp32, run on the CPU) bin/ ├── sharp_ax # command line tool (aarch64, glibc >= 2.38) └── libsharp_ax.so # C API for Python / other languages python/ ├── sharp_ax.py # ctypes binding ├── web_demo.py # browser demo served from the board └── web_demo.html ``` ## Usage ```bash # command line: .spz = SPZ v2, .ply = same PLY layout as ml-sharp LD_LIBRARY_PATH=/opt/lib ./bin/sharp_ax -m models -i photo.jpg -o photo.spz # Python (standard library only) cp bin/libsharp_ax.so python/ && cd python python3 -c "from sharp_ax import Sharp; print(Sharp('../models').run('photo.jpg', 'photo.spz'))" # web demo: open http://:8080, upload a photo, view the result in the browser python3 web_demo.py -m ../models --port 8080 ``` The `.spz` result can also be opened in viewers such as [SuperSplat](https://superspl.at/editor). ## Model derivative and license *Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.* These files are **model derivatives** of Apple's SHARP checkpoint, released under the [Apple Machine Learning Research Model License](LICENSE_MODEL) — **for non-commercial research purposes only**. This project is not affiliated with or endorsed by Apple. Changes made to the original model: - Split into a ViT part (DINOv2-L patch and image encoders, run 35 + 1 times per image) and a decoder part (DPT + Gaussian decoder). - ViT weights and activations quantized to FP8 and run with custom NPU kernels. - Decoder compiled with pulsar2 using U16 activations (INT8 weights), calibrated on 80 photos; 16-bit tensors above 128 MiB split along channels; the image is fed as a 2×2 space-to-depth tensor. - The last 1×1 convolution of the depth head is taken out of the NPU graph and computed on the CPU in FP32. - Pre- and post-processing re-implemented in C++; optional SPZ output (quantized positions/attributes). Demo photo: [Pexels](https://www.pexels.com) (Niko Desmon).