翻篇收录说明
翻篇网页快照

PyTorchVideo · A deep learning library for video understanding research

https://pytorchvideo.org/

最近抓取:2026-12-04 20:14:47(北京时间)

最近内容变化:2026-12-02 09:07:44(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

A deep learning library for video understanding research

正文摘录

A deep learning library for video understanding researchGet StartedTutorialsGitHubBased on PyTorch Built using PyTorch. Makes it easy to use all the PyTorch-ecosystem components. Reproducible Model Zoo Variety of state of the art pretrained video models and their associated benchmarks that are ready to use. Efficient Video Components Video-focused fast and efficient components that are easy to use. Supports accelerated inference on hardware. Get StartedInstall pytorchvideo (Confirm requirements following the instructions here)pip install pytorchvideo Try Video classification with Model Zoo (For detailed instructions, refer to the PyTorchVideo Model Zoo Inference Tutorial# Import all the required components ... # Load pre-trained model model = torch.hub.load('facebookresearch/pytorchvideo', 'slow_r50', pretrained=True) # Load video video = EncodedVideo.from_path('some_video.avi') # Compose video data transforms transform = ApplyTransformToKey( key="video", transform=Compose( [ UniformTemporalSubsample(num_frames), Lambda(lambda x: x/255.0), NormalizeVideo(mean, std), ShortSideScale( size=side_size ), CenterCropVideo(crop_size=(crop_size, crop_size)) ] ), ) # Get clip clip_start_sec = 0.0 # secs clip_duration = 2.0 # secs video_data = video.get_clip(start_sec=clip_start_sec, end_sec=clip_start_sec + clip_duration) video_data = transform(video_data) # Generate top 5 predictions preds = torch.nn.functional.softmax(preds) pred_class_ids = preds.topk(k=5).indices