您现在的位置是:挑肥拣瘦网 > 热点
手机跑SOTA模型快8倍 Facebook AI开源超强全栈视频库PyTorchVideo
挑肥拣瘦网2026-11-14【热点】{固定数字1}人已围观
简介谷歌搜索留痕霸屏【tg:seogoogle987】
视频已逐渐超过文字和图片,可以说成为了现在使用最广的媒体形式,同时也占据了用户更多的浏览时间,这就使得视频理解变得尤为重要。
各大互联网公司与顶尖高校纷纷绞尽脑汁,竞相研究SOTA的视频理解模型与算法。
在谷歌,脸书,Open-MM Lab等分别祭出各家杀器之后,脸书人工智能实验室(Facebook AI)在推出PySlowFast之后时隔一年,携PyTorchVideo重回战场。
官方网站: https://pytorchvideo.org/
今天我们就来扒一下,PyTorchVideo究竟是怎样的一个代码库,又如何能在开源当天就跻身于GitHub Trending榜单。
PyTorchVideo哪儿都能用
不同于在座的各位视频代码理解框架只醉心于自家框架,无法移步与其他代码库。
PyTorc手机hVideo像是torchvision等基础代码库一般,「哪儿都能用」!PyTorchVideo不但可以用在视频理解任务中,甚至可以用在其他任务的代码库。
脸书人工智能实验室的大佬们不但在「自家人」的PySlowFast代码库上无缝使用上了PyTorchVideo,并且还在Classy Vision,PyTorch Lightening等等框架上无缝插入。
作为含着金钥匙出生的PyTorchVideo,其直接成为了PyTorch Lightning-Flash的视频理解担当,作为基础库被默认使用。
这不,在FiftyOne项目中,开源社区的吃瓜群众就利用Lightning-Flash搞出了一个浏览视频的工具箱,可以直接查看视频的动作类别。
FiftyOne: https://medium.com/pytorch跑S/ushering-in-the-new-age-of-video-understanding-with-pytorch-1d85078e8015
PyTorchVideo啥都能做
更厉害的是,PyTorchVideo似乎「啥都能做」!不但在视频分类,动作检测等任务中深耕SOTA。
甚至还「略懂」LeCun最爱的自监督学习,以及音频事件检测等等千奇百怪的任务也不在话下。
基于PyTorchVideo的SlowFast模型进行动作监测
PyTorchVideo手机也能玩
更丧心病狂的是,PyTorchVideo一并开源了移动端的加速优化,不但提供了手把手的教程,将视频模型一步步优化核心Kernel,量化(quantilize)加速。
数倍加速后在移动端实时运行,甚至官方直接暴力放出Android和iOS移OT动端开源代码,将SOTA的视频模型直接塞到手机里跑着玩玩。
在三星Galaxy S10手机上运行的PyTorchVideo加速X3D模型,运行速度快8倍,处理一秒视频大约需要130毫秒
PyTorchVideo是个啥
PyTorchVideo的真身是一个视频理解的机器学习库,可以服务于各种代码库,以及各类SOTA视频模型模型和开源视频模型。
以及各种视频基础算法,视频数据操作,各类流行视频数据集,视频增广,视频模型加速量化,等等一些列的全栈视频相关内容。
PyTorchVideo怎么玩
首先pip一下。
pip install pytorchvideo
然后,在浏览官方的教程并上手实验了一下之后,发现通过PyTorchVideo只需要寥寥几行就可以训练一个视频模型:
fromA模 pytorchvideo import data, models, accelerator # Create visual and acoustic models. visual_model = models.slowfast.create_slowfast( model_num_class=400, ) acoustic_model = models.resnet.create_acoustic_resnet( &nb型快sp; model_num_class=400, ) # Create Kinetics data loader. kinetics_loader = torch.utils.data.DataLoader( data.Kinetics( data_path=DATA_PATH, clip_sam8倍pler=data.make_clip_sampler( "uniform", CLIP_DURATION, ), ) batch_size=BATCH_SIZ FE, ) # Deploy model. visual_net_inst_deploy = accelerator.deployment. convert_to_deployable_form(net_inst, input_tensor)
那么从开源的训练模型库中直接使用模型效果如何?
model = torch.hub.load("facebookresearch/pytorchvideo", model=model_name, pretrained=True)
官ac方的模型库太丰富,简直眼花缭乱。
Kinetics-400
arch
depth
frame length x sample rate
top 1
Flops (G) x views
Params (M)
C2D
R50
8x8
71.46
25.89 x 3 x 10
24.33
I3D
R50
8x8
73.27
37.53 x 3 x 10
28.04
Slow
R50
4x16
72.40
27.55 x 3 x 10
32.45
Slow
R50
8x8
74.58
54.52 x 3 x 10
32.45
SlowFast
R50
4x16
75.34
36.69 x 3 x 10
34.48
SlowFast
R50
8x8
76.94
65.71 x 3 x 10
34.57
SlowFast
R101
8x8
77.90
127.20 x 3 x 10
62.83
SlowFast
R101
16x8
78.70
215.61 x 3 x 10
53.77
CebSN
R101
32x2
77.00
75.62 x 3 x 10
22.21
R(2+1)D
R50
16x4
76.01
76.45 x 3 x 10
28.11
X3D
XS
4x12
69.12
0.91 x 3 x 10
3.79
X3D
S
13x6
73.33
2.96 x 3 x 10
3.79
X3D
M
16x5
75.94
6.72 x 3 x 10
3.79
X3D
L
16x5
77.44
26.64 x 3 x 10
6.15
Something-Something V2
arch
depth
pretrain
frame length x sample rate
top 1
Flops (G) x views
Params (M)
Slow
R50
Kinetics 400
8x8
60.04
55.10 x 3 x 1
31.96
SlowFast
R50
Kinetics 400
8x8
61.68
66.60 x 3 x 1
34.04
Charades
arcooh
depth
pretrain
frame length x sample rate
MAP
Flops (G) x views
Params (M)
Slow
R50
Kinetics 400
8x8
34.72
55.10 x 3 x 10
31.96
SlowFast
R50
Kinetics 400
8x8
37.24
66.60 x 3 x 10
34.00
AVA (V2.2)
arch
depth
pretrain
frame length x sample rate
MAP
Params (M)
Slow
R50
Kinetics 400
4x16
19.5
31.78
SlowFast
R50
Kinetics 400
8x8
24.67
33.82
甚至通过PyTorchVideo加持的 Lightning Flash,分类视频仅仅只需三行。
from flash import&nk bsp;VideoClassifier model = VideoClassifier.load_from_checkpoint("checkpoint_uri") model.predict("path_to_video_folder")
据官方博客透露,PyTorchVideo开源了一大票视频模型,包括脸书人工智能实验室近期出现在ICCV,ICML等工作:
Multiscale Vision Transformershttps://arxiv.org/abs/2104.11227 A large-scale study on unsupervised spatiotemporal representation learninghttps://arxivAI.org/abs/2104.14558 Multiview pseudo-labeling for semi-supervised learning from videohttps://arxiv.org/abs/2104.00682 Is space-time attention all you need for video understanding?https://arxiv.org/abs/2102.05095 Keeping Your Eye on the Ball: Trajectory Attention in Video Transformershttps://arxiv.org/abs/2106.05392 SlowFast networks for video recognitionhttps://arxiv.org/abs/1812.开源03982 X3D: Expanding architectures for efficient video recognitionhttps://arxiv.org/abs/2004.04730 Audiovisual SlowFast networks for video recognitionhttps://arxiv.org/abs/2001.08740 Non-local neural networkshttps://arxiv.org/abs/1711.07971 A closer look at spatiotemporal convolutions for action recognitionhttps://arxiv.org/abs/1711.11248 Video classification with chann超强el-separated convolutional networkshttps://arxiv.org/abs/1904.02811
似乎MultiScale Vision Transform也位列其中,有兴趣的朋友可以去一探究竟。
很赞哦!(8734007)
上一篇: 九大数据分析方法之:标签分析法
热门文章
站长推荐
友情链接
- 标签: 康师傅
- https://www.vietnamconsulate-sf.org/?action=CHECK&s=谷歌搜索留痕霸屏【tg:seogoogle987】,X4c
- https://www.wellbees.com/catalogsearch/result/?action=CHECK&q=谷歌搜索留痕霸屏【tg:seogoogle987】,8aR
- https://store.line.me/search/sticker/ja?q=谷歌搜索留痕霸屏【tg:seogoogle987】YBK
- https://www.remit.co.jp/id/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,p6L
- https://www.sweat.com/collections/vendors?q=谷歌搜索留痕霸屏【tg:seogoogle987】,zbk
- https://www.soccerbible.com/search?q=谷歌搜索留痕霸屏【tg:seogoogle987】,Aqf
- https://www.teamlab.art/it/?submit=谷歌搜索留痕霸屏【tg:seogoogle987】,7sX
- https://www.maafushidive.com?collections?vendors?q=谷歌搜索留痕霸屏【tg:seogoogle987】,Vxk
- https://www.localfootdoc.com/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,tQi
- https://yscc1986.net/search/谷歌搜索留痕霸屏【tg:seogoogle987】e7Y
- https://www.wmfe.org/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,gFA
- https://www.madebyoranges.com/nl/search/谷歌搜索留痕霸屏【tg:seogoogle987】,Tpq
- https://www.tumblr.com/tagged/谷歌搜索留痕霸屏【tg:seogoogle987】,DTr
- https://www.hanbat.ac.kr/search/front/Search.jsp?qt=谷歌搜索留痕霸屏【tg:seogoogle987】Q0v
- https://www.kissthekangaroo.com.au/index.php?route=product/search&tag=谷歌搜索留痕霸屏【tg:seogoogle987】,pV7
- https://www.lezhin.com/ko/tags/谷歌搜索留痕霸屏【tg:seogoogle987】,bBV
- https://search.danawa.com/dsearch.php?query=谷歌搜索留痕霸屏【tg:seogoogle987】oqr
- https://www.remit.co.jp/zh/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,7pk
- https://www.maine.gov/pfr/professionallicensing/search/node?keys=谷歌搜索留痕霸屏【tg:seogoogle987】,e8u
- https://blvdseafood.com/?s=谷歌搜索留痕霸屏【tg:seogoogle987】1Np
- https://www.resilienz-akademie.com/?cat=71&s=谷歌搜索留痕霸屏【tg:seogoogle987】,yyE
- https://www.tmtpost.com/search?q=谷歌搜索留痕霸屏【tg:seogoogle987】,RQk
- https://nicolazzi.it/en/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,7in
- https://www.target.com/s?searchTerm=谷歌搜索留痕霸屏【tg:seogoogle987】,XDN
- https://www.springfieldlibrary.org/library/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,oO9
- https://www.tombow.com/search/谷歌搜索留痕霸屏【tg:seogoogle987】,Oyc
- https://jihoon471.cafe24.com/product/search.html?banner_action=&keyword=谷歌搜索留痕霸屏【tg:seogoogle987】SUf
- https://www.repetto.jp/item/search?action=QUERY&q=谷歌搜索留痕霸屏【tg:seogoogle987】,ErL
- https://www.sensorshop24.de/catalogsearch/result/index/?type=132&q=谷歌搜索留痕霸屏【tg:seogoogle987】,FOk
- https://www.losgatoschamber.com/list/search?action=SEARCH&q=谷歌搜索留痕霸屏【tg:seogoogle987】,azh
- https://www.lgnewsroom.com/search/谷歌搜索留痕霸屏【tg:seogoogle987】,ctT
- https://www.teamlab.art/?submit=谷歌搜索留痕霸屏【tg:seogoogle987】,4a2
- https://www.rookwinkel.nl/catalogsearch/result/index/?q=谷歌搜索留痕霸屏【tg:seogoogle987】,5vN
- https://www.springfieldlibrary.org/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,xO7
- https://www.pearson.com/en-us/search.html?aq=谷歌搜索留痕霸屏【tg:seogoogle987】,u0i
- https://xn--lgernevedlystskoven-lxb.dk/search/谷歌搜索留痕霸屏【tg:seogoogle987】,Nd2
- https://m.shoppinghow.kakao.com/m/search/q/谷歌搜索留痕霸屏【tg:seogoogle987】oR6
- https://www.stormberg.com/no/search?q=谷歌搜索留痕霸屏【tg:seogoogle987】,SFT
- https://www.sic-info.org/vi/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,P5M
- https://www.trockenmittel.ch/catalogsearch/result/?iC=ZM3&q=谷歌搜索留痕霸屏【tg:seogoogle987】,QN5
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=谷歌搜索留痕霸屏【tg:seogoogle987】,5nw
- https://www.olx.ba/pretraga?trazilica=谷歌搜索留痕霸屏【tg:seogoogle987】,4Jy
- https://www.kaiyueleather.com/search/谷歌搜索留痕霸屏【tg:seogoogle987】,rJD
- https://www.wellbees.com/index.php/catalogsearch/result/index/?q=谷歌搜索留痕霸屏【tg:seogoogle987】,0Hp
- https://www.merchbar.com/search?q=谷歌搜索留痕霸屏【tg:seogoogle987】,Fer
- https://www.teamlab.art/fr/?submit=谷歌搜索留痕霸屏【tg:seogoogle987】,lrN
- https://www.mygrandma.com/Items.aspx?search=谷歌搜索留痕霸屏【tg:seogoogle987】,LFQ
- https://www.paulaschoice.hk/zh_hant/catalogsearch/result/?q=谷歌搜索留痕霸屏【tg:seogoogle987】,tLt
- https://www.lneg.pt/en/?s=谷歌搜索留痕霸屏【tg:seogoogle987】,cXV
- https://www.kingston.gov.uk/site-search/results/?q=谷歌搜索留痕霸屏【tg:seogoogle987】,oDG







