PVT v2-B1 backbone (Wang et al., 2022).
Builds the canonical PVT v2-B1 configuration:
embed_dims=(64, 128, 320, 512), depths=(2, 2, 2, 2),
num_heads=(1, 2, 5, 8), sr_ratios=(8, 4, 2, 1).
Approximately 14.0M parameters — ResNet-18 / 34 class on the
accuracy/cost trade-off.
Model Size
Parameters
pretrainedbool= FalseIf
True, loads ImageNet-1k pretrained weights when
available. Defaults to False.**overridesobject= {}Keyword overrides on top of the canonical PVT v2-B1 config.
Returns
PVTA PVT backbone returning a flat
feature.
Notes
PVT v2-B1 reaches 78.7% top-1 on ImageNet-1k at 224x224 (Wang et al., 2022, Table 1).
Examples
>>> import lucid
>>> from lucid.models.vision.pvt import pvt_v2_b1
>>> model = pvt_v2_b1()
>>> x = lucid.randn(1, 3, 224, 224)
>>> model.forward_features(x).shape
(1, 512)