您的位置:首页 > 教育 > 锐评 > 网站运维是做什么的_华为企业解决方案_软文营销的案例_百度竞价被换着ip点击

网站运维是做什么的_华为企业解决方案_软文营销的案例_百度竞价被换着ip点击

2025/4/18 12:20:38 来源:https://blog.csdn.net/2401_88870554/article/details/143838217  浏览:    关键词:网站运维是做什么的_华为企业解决方案_软文营销的案例_百度竞价被换着ip点击
网站运维是做什么的_华为企业解决方案_软文营销的案例_百度竞价被换着ip点击

想要训练出效果好的模型,高质量的数据集必不可少。深度学习的经典数据集包括MNIST手写数字数据集、Fashion MNIST数据集、CIFAR-10和CIFAR-100数据集、ILSVRC竞赛的ImageNet数据集、用于检测和分割的PASCAL VOC和COCO数据集等,本文将对这些数据集进行介绍。

1.MNIST

MNIST数据集包含了60000个训练集和10000个的测试集,每个手写数字的图像的大小均为28*28。MNIST手写数字数据集的官网地址:

http://yann.lecun.com/exdb/mnist/

数据集的导入:

from tensorflow.keras.datasets import mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
print(x_train.shape, y_train.shape, x_test.shape, y_test.shape)#输出结果
(60000, 28, 28) (60000,) (10000, 28, 28) (10000,)

可视化展示0-9这十个数字: 

import matplotlib.pyplot as plt
import numpy as np
plt.figure(figsize=(12,8))
for i in range(10):    plt.subplot(2,5,i+1)    plt.xticks([])    plt.yticks([])    img = x_train[y_train == i][0].reshape(28, 28)    plt.imshow(img, cmap=plt.cm.binary)

2.Fashion MNIST

Fashion MNIST是时尚穿戴品的数据集,包含了10类,共计70000张图像,整体数据结构跟MNIST一致,每张图像的尺寸也是28*28。数据集下载地址:

https://research.zalando.com/welcome/mission/research-projects/fashion-mnist/

数据集的导入:

from tensorflow.keras.datasets import fashion_mnist
(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()
print(x_train.shape, y_train.shape, x_test.shape, y_test.shape)#输出结果
(60000, 28, 28) (60000,) (10000, 28, 28) (10000,)

可视化展示10种类别:

class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
plt.figure(figsize=(12,8))
for i in range(10):    plt.subplot(2,5,i+1)    plt.xticks([])    plt.yticks([])    plt.grid(False)    img = x_train[y_train == i][0].reshape(28, 28)    plt.imshow(x_train[i], cmap=plt.cm.binary)    plt.xlabel(class_names[y_train[i]])

3.CIFAR-10

CIFAR-10是一个用于识别普适物体的彩色图像数据集。一共包含10种类别的RGB彩色图片:飞机( airplane)、汽车(automobile)、鸟类(bird)、猫(cat)、鹿(deer)、狗(dog)、蛙类(frog)、马(horse)、船(ship)和卡车(truck)。 数据集下载地址如下:

https://www.cs.toronto.edu/~kriz/cifar.html

数据集的导入: 

from tensorflow.keras.datasets import cifar10
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
print(x_train.shape, y_train.shape, x_test.shape, y_test.shape)#输出结果
(50000, 32, 32, 3) (50000, 1) (10000, 32, 32, 3) (10000, 1)

可视化展示如下:

plt.figure(figsize=(12,8))
for i in range(10):    plt.subplot(2,5,i+1)    plt.xticks([])    plt.yticks([])    plt.grid(False)    plt.imshow(x_train[i], cmap=plt.cm.binary)

4.CIFAR-100

CIFAR-100将类别扩大到100个类,每个类包含了600张图像,分别有500张训练图像和100张测试图像。数据集下载地址:

https://www.cs.toronto.edu/~kriz/cifar.html

数据集的导入:

from tensorflow.keras.datasets import cifar100
(x_train, y_train), (x_test, y_test) = cifar100.load_data()
print(x_train.shape, y_train.shape, x_test.shape, y_test.shape)#输出结果
(50000, 32, 32, 3) (50000, 1) (10000, 32, 32, 3) (10000, 1)

可视化展示如下:

plt.figure(figsize=(12,8))
for i in range(100):    plt.subplot(10,10,i+1)    plt.xticks([])    plt.yticks([])    plt.grid(False)    plt.imshow(x_train[i], cmap=plt.cm.binary)

5.ImageNet

ImageNet图像数据集是在2009年由斯坦福的项目形成的一个数据集。目前ImageNet中总共有14197122张图像,分为21841个类别,数据地址为:

http://www.image-net.org/

ImageNet数据集示例:

6.PASCAL VOC

PASCAL VOC最初主要用于目标检测,目前PASCAL VOC主要分为VOC2007和VOC2012两个版本的数据集。数据集下载地址:

http://host.robots.ox.ac.uk/pascal/VOC/

VOC数据集示例:

7.COCO

COCO数据集是微软在ImageNet和PASCAL VOC数据集标注上的基础上产生的,主要是用于图像分类、检测和分割等任务。数据包括91个类别目标,其中有82个类别的数据量都超过了5000张。数据集下载地址:

http://cocodataset.org/#home

COCO数据集示例:

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com