图像预处理
文章平均质量分 67
图像预处理
何如千泷
这个作者很懒,什么都没留下…
展开
-
图像增强之PIL库实现
from PIL import Image, ImageEnhanceimport matplotlib.pyplot as pltimport numpy as npimport randomimport math# 读入图片img = Image.open('img/bear.png')# 显示图片plt.imshow(img)<matplotlib.image.AxesImage at 0x7ffa922bac10>def show_compare(src_i原创 2021-11-22 23:30:02 · 1333 阅读 · 0 评论 -
利用transforms Dataset DataLoader对图像数据进行处理并构建自己的数据集
1. torchvision.transforms在CV任务中,可以用此对图像进行预处理,数据增强等操作1.1 Transforms on Imageimport torchvision.transforms as transformsfrom PIL import Imageimg = Image.open('lena.png')img = img.convert("RGB")imgwidth, height = img.sizeprint(width, height)132原创 2021-04-17 15:32:20 · 3226 阅读 · 7 评论