- Practical Computer Vision
- Abhinav Dadhich
- 164字
- 2021-06-30 18:54:46
CIFAR-10
Though MNIST is one of the easiest datasets to get started, the lack of color images makes it less appealing for tasks that require a colored dataset. A slight more complex dataset is CIFAR-10 by Alex and others[1], which consists of 10 categories of images with 60,000 training images and 10,000 test images, uniformly from each category. The size of each image is 32 x 32 and each has three color channels. This dataset can also be easily loaded in Keras, as follows:
from __future__ import print_function
from keras.datasets import cifar10
import matplotlib.pyplot as plt
# Download and load dataset
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
labels = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
# to know the size of data
print("Train data shape:", x_train.shape, "Test data shape:", x_test.shape)
# plot sample image
idx = 1500
print("Label:",labels[y_train[idx][0]])
plt.imshow(x_train[idx])
plt.axis('off')
plt.show()
The labels, in order, are: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, and truck.
推薦閱讀
- Oracle SOA Governance 11g Implementation
- 并行數(shù)據(jù)挖掘及性能優(yōu)化:關(guān)聯(lián)規(guī)則與數(shù)據(jù)相關(guān)性分析
- 計算機原理
- Java開發(fā)技術(shù)全程指南
- 計算機系統(tǒng)結(jié)構(gòu)
- Implementing Oracle API Platform Cloud Service
- Windows Server 2003系統(tǒng)安全管理
- Containers in OpenStack
- Bayesian Analysis with Python
- 基于Proteus的單片機應(yīng)用技術(shù)
- 運動控制系統(tǒng)(第2版)
- Java求職寶典
- Getting Started with Tableau 2019.2
- 信息系統(tǒng)安全保障評估
- Apache Spark Machine Learning Blueprints