CoolFace
Datasetpublic

jax-diffusers-event/canny_diffusiondb

Canny DiffusionDB This dataset is the DiffusionDB dataset that is transformed using Canny transformation. You can see samples below 👇 Sample: Original Image: Transformed Image: Caption: "a small wheat field beside a forest, studio lighting, golden ratio, details, masterpiece, fine art, intricate, decadent, ornate, highly detailed, digital painting, octane render, ray tracing reflections, 8 k, featured, by claude monet and vincent van gogh " Below you can find a small script… See the full description on the dataset page: https://huggingface.co/datasets/jax-diffusers-event/canny_diffusiondb.

sourceHugging Faceupdated 3y agoView on Hugging Face
2likes30downloads
Dataset Card

Canny DiffusionDB

This dataset is the DiffusionDB dataset that is transformed using Canny transformation.

You can see samples below 👇

Sample:

Original Image: image Transformed Image: image Caption: "a small wheat field beside a forest, studio lighting, golden ratio, details, masterpiece, fine art, intricate, decadent, ornate, highly detailed, digital painting, octane render, ray tracing reflections, 8 k, featured, by claude monet and vincent van gogh "

Below you can find a small script used to create this dataset:

python

def canny_convert(image):
  image_array = np.array(image)
  gray_image = cv2.cvtColor(image_array, cv2.COLOR_BGR2GRAY)
  edges = cv2.Canny(gray_image, 100, 200)
  edge_image = Image.fromarray(edges)
  return edge_image

dataset = load_dataset("poloclub/diffusiondb", split = "train")

dataset_list = []
for data in dataset:

  image_path = data["image"]
  prompt = data["prompt"]
  transformed_image_path = canny_convert(image_path)

  new_data = {
      "original_image": image,
      "prompt": prompt,
      "transformed_image": transformed_image,
  }
  dataset_list.append(new_data)