mc3_18(*, weights: Optional[torchvision.models.video.resnet.MC3_18_Weights] = None, progress: bool = True, **kwargs: Any) → torchvision.models.video.resnet.VideoResNet¶
Construct 18 layer Mixed Convolution network as in
The video module is in Beta stage, and backward compatibility is not guaranteed.
progress (bool) – If True, displays a progress bar of the download to stderr. Default is True.
**kwargs – parameters passed to the
torchvision.models.video.resnet.VideoResNetbase class. Please refer to the source code for more details about this class.
The model builder above accepts the following values as the
MC3_18_Weights.DEFAULTis equivalent to
MC3_18_Weights.KINETICS400_V1. You can also use strings, e.g.
These weights reproduce closely the accuracy of the paper for 16-frame clip inputs. 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
MC3_18_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=[112, 112]. Finally the values are first rescaled to
[0.0, 1.0]and then normalized using
mean=[0.43216, 0.394666, 0.37645]and
std=[0.22803, 0.22145, 0.216989]. Finally the output dimensions are permuted to
(..., C, T, H, W)tensors.