OMDet-Turbo t

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

OMDet-Turbo tOpen-vocabulary detection, 640 × 640 image, 3 class prompts, 16 valid task tokens. 900 selected object queries.LibreYOLOOMDet-Turbo tOpen-vocabulary detection, 640 × 640 image, 3 class prompts, 16 valid task tokens. 900 selected object queries.Swin-T image backboneImage3 × 640 × 640Conv2d 4×4 / 496 × 160 × 160LayerNorm in NHWC160 × 160 × 96Swin stage 1, n=2160 × 160 × 96, 3 headsSwin stage 2, n=280 × 80 × 192, 6 headsSwin stage 3, n=640 × 40 × 384, 12 headsSwin stage 4, n=220 × 20 × 768, 24 headsLayerNorm on selected stage mapsStages 2,3,4; then permute NCHWConv2d 1×1 and BatchNorm192/384/768 to 256 channelsAll windows are 7×7. Even blocks shift by 3.Timm order: shift first, then pad to window multiple.Shared CLIP text backboneClass and task token IDsThree class rows and one task row, length77Token embedding77 × 512, vocabulary49,408Add learned positions77 × 512Causal text encoder, repeats=12512 width, 8 heads, MLP2,048Final LayerNorm77 × 512Class EOT selection3 × 512Truncate task to valid tokens16 × 512MatMul text projection512 to512, no biasTask residual MLP512 to1,024 to512Linear task projection512 to256Decoder initialization and outputHybrid encoder output256-channel maps at80×80,40×40,20×20Conv2d 1×1 + BatchNorm per level256 to256, no activationFlatten and concatenate8,400 × 256Linear + LayerNorm proposal features8,400 × 256Cosine score against projected class rowsClass Linear512 to256; scores8,400 ×3Top900 by maximum class scoreGather features and box proposalsDecoder block, repeats=6900 query states +16 task tokensFinal prediction heads900 ×3 class logits;900 ×4 boxesInitial content is selected image proposal features, not learned query embeddings.Task tokens are updated by joint self-attention and carried to the next layer.Postprocess rescales boxes and applies class-aware NMS (default IoU0.5).Top-down FPNProjected P3256 × 80 × 80Projected P4256 × 40 × 40Projected P5256 × 20 × 20One transformer encoder block400 tokens ×256Lateral ConvNormGELU 1×1256 ×20 ×20Nearest upsample ×2256 ×40 ×40Concat upsample and P4512 ×40 ×40CSPRep layer256 ×40 ×40Lateral ConvNormGELU 1×1256 ×40 ×40Nearest upsample ×2256 ×80 ×80Concat upsample and P3512 ×80 ×80CSPRep layer256 ×80 ×80FPN routes preserve the lateral256-channel features for PAN concatenation.Bottom-up PANFinest FPN output256 ×80 ×80 (output P3)ConvNormGELU 3×3 /2256 ×40 ×40FPN lateral feature256 ×40 ×40Concat downsample and lateral512 ×40 ×40CSPRep layer256 ×40 ×40 (output P4)ConvNormGELU 3×3 /2256 ×20 ×20FPN lateral feature256 ×20 ×20Concat downsample and lateral512 ×20 ×20CSPRep layer256 ×20 ×20 (output P5)P3/P4/P5 output sizes:6,400+1,600+400=8,400 locations.Highest-level encoder blockInput 400 × 256Self-attention8 heads, 256 channels+LayerNorm400 × 256Linear256 to 2048ReLU400 × 2048Linear2048 to 256+LayerNorm400 × 256Highest-level self-attentionQuery input400 × 256Key/value input400 × 256Linear Q256 to 256Reshape heads8 × 400 × 32Linear K256 to 256Reshape heads8 × 400 × 32Linear V256 to 256Reshape heads8 × 400 × 32MatMul Q K-transpose8 × 400 × 400ScaleDivide by sqrt(32)Softmax over keys8 × 400 × 400MatMul attention × V8 × 400 × 32Merge heads400 × 256Linear output256 to 256CSPRep layerInput feature512 channels; spatial80/40/20Conv2d 1×1 / 1512 to 256, bias=FalseBatchNorm2d256 channelsSiLU256 channelsConv2d 1×1 / 1512 to 256, bias=FalseBatchNorm2d256 channelsSiLU256 channelsRepVGG block256 channelsRepVGG block256 channelsRepVGG block256 channels+Output256 channels. Final projection is identity.RepVGG blockInput256 channels; same tensor feeds both convolutions.Conv2d 3×3 / 1256 to 256, bias=FalseBatchNorm2d256 channelsConv2d 1×1 / 1256 to 256, bias=FalseBatchNorm2d256 channels+SiLU256 channelsUnfused graph: independent3×3 and1×1 paths, each with BN.Decoder blockObject query states900 ×256Task token states16 ×256Concat object and task tokens916 ×256; Q/K add object query positionJoint self-attention916 tokens,8 heads ×32+LayerNorm916 ×256Split first900 object tokens900 ×256Split last16 task tokens16 ×256, carried to next layerDeformable image attention900 queries,3 image levels,4 points/level+LayerNorm900 ×256Linear256 to2,048ReLU900 ×2,048Linear2,048 to256+LayerNorm900 ×256Joint object/task self-attentionQuery input916 × 256Key/value input916 × 256Linear Q256 to 256Reshape heads8 × 916 × 32Linear K256 to 256Reshape heads8 × 916 × 32Linear V256 to 256Reshape heads8 × 916 × 32MatMul Q K-transpose8 × 916 × 916ScaleDivide by sqrt(32)Softmax over keys8 × 916 × 916MatMul attention × V8 × 916 × 32Merge heads916 × 256Linear output256 to 256Task residual MLPTask tokens16 ×512Linear512 to1,024ReLU16 ×1,024Linear1,024 to512+LayerNorm16 ×512Linear512 to256Query position MLP:Reference box coordinates900 ×4Linear4 to512ReLU900 ×512Linear512 to256Three-level deformable attentionQuery + box position900 ×256Linear offsets256 to192Linear weights + softmax256 to96;8 heads ×12 pointsLinear value projection8,400 ×256, reshape8 heads ×32Sample locations from reference XYWH and offsets900 ×8 ×3 ×4 ×2; referenceXY + offset/4 ×WH ×0.5Bilinear grid_sample256 ×80 ×80 value map;4 samples/query/headMultiply sampled values × weights4 ×32 values/query/headBilinear grid_sample256 ×40 ×40 value map;4 samples/query/headMultiply sampled values × weights4 ×32 values/query/headBilinear grid_sample256 ×20 ×20 value map;4 samples/query/headMultiply sampled values × weights4 ×32 values/query/headSum all3 levels and4 points; merge8 heads900 ×256Linear output projection256 to256CLIP text encoder blockInput 77 × 512LayerNorm77 × 512Multi-head self-attention8 heads+LayerNorm77 × 512Linear512 to 2048QuickGELU77 × 2048Linear2048 to 512+Output 77 × 512CLIP causal text self-attentionQuery input77 × 512Key/value input77 × 512Linear Q512 to 512Reshape heads8 × 77 × 64Linear K512 to 512Reshape heads8 × 77 × 64Linear V512 to 512Reshape heads8 × 77 × 64MatMul Q K-transpose8 × 77 × 77ScaleDivide by sqrt(64)Causal mask77 × 77+Softmax over keys8 × 77 × 77MatMul attention × V8 × 77 × 64Merge heads77 × 512Linear output512 to 512Class scoring and box headsPer-layer class projection3 class rows, Linear512 to256L2 normalize class and object features3 ×256 and900 ×256MatMul cosine similarity900 ×3Scale by1/0.07900 ×3 logitsBox MLP, independently parameterized per decoder layer:Linear256 to256ReLU256Linear256 to256ReLU256Linear256 to4Add inverse-sigmoid reference; sigmoid900 ×4 normalized boxesSwin block and ConvNorm definitionsLayerNormChannels96/192/384/768Shift, pad and partition7×7 windowsStages160,80,40,20 spatial;even shifts3Window self-attentionHeads3/6/12/24;32 channels/headReverse windows, crop, reverse shiftRestore stage spatial shapeResidual additionAdd block inputLayerNormChannels96/192/384/768Linear, GELU, LinearMLP widths384/768/1,536/3,072Residual additionAdd post-attention statePatch merging: flatten2×2 neighbors, LayerNorm,Linear384 to192 /768 to384 /1,536 to768.ConvNormGELU: Conv2d, BatchNorm2d, GELU.Lateral uses1×1/1; PAN downsample uses3×3/2.QuickGELU: x × sigmoid(1.702 ×x).CPU composition used the in-tree timm-parity Swin-T and installed Apache-2.0 OmDet modules, without downloaded weights.Source: libreyolo/models/openvocab/omdet_turbo.py. Revision a4d0ecc9e17f.libreyolo.com