swin3d_b¶
- torchvision.models.video.swin3d_b(*, weights: Optional[Swin3D_B_Weights] = None, progress: bool = True, **kwargs: Any) SwinTransformer3d [source]¶
Constructs a swin_base architecture from Video Swin Transformer.
- Parameters:
weights (
Swin3D_B_Weights
, optional) – The pretrained weights to use. SeeSwin3D_B_Weights
below 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.SwinTransformer
base class. Please refer to the source code for more details about this class.
- class torchvision.models.video.Swin3D_B_Weights(value)[source]¶
The model builder above accepts the following values as the
weights
parameter.Swin3D_B_Weights.DEFAULT
is equivalent toSwin3D_B_Weights.KINETICS400_V1
. You can also use strings, e.g.weights='DEFAULT'
orweights='KINETICS400_V1'
.Swin3D_B_Weights.KINETICS400_V1:
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
Swin3D_B_Weights.DEFAULT
.acc@1 (on Kinetics-400)
79.427
acc@5 (on Kinetics-400)
94.386
categories
abseiling, air drumming, answering questions, … (397 omitted)
min_size
height=1, width=1
min_temporal_size
1
recipe
num_params
88048984
GFLOPS
140.67
File size
364.1 MB
The inference transforms are available at
Swin3D_B_Weights.KINETICS400_V1.transforms
and perform the following preprocessing operations: Accepts batched(B, T, C, H, W)
and single(T, C, H, W)
video frametorch.Tensor
objects. The frames are resized toresize_size=[256]
usinginterpolation=InterpolationMode.BILINEAR
, followed by a central crop ofcrop_size=[224, 224]
. Finally the values are first rescaled to[0.0, 1.0]
and then normalized usingmean=[0.485, 0.456, 0.406]
andstd=[0.229, 0.224, 0.225]
. Finally the output dimensions are permuted to(..., C, T, H, W)
tensors.Swin3D_B_Weights.KINETICS400_IMAGENET22K_V1:
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
acc@1 (on Kinetics-400)
81.643
acc@5 (on Kinetics-400)
95.574
categories
abseiling, air drumming, answering questions, … (397 omitted)
min_size
height=1, width=1
min_temporal_size
1
recipe
num_params
88048984
GFLOPS
140.67
File size
364.1 MB
The inference transforms are available at
Swin3D_B_Weights.KINETICS400_IMAGENET22K_V1.transforms
and perform the following preprocessing operations: Accepts batched(B, T, C, H, W)
and single(T, C, H, W)
video frametorch.Tensor
objects. The frames are resized toresize_size=[256]
usinginterpolation=InterpolationMode.BILINEAR
, followed by a central crop ofcrop_size=[224, 224]
. Finally the values are first rescaled to[0.0, 1.0]
and then normalized usingmean=[0.485, 0.456, 0.406]
andstd=[0.229, 0.224, 0.225]
. Finally the output dimensions are permuted to(..., C, T, H, W)
tensors.