Dataset Viewer
Auto-converted to Parquet
Search is not available for this dataset
image
imagewidth (px)
80
5.18k
End of preview. Expand in Data Studio

My Image Dataset

This dataset contains images in color and grayscale versions, organized into separate folders.

Dataset Structure Preview

  • color/: Original color images.
  • gray_scale/: Grayscale versions of the images.
    All images are in .jpg format and sequentially numbered (1.jpg, 2.jpg, ...).

Sample Preview

Below is a preview of the dataset with 8 images (4 color on top row, 4 grayscale on bottom row):

Sample Preview

Loading Dataset from Hugging Face

You can load this dataset directly from Hugging Face using the datasets library:

from datasets import load_dataset
from PIL import Image
import os

# Load the dataset
dataset = load_dataset("haydarkadioglu/color_gray_image_dataset")

# Access color images
color_images = dataset['train']['color']  # assuming 'train' split exists
gray_images = dataset['train']['gray_scale']

# Example: display the first color image
img_path = color_images[0]
img = Image.open(img_path)
img.show()

Note: If the dataset has only one split, replace 'train' with the appropriate split name.

Usage Example (Local)

from PIL import Image

# Load a color image locally
img_path = "dataset/color/1.jpg"
img = Image.open(img_path)
img.show()

# Load a grayscale image locally
gray_path = "dataset/gray_scale/1.jpg"
gray_img = Image.open(gray_path)
gray_img.show()
Downloads last month
51