FCOS ResNet-50

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

FCOS ResNet-50Detection; 800 × 800 RGB canvas; batch 1; unfused eval. 91 class-head slots map to 80 COCO classes.LibreYOLOFCOS ResNet-50Detection; 800 × 800 RGB canvas; batch 1; unfused eval. 91 class-head slots map to 80 COCO classes.ResNet-50 backboneInput3 × 800 × 800Conv2d 7×7, s=2, p=364 × 400 × 400; no biasFrozenBatchNorm2d + ReLU64 × 400 × 400; eps=0.00001MaxPool2d 3×3, s=2, p=164 × 200 × 200C2: 1 projection + 2 identity blocks256 × 200 × 200; hidden 64C3: 1 projection + 3 identity blocks512 × 100 × 100; hidden 128C4: 1 projection + 5 identity blocks1024 × 50 × 50; hidden 256C5: 1 projection + 2 identity blocks2048 × 25 × 25; hidden 512Projection strides: C2=1, C3/C4/C5=2.The stride is in the bottleneck 3×3 convolution.Feature pyramid (FPN)C5: Conv2d 1×12048 input; 256 × 25 × 25P5: Conv2d 3×3, p=1256 × 25 × 25C4: Conv2d 1×11024 input; 256 × 50 × 50P4: Conv2d 3×3, p=1256 × 50 × 50+C3: Conv2d 1×1512 input; 256 × 100 × 100P3: Conv2d 3×3, p=1256 × 100 × 100+Nearest resize256 × 50 × 50Nearest resize256 × 100 × 100P5 continuation256 × 25 × 25Conv2d 3×3, s=2, p=1P6: 256 × 13 × 13ReLUP6 activationConv2d 3×3, s=2P7: 256 × 7 × 7; p=1Lateral sums feed upsampling before the output 3×3 convolutions.FCOS headApply the same tower weights to P3, P4, P5, P6 and P7.One pyramid feature256 channels; grid 100 / 50 / 25 / 13 / 7Head unit repeated 4 timesConv3×3 + GroupNorm32 + ReLU; 256 chHead unit repeated 4 timesConv3×3 + GroupNorm32 + ReLU; 256 chConv2d 3×3, p=191 logits/location; bias=TrueReshape anchor/location rows1 × 13,343 × 91Conv2d 3×3, p=14 distancesConv2d 3×3, p=11 centerness logitReLU1 × 13,343 × 4Reshape rows1 × 13,343 × 1Class and regression towers have separate parameters.Intermediate conv bias: enabled, including GroupNorm paths.Pyramid grid predictions per location rows100 × 100110,00050 × 5012,50025 × 25162513 × 1311697 × 7149FCOS returns raw tensors plus anchor metadata.Projection bottleneckStage order: C2 / C3 / C4 / C5.Input64 / 256 / 512 / 1024 chConv2d 1×164 / 128 / 256 / 512 output channelsFrozenBatchNorm2d64 / 128 / 256 / 512 channelsReLUConv2d 3×3, p=1s=1/2/2/2FrozenBatchNorm2d64 / 128 / 256 / 512 channelsReLUConv2d 1×1256 / 512 / 1024 / 2048 output channelsFrozenBatchNorm2dNo activation before addition+ReLUBlock outputConv2d 1×1256 / 512 / 1024 / 2048 chFrozenBatchNorm2dStride 1 / 2 / 2 / 2Identity bottleneckStage order: C2 / C3 / C4 / C5.Input256 / 512 / 1024 / 2048 chConv2d 1×164 / 128 / 256 / 512 output channelsFrozenBatchNorm2d64 / 128 / 256 / 512 channelsReLUConv2d 3×3, p=1s=1FrozenBatchNorm2d64 / 128 / 256 / 512 channelsReLUConv2d 1×1256 / 512 / 1024 / 2048 output channelsFrozenBatchNorm2dNo activation before addition+ReLUBlock outputidentityNormalization and head unitFrozenBatchNorm2deps=0.00001; learned scale and biasReLUFor stem and first two bottleneck convolutionsFrozen normalization uses stored mean/variance;BatchNorm in eval also uses its running statistics.Affine transform: (x - mean) / sqrt(variance + eps),then multiply scale and add bias.Head Conv2d 3×3, p=1256 input/output channelsOptional GroupNorm32 groups; eps=0.00001ReLUThis head unit repeats four times in each towerRetinaNet r50 has no head normalization.RetinaNet r50v2 and FCOS use GroupNorm.Location/anchor decoding and selectionOne square per locationAnchor sizes 8,16,32,64,128; zero-based centersScale ReLU distances by anchor sizeCenter minus left/top; plus right/bottomSigmoid class and centerness logitsScore = sqrt(class probability × centerness)COCO slot mapping; threshold; top-K; NMSPostprocessing occurs outside raw network forwardActual 800-pixel canvas grid spacing is floor(800/grid): 8,16,32,61,114. Anchor base sizes remain separately defined.Random-weight CPU checks cover backbone, FPN, raw heads and model outputs. No pretrained weights were downloaded.Source: models/fcos/nn.py; postprocess/fcos.py. Revision a4d0ecc9e17f.libreyolo.com