MiDaS Small
Fit diagram
Read at 100%
Clear selection
Download SVG
Download PNG
Click a block to read its description, or select it with Tab and Enter.
MiDaS Small
Relative inverse depth,EfficientNet-Lite3,input3 × 256 × 256,native eval. Shapes exclude batch.
LibreYOLO
MiDaS Small
Relative inverse depth,EfficientNet-Lite3,input3 × 256 × 256,native eval. Shapes exclude batch.
EfficientNet-Lite3 encoder
RGB + ImageNet normalization
3 × 256 × 256
Conv3×3,s2;BN;ReLU6
3 to32;128 × 128
Depthwise-separable group,n=1
32/32/24;k3,firsts1; repeat expansion32;128²
MBConv group,n=3
24/144/32;k3,firsts2; repeat expansion192;64²
MBConv group,n=3
32/192/48;k5,firsts2; repeat expansion288;32²
MBConv group,n=5
48/288/96;k3,firsts2; repeat expansion576;16²
MBConv group,n=5
96/576/136;k5,firsts1; repeat expansion816;16²
MBConv group,n=6
136/816/232;k5,firsts2; repeat expansion1392;8²
MBConv group,n=1
232/1392/384;k3,firsts1; repeat expansion1392;8²
Taps after groups1,2,4,6:32×64²,48×32²,136×16²,384×8².
Projection and multiscale refinement
Tap L1
32 × 64 × 64
Conv3×3,s1,p1
32 to64;biasFalse
A1
64 × 64 × 64
Tap L2
48 × 32 × 32
Conv3×3,s1,p1
48 to128;biasFalse
A2
128 × 32 × 32
Tap L3
136 × 16 × 16
Conv3×3,s1,p1
136 to256;biasFalse
A3
256 × 16 × 16
Tap L4
384 × 8 × 8
Conv3×3,s1,p1
384 to512;biasFalse
A4
512 × 8 × 8
FeatureFusion4
512 to256;bilinear×2; output256×16²
A4
512ch
FeatureFusion3
256 to128;bilinear×2; output128×32²
A3
256ch
FeatureFusion2
128 to64;bilinear×2; output64×64²
A2
128ch
FeatureFusion1
64 to64;bilinear×2; output64×128²
A1
64ch
FeatureFusion4 has no lateral branch; other stages merge their matching adapted tap.
EfficientNet-Lite block primitives
Ci/expanded/Co,k,s are numeric tuples in the encoder. No squeeze-excitation in Lite3.
PointwiseConv1×1
Ci toexpanded; omitted for first depthwise-separable group
BatchNorm + ReLU6
DepthwiseConv k×k
Expanded groups; first stride s; repeated stride1
BatchNorm + ReLU6
PointwiseConv1×1
Expanded toCo
BatchNorm
No projection activation
+
Identity
Only s1,Ci=Co
TensorFlow SAME padding in timm preserves ceil(input/stride) dimensions.
Small output head
Conv3×3
64 to32;128 × 128
Bilinear resize×2
32 × 256 × 256;align_corners=False
Conv3×3
32 to32;s1,p1
ReLU
Conv1×1
32 to1
ReLU
Nonnegative relative inverse depth
Output
1 × 256 × 256
Fusion4: 512 to256
Top feature
512 channels
ResidualConvUnit
512 channels
Bilinear resize×2
align_corners=True
Conv1×1
512 to256;biasTrue
ResidualConvUnit 512
Input
512 channels
ReLU
Conv3×3
512 to512;s1,p1,biasTrue
ReLU
Conv3×3
512 to512;s1,p1,biasTrue
+
Fusion3: 256 to128
Top feature
256 channels
Lateral A3
256 channels
ResidualConvUnit
256 channels
+
ResidualConvUnit
256 channels
Bilinear resize×2
align_corners=True
Conv1×1
256 to128;biasTrue
ResidualConvUnit 256
Input
256 channels
ReLU
Conv3×3
256 to256;s1,p1,biasTrue
ReLU
Conv3×3
256 to256;s1,p1,biasTrue
+
Fusion2: 128 to64
Top feature
128 channels
Lateral A2
128 channels
ResidualConvUnit
128 channels
+
ResidualConvUnit
128 channels
Bilinear resize×2
align_corners=True
Conv1×1
128 to64;biasTrue
ResidualConvUnit 128
Input
128 channels
ReLU
Conv3×3
128 to128;s1,p1,biasTrue
ReLU
Conv3×3
128 to128;s1,p1,biasTrue
+
Fusion1: 64 to64
Top feature
64 channels
Lateral A1
64 channels
ResidualConvUnit
64 channels
+
ResidualConvUnit
64 channels
Bilinear resize×2
align_corners=True
Conv1×1
64 to64;biasTrue
ResidualConvUnit 64
Input
64 channels
ReLU
Conv3×3
64 to64;s1,p1,biasTrue
ReLU
Conv3×3
64 to64;s1,p1,biasTrue
+
Source: libreyolo/models/midas/nn.py and model.py. Revision a4d0ecc9e17f.
libreyolo.com