SENet
18 memberslucid.models.vision.senetSENet / SE-ResNet family — backbone + image classification.
Hu, Jie, et al. "Squeeze-and-Excitation Networks." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 7132–7141.
SENet introduces the Squeeze-and-Excitation block, a tiny drop-in channel-attention module that recalibrates the relative importance of each feature-map channel after every convolutional stage. The block runs in three phases.
The squeeze phase reduces each channel to a single scalar by global average pooling over the spatial dimensions:
yielding a channel descriptor that summarises the global response of every channel.
The excitation phase passes through a small two-layer fully-connected bottleneck with a reduction ratio (typically 16) and a sigmoid output:
where is ReLU and is the sigmoid. The output is interpreted as per-channel gating weights.
Finally the scale phase modulates the original feature map channel-wise:
Plugging this block into the end of every residual unit of a
ResNet-50 (giving SE-ResNet-50) adds only ~10% extra parameters
and negligible FLOPs while reducing ImageNet top-5 error by
roughly 1.5 percentage points — a result that won the ILSVRC
2017 classification challenge. In Lucid SENetConfig
parameterises every SE-ResNet variant (18 / 34 / 50 / 101 / 152)
with the same layers and block_type knobs as ResNet plus
the SE-specific reduction ratio.
Classes
Functions
se_resnet_18→ SENetSE-ResNet-18 feature-extracting backbone (no classification head).
se_resnet_18_cls→ SENetForImageClassificationSE-ResNet-18 image classifier (backbone + GAP + linear head).
se_resnet_34→ SENetSE-ResNet-34 feature-extracting backbone (no classification head).
se_resnet_34_cls→ SENetForImageClassificationSE-ResNet-34 image classifier (backbone + GAP + linear head).
se_resnet_50→ SENetSE-ResNet-50 feature-extracting backbone (no classification head).
se_resnet_50_cls→ SENetForImageClassificationSE-ResNet-50 image classifier (backbone + GAP + linear head).
se_resnet_101→ SENetSE-ResNet-101 feature-extracting backbone (no classification head).
se_resnet_101_cls→ SENetForImageClassificationSE-ResNet-101 image classifier (backbone + GAP + linear head).
se_resnet_152→ SENetSE-ResNet-152 feature-extracting backbone (no classification head).
se_resnet_152_cls→ SENetForImageClassificationSE-ResNet-152 image classifier (backbone + GAP + linear head).
Weights
SEResNet18WeightsPretrained weights for lucid.models.se_resnet_18_cls.
SEResNet34WeightsPretrained weights for lucid.models.se_resnet_34_cls.
SEResNet50WeightsPretrained weights for lucid.models.se_resnet_50_cls.
SEResNet101WeightsPretrained weights for lucid.models.se_resnet_101_cls.
SEResNet152WeightsPretrained weights for lucid.models.se_resnet_152_cls.