r/deeplearning • u/singam96 • 11h ago
ShadeNet-5 35M (albedo/depth/normal) 31 MB quantised ONNX
ShadeNet v5 is out!!!
ShadeNet v5 is a 35M-parameter feed-forward network built on a frozen DINOv2 ViT-S/14 backbone. In a single forward pass, it takes one RGB image and predicts three maps: albedo, relative depth, and surface normals.
Live Demo (no install):https://huggingface.co/spaces/singam96/ShadeNet-5
Weights, Model Card & ONNX:https://huggingface.co/singam96/ShadeNet-5-35M
What’s new and notable:
Distilled single-pass refiner (0.91M UNet): Test-time augmentation (averaging 6 passes across flips and ±4° rotations) noticeably improves quality, but at 6x the compute. To bypass this, I trained a tiny UNet to predict the 6-pass ensemble output from a single pass. Because the model's own 6-pass output acts as the ground truth, training required zero labels—just ~8,000 CC BY 2.0 photos from Open Images. On a 23-image held-out set, it drops mean L1 error from 0.1757 to 0.1673 (full 6-pass is 0.1628), capturing ~65% of the ensemble gain at ~20% of the compute cost. Most of the improvement shows up in the surface normals, while depth sees minimal change.
Lightweight CPU inference (ONNX): The base model exports to a 31 MB 4/8-bit quantized ONNX file, or a single 35 MB bundle with the refiner baked in. CPU inference takes ~1.0s for a single pass and ~1.3s with the refiner (scoring 0.1676 L1 vs. 0.1755 without the refiner).
Current limitations:
No shading channel: Unlike v3.2, v5 does not output a separate shading map.
Relative depth: Depth predictions have per-image scale and shift.
Fixed ONNX resolution: The exported ONNX graphs currently require a fixed 448×448 input.





