Python数据增强(data augmentation)库--Augmentor 使用介绍
Augmentor 使用介绍
原图
1.random_distortion(probability, grid_height, grid_width, magnitude)
最终选择参数为
p.random_distortion(probability=0.8, grid_height=3, grid_width=3, magnitude=6)
其他参数效果:
magnitude和grid_width,grid_height越大,扭曲程度越大
p.random_distortion(probability=0.6, grid_height=6, grid_width=6, magnitude=5)
p.random_distortion(probability=0.6, grid_height=6, grid_width=6, magnitude=9)
p.random_distortion(probability=0.6, grid_height=10, grid_width=10, magnitude=5)
2.random_erasing(probability, rectangle_area)
rectangle_area表示覆盖区域的比例,值越大比例越大。但是设置为1的时候并不是全覆盖,不知道为什么,反正也没必要弄清楚
p.random_erasing(1,1)
3.zoom_random(probability, percentage_area)
放大图片,然后按照percenta_area的比例对图片进行crop。
p.zoom_random(probability=1, percentage_area=0.2)
p.zoom_random(probability=1, percentage_area=0.8)
4.zoom(probability, min_factor, max_factor)
p.zoom(probability=1, min_factor=1.1, max_factor=1.5)
p.zoom(probability=1, min_factor=2, max_factor=2)
组合操作
p.rotate_random_90(probability=0.8) p.random_distortion(probability=0.8, grid_height=3, grid_width=3, magnitude=6) p.random_erasing(0.3, 0.2) p.zoom(probability=0.4, min_factor=1.1, max_factor=1.5) p.sample(6)
MARSGGBO原创
2018-4-1

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
列表的魔法
以中括号括起来,以","分隔每个元素,列表中的元素可以是数字,字符串,列表中可以嵌套列表。列表的列表中还能嵌套列表,也可以是布尔值。所有的都能放进去。 li = [1,12,9,"age",["hehe",2,"wang",["wanggang","xudong"]],"end"] print(li[4][3][1]) --- xudong --- 切片 li = [1,12,9,"age",["hehe",2,"wang",["wanggang","xudong"]],"end"] print(li[3:-1]) --- ['age', ['hehe', 2, 'wang', ['wanggang', 'xudong']]] # 取大于等于3,小于5 print(li[3:5]) --- ['age', ['hehe', 2, 'wang', ['wanggang', 'xudong']]] 支持for循环,while循环,break,continue for item in li: print(item) --- 1 12 9 age ['hehe', 2, 'wang', ['w...
- 下一篇
Java程序员发展道路图
Java程序员发展道路图如下: 加油!骚年!我的GitHub地址: https://github.com/heizemingjun 我的博客园地址: http://www.cnblogs.com/chenmingjun 我的蚂蚁笔记博客地址: http://blog.leanote.com/chenmingjun Copyright ©2018 黑泽明军 【转载文章务必保留出处和署名,谢谢!】
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- Hadoop3单机部署,实现最简伪集群
- Eclipse初始化配置,告别卡顿、闪退、编译时间过长
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- Windows10,CentOS7,CentOS8安装Nodejs环境
- 设置Eclipse缩进为4个空格,增强代码规范
- CentOS7编译安装Cmake3.16.3,解决mysql等软件编译问题
- CentOS7设置SWAP分区,小内存服务器的救世主
- CentOS6,7,8上安装Nginx,支持https2.0的开启
- Linux系统CentOS6、CentOS7手动修改IP地址
- Docker安装Oracle12C,快速搭建Oracle学习环境