MoGe-2 S

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

MoGe-2 SSurface-normal prediction, input3 × 518 × 518 RGB,native eval. Shapes exclude batch.LibreYOLOMoGe-2 SSurface-normal prediction, input3 × 518 × 518 RGB,native eval. Shapes exclude batch.DINOv2 feature encoderResize and ImageNet normalization518 × 518;bilinear,antialias=TrueConv patch14,stride143 to384;37 × 37 patchesPrepend CLS + learned positions1370 × 384; no registersTransformer blocks,n=126 heads; taps every6 completed blocksTake2 taps; LayerNorm; discard CLSS/B:[5,11]; L:[5,11,17,23]; 384×37²Independent Conv1×1 per tap384 to384; each projection has own parametersStack projected maps along tap dimension2 × 384 × 37 × 37Sum over tap dimensionFeature F: 384 × 37 × 37The normal-only graph omits points,mask andmetric-scale heads.Last CLS token is returned by encoder, then ignored by this head.UV-conditioned neck ConvStackF concat UV0386channelsInput Conv1×1386 to384;37 × 37ResidualConvBlock,n=0384 × 37 × 37; N0Resampler×2384 to256; output74²UV12channelsInput Conv1×12 to256;74 × 74+ResidualConvBlock,n=1256 × 74 × 74; N1Resampler×2256 to128; output148²UV22channelsInput Conv1×12 to128;148 × 148+ResidualConvBlock,n=1128 × 148 × 148; N2Resampler×2128 to64; output296²UV32channelsInput Conv1×12 to64;296 × 296+ResidualConvBlock,n=164 × 296 × 296; N3Resampler×264 to32; output592²UV42channelsInput Conv1×12 to32;592 × 592+ResidualConvBlock,n=032 × 592 × 592; N4Every Ni is retained as an independent normal-head input.Normal head ConvStackN0384channelsInput Conv1×1384 to384;37 × 37ResidualConvBlock,n=0384 × 37 × 37; H0Resampler×2384 to256; output74²N1256channelsInput Conv1×1256 to256;74 × 74+ResidualConvBlock,n=1256 × 74 × 74; H1Resampler×2256 to128; output148²N2128channelsInput Conv1×1128 to128;148 × 148+ResidualConvBlock,n=1128 × 148 × 148; H2Resampler×2128 to64; output296²N364channelsInput Conv1×164 to64;296 × 296+ResidualConvBlock,n=164 × 296 × 296; H3Resampler×264 to32; output592²N432channelsInput Conv1×132 to32;592 × 592+ResidualConvBlock,n=032 × 592 × 592; H4Output Conv1×132 to3;592 × 592Bilinear resize to518 × 518align_corners=False,antialias=FalseNormalize3-channel vectors3 × 518 × 518 unit normalsTransformer blockInput tokens1370 × 384LayerNorm384 channels; epsilon1e-6Multihead self-attention6 heads; head width64LayerScale384 learned channel scalars+LayerNorm384 channels; epsilon1e-6Linear384 to 1536GELULinear1536 to 384LayerScale384 learned channel scalars+Output tokens1370 × 384Self-attention primitivesFused QKV linear384 to 1152; biases enabledSplit Q, K and V6 heads; 1370 tokens;64 channels/headQ × transpose(K) / 81370 × 1370 per headValues V64/headSoftmax over keysAttention weights × V6 heads;64 output channels/headConcat heads1370 × 384Output linear384 to 384No causal mask. Dropout and stochastic depth are inactive in eval.Resampler and UV geometryFirst3 transitions:ConvTranspose2×2D to256,256to128,128to64;stride2Conv3×3,replicate padding1Output channels256,128,64 respectivelyLast transition:bilinear resize×264 channels;align_corners=FalseConv3×3,replicate padding164 to32Both ConvStacks use these exact four resamplers.UV levels:37²,74²,148²,296²,592²;2 coordinate channels.For square input, horizontal/vertical span is1/sqrt(2).Endpoints are ±span×(resolution-1)/resolution.UV0 concatenates with image features; later neck levelsreceive coordinates alone before learned projection.All ConvStack input blocks are Conv1×1, even when Cin=Co.ResidualConvBlock 256 channelsInput256 channelsReLUConv3×3256 to256;replicate padding1ReLUConv3×3256 to256;replicate padding1+No normalization in the configured neck/head residual blocks.ResidualConvBlock 128 channelsInput128 channelsReLUConv3×3128 to128;replicate padding1ReLUConv3×3128 to128;replicate padding1+No normalization in the configured neck/head residual blocks.ResidualConvBlock 64 channelsInput64 channelsReLUConv3×364 to64;replicate padding1ReLUConv3×364 to64;replicate padding1+No normalization in the configured neck/head residual blocks.Source: libreyolo/models/moge2/nn.py and model.py. Revision a4d0ecc9e17f.libreyolo.com