RetinaNet R50

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

RetinaNet R50Detection; 800 × 800 RGB canvas; batch 1; unfused eval. 91 class-head slots map to 80 COCO classes.LibreYOLORetinaNet R50Detection; 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=0MaxPool2d 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.RetinaNet 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 + ReLU; 256 chHead unit repeated 4 timesConv3×3 + ReLU; 256 chConv2d 3×3, p=1819 logits/location; bias=TrueReshape anchor/location rows1 × 120,087 × 91Conv2d 3×3, p=136 deltas/location; bias=TrueReshape anchor rows1 × 120,087 × 4Class and regression towers have separate parameters.Intermediate conv bias: disabled with GroupNorm; enabled without norm.Pyramid grid predictions per location rows100 × 100990,00050 × 50922,50025 × 2595,62513 × 1391,5217 × 79441RetinaNet decodes boxes and sigmoid scores inside forward().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; 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 selectionNine anchors per locationThree scales × ratios 0.5, 1, 2Decode center/size deltasWeights all 1; exp sizes clamped at log(1000/16)Sigmoid classes; map COCO slotsNetwork output: 1 × 120,087 × 84Confidence filtering and class NMSPostprocessing follows network forwardActual 800-pixel canvas grid spacing is floor(800/grid): 8,16,32,61,114. Anchor base sizes remain separately defined.Base anchor sizes per level: (32,40,50), (64,80,101), (128,161,203), (256,322,406), (512,645,812).Random-weight CPU checks cover backbone, FPN, raw heads and model outputs. No pretrained weights were downloaded.Source: models/retinanet/nn.py; postprocess/retinanet.py. Revision a4d0ecc9e17f.libreyolo.com