您现在的位置是:热点 >>正文
手机跑SOTA模型快8倍 Facebook AI开源超强全栈视频库PyTorchVideo
热点58508043人已围观
简介...
视频已逐渐超过文字和图片,可以说成为了现在使用最广的媒体形式,同时也占据了用户更多的浏览时间,这就使得视频理解变得尤为重要。
各大互联网公司与顶尖高校纷纷绞尽脑汁,竞相研究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/pytor跑Sch/ushering-in-the-new-age-of-video-understanding-with-pytorch-1d85078e8015
PyTorchVideo啥都能做
更厉害的是,PyTorchVideo似乎「啥都能做」!不但在视频分类,动作检测等任务中深耕SOTA。
甚至还「略懂」LeCun最爱的自监督学习,以及音频事件检测等等千奇百怪的任务也不在话下。
基于PyTorchVideo的SlowFast模型进行动作监测
PyTorchVideo手机也能玩
更丧心病狂的是,PyTorchVideo一并开源了移动端的加速优化,不但提供了手把手的教程,将视频模型一步步优化核心Kernel,量化(quantilize)加速。
数倍加速后在移动端实时运行,甚至官方直接暴力放出Android和iOTOS移动端开源代码,将SOTA的视频模型直接塞到手机里跑着玩玩。
在三星Galaxy S10手机上运行的PyTorchVideo加速X3D模型,运行速度快8倍,处理一秒视频大约需要130毫秒
PyTorchVideo是个啥
PyTorchVideo的真身是一个视频理解的机器学习库,可以服务于各种代码库,以及各类SOTA视频模型模型和开源视频模型。
以及各种视频基础算法,视频数据操作,各类流行视频数据集,视频增广,视频模型加速量化,等等一些列的全栈视频相关内容。
PyTorchVideo怎么玩
首先pip一下。
pip install pytorchvideo
然后,在浏览官方的教程并上手实验了一下之后,发现通过PyTorchVideo只需要寥寥几行就可以训练一个视频模型:
fA模rom 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_s8倍ampler=data.make_clip_sampler( "uniform", CLIP_DURATION, ), ) batch_size=BATCH_SI FZE, ) # 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
CSN
Reb101
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
arch
deoopth
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&nbsk p;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://arxiv.oAIrg/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/181开源2.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 c超强hannel-separated convolutional networkshttps://arxiv.org/abs/1904.02811
似乎MultiScale Vision Transform也位列其中,有兴趣的朋友可以去一探究竟。
Tags:
相关文章
百度、B站二次上市将近 中概股回港又一次浪潮汹涌
热点来源:经济观察网 记者/任晓宁 实习生/卢硕 1月20日,百度回港二次上市启动消息传出,百度对此没有向经济观察网做出回应。根据传出的消息,百度已确定了高盛和中信为其上市保荐团队,计划于春节后正式提交在...
【热点】
阅读更多Facebook内容审核员:“科技界最糟糕的工作”?
热点新浪科技讯 北京时间4月15日下午消息,据报道,本周三,一位Facebook内容审核员在辞职前,向外界发出了自己的声音,称公司的内容审核系统不健全,且未能对审核员的工作提供足够支持。 有媒体人员在Tw...
【热点】
阅读更多DeepMind 携手耶鲁大学发布 C2S-Scale27B 模型:AI 发现癌症治疗新途径
热点谷歌 DeepMind 近日与耶鲁大学合作,推出了一款名为 C2S-Scale27B 的全新人工智能模型。该模型基于开放的 Gemma 模型系列 构建,专注于复杂的 单细胞分析 ,并成功发现了一条 此...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.sweat.com/collections/vendors?q=外推留痕软件【tg:seogoogle987】,Vyt
- https://www.kaiyueleather.com/search/外推留痕软件【tg:seogoogle987】,iAT
- https://www.vet-direct.com/search?cat=72&term=外推留痕软件【tg:seogoogle987】,IW5
- https://www.writingforward.com/?action=SEARCH&s=外推留痕软件【tg:seogoogle987】,dz4
- https://www.wmfe.org/?s=外推留痕软件【tg:seogoogle987】,KgX
- https://www.resopal.de/catalogsearch/result/?action=SEARCH&q=外推留痕软件【tg:seogoogle987】,bSm
- https://www.unclefossil.com/search/外推留痕软件【tg:seogoogle987】gad_source=1&gclid=Cj0KCQjw_-GxBhC1ARIsADGgDjsNKplUXa2F6YGlHBK2sHDQ88cgsJBb05DyO99TV9jNq_cT0kGMqyQaAgHQEALw_wcB
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=外推留痕软件【tg:seogoogle987】S7X
- https://www.ng-slo.si/si/iskanje?cat=114&q=外推留痕软件【tg:seogoogle987】,pWJ
- https://www.l-and-b.jp/?page=1&s=外推留痕软件【tg:seogoogle987】,jIx
- https://yscc1986.net/search/外推留痕软件【tg:seogoogle987】XcS
- https://www.kaskus.co.id/search?q=外推留痕软件【tg:seogoogle987】,skw
- https://www.sbaad.no/?s=外推留痕软件【tg:seogoogle987】,3Hp
- https://www.remit.co.jp/vi/?s=外推留痕软件【tg:seogoogle987】,krH
- https://www.rollingstone.it/?ID=DVMeu3AlmzZE1cuJ2FmgmO5TSCQRb3yh&s=外推留痕软件【tg:seogoogle987】,G0m
- https://www.ushmm.org/search/results/?ID=8s0587Oi8UTv74zPPM4fuhwjNpe2hsEE&q=外推留痕软件【tg:seogoogle987】,Tsj
- https://www.remit.co.jp/pt/?action=CHECK&s=外推留痕软件【tg:seogoogle987】,3VI
- https://wwwcp.umes.edu/search/外推留痕软件【tg:seogoogle987】,GRk
- https://www.welshmountainzoo.org/shop/index.php?routeproduct/search&tag=外推留痕软件【tg:seogoogle987】,gxE
- https://www.youtube.com/hashtag/外推留痕软件【tg:seogoogle987】,mgb
- https://www.rostaing.com/catalogsearch/result/?cat=22&q=外推留痕软件【tg:seogoogle987】,iAc
- https://www.le-trend.com/en/search/=外推留痕软件【tg:seogoogle987】,FET
- https://www.sbaad.no/search/外推留痕软件【tg:seogoogle987】,QCx
- https://www.solerpalau.com/en-en/catalogsearch/result/?q=外推留痕软件【tg:seogoogle987】,W8F
- https://hsmoa.com/search?query=外推留痕软件【tg:seogoogle987】nPr
- https://www.mi.com/search?keyword=外推留痕软件【tg:seogoogle987】,3Je
- https://www.zalora.sg/catalog/?cat=112&q=外推留痕软件【tg:seogoogle987】,u7i
- https://www.sogou.com/web?query=外推留痕软件【tg:seogoogle987】,hkQ
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=外推留痕软件【tg:seogoogle987】7wB
- https://www.teamlab.art/th/?submit=外推留痕软件【tg:seogoogle987】,3Nl
- https://www.randjleather.co.uk/index.php?route=product/search&tag=外推留痕软件【tg:seogoogle987】,DxD
- https://www.rockngem.com/?action=CHECK&s=外推留痕软件【tg:seogoogle987】,IvD
- https://www.shopping.com/search.html?keyword=外推留痕软件【tg:seogoogle987】,7WZ
- https://www.pixiv.net/tags/外推留痕软件【tg:seogoogle987】,1xN
- https://www.maafushidive.com?collections?vendors?q=外推留痕软件【tg:seogoogle987】,r2B
- https://www.sensorshop24.de/catalogsearch/result/index/?type=132&q=外推留痕软件【tg:seogoogle987】,zG4
- https://www.temu.com/search_result.html?search_key=外推留痕软件【tg:seogoogle987】Wiw
- https://www.vocabulary.com/dictionary/外推留痕软件【tg:seogoogle987】,2Rx
- https://5gaa.org/?token=6e2l7hjt2i26gzgctgwdrv7v0j6nxorq&s=外推留痕软件【tg:seogoogle987】oz5
- https://www.schenckprocess.com/search?q=外推留痕软件【tg:seogoogle987】,Z6Z
- https://www.teamlab.art/es/?submit=外推留痕软件【tg:seogoogle987】,Uf7
- https://www.teamlab.art/zh-hans/?submit=外推留痕软件【tg:seogoogle987】,qy9
- https://www.paulaschoice.hk/zh_hant/catalogsearch/result/?q=外推留痕软件【tg:seogoogle987】,2JK
- https://www.remit.co.jp/id/?s=外推留痕软件【tg:seogoogle987】,r5q
- https://www.routesonline.com/search/?query=外推留痕软件【tg:seogoogle987】,5BQ
- https://www.tarleton.edu/?s=外推留痕软件【tg:seogoogle987】,KNc
- https://www.repetto.jp/item/search?action=QUERY&q=外推留痕软件【tg:seogoogle987】,NVP
- https://www.lenovo.com/gb/en/search?action=SEARCH&text=外推留痕软件【tg:seogoogle987】,Guk
- https://www.remit.co.jp/en/?s=外推留痕软件【tg:seogoogle987】,KLZ
- https://www.whirlpool.com.hk/chinese/catalogsearch/result?cat=30&q=外推留痕软件【tg:seogoogle987】,0Nw