您现在的位置是:热点 >>正文
BBAug: 一个用于PyTorch的物体检测包围框数据增强包
热点048402人已围观
简介...
像许多神经网络模型一样,目标检测模型在训练大量数据时效果最好。通常情况下,可用的数据有限,世界各地的许多研究人员正在研究增强策略,以增加可用的数据量。谷歌的大脑团队进行了一项这样的研究,并发表在了一篇论文中,名为Learning Data Augmentation Strategies for Object Detection。在这篇论文中,作者确定了一组增强称为策略,它对目标检测问题表现良好。该策略通过增强搜索获得,提高了通用模型的性能。
作者将增强策略定义为一组子策略。BB在模型进行训练时,随机选择其中一个子策略用于增强图像。在每个子策略中都有要依次应用于图像的增强。每个转换也有两个超参数:概率和幅度。概率表示该增强将被应用的可能性,而幅度表示该增强的程度。下面的代码显示了本文中使用的策略:
policy = [ [('TranslateX_BBox', 0.6, 4), ('EqualAuize', 0.8, 10)], [('TranslateY_Only_BBoxes', 0.2, 2), ('Cutout', 0.8, 8)], [('Sharpness', 0.0, 8), ('ShearX_BBox', 0.g: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  or;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 augment的物ation. Returns the augmented image and bounding boxes. # Image is a numpy array of the image # Bounding boxes is a lis体检t 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 a测包re 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_poli围框cy, image, bounding_boxes, labels) # image_aug: numpy array of the augmented image # bbs_aug: numpy array of augmneted bounding boxe数据s in format: [[label, x_min, y_min, x_man, y_max],...] 总结
该包实现了谷歌Brain Team推导出的增强策略。目前,已经实现了所有4个策略,该包还附带了notebooks,以帮助用户将这些策略集成到他们的PyTorch训练pipeline中。
Tags:
相关文章
标签: 豆包手机助手 AI操作手机 金融类应用限制
热点云梦级12月5日云梦级消息,12月5日,“豆包手机助手”账号发文称,团队将在接下来的一段时间,在部分场景,对AI操作手机的能力做一些规范化调整。包括但不限于对限制刷分、刷激励的使用场景进行能力限制,进...
【热点】
阅读更多AI 摘要与社交媒体双重夹击:维基百科人工流量骤降8% 敲响警钟
热点长期以来被誉为“互联网绿洲”的维基百科,正面临着来自生成式人工智能和社交媒体的严峻挑战。维基媒体基金会(Wikimedia Foundation)的马歇尔·米勒(Marshall Miller)在一篇...
【热点】
阅读更多标签: 宏明电子 深交所 创业板 阻容元器件
热点云梦级12月26日云梦级消息,成都宏明电子股份有限公司(简称:“宏明电子”)日前通过注册,准备在深交所创业板上市。宏明电子主要从事以阻容元器件为主的新型电子元器件的研发、生产和销售,致力于向客户提供高...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.xbiao.com/search/index?tpf&wd=谷歌留痕外推【tg:seogoogle987】,DeJ
- https://www.lauben.com/en/?action=SEARCH&s=谷歌留痕外推【tg:seogoogle987】,nLp
- https://www.remit.co.jp/ne/?s=谷歌留痕外推【tg:seogoogle987】,6SV
- https://www.nonsolocap.it/cap?action=SEARCH&k=谷歌留痕外推【tg:seogoogle987】,oNR
- https://www.televes.com/es/catalogsearch/result/?q=谷歌留痕外推【tg:seogoogle987】,Ew0
- https://www.voices.com/talents/search?keywords=谷歌留痕外推【tg:seogoogle987】,K82
- https://search.danawa.com/dsearch.php?query=谷歌留痕外推【tg:seogoogle987】VMT
- https://www.rea.govt.nz/search?searchterm=谷歌留痕外推【tg:seogoogle987】,YRu
- https://www.sweat.com/collections/vendors?q=谷歌留痕外推【tg:seogoogle987】,REv
- https://www.world-architects.com/en/search?term=谷歌留痕外推【tg:seogoogle987】,H9Y
- https://www.youtube.com/hashtag/谷歌留痕外推【tg:seogoogle987】,h02
- https://www.kelsa.co.uk/catalogsearch/result/index/?T=1686132119291&q=谷歌留痕外推【tg:seogoogle987】,O4y
- https://wwwcp.umes.edu/search/谷歌留痕外推【tg:seogoogle987】,fHq
- https://www.teamlab.art/ko/?submit=谷歌留痕外推【tg:seogoogle987】,JSe
- https://www.partilerdunyasi.com/index.php?route=product/search&tag=谷歌留痕外推【tg:seogoogle987】,XrI
- https://www.wheels24.gr/?action=CHECK&s=谷歌留痕外推【tg:seogoogle987】,2GI
- https://www.remit.co.jp/vi/?s=谷歌留痕外推【tg:seogoogle987】GpW
- https://www.sic-info.org/vi/?s=谷歌留痕外推【tg:seogoogle987】,og9
- https://www.lechzuers.com/de/search?cat=163&q=谷歌留痕外推【tg:seogoogle987】,bKY
- https://store.line.me/search/sticker/ja?q=谷歌留痕外推【tg:seogoogle987】hlP
- https://www.smarty.net/search?q=谷歌留痕外推【tg:seogoogle987】,oQM
- https://www.luxurysociety.com/en/search?q=谷歌留痕外推【tg:seogoogle987】,qiR
- https://yscc1986.net/search/谷歌留痕外推【tg:seogoogle987】WcN
- https://www.umc.edu/search.aspx?ID=I4gnDKRS991MFcIDDzoYze4aWSAszAm7&q=谷歌留痕外推【tg:seogoogle987】,ipp
- https://www.ussalabama.com/?action=CHECK&s=谷歌留痕外推【tg:seogoogle987】,Dlv
- https://5gaa.org/?token=6e2l7hjt2i26gzgctgwdrv7v0j6nxorq&s=谷歌留痕外推【tg:seogoogle987】7d8
- https://jihoon471.cafe24.com/product/search.html?banner_action=&keyword=谷歌留痕外推【tg:seogoogle987】cwF
- https://www.nextavenue.org/?action=QUERY&s=谷歌留痕外推【tg:seogoogle987】,hiI
- https://www.kissthekangaroo.com.au/index.php?route=product/search&tag=谷歌留痕外推【tg:seogoogle987】,xDW
- https://www.openstreetmap.org/search?query=谷歌留痕外推【tg:seogoogle987】,o2q
- https://www.pixiv.net/tags/谷歌留痕外推【tg:seogoogle987】,pHY
- https://www.teacherspayteachers.com/Browse/Price-Range/Free/Search:谷歌留痕外推【tg:seogoogle987】,98K
- https://www.remit.co.jp/vi/?s=谷歌留痕外推【tg:seogoogle987】,hG1
- https://www.youm7.com/Home/Search?allwords=谷歌留痕外推【tg:seogoogle987】,GeT
- https://www.nytimes.com/search?dropmab=true&query=谷歌留痕外推【tg:seogoogle987】,CYp
- https://www.prattlibrary.org/search?q=谷歌留痕外推【tg:seogoogle987】,cUU
- https://www.otakuninjahero.com/en/search/谷歌留痕外推【tg:seogoogle987】,tqW
- https://www.klatreverden.no/search?q=谷歌留痕外推【tg:seogoogle987】,AnR
- https://www.wellbees.com/catalogsearch/result/?action=CHECK&q=谷歌留痕外推【tg:seogoogle987】,J3x
- https://www.tarleton.edu/news/search/谷歌留痕外推【tg:seogoogle987】,PWt
- https://www.teamlab.art/th/?submit=谷歌留痕外推【tg:seogoogle987】,JRp
- https://www.ncetm.org.uk/search?action=CHECK&q=谷歌留痕外推【tg:seogoogle987】,1mf
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=谷歌留痕外推【tg:seogoogle987】,L6X
- https://www.olx.ba/pretraga?trazilica=谷歌留痕外推【tg:seogoogle987】,WRk
- https://www.tumblr.com/tagged/谷歌留痕外推【tg:seogoogle987】,enS
- https://www.tcv.org.uk/search/谷歌留痕外推【tg:seogoogle987】,Zq7
- https://www.roberthalf.com/us/en/jobs/all/谷歌留痕外推【tg:seogoogle987】Kvj
- https://www.sensorshop24.de/catalogsearch/result/index/?type=132&q=谷歌留痕外推【tg:seogoogle987】,3AA
- https://www.mexperience.com/?T=1686132112324&s=谷歌留痕外推【tg:seogoogle987】,mpw
- https://www.wuv.edu/?s=谷歌留痕外推【tg:seogoogle987】,T7F