MobileNet v1 feature-extracting backbone (no classification head).
Implements the depthwise-separable convolutional topology from Howard et al., "MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications", arXiv:1704.04861, 2017. The network alternates a per-channel depthwise convolution with a pointwise convolution that mixes channels — a factorisation that reduces FLOPs by roughly relative to a standard convolution, an 8–9× saving for the case.
The body is a 3×3 stem (stride 2) followed by 13 depthwise + pointwise blocks producing feature maps at strides 2, 4, 8, 16, and 32 relative to the input. A global average pool collapses the final spatial map to a single 1×1 descriptor. This class is the canonical feature extractor used by detection / segmentation heads when deployed on mobile / embedded devices.
Parameters
configMobileNetV1Configmobilenet_v1, mobilenet_v1_075, …) for
paper-cited width-multiplier variants.Attributes
configMobileNetV1Configfeaturesnn.Sequentialconfig.width_mult.avgpoolnn.AdaptiveAvgPool2d(B, C, 1, 1).feature_infolist[FeatureInfo]BackboneMixin for downstream FPN / decoder
modules.Notes
Each depthwise-separable block computes
where is the per-channel
spatial filter (groups=in_channels),
is the channel-mixing
convolution, and is ReLU. The width multiplier
uniformly scales every channel count
so that the same architecture can target sub-mW edge devices
() up to full desktop deployment
().
Examples
Build a MobileNet-v1 backbone and run a forward pass:
>>> import lucid
>>> from lucid.models.vision.mobilenet import mobilenet_v1
>>> backbone = mobilenet_v1()
>>> x = lucid.randn(2, 3, 224, 224)
>>> out = backbone(x)
>>> out.last_hidden_state.shape
(2, 1024, 1, 1)
Inspect the per-stage feature map descriptors for FPN integration:
>>> info = backbone.feature_info
>>> [(fi.stage, fi.num_channels, fi.reduction) for fi in info]
[(1, 64, 2), (2, 128, 4), (3, 256, 8), (4, 512, 16), (5, 1024, 32)]Used by 2
Constructors
1Properties
1feature_info: list[FeatureInfo]