EfficientDet D0
Fit diagram
Read at 100%
Clear selection
Download SVG
Download PNG
Click a block to read its description, or select it with Tab and Enter.
EfficientDet D0
512 × 512 RGB; batch 1; unfused eval. 90 sparse class slots map to 80 COCO classes.
LibreYOLO
EfficientDet D0
512 × 512 RGB; batch 1; unfused eval. 90 sparse class slots map to 80 COCO classes.
EfficientNet feature backbone
Input
3 × 512 × 512
Conv 3×3 s=2; BN; SiLU
32 × 256 × 256
S0: DepthwiseSeparable k=3, s=1, n=1
16 × 256 × 256; E=32; SE=8
S1: MBConv k=3, s=2, n=2
24 × 128 × 128; E=96/144; SE=4/6
S2: MBConv k=5, s=2, n=2
40 × 64 × 64; E=144/240; SE=6/10
S3: MBConv k=3, s=2, n=3
80 × 32 × 32; E=240/480; SE=10/20
S4: MBConv k=5, s=1, n=3
112 × 32 × 32; E=480/672; SE=20/28
S5: MBConv k=5, s=2, n=4
192 × 16 × 16; E=672/1152; SE=28/48
S6: MBConv k=3, s=1, n=1
320 × 16 × 16; E=1152; SE=48
E/SE pairs give first/later widths only when n>1.
S2, S4 and S6 provide C3, C4 and C5.
Bidirectional feature pyramid cell
Fnode I6
64 × 8 × 8; 2 inputs
Fnode I5
64 × 16 × 16; 2 inputs
Fnode I4
64 × 32 × 32; 2 inputs
Fnode P3
64 × 64 × 64; 2 inputs
Fnode P4
64 × 32 × 32; 3 inputs
Fnode P5
64 × 16 × 16; 3 inputs
Fnode P6
64 × 8 × 8; 3 inputs
Fnode P7
64 × 4 × 4; 2 inputs
in6
in5
in4
in3
in7
in4
I4
in5
I5
in6
I6
in7
I6
I5
I4
Each incoming edge resamples to its destination resolution.
Outputs are P3/P4/P5/P6/P7. Repeat this cell 3 times, with independent weights.
Cell 1: in3/in4/in5 = C3/C4/C5; in6/in7 come from C5 downsampling.
Later cells receive five 64-channel maps from the previous cell.
Class and box towers
Apply both towers independently at every P3...P7 level.
Pyramid feature
64 channels
SeparableConv2d 3×3
64 channels; pointwise bias=True
BatchNorm2d
Per level and per repeat; eps=.001
SiLU
Repeat tower unit 3 times
SeparableConv2d 3×3
810 output channels; no BN/activation
Pyramid feature
64 channels
SeparableConv2d 3×3
64 channels; pointwise bias=True
BatchNorm2d
Per level and per repeat; eps=.001
SiLU
Repeat tower unit 3 times
SeparableConv2d 3×3
36 output channels; no BN/activation
Class: 9 anchors × 90 logits = 810 channels.
Box: 9 anchors × 4 deltas = 36 channels.
Every repeated conv is shared across levels.
BatchNorm parameters/statistics differ by level.
Five raw maps per tower; no sigmoid in network output.
49,104 anchor rows after flattening.
MBConv
Input
Channel widths are resolved by stage
Conv2d 1×1 expansion
E first/later width from stage
BatchNorm2d + SiLU
eps=.001; momentum=.1
Depthwise Conv2d
k/s from stage; groups=E; SAME padding
BatchNorm2d + SiLU
eps=.001; momentum=.1
SqueezeExcite
SE first/later reduced width from stage
Conv2d 1×1 projection
Stage output channels; no bias
BatchNorm2d
eps=.001; no activation
+
Add identity only when stride 1 and input/output widths match.
DSConv
Input
Channel widths are resolved by stage
Depthwise Conv2d
k/s from stage; groups=E; SAME padding
BatchNorm2d + SiLU
eps=.001; momentum=.1
SqueezeExcite
SE first/later reduced width from stage
Conv2d 1×1 projection
Stage output channels; no bias
BatchNorm2d
eps=.001; no activation
+
Add identity only when stride 1 and input/output widths match.
SqueezeExcite
Input
Expanded feature
Spatial mean
1 ×1; channels preserved
Conv2d 1×1
SE reduced width; bias=True
SiLU
Conv2d 1×1
Restore expanded width; bias=True
Sigmoid
Multiply with original input
Broadcast over spatial positions
Fnode
Resample each input
Two or three separate tensors
Learned edge weights
2 or 3 scalar parameters
ReLU weights
Nonnegative weights
Normalize weights
Divide by sum(weights) +0.0001
Multiply each input by its weight
One product for each input
Stack and sum products
Reduce incoming-edge axis
SiLU
Activation before convolution
SeparableConv2d 3×3
64 channels; pointwise bias
BatchNorm2d
eps=.001; momentum=.01
Resample
Optional Conv2d 1×1
Cell 1 backbone edges project to 64 channels
BatchNorm2d
Projection has bias=True; eps=.001
Resolution transform
Per edge; target grid given by Fnode
Nearest interpolation
For coarser input
MaxPool2d3×3, s=2
SAME pad with negative infinity
Equal grid: identity. Equal channels: no projection.
Initial in6: C5 projection + pooling. in7: pool in6.
Cell 1 projects each C3/C4/C5 edge independently.
All later cell inputs already have 64 channels.
Incoming C3/C4/C5 channels: 40/112/320
Separable
Depthwise Conv2d3×3
groups=input channels; p=1; no bias
Pointwise Conv2d 1×1
bias=True; output width from occurrence
This core has no normalization or activation.
BiFPN appends BN; head repeat appends BN and SiLU.
Final predictions append neither.
BatchNorm2d
eps=.001
SiLU
Visible ConvBNSiLU suffix definition
SamePadding
Pad before convolution/pooling
Left/top use floor(total padding /2)
Conv2d or MaxPool2d
Output is ceil(input/stride)
For these even inputs and stride 2:
k3: left/top 0, right/bottom 1.
k5: left/top 1, right/bottom 2.
Stride1 uses symmetric padding 1 (k3) or 2 (k5).
Convolutions pad zero; max pooling pads negative infinity.
Decode
Flatten five class/box levels
49,104 ×90 logits; 49,104 ×4 deltas
Top 5000 class logits
Select anchors and class slots before sigmoid
Generate 9 anchors/location
Strides 8/16/32/64/128; center=stride/2
Decode ty,tx,th,tw
Shift centers; exp height/width
Sigmoid selected logits; map COCO
90 slots; unused IDs become -1
Filter invalid/low-score boxes; class NMS
Default maximum 100 detections
Anchor shapes: base size 4 × stride × 2^(scale_index/3), scale_index 0/1/2; width/height factors (1,1), (1.4,.7), (.7,1.4).
Native fixed-resolution eval graph. All five scales and every first-cell resample shape passed a random-weight CPU forward.
Source: models/efficientdet/nn.py; models/efficientdet/config.py. Revision a4d0ecc9e17f.
libreyolo.com