- torchvision.models.video.swin3d_t(*, weights: Optional[Swin3D_T_Weights] = None, progress: bool = True, **kwargs: Any) SwinTransformer3d [source]¶
Constructs a swin_tiny architecture from Video Swin Transformer.
Swin3D_T_Weights, optional) – The pretrained weights to use. See
Swin3D_T_Weightsbelow for more details, and possible values. By default, no pre-trained weights are used.
progress (bool, optional) – If True, displays a progress bar of the download to stderr. Default is True.
**kwargs – parameters passed to the
torchvision.models.video.swin_transformer.SwinTransformerbase class. Please refer to the source code for more details about this class.
- class torchvision.models.video.Swin3D_T_Weights(value)[source]¶
The model builder above accepts the following values as the
Swin3D_T_Weights.DEFAULTis equivalent to
Swin3D_T_Weights.KINETICS400_V1. You can also use strings, e.g.
The weights were ported from the paper. The accuracies are estimated on video-level with parameters frame_rate=15, clips_per_video=12, and clip_len=32 Also available as
acc@1 (on Kinetics-400)
acc@5 (on Kinetics-400)
abseiling, air drumming, answering questions, … (397 omitted)
The inference transforms are available at
Swin3D_T_Weights.KINETICS400_V1.transformsand perform the following preprocessing operations: Accepts batched
(B, T, C, H, W)and single
(T, C, H, W)video frame
torch.Tensorobjects. The frames are resized to
interpolation=InterpolationMode.BILINEAR, followed by a central crop of
crop_size=[224, 224]. Finally the values are first rescaled to
[0.0, 1.0]and then normalized using
mean=[0.485, 0.456, 0.406]and
std=[0.229, 0.224, 0.225]. Finally the output dimensions are permuted to
(..., C, T, H, W)tensors.