MiDaS Small

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

MiDaS SmallRelative inverse depth,EfficientNet-Lite3,input3 × 256 × 256,native eval. Shapes exclude batch.LibreYOLOMiDaS SmallRelative inverse depth,EfficientNet-Lite3,input3 × 256 × 256,native eval. Shapes exclude batch.EfficientNet-Lite3 encoderRGB + ImageNet normalization3 × 256 × 256Conv3×3,s2;BN;ReLU63 to32;128 × 128Depthwise-separable group,n=132/32/24;k3,firsts1; repeat expansion32;128²MBConv group,n=324/144/32;k3,firsts2; repeat expansion192;64²MBConv group,n=332/192/48;k5,firsts2; repeat expansion288;32²MBConv group,n=548/288/96;k3,firsts2; repeat expansion576;16²MBConv group,n=596/576/136;k5,firsts1; repeat expansion816;16²MBConv group,n=6136/816/232;k5,firsts2; repeat expansion1392;8²MBConv group,n=1232/1392/384;k3,firsts1; repeat expansion1392;8²Taps after groups1,2,4,6:32×64²,48×32²,136×16²,384×8².Projection and multiscale refinementTap L132 × 64 × 64Conv3×3,s1,p132 to64;biasFalseA164 × 64 × 64Tap L248 × 32 × 32Conv3×3,s1,p148 to128;biasFalseA2128 × 32 × 32Tap L3136 × 16 × 16Conv3×3,s1,p1136 to256;biasFalseA3256 × 16 × 16Tap L4384 × 8 × 8Conv3×3,s1,p1384 to512;biasFalseA4512 × 8 × 8FeatureFusion4512 to256;bilinear×2; output256×16²A4512chFeatureFusion3256 to128;bilinear×2; output128×32²A3256chFeatureFusion2128 to64;bilinear×2; output64×64²A2128chFeatureFusion164 to64;bilinear×2; output64×128²A164chFeatureFusion4 has no lateral branch; other stages merge their matching adapted tap.EfficientNet-Lite block primitivesCi/expanded/Co,k,s are numeric tuples in the encoder. No squeeze-excitation in Lite3.PointwiseConv1×1Ci toexpanded; omitted for first depthwise-separable groupBatchNorm + ReLU6DepthwiseConv k×kExpanded groups; first stride s; repeated stride1BatchNorm + ReLU6PointwiseConv1×1Expanded toCoBatchNormNo projection activation+IdentityOnly s1,Ci=CoTensorFlow SAME padding in timm preserves ceil(input/stride) dimensions.Small output headConv3×364 to32;128 × 128Bilinear resize×232 × 256 × 256;align_corners=FalseConv3×332 to32;s1,p1ReLUConv1×132 to1ReLUNonnegative relative inverse depthOutput1 × 256 × 256Fusion4: 512 to256Top feature512 channelsResidualConvUnit512 channelsBilinear resize×2align_corners=TrueConv1×1512 to256;biasTrueResidualConvUnit 512Input512 channelsReLUConv3×3512 to512;s1,p1,biasTrueReLUConv3×3512 to512;s1,p1,biasTrue+Fusion3: 256 to128Top feature256 channelsLateral A3256 channelsResidualConvUnit256 channels+ResidualConvUnit256 channelsBilinear resize×2align_corners=TrueConv1×1256 to128;biasTrueResidualConvUnit 256Input256 channelsReLUConv3×3256 to256;s1,p1,biasTrueReLUConv3×3256 to256;s1,p1,biasTrue+Fusion2: 128 to64Top feature128 channelsLateral A2128 channelsResidualConvUnit128 channels+ResidualConvUnit128 channelsBilinear resize×2align_corners=TrueConv1×1128 to64;biasTrueResidualConvUnit 128Input128 channelsReLUConv3×3128 to128;s1,p1,biasTrueReLUConv3×3128 to128;s1,p1,biasTrue+Fusion1: 64 to64Top feature64 channelsLateral A164 channelsResidualConvUnit64 channels+ResidualConvUnit64 channelsBilinear resize×2align_corners=TrueConv1×164 to64;biasTrueResidualConvUnit 64Input64 channelsReLUConv3×364 to64;s1,p1,biasTrueReLUConv3×364 to64;s1,p1,biasTrue+Source: libreyolo/models/midas/nn.py and model.py. Revision a4d0ecc9e17f.libreyolo.com