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条评论来说两句吧...
文章二维码
点击排行
-
Docker使用Oracle官方镜像安装(12C,18C,19C)
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- CentOS8编译安装MySQL8.0.19
- Docker快速安装Oracle11G,搭建oracle11g学习环境
- SpringBoot2配置默认Tomcat设置,开启更多高级功能
- MySQL8.0.19开启GTID主从同步CentOS8
- CentOS7,8上快速安装Gitea,搭建Git服务器
- Jdk安装(Linux,MacOS,Windows),包含三大操作系统的最全安装
- SpringBoot2编写第一个Controller,响应你的http请求并返回结果
推荐阅读
最新文章
- Jdk安装(Linux,MacOS,Windows),包含三大操作系统的最全安装
- SpringBoot2配置默认Tomcat设置,开启更多高级功能
- Springboot2将连接池hikari替换为druid,体验最强大的数据库连接池
- SpringBoot2整合MyBatis,连接MySql数据库做增删改查操作
- Hadoop3单机部署,实现最简伪集群
- Docker使用Oracle官方镜像安装(12C,18C,19C)
- MySQL8.0.19开启GTID主从同步CentOS8
- SpringBoot2编写第一个Controller,响应你的http请求并返回结果
- Windows10,CentOS7,CentOS8安装MongoDB4.0.16
- CentOS7,CentOS8安装Elasticsearch6.8.6