1aurent's picture
Update README.md
26e8037 verified
metadata
dataset_info:
  features:
    - name: url
      dtype: string
    - name: ai_description
      dtype: string
    - name: palettes
      struct:
        - name: '1'
          dtype:
            array2_d:
              shape:
                - 1
                - 3
              dtype: uint8
        - name: '2'
          dtype:
            array2_d:
              shape:
                - 2
                - 3
              dtype: uint8
        - name: '3'
          dtype:
            array2_d:
              shape:
                - 3
                - 3
              dtype: uint8
        - name: '4'
          dtype:
            array2_d:
              shape:
                - 4
                - 3
              dtype: uint8
        - name: '5'
          dtype:
            array2_d:
              shape:
                - 5
                - 3
              dtype: uint8
        - name: '6'
          dtype:
            array2_d:
              shape:
                - 6
                - 3
              dtype: uint8
        - name: '7'
          dtype:
            array2_d:
              shape:
                - 7
                - 3
              dtype: uint8
        - name: '8'
          dtype:
            array2_d:
              shape:
                - 8
                - 3
              dtype: uint8
  splits:
    - name: train
      num_bytes: 28536733
      num_examples: 24998
  download_size: 4159745
  dataset_size: 28536733
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
license: other
license_name: unsplash-commercial
license_link: https://github.com/unsplash/datasets/blob/master/DOCS.md
task_categories:
  - text-to-image
  - image-to-text
language:
  - en
tags:
  - unsplash
  - v1.2.1
pretty_name: Unsplash Lite w/ Palettes
size_categories:
  - 10K<n<100K
source_datasets:
  - 1aurent/unsplash-lite

The Unsplash Lite Dataset (v1.2.1) with color palettes

The Lite dataset contains all of the same fields as the Full dataset, but is limited to ~25,000 photos. It can be used for both commercial and non-commercial usage, provided you abide by the terms.

The Unsplash Dataset is made available for research purposes. It cannot be used to redistribute the images contained within. To use the Unsplash library in a product, see the Unsplash API.

This subset of the dataset contains only urls to the images, their descriptions generated from an AI service, and 8 palettes (generated using okolors).

To download the images from the urls, you may do something like this:

from datasets import load_dataset, DownloadManager, Image

ds = load_dataset("1aurent/unsplash-lite-palette")

def download_image(url: str | list[str]) -> str | list[str]:
  dl_manager = DownloadManager()
  filename = dl_manager.download(url)
  return {"image": filename}

ds = ds.map(
  function=download_image,
  input_columns=["url"],
  batched=True,
  num_proc=6,
)
ds = ds.cast_column(
  column="image",
  feature=Image(),
)