YOLOv2-B

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

YOLOv2-BDetection; 608 × 608 RGB; 80 classes; batch 1; unfused eval. Every cfg layer is shown.LibreYOLOYOLOv2-BDetection; 608 × 608 RGB; 80 classes; batch 1; unfused eval. Every cfg layer is shown.L = cfg layer index. Matching F labels continue the same tensor across columns. Full routes remain visible.Layers 0 to 15L0 Conv 3×3, s=1 + norm + leaky32 × 608 × 608L1 MaxPool2d 2×2, s=232 × 304 × 304L2 Conv 3×3, s=1 + norm + leaky64 × 304 × 304L3 MaxPool2d 2×2, s=264 × 152 × 152L4 Conv 3×3, s=1 + norm + leaky128 × 152 × 152L5 Conv 1×1, s=1 + norm + leaky64 × 152 × 152L6 Conv 3×3, s=1 + norm + leaky128 × 152 × 152L7 MaxPool2d 2×2, s=2128 × 76 × 76L8 Conv 3×3, s=1 + norm + leaky256 × 76 × 76L9 Conv 1×1, s=1 + norm + leaky128 × 76 × 76L10 Conv 3×3, s=1 + norm + leaky256 × 76 × 76L11 MaxPool2d 2×2, s=2256 × 38 × 38L12 Conv 3×3, s=1 + norm + leaky512 × 38 × 38L13 Conv 1×1, s=1 + norm + leaky256 × 38 × 38L14 Conv 3×3, s=1 + norm + leaky512 × 38 × 38L15 Conv 1×1, s=1 + norm + leaky256 × 38 × 38Input: 3 × 608 × 608F15Layers 16 to 31L16 Conv 3×3, s=1 + norm + leaky512 × 38 × 38L17 MaxPool2d 2×2, s=2512 × 19 × 19L18 Conv 3×3, s=1 + norm + leaky1024 × 19 × 19L19 Conv 1×1, s=1 + norm + leaky512 × 19 × 19L20 Conv 3×3, s=1 + norm + leaky1024 × 19 × 19L21 Conv 1×1, s=1 + norm + leaky512 × 19 × 19L22 Conv 3×3, s=1 + norm + leaky1024 × 19 × 19L23 Conv 3×3, s=1 + norm + leaky1024 × 19 × 19L24 Conv 3×3, s=1 + norm + leaky1024 × 19 × 19L25 Route512 × 38 × 38L26 Conv 1×1, s=1 + norm + leaky64 × 38 × 38L27 Reorg, stride 2256 × 19 × 19L28 Concat1280 × 19 × 19L29 Conv 3×3, s=1 + norm + leaky1024 × 19 × 19L30 Conv 1×1, s=1425 × 19 × 19L31 Raw region head425 × 19 × 19F15Convolution blockConv2dk, stride and channels from layer labelDarknet normalizationOnly layers labeled + normActivationleaky: LeakyReLU(0.1); linear: identityNorm layers: bias=False. Without norm: bias=True.Mish uses its separate definition when present.Normalization and poolingSubtract running meanx - meanDivide by standard deviationsqrt(running variance) + 0.000001Multiply scale, add biasLearned channel-wise affine transformMaxPool2d: p = floor((k - 1) / 2).k=2, s=1: pad right/bottom with negative infinity.That pool preserves its input spatial size.Reorg (Darknet channel ordering)Reshape + transpose axes 3, 41 × 64 × 19 × 2 × 19 × 2Reshape + transpose axes 2, 31 × 64 × 361 × 4Reshape + transpose axes 1, 21 × 64 × 4 × 19 × 19Reshape contiguous result1 × 256 × 19 × 19Detection decoding (postprocessing)Raw head outputs: 425 × 19 × 19Raw prediction tensorField selection is explicit in the three branchesSelect xy; sigmoid center offsetsGrid + offsets; multiply by per-head strideSelect wh; exponentiate logitsMultiply by anchor widths and heightsSelect objectness and class logitsSigmoid objectness × softmax classesStack cx, cy, width, heightConvert to corner coordinatesConfidence filter + class NMSThen invert resize to the original imageAnchors by raw head (width, height): [(0.57273, 0.677385), (1.87446, 2.06253), (3.33843, 5.47434), (7.88282, 3.52778), (9.77052, 9.16828)]Strides: 32. Region anchors are in grid cells, so width/height also multiply by stride.Center scale_x_y per head: 1.0. Offset = sigmoid(raw) × scale - (scale - 1)/2.Source: darknet/cfgs/yolov2.cfg; darknet/net.py; darknet/blocks.py. Revision a4d0ecc9e17f.libreyolo.com