
datasets
BJRSR
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
cifar10 cifar100 svhn 数据抽取
cifar10import osimport _pickle as cPickleimport numpy as npdef load_cifar10(data_dir='../data/'): def load_cifar_batches(filenames): if isinstance(filenames, str): filenames = [filenames] images = [] labels = .原创 2021-04-20 10:18:11 · 380 阅读 · 1 评论 -
判断是否为图像文件
def is_image_file(fileName): ls = [fileName.endswith(extension) for extension in ['.jpg', '.png', '.jpeg']] print(ls) print(any(ls))fileName = '01.jpg'is_image_file(fileName)原创 2021-03-30 09:41:35 · 592 阅读 · 0 评论 -
BSD500数据集下载和处理
首先,用urllib获取数据,写个压缩包文件,把数据存进去,解压压缩包文件,形成带有数据的目录。from os.path import exists, basename, joinfrom os import makedirs, removefrom six.moves import urllibimport tarfileclass download_basd300(object): def __init__(self, dest="dataset"): sel.原创 2021-03-30 09:23:56 · 2044 阅读 · 1 评论 -
BSD500数据集处理
from os.path import exists, join, basenamefrom os import makedirs, removefrom six.moves import urllibimport tarfilefrom torchvision.transforms import Compose, CenterCrop, ToTensor, Resizefrom dataset import DatasetFromFolderdef download_bsd300(de.原创 2021-03-30 09:03:20 · 846 阅读 · 0 评论