您现在的位置是:热点 >>正文
BBAug: 一个用于PyTorch的物体检测包围框数据增强包
热点0415397人已围观
简介...
像许多神经网络模型一样,目标检测模型在训练大量数据时效果最好。通常情况下,可用的数据有限,世界各地的许多研究人员正在研究增强策略,以增加可用的数据量。谷歌的大脑团队进行了一项这样的研究,并发表在了一篇论文中,名为Learning Data Augmentation Strategies for Object Detection。在这篇论文中,作者确定了一组增强称为策略,它对目标检测问题表现良好。该策略通过增强搜索获得,提高了通用模型的性能。
作者将增强策略定义为一组子策略。BB在模型进行训练时,随机选择其中一个子策略用于增强图像。在每个子策略中都有要依次应用于图像的增强。每个转换也有两个超参数:概率和幅度。概率表示该增强将被应用的可能性,而幅度表示该增强的程度。下面的代码显示了本文中使用的策略:
policy = [ [('TranslateX_BBox', 0.6, 4), ('EqAuualize', 0.8, 10)], [('TranslateY_Only_BBoxes', 0.2, 2), ('Cutout', 0.8, 8)], [('Sharpness', 0.0, 8), ('ShearX_BBox',&nbg:sp;0.4, 0)], [('ShearY_BBox', 1.0, 2), ('TranslateY_Only_BBoxes', 0.6, 6)], [('Rotate_BBox', 0.6, 10), ('Color', 1. 一0, 6)], ]
在这个策略中有5个子策略,如果我们取第一个子策略,它就包含了TranslateX_BBox和Equalize增强。TranslateX_BBox操作在x轴上转换图像的幅度为4。在本例中,大小并不直接转换为像素,而是根据大小缩放为像素值。该增强的概率也为0.6,这意味着如果该增强被选中,则应用该增强的概率为60%。随着每个增强都有一个相关的概率,引入了一个随机的概念,给训练增加了一定程度的随机性。总的来说,Brain Team已经提出个用了4个策略: v0, v1, v2和v3。本文中显示了v0策略,其他三个策略包含更多的子策略,这些子策略具有几种不同的转换。总的来说,增加分为三类,作者定义为:
颜色操作: 扭曲颜色通道,不影响边界框的位置。
几何操作:几何扭曲图像,这相应地改变了边界框的位置和大小。
包围框操作:只会扭曲包围框中包含的像素内容。
BBAug
那么BBAug)在这方面有什么贡献呢?BBAug是一个python包,它实现了谷歌Brain Team的所有策略。这个包是一个包装器,可以更容易地使用这些策略。实际的扩展是由优于P秀的imgaug包完成的。
上面显示的策略应用于一个示例图像,如下所示。每一行是一个不同的子策略,每一列是该子策略的不同运行。
正如你所看到的,在子策略的运行之间有一定程度的变化,因此给训练增加了一定程度的随机性。这只是BBAug实施的4个策略之一。要查看所有4个策略的完整可视化,请查看包的GitHub页面:https://github.com/harpalsahota/bbaug。该包还提供了一些有用的功能,比如定制策略的可能性,以及位于图像外部的边界框,如果它们部分位于图像外部,yT则会被自动删除或剪切。例如,在下面的图像中,应用了平移增强,将边界框部分推到图像外部。你可以看到新的边界框已经缩小以适应这一点。
也可以创建只影响边界框区域的增强。在下图中,solarisaugmentation只应用于边界框区域:
用随机策略增加单个图像有多容易?就像这样简单:
from bbaug import policies # select policy v0 set &nbsorp;aug_policy = policies.policies_v0() # instantiate the policy container with the selected policy set policy_container = policies.PolicyContainer(aug_chpolicy) # select a random policy from the policy set random_policy = policy_container.select_random_policy() # Apply the augmentati的物on. Returns the augmented image and bounding boxes. # Image is a numpy array of the image # Bounding boxes is a list体检 of list of bounding boxes in pixels (int). # e.g. [[x_min, y_min, x_man, y_max], [x_min, y_min, x_man, y_max]] # Labels are&测包nbsp;the class labels for the bounding boxes as an iterable of ints e.g. [1,0] img_aug, bbs_aug = policy_container.apply_augmentation(random_policy,围框 image, bounding_boxes, labels) # image_aug: numpy array of the augmented image # bbs_aug: numpy array of augmneted bounding boxes 数据;in format: [[label, x_min, y_min, x_man, y_max],...] 总结
该包实现了谷歌Brain Team推导出的增强策略。目前,已经实现了所有4个策略,该包还附带了notebooks,以帮助用户将这些策略集成到他们的PyTorch训练pipeline中。
Tags:
相关文章
OpenAI 联手高通联发科研发手机芯片,立讯精密斩获独家代工并定于2028年量产
热点知名行业分析师郭明錤近日透露,人工智能巨头 OpenAI 正计划深度介入硬件底层生态,联合移动芯片双雄高通(Qualcomm)与联发科(MediaTek)共同开发专用手机芯片,并选定立讯精密作为独家制...
【热点】
阅读更多标签: 英伟达 黄仁勋 AI 卡内基梅隆大学
热点云梦级5月11日云梦级消息,据《商业内幕》报道,英伟达创始人兼 CEO 黄仁勋最近出席卡内基梅隆大学 2026 年毕业典礼演讲,强调 AI 将为人类整体带来积极影响,即将走出校园、踏入职场的应届生们也...
【热点】
阅读更多Python中组合分类和回归的神经网络模型
热点Python中文社区 (ID:python-china) 某些预测问题需要为同一输入预测数字值和类别标签。一种简单的方法是在同一数据上开发回归和分类预测模型,然后依次使用这些模型。另一种通常更有效的方...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.remit.co.jp/id/?s=小旋风万能蜘蛛池【tg:seogoogle987】,1YA
- https://www.nissin.com/jp/search/?cat=105&q=小旋风万能蜘蛛池【tg:seogoogle987】,a7B
- https://www.lenovo.com/gb/en/search?action=SEARCH&text=小旋风万能蜘蛛池【tg:seogoogle987】,QkL
- https://www.shopping.com/search.html?keyword=小旋风万能蜘蛛池【tg:seogoogle987】,hMs
- https://www.tailoy.com.pe/catalogsearch/result/?q=小旋风万能蜘蛛池【tg:seogoogle987】,8rb
- https://www.rockngem.com/?action=CHECK&s=小旋风万能蜘蛛池【tg:seogoogle987】,ZXZ
- https://www.lindseymedicalsupply.com/search/小旋风万能蜘蛛池【tg:seogoogle987】,P3H
- https://www.openstreetmap.org/search?query=小旋风万能蜘蛛池【tg:seogoogle987】,Nhp
- https://www.randjleather.co.uk/index.php?route=product/search&tag=小旋风万能蜘蛛池【tg:seogoogle987】,6QP
- https://zhidao.baidu.com/index/?action=QUERY&word=小旋风万能蜘蛛池【tg:seogoogle987】,Yas
- https://www.rostaing.com/catalogsearch/result/?cat=22&q=小旋风万能蜘蛛池【tg:seogoogle987】,V2I
- https://www.umc.edu/search.aspx?ID=I4gnDKRS991MFcIDDzoYze4aWSAszAm7&q=小旋风万能蜘蛛池【tg:seogoogle987】,iSP
- https://www.sogou.com/web?query=小旋风万能蜘蛛池【tg:seogoogle987】,dBR
- https://www.ushmm.org/search/results/?ID=8s0587Oi8UTv74zPPM4fuhwjNpe2hsEE&q=小旋风万能蜘蛛池【tg:seogoogle987】,5wB
- https://www.xvideos.com/tags/小旋风万能蜘蛛池【tg:seogoogle987】,3aZ
- https://www.seforall.org/search?keywords=小旋风万能蜘蛛池【tg:seogoogle987】,Qdx
- https://www.voices.com/talents/search?keywords=小旋风万能蜘蛛池【tg:seogoogle987】,3mp
- https://www.scivee.tv/?s=小旋风万能蜘蛛池【tg:seogoogle987】,Xqo
- https://jihoon471.cafe24.com/product/search.html?banner_action=&keyword=小旋风万能蜘蛛池【tg:seogoogle987】HXi
- https://www.teamlab.art/?submit=小旋风万能蜘蛛池【tg:seogoogle987】,kig
- https://www.maafushidive.com?collections?vendors?q=小旋风万能蜘蛛池【tg:seogoogle987】,pFV
- https://hsmoa.com/search?query=小旋风万能蜘蛛池【tg:seogoogle987】zZf
- https://blvdseafood.com/?s=小旋风万能蜘蛛池【tg:seogoogle987】NHK
- https://www.goodreads.com/quotes/tag/小旋风万能蜘蛛池【tg:seogoogle987】TXT
- https://xn--lgernevedlystskoven-lxb.dk/search/小旋风万能蜘蛛池【tg:seogoogle987】,4f4
- https://www.target.com/s?searchTerm=小旋风万能蜘蛛池【tg:seogoogle987】,XRl
- https://www.wattpad.com/search/小旋风万能蜘蛛池【tg:seogoogle987】znZ
- https://www.xbiao.com/search/index?tpf&wd=小旋风万能蜘蛛池【tg:seogoogle987】,cWN
- https://www.abbreviations.com/小旋风万能蜘蛛池【tg:seogoogle987】ka8
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=小旋风万能蜘蛛池【tg:seogoogle987】,0jz
- https://www.kaskus.co.id/search?q=小旋风万能蜘蛛池【tg:seogoogle987】,9iK
- https://www.realsporting.com/buscador?buscar=小旋风万能蜘蛛池【tg:seogoogle987】,hoz
- https://www.resopal.de/catalogsearch/result/?action=SEARCH&q=小旋风万能蜘蛛池【tg:seogoogle987】,Dgp
- https://www.kelsa.co.uk/catalogsearch/result/index/?T=1686132119291&q=小旋风万能蜘蛛池【tg:seogoogle987】,3S2
- https://www.madebyoranges.com/nl/search/小旋风万能蜘蛛池【tg:seogoogle987】,09U
- https://www.nyif.com/catalogsearch/result/index/?f=sarbanesoxleyU&index=me_cms_pe&lit=20&mode=list&p=1&q=小旋风万能蜘蛛池【tg:seogoogle987】,crd
- https://5gaa.org/?token=6e2l7hjt2i26gzgctgwdrv7v0j6nxorq&s=小旋风万能蜘蛛池【tg:seogoogle987】x6Y
- https://www.manga-news.com/index.php/recherche/?q=小旋风万能蜘蛛池【tg:seogoogle987】,y8l
- https://www.wellbees.com/index.php/catalogsearch/result/index/?q=小旋风万能蜘蛛池【tg:seogoogle987】,7Td
- https://www.remit.co.jp/vi/?s=小旋风万能蜘蛛池【tg:seogoogle987】FBi
- https://www.wikiart.org/pt/Search/小旋风万能蜘蛛池【tg:seogoogle987】,OGG
- https://www.totolink.vn/search/小旋风万能蜘蛛池【tg:seogoogle987】,DDm
- https://m.shoppinghow.kakao.com/m/search/q/小旋风万能蜘蛛池【tg:seogoogle987】3xh
- https://www.teamlab.art/zh-hans/?submit=小旋风万能蜘蛛池【tg:seogoogle987】,hdF
- https://www.rollingstone.it/?ID=DVMeu3AlmzZE1cuJ2FmgmO5TSCQRb3yh&s=小旋风万能蜘蛛池【tg:seogoogle987】,OLg
- https://www.safetv.go.kr/base/search/view?searchWord=小旋风万能蜘蛛池【tg:seogoogle987】V7A
- https://www.normani.de/search?q=小旋风万能蜘蛛池【tg:seogoogle987】,y9P
- https://www.posten-portal.de/search?query=小旋风万能蜘蛛池【tg:seogoogle987】,05W
- https://www.youthforum.org/search-results?cx=4f5236218ab5e8ef9&ie=UTF-8&q=小旋风万能蜘蛛池【tg:seogoogle987】,xST
- https://www.nonsolocap.it/cap?action=SEARCH&k=小旋风万能蜘蛛池【tg:seogoogle987】,mDH