DepthPro2-H-ONNX / config.json
Petrouil's picture
Initial release: DepthPro2-H ONNX, five precisions plus clip and focal graphs
652fb54 verified
Raw History Blame Contribute Delete
3.53 kB
{
"architecture": "DepthPro2 (DINOv3 ViT-H+/16 encoder with cross-frame attention, DPT decoder)",
"model_type": "depthpro2",
"base_model": "apple/DepthPro2-H",
"base_revision": "68426c789f75a7c760273e857222625b4fe69576",
"parameters": 872108865,
"focal_estimator_removed": true,
"removed_network": "apple/DepthPro2-focal (23.5M parameters)",
"upstream_config": {
"backbone_preset": "vit_huge_plus_patch16_dinov3",
"cross_frame_blocks": [11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31],
"reassembled_blocks": [7, 15, 23, 31],
"dim_decoder": 256,
"dims_reassemble": [256, 512, 1024, 1024],
"fov": false
},
"dynamic_shapes": true,
"input": {
"pixel_values": "float32 (1, 3, H, W) or (4, 3, H, W), RGB in [0, 1], ImageNet normalisation applied inside the graph",
"f_px": "float32 (1,), horizontal focal length in pixels of pixel_values",
"multiple_of": 32,
"tested_geometries": [
"480x640",
"736x1280",
"1088x1920"
]
},
"output": {
"inverse_depth": "float32 (1, H, W), focal-normalised inverse depth, 0 at infinite distance",
"depth_meters": "float32 (1, H, W), z-depth in metres, inf where inverse_depth is 0"
},
"precisions": [
"fp32",
"fp16",
"bf16",
"int8",
"int4-mixed"
],
"variants": {
"onnx/model.onnx": {
"precision": "fp32",
"size_mb": 4.4,
"external_data": "onnx/model.onnx.data (3.3 GB) must be kept next to the graph",
"parity_vs_pytorch_fp32": {"abs_rel_inv": 3.4e-07, "delta1": 1.0}
},
"onnx/model_fp16.onnx": {
"precision": "fp16 weights, fp32 compute",
"size_mb": 1752.1,
"parity_vs_pytorch_fp32": {"abs_rel_inv": 6.5e-05},
"note": "full fp16 compute overflows on the DINOv3 backbone; see README"
},
"onnx/model_bf16.onnx": {
"precision": "bf16 weights, fp32 compute",
"size_mb": 1752.1,
"parity_vs_pytorch_fp32": {"abs_rel_inv": 3.9e-04}
},
"onnx/model_int8.onnx": {
"precision": "int8 weight-only, 32-weight groups, in-graph Cast+Mul dequantisation",
"size_mb": 1067.1,
"parity_vs_pytorch_fp32": {"abs_rel_inv": 0.0012},
"fidelity_on_300_nyu": {"abs_rel_inv": 0.0014, "boundary_f1": 0.9952}
},
"onnx/model_w4mixed.onnx": {
"precision": "GPTQ int4 group 32, qkv/fc2/convolutions at int8",
"size_mb": 838.8,
"parity_vs_pytorch_fp32": {"abs_rel_inv": 0.0076},
"fidelity_on_300_nyu": {"abs_rel_inv": 0.0091, "boundary_f1": 0.9924}
},
"onnx/model_clip4_int8.onnx": {
"precision": "int8 group 32, four-frame shared encoder",
"size_mb": 1067.5,
"parity_vs_pytorch_fp32_clip": {"abs_rel_inv": 0.0012}
},
"onnx/model_focal.onnx": {
"precision": "fp32 focal-length estimator (copied unchanged from DepthPro2-L-ONNX)",
"size_mb": 92
},
"onnx/model_focal_fp16.onnx": {
"precision": "fp16 weights, fp32 compute",
"size_mb": 47,
"error_in_f_px": {"mean": 0.0002, "max": 0.0018}
},
"onnx/model_focal_int8.onnx": {
"precision": "int8 group-32 trunk, fp32 FOV head",
"size_mb": 33,
"error_in_f_px": {"mean": 0.0028, "max": 0.014}
}
},
"evaluation": {
"dataset": "NYUv2 val (Ultralytics nyu-depth-png), 300 images; plus KITTI 150 and TUM 6x16 frames",
"geometry": "480x640",
"focal": "fitted once on fp32, f_px = 484.20, frozen for all candidates",
"metric": "abs_rel_inv = sum|1/d_pred - 1/d_gt| / sum(1/d_gt) against PyTorch fp32"
}
}