ShadeNet-5: 35M-Parameter Single-Pass Inference for Albedo/Depth/Normals

ShadeNet v5: a 35M-parameter feedforward network predicting albedo, relative depth, and normals from a single RGB image in one pass, with 31MB quantized CPU inference.
ShadeNet v5 is a 35M-parameter feedforward network built on a frozen DINOv2 ViT-S/14 backbone that outputs albedo, relative depth, and surface normals from one RGB image in a single forward pass. Its highlight is a distilled single-pass refiner: a 0.91M-parameter tiny UNet approximating a 6-pass TTA ensemble at ~20% compute cost for ~65% of the gain, with no manual labels. The model exports to a 31MB 4/8-bit quantized ONNX running at ~1.0s on CPU (~1.3s with refiner). Limitations: no separate shading channel, relative depth only, and fixed 448×448 ONNX input.
ShadeNet v5 is here. It's a 35M-parameter feedforward network built on a frozen DINOv2 ViT-S/14 backbone that can predict three maps from a single RGB image in one forward pass: albedo, relative depth, and surface normals. The project offers an online demo and ONNX weights, with the quantized version at just 31 MB, targeting lightweight CPU inference.

Core Architecture: Frozen Backbone + Single Forward Pass
ShadeNet v5's design philosophy is "one forward pass, three outputs." Rather than using multi-stage or iterative inference, it treats DINOv2 ViT-S/14 as a frozen feature extractor, followed by lightweight prediction heads that simultaneously regress albedo, relative depth, and normals. At 35M parameters, it's very small for a multi-task geometry estimation model of this kind, making it feasible to run on edge devices or ordinary CPUs.
This single-forward-pass setup means inference latency is controllable and avoids the memory and scheduling overhead of chaining multiple models. For downstream tasks that need real-time geometric cues—such as AR try-on, relighting, or 3D reconstruction preprocessing—an interface that outputs three maps in one pass is quite convenient.
DINOv2 and ViT-S/14: DINOv2 is a self-supervised visual pretraining model proposed by Meta that learns general visual features from large-scale unlabeled images, achieving strong generalization without manual annotation. ViT-S/14 is the small-sized vision Transformer variant within it, where S stands for Small and 14 indicates the input image is split into 14×14 pixel patches. A frozen backbone means DINOv2's weights are not updated during ShadeNet v5 training; it serves only as a fixed feature extractor, which greatly reduces trainable parameters and memory usage while retaining the pretrained model's powerful semantic feature representation.
Albedo, Relative Depth, and Surface Normals: Albedo refers to the diffuse reflection color of an object's surface itself, excluding the effects of lighting and shadows; relative depth represents the near-far relationships between pixels but lacks absolute physical scale; surface normals are direction vectors perpendicular to the object's surface, commonly used in lighting calculations and geometric reconstruction. Jointly estimating all three helps disentangle the scene's lighting and geometric information.
Distilled Single-Pass Refiner: Approximating TTA with Unlabeled Data
A highlight of v5 is the "distilled single-pass refiner." The author found that test-time augmentation (TTA)—flipping the input and rotating by ±4° for a total of 6 forward passes, then averaging—noticeably improves quality, but at 6× the compute. To bypass this cost, the author trained a tiny 0.91M-parameter UNet to directly predict the 6-pass ensemble output from a single forward pass.
Training requires no manual labels: the model's own 6-pass TTA output serves as the "ground truth," with data drawn from roughly 8,000 CC BY 2.0 photos on Open Images. On a held-out set of 23 images, average L1 error dropped from 0.1757 to 0.1673 (full 6-pass TTA is 0.1628), capturing about 65% of the ensemble gain at roughly 20% of the compute cost. The improvement is mainly concentrated in surface normals, with little change in depth.
This "self-distillation + unlabeled" approach is worth noting: it compresses expensive ensemble inference into a small module while not relying on additional annotations, making it well-suited for geometry estimation tasks where labeling is costly.
Test-Time Augmentation (TTA) and Ensembling: TTA is a technique that applies various transforms (such as flipping, rotation, cropping) to the same input at inference, forwards each separately, and then fuses the multiple predictions. Its core idea is to reduce the variance of a single prediction through augmentation diversity, thereby improving robustness. The cost, however, is a multiplicative increase in inference passes, with latency and compute rising linearly. ShadeNet v5 uses 6-pass TTA (flip plus ±4° rotations) as the "teacher" signal—essentially a self-ensembling strategy.
Self-Distillation: Self-distillation refers to training another, smaller model using the output of the model itself (or a larger ensemble of the same architecture) as the supervision signal. Here the teacher is the ensemble result of 6-pass TTA, and the student is the 0.91M-parameter tiny UNet. Since the teacher signal comes from unlabeled images, the entire training process requires no manual annotation, placing it in the unsupervised distillation paradigm.
CPU Inference and ONNX Deployment
The base model can be exported as a 31 MB 4/8-bit quantized ONNX file; bundling the refiner together yields a 35 MB single file. A single CPU forward pass takes about 1.0 second, and about 1.3 seconds with the refiner, with L1 of 0.1676 and 0.1755 respectively (better with the refiner).
This size and speed let ShadeNet-5 be embedded into desktop or browser-based tools without relying on GPU servers. Note, however, that the exported ONNX graph currently requires a fixed 448×448 input, limiting flexibility; integrating it into existing pipelines requires resolution adaptation.
ONNX and Quantization: ONNX (Open Neural Network Exchange) is an open model exchange format that allows models exported from different deep learning frameworks (such as PyTorch and TensorFlow) to run on various inference engines. Quantization is the process of converting model weights and/or activations from floating point (e.g., FP32) to lower-precision integers (e.g., INT8 or INT4), significantly reducing model size and accelerating inference, especially on CPUs and edge devices. ShadeNet v5's 4/8-bit quantization compresses the model to 31 MB.
Fixed Input Resolution: The exported ONNX graph requires a fixed 448×448 input because static computation graphs fix tensor shapes at export time; dynamic size support requires additional configuration and may affect inference optimization. Integrating into real pipelines typically requires resizing or cropping images to this resolution.
Known Limitations and Usage Recommendations
Compared with v3.2, v5 drops the separate shading channel and outputs only albedo, relative depth, and normals. If your pipeline depends on a shading map, you'll need extra handling or should stick with the older version. Depth is relative, with per-image scale and offset, so it cannot be used directly as metric depth; 3D reconstruction still requires calibration or scale alignment.
Overall, ShadeNet-5's positioning is clear: a small-footprint, single-pass, CPU-runnable three-map output model. It's not suited for offline scenarios chasing maximum precision, but for interactive applications and lightweight deployment, a 31 MB quantized ONNX with sub-second CPU latency is a competitive choice.
One-line Summary
ShadeNet v5 is a 35M-parameter feedforward network that predicts albedo, relative depth, and normals from a single RGB image in one forward pass, with 31MB quantized CPU inference.
Paragraph Summary
ShadeNet v5 is a 35M-parameter feedforward network built on a frozen DINOv2 ViT-S/14 backbone that simultaneously outputs albedo, relative depth, and surface normals from a single RGB image in one forward pass. Its highlight is a distilled single-pass refiner: a 0.91M-parameter tiny UNet that approximates a 6-pass TTA ensemble from a single result, capturing about 65% of the ensemble gain at roughly 20% of the compute cost, with training requiring no manual labels. The model exports to a 31MB 4/8-bit quantized ONNX, with CPU single-pass inference at about 1.0 second and about 1.3 seconds with the refiner. Known limitations include no separate shading channel, relative rather than metric depth, and a fixed 448×448 ONNX input.
Related articles

No Coding Required: He Shipped an App Store App by 'Cutting Features' and Nitpicking with AI
A game designer with zero frontend/backend skills shipped a dual-platform App Store app with AI—not via one-click generation, but by cutting scope and nitpicking like a demanding client.

What Is Harness Engineering? From Concept Origins to Enterprise-Level Agent Implementation
What is Harness Engineering? This article traces the concept's origins and analyzes enterprise-level Agent requirements for tool call fault tolerance, data security, tenant isolation, and memory gaps.

Coze in Practice: A Three-Tier Agent Classification and a Multi-Agent Collaboration Guide
A Bilibili tutorial breaks down the multi-agent collaboration toolchain into three categories: building platforms like Coze Studio and Dify, Agent software like Claude Code, and development frameworks like LangChain—plus a Coze demo of industry templates, three-platform interoperability, local Agent integration, and the trade-offs of credit consumption.