1、The CIFAR-10 dataset
数据集:The CIFAR-10 and CIFAR-100标记为8000万微型图片
收集者: Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton.
格式:60000 32*32 colour images in 10 classes 、 6000 images per class.
training images(5 batch):50000、 test images(1):10000.
可视化观察一下:
airplane | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
automobile | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
bird | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
cat | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
deer | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
dog | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
frog | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
horse | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
ship | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
truck | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
数据集布局(Dataset layout(Python))
包含:data_batch_1, data_batch_2, ...,data_batch_5, 和test_batch 6个文件,文件中的每一个都是用cPickle生成的Python“pickle”对象。
下面是一个python2例程,它将打开这样一个文件并返回一个字典:
def unpickle(file):
import cPickle
with open(file, 'rb') as fo:
dict = cPickle.load(fo)
return dict
使用这种方式加载,成功后,每个文件下包含下列元素的字典:
1) data -- a 10000x3072 numpy array of uint8s.
以行为主存储方式,每一行存储一个 32x32 colour image. 前1024存red channel values the next 1024 : green, final 1024: the blue.
2) labels -- 值为0-9的10000 个值的列表.
索引为i即第i个图像的标签。
文件batches.meta包含字典元素:
- label_names -- 一个包含10个元素的列表,每一个值对应着labels中的实际意义,例如: label_names[0] == "airplane", label_names[1] == "automobile", 等。
使用案例:
#转化至范围【-1,1】
transform = transforms.Compose(
[transforms.ToTensor(), transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
trainset = torchvision.datasets.CIFAR10(root='./data', train=True,download=True, transform=transform)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4,shuffle=True, num_workers=2)
testset = torchvision.datasets.CIFAR10(root='./data', train=False,download=True, transform=transform)
testloader = torch.utils.data.DataLoader(testset, batch_size=4, shuffle=False, num_workers=2)
classes = ('plane', 'car', 'bird', 'cat','deer', 'dog', 'frog', 'horse', 'ship', 'truck')
2、人脸名人数据集CelebA
202599张面部图片
10177个identity(1000val_19962、985test_19867、8192train_162770)
5个landmark locations
40 binary attributes
文件夹及其下的文件
Anno:
list_attr_celeba
list_bbox_celeba
list_landmarks_align_celeba
list_landmarks_celeba
l list_attr_celeba
First Row: number of images
Second Row: attribute names
Restof the Rows: <image_id> <attribute_labels>
具体:202599.jpg*40个属性(以1,-1)标记
注意:
1.属性标签的顺序符合属性名称的顺序;
2.在属性标签中,“1”表示正数,“-1”表示负数。
Il list_bbox_celeba
FirstRow: number of images
SecondRow: entry names
Rest of the Rows: <image_id> <bbox_locations>
具体:image_id x_1 y_1width height
202599.jpg *4
注意:
1. bbox标签的顺序符合条目名称的顺序;
2.在bbox位置,“x_1”和“y_1”代表边界框的左上点坐标,“width”和“height”代表边界框的宽度和高度。边界框位置按[x_1,y_1,宽度,高度]的顺序列出。
III list_landmarks_align_celeba
First Row:number of images
Second Row:landmark names
Rest of theRows: <image_id> <landmark_locations>
具体:
lefteye_xlefteye_y righteye_x righteye_y nose_x nose_y leftmouth_x leftmouth_yrightmouth_x rightmouth_y
202599* 10
IV list_landmarks_celeba
First Row:number of images
Second Row:landmark names
Rest of theRows: <image_id> <landmark_locations>
具体:lefteye_xlefteye_y righteye_x righteye_y nose_x nose_y leftmouth_x leftmouth_y rightmouth_xrightmouth_y
202599*10
注意:
1.地标位置的顺序符合地标名称的顺序;
2.“list_landmarks_celeba.txt”中的地标位置基于野内图像的坐标;
3.“list_landmarks_align_celeba.txt”中的地标位置基于对齐和裁剪图像的坐标
Eval:
l list_eval_partition
All Rows: <image_id> <evaluation_status>
具体:202599*1(0,1,2中一个)
评价分区(Eval /list_eval_partition.txt)
分别用于培训、验证和测试的图像id
注意:
1.在评估状态下,“0”表示训练图像,“1”表示验证图像,“2”表示测试图像;
2.人脸图像的身份不会在此数据集分区中重叠;
3.在我们的ICCV 2015论文中,“LNets +ANet”使用野外图像进行训练,而“FaceTracer”和“PANDA-l”使用对齐和裁剪图像进行训练;
4.请参阅文章“野外深度学习面部属性”了解更多详情。
Img:
img_celeba.7z:web上下载的原图片
Align&Cropped Images:
img_align_celeba.zip: JPG
img_align_celeba_png.7z: PNG
1.首先根据两个眼睛位置使用相似性变换粗略地对齐图像;
2.然后将图像调整为218 * 178;
Identity:
Image_id pople_id
Notes:
1. The face identities are released uponrequest for research purposes only. Please contact us for details;
2. There are no identity overlappingbetween CelebA dataset and LFW dataset.
##############################继续学习ing######################################