Depth Anything 3 Large

Click a block to read its description, or select it with Tab and Enter.

Depth Anything 3 LargeDA3MONO-LARGE, inverse-depth output, input 3 × 504 × 504, native eval. Shapes exclude batch.LibreYOLODepth Anything 3 LargeDA3MONO-LARGE, inverse-depth output, input 3 × 504 × 504, native eval. Shapes exclude batch.Single-view DINOv2-LargeImageNet normalization + singleton viewB × 1 × 3 × 504 × 504Conv2d patch14, stride141024 × 36 × 36;1296 patch tokensCLS + interpolated learned positions1297 × 1024; position grid37×37 resized36×36Transformer blocks, n=5Ends at zero-based index4;16 headsLayerNorm + remove CLST1: 1024 × 36 × 36Transformer blocks, n=7Ends at zero-based index11;16 headsLayerNorm + remove CLST2: 1024 × 36 × 36Transformer blocks, n=6Ends at zero-based index17;16 headsLayerNorm + remove CLST3: 1024 × 36 × 36Transformer blocks, n=6Ends at zero-based index23;16 headsLayerNorm + remove CLST4: 1024 × 36 × 36alt_start=qknorm_start=rope_start=-1.No alternating view attention, QK norm, RoPE or camera token.cat_token=False; tap width stays1024.DPT adapters and fusionTap T11024 × 36 × 36Conv2d 1×11024 to 256ConvTranspose2d 4×4s4,p0; 256 channelsConv2d 3×3256 to 256; 144 × 144; bias=FalseL1256 chTap T21024 × 36 × 36Conv2d 1×11024 to 512ConvTranspose2d 2×2s2,p0; 512 channelsConv2d 3×3512 to 256; 72 × 72; bias=FalseL2256 chTap T31024 × 36 × 36Conv2d 1×11024 to 1024Identity1024 channelsConv2d 3×31024 to 256; 36 × 36; bias=FalseL3256 chTap T41024 × 36 × 36Conv2d 1×11024 to 1024Conv2d 3×3s2,p1; 1024 channelsConv2d 3×31024 to 256; 18 × 18; bias=FalseL4256 chFeatureFusionBlock 4256 channels; output 36 × 36L4256 channelsFeatureFusionBlock 3256 channels; output 72 × 72L3256 channelsFeatureFusionBlock 2256 channels; output 144 × 144L2256 channelsFeatureFusionBlock 1256 channels; output 288 × 288L1256 channelsL1...L4 are named continuations of the independent adapted feature maps.First fusion resizes to the exact next grid, including odd-grid rounding.Transformer blockInput tokens1297 × 1024LayerNorm1024 channels; epsilon1e-5Multihead self-attention16 heads; head width64LayerScale1024 learned channel scalars+LayerNorm1024 channels; epsilon1e-5Linear1024 to 4096GELULinear4096 to 1024LayerScale1024 learned channel scalars+Output tokens1297 × 1024Self-attention primitivesFused QKV linear1024 to 3072; biases enabledSplit Q, K and V16 heads; 1297 tokens;64 channels/headQ × transpose(K) / 81297 × 1297 per headValues V64/headSoftmax over keysAttention weights × V16 heads;64 output channels/headConcat heads1297 × 1024Output linear1024 to 1024No causal mask. Dropout and stochastic depth are inactive in eval.Shared output feature and two headsConv2d 3×3256 to128;288 × 288Bilinear resize128 × 504 × 504; align_corners=TrueConv2d 3×3128 to32; s1,p1ReLUConv2d 1×132 to1Exponential1 × 504 × 504Conv2d 3×3128 to32; s1,p1ReLUConv2d 1×132 to1ReLU1 × 504 × 504Depth output is positive relative depth.Sky is ReLU output, not a probability sigmoid.No confidence head when output_dim=1.Sky handling and inversion execute after this shared core.ResidualConvUnitInput256 channelsReLUConv2d 3×3256 to 256; s1,p1,bias=TrueReLUConv2d 3×3256 to 256; s1,p1,bias=True+No BatchNorm in these DPT fusion units.FeatureFusionBlock with lateral inputTop-down feature256 channelsLateral feature256 channelsResidualConvUnit256 channels+ResidualConvUnit256 channelsBilinear resizeTarget size shown at each occurrence; align_corners=TrueConv2d 1×1256 to 256; bias=TrueDeepest block has no lateral input and skips the first RCU/add.Native depth finishingNon-sky masksky <0.3, per imageCount both mask regionsApply only if each has more than10 pixelsNon-sky depth valuesSample100000 if there are more99th percentileFar-depth value from non-sky depthReplace sky pixelsUse far depth where sky>=0.3Clamp depth minimum1e-6Positive denominatorReciprocalInverse relative depthRemove singleton viewB × 1 × 504 × 504If counts fail, keep original depth before inversion.Raw adapters:256×144²,512×72²,1024×36²,1024×18². Fusion outputs36²,72²,144²,288² before the final resize.Sky statistics are computed independently per batch image; the wrapper never mixes images into one scene.Source: libreyolo/models/depth_anything3/nn.py and model.py. Revision a4d0ecc9e17f.libreyolo.com