您现在的位置是:热点 >>正文
手机跑SOTA模型快8倍 Facebook AI开源超强全栈视频库PyTorchVideo
热点56003人已围观
简介...
视频已逐渐超过文字和图片,可以说成为了现在使用最广的媒体形式,同时也占据了用户更多的浏览时间,这就使得视频理解变得尤为重要。
各大互联网公司与顶尖高校纷纷绞尽脑汁,竞相研究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/pyto跑Srch/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( &型快nbsp; model_num_class=400, ) # Create Kinetics data loader. kinetics_loader = torch.utils.data.DataLoader( data.Kinetics( data_path=DATA_PATH, clip8倍_sampler=data.make_clip_sampler( "uniform", CLIP_DURATION, ), ) batch_size=B FATCH_SIZE, ) # 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)&acnbsp;
官方的模型库太丰富,简直眼花缭乱。
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.7eb7
CSN
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
Charadeoos
arch
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&k nbsp;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://AIarxiv.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/a开源bs/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 channel-separated convolutional networkshttps://arxiv.org/abs/1904.02811
似乎MultiScale Vision Transform也位列其中,有兴趣的朋友可以去一探究竟。
Tags:
相关文章
Meta 投资 15 亿美元在德州建设 AI 数据中心,水资源回收率将达 200%
热点Meta 公司近日宣布将在美国德克萨斯州埃尔帕索新建一座投资高达15亿美元的人工智能优化数据中心。这将是 Meta 在全球的第29座数据中心,同时也是该州的第三座,旨在满足不断增长的人工智能应用需求。...
【热点】
阅读更多标签: 萝卜快跑 Dubai 全无人驾驶 Apollo Go Park
热点云梦级1月8日云梦级消息,萝卜快跑宣布于 1 月 6 日正式获得阿联酋迪拜道路与交通管理局(RTA)颁发的首个全无人驾驶测试许可,成为迪拜目前唯一获准开展全无人测试的平台。当日,萝卜快跑在海外建设的首...
【热点】
阅读更多标签: 江阴银行 2025年财报 净利润增长 资产质量
热点云梦级10月29日云梦级消息,据蓝鲸新闻报道,10月28日,江阴银行发布2025年第三季度报告。报告显示,今年前三季度,该行实现营业收入32.04亿元,同比增长6.17%;归母净利润为12.78亿元,...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://yscc1986.net/search/蜘蛛池出租【tg:seogoogle987】UFy
- https://www.lifesciencesweden.se/search?q=蜘蛛池出租【tg:seogoogle987】,UkQ
- https://www.abbreviations.com/蜘蛛池出租【tg:seogoogle987】qhu
- https://www.lyrics.com/lyrics/kkk3蜘蛛池出租【tg:seogoogle987】,tok
- https://www.teamlab.art/pt/?submit=蜘蛛池出租【tg:seogoogle987】,OrI
- https://www.whirlpool.com.hk/chinese/catalogsearch/result?cat=30&q=蜘蛛池出租【tg:seogoogle987】,rgd
- https://www.nslcleaders.org/?s=蜘蛛池出租【tg:seogoogle987】,Edz
- https://www.uctronics.com/catalogsearch/result/?q=蜘蛛池出租【tg:seogoogle987】,ztB
- https://www.thedp.com/page/search?q=蜘蛛池出租【tg:seogoogle987】,eED
- https://xehay.vn/tim-kiem/=蜘蛛池出租【tg:seogoogle987】,ygl
- https://www.woorden.org/spreekwoord.php?woord=蜘蛛池出租【tg:seogoogle987】,Dom
- https://www.navymwr.org/search/?query=蜘蛛池出租【tg:seogoogle987】,m0q
- https://www.lindseymedicalsupply.com/search/蜘蛛池出租【tg:seogoogle987】,sxQ
- https://www.localfootdoc.com/?s=蜘蛛池出租【tg:seogoogle987】,enF
- https://www.wellbees.com/index.php/catalogsearch/result/index/?q=蜘蛛池出租【tg:seogoogle987】,WVl
- https://www.springfieldlibrary.org/library/?s=蜘蛛池出租【tg:seogoogle987】,xjJ
- https://www.sebson.de/en/search?query=蜘蛛池出租【tg:seogoogle987】,ekt
- https://www.laoairlines.com/?action=QUERY&s=蜘蛛池出租【tg:seogoogle987】,dWU
- https://www.wellbees.com/catalogsearch/result/?action=CHECK&q=蜘蛛池出租【tg:seogoogle987】,hUC
- https://www.seagrant.wisc.edu/?page=63&s=蜘蛛池出租【tg:seogoogle987】,Vf1
- https://www.welshmountainzoo.org/shop/index.php?routeproduct/search&tag=蜘蛛池出租【tg:seogoogle987】,VW6
- https://www.sonepar.ch/fr/search?q=蜘蛛池出租【tg:seogoogle987】,4JK
- https://www.goodreads.com/quotes/tag/蜘蛛池出租【tg:seogoogle987】Pxb
- https://search.danawa.com/dsearch.php?query=蜘蛛池出租【tg:seogoogle987】H5v
- https://www.posten-portal.de/search?query=蜘蛛池出租【tg:seogoogle987】,336
- https://www.tailoy.com.pe/catalogsearch/result/?q=蜘蛛池出租【tg:seogoogle987】,Bli
- https://www.resilienz-akademie.com/?cat=71&s=蜘蛛池出租【tg:seogoogle987】,Xpk
- https://www.safetv.go.kr/base/search/view?searchWord=蜘蛛池出租【tg:seogoogle987】Coe
- https://www.remit.co.jp/vi/?s=蜘蛛池出租【tg:seogoogle987】,Ml4
- https://www.nyif.com/catalogsearch/result/?q=蜘蛛池出租【tg:seogoogle987】,ch5
- https://www.olx.ba/pretraga?trazilica=蜘蛛池出租【tg:seogoogle987】,7LI
- https://www.zalora.sg/catalog/?cat=112&q=蜘蛛池出租【tg:seogoogle987】,70T
- https://www.rollingstone.it/?ID=DVMeu3AlmzZE1cuJ2FmgmO5TSCQRb3yh&s=蜘蛛池出租【tg:seogoogle987】,tch
- https://www.stormberg.com/no/search?q=蜘蛛池出租【tg:seogoogle987】,qyb
- https://www.lneg.pt/en/?s=蜘蛛池出租【tg:seogoogle987】,3qW
- https://www.pickett.co.uk/collections/vendors?q=蜘蛛池出租【tg:seogoogle987】,rl1
- https://5gaa.org/?token=6e2l7hjt2i26gzgctgwdrv7v0j6nxorq&s=蜘蛛池出租【tg:seogoogle987】GYd
- https://www.livehindustan.com/tags/蜘蛛池出租【tg:seogoogle987】,fG4
- https://www.symatoys.com/search.html?ID=UyMD6aO58bPrJvQAB1I0N69KzJBZeNPC&keyword=蜘蛛池出租【tg:seogoogle987】,987
- https://www.mi.com/search?keyword=蜘蛛池出租【tg:seogoogle987】,vAs
- https://www.dba.dk/soeg/?soeg=蜘蛛池出租【tg:seogoogle987】U2y
- https://www.stonerealestate.com.au/?cat=100&s=蜘蛛池出租【tg:seogoogle987】,CqW
- https://www.remit.co.jp/vi/?s=蜘蛛池出租【tg:seogoogle987】ezU
- https://www.voices.com/talents/search?keywords=蜘蛛池出租【tg:seogoogle987】,FJ7
- https://www.polliwogs.com/search/蜘蛛池出租【tg:seogoogle987】,s2V
- https://www.mynextmove.org/find/search?s=蜘蛛池出租【tg:seogoogle987】,Kf4
- https://www.openspaceinstitute.org/search?q=蜘蛛池出租【tg:seogoogle987】,Gtt
- https://www.oikos-tecnics.com/?s=蜘蛛池出租【tg:seogoogle987】,Alu
- https://www.wuv.edu/?s=蜘蛛池出租【tg:seogoogle987】,UD0
- https://www.randjleather.co.uk/index.php?route=product/search&tag=蜘蛛池出租【tg:seogoogle987】,Up4