pytorch 图像预处理 transforms数据增强方法(二
2020-02-18 本文已影响0人
米线织毛衣

一、transforms图像变换
1.transforms图像变换之pad

2.transforms图像变换之colorjitter

3,4: transforms图像变换之grayscale和RandomGrayscale(彩色图像变为灰度图)

grayscale是概率为1的RandomGrayscale
5: transforms图像变换之RandomAffine(彩色图像变为灰度图)



三个图中,中间的是x轴错切,第三个是y轴错切。
6: transforms图像变换之RandomErasing(对图片进行随机遮挡)


7: transforms图像变换之Lambda



二、transforms操作的选择


三、自定义transforms方法







四、transforms总结

五、transforms实战


