Load sample images for image manipulation.
Loads both, china and flower.
Read more in the User Guide.
Bunch
Dictionary-like object, with the following attributes.
The two sample image.
The filenames for the images.
The full description of the dataset.
To load the data and visualize the images:
>>> from sklearn.datasets import load_sample_images
>>> dataset = load_sample_images()
>>> len(dataset.images)
2
>>> first_img_data = dataset.images[0]
>>> first_img_data.shape
(427, 640, 3)
>>> first_img_data.dtype
dtype('uint8')
© 2007–2025 The scikit-learn developers
Licensed under the 3-clause BSD License.
https://scikit-learn.org/1.6/modules/generated/sklearn.datasets.load_sample_images.html