-
Notifications
You must be signed in to change notification settings - Fork 19.7k
Description
While training a CNN model using CIFAR-10 via "keras.datasets.cifar10.load_data()", I noticed that some images seem to have incorrect ground-truth labels. This leads to misleading training results and incorrect evaluation.
import numpy as np
import matplotlib.pyplot as plt
import keras
(X_train, Y_train), (X_test, Y_test) = keras.datasets.cifar10.load_data()
X_train = X_train / 255.0
X_test = X_test / 255.0
class_labels = ['airplane','automobile','bird','cat','deer',
'dog','frog','horse','ship','truck']
plt.figure(figsize=(12,8))
for j, i in enumerate(np.random.randint(0, 10000, 6)):
plt.subplot(2,3,j+1)
plt.imshow(X_test[i])
plt.axis('off')
plt.title(f"Actual={class_labels[Y_test[i][0]]} ({Y_test[i][0]})")
plt.show()
Some images appear to be mislabeled. For example:
An airplane image labeled as frog
A horse image labeled as cat
A ship image labeled as truck
