PIDNet S

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

PIDNet SCityscapes semantic segmentation,19 classes,input3 × 1024 × 1024, native eval. Shapes exclude batch.LibreYOLOPIDNet SCityscapes semantic segmentation,19 classes,input3 × 1024 × 1024, native eval. Shapes exclude batch.Shared stem and integral stream IRGB + ImageNet normalization3 × 1024 × 1024Two Conv3×3/BN/ReLU operations3 to32 to32; bothstride2; 32 × 256 × 256BasicBlock stage1,n=232 to32; stride1;256 × 256ReLU; BasicBlock stage2,n=2; ReLU32 to64; firststride2;128 × 128BasicBlock stage3,n=3; ReLU64 to128; firststride2;64 × 64BasicBlock stage4,n=3; ReLU128 to256; firststride2;32 × 32Bottleneck stage5,n=2256 to512; inner256; firststride2;16²PAPPM512 to128; branchwidth96;16 × 16Bilinear resize to128 × 128I: 128 × 128 × 128Stage2 output fans into P, I and D streams.Proportional stream PBasicBlock layer3_,n=2From sharedstage2; 64 to64;128²PagFM3 with compressed I3I3 Conv1×1+BN: 128 to64ReLU; BasicBlock layer4_,n=264 to64;128²PagFM4 with compressed I4I4 Conv1×1+BN: 256 to64ReLU; Bottleneck layer5_,n=164 to128; inner64;128²P: 128 × 128 × 128.Derivative stream DBasicBlock layer3_d,n=1From sharedstage2; 64 to32; nofinalReLUAdd resized diff3(I3)Conv3×3+BN: 128 to32; thenresize128²ReLU; Bottleneck layer4_d,n=132 to64; inner32;128²Add resized diff4(I4)Conv3×3+BN: 256 to64; thenresize128²ReLU; Bottleneck layer5_d,n=164 to128; inner64;128²D: 128 × 128 × 128.PagFM (used twice)P input64 channelsConv1×1 + BatchNorm64 to32Y input64 channelsConv1×1 + BatchNorm64 to32Bilinear resize projectedYMatch P grid128×128×Sum channels then sigmoidSimilarity S:1 × 128 × 128Multiply (1-S) × P64 channelsMultiply S × resize(Y)64 channels+P/Y in the weighted mix are unprojected feature tensors.LightBagSigmoid(D)Edge gate E: 128 channelsMultiply (1-E) × I128 channelsMultiply E × P128 channels++PIConv1×1 + BatchNorm128 to128Conv1×1 + BatchNorm128 to128+P, I and D are the final128×128 stream outputs.Large uses Bag; S/M use LightBag with two learned paths.SegmentHead and native outputFused feature128 × 128 × 128BatchNorm2d128 channelsReLUConv2d3×3128 to128;s1,p1,bias=FalseBatchNorm2d128 channelsReLUConv2d1×1128 to19;bias=TrueSemantic logits19 × 128 × 128Full-canvas resizing belongs to public postprocessing.PAPPMIdentityInput 512 × 16 × 16BatchNorm; ReLU; Conv1×1512 to96; noConv biasZ096chAvgPool5,s2,p2Input 512 × 16 × 16BatchNorm; ReLU; Conv1×1512 to96; noConv biasBilinear resize16×1696 channels+Z0AvgPool9,s4,p4Input 512 × 16 × 16BatchNorm; ReLU; Conv1×1512 to96; noConv biasBilinear resize16×1696 channels+Z0AvgPool17,s8,p8Input 512 × 16 × 16BatchNorm; ReLU; Conv1×1512 to96; noConv biasBilinear resize16×1696 channels+Z0AdaptiveAvgPool1Input 512 × 16 × 16BatchNorm; ReLU; Conv1×1512 to96; noConv biasBilinear resize16×1696 channels+Z0U196chU296chU396chU496chU1U2U3U4Concat U1,U2,U3,U4384 channelsBN; ReLU; groupedConv3×3 (groups4)384 to384;s1,p1Z0Concat Z0 and grouped scale output480 channelsInput shortcut: BN; ReLU; Conv1×1512 to128BN; ReLU; Conv1×1 compression480 to128+All pool branches consume the same input. Each scale independently adds the same Z0 before grouped processing.Residual block and composite-convolution definitionsCi/Co are the explicit input/output channel numbers printed at each occurrence; s is its printed stride.BasicBlockConv3×3 Ci toCo,s,p1BNReLUConv3×3 Co toCo,s1,p1BN+Identity or1×1+BNProject when Ci!=Co or s!=1BottleneckConv1×1 Ci toinnerBNReLUConv3×3 inner toinner,s,p1BNReLUConv1×1 inner to2innerBN+Identity or1×1+BNProject when Ci!=Co or s!=1Last BasicBlock in a multi-block stage omits final ReLU. Bottlenecks and single D blocks omit it; main graph marks later ReLUs.Source: libreyolo/models/pidnet/nn.py and model.py. Revision a4d0ecc9e17f.libreyolo.com