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.
230
1---2dataset_info:3 features:4 - name: original_image5 dtype: image6 - name: prompt7 dtype: string8 - name: transformed_image9 dtype: image10 splits:11 - name: train12 num_bytes: 604990210.013 num_examples: 99414 download_size: 60484970715 dataset_size: 604990210.016---17# Canny DiffusionDB 18 19This dataset is the [DiffusionDB dataset](https://huggingface.co/datasets/poloclub/diffusiondb) that is transformed using Canny transformation.20 21You can see samples below 👇 22 23**Sample:**24 25Original Image:2627Transformed Image:2829Caption: 30"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 "31 32Below you can find a small script used to create this dataset:33```python34 35def canny_convert(image):36 image_array = np.array(image)37 gray_image = cv2.cvtColor(image_array, cv2.COLOR_BGR2GRAY)38 edges = cv2.Canny(gray_image, 100, 200)39 edge_image = Image.fromarray(edges)40 return edge_image41 42dataset = load_dataset("poloclub/diffusiondb", split = "train")43 44dataset_list = []45for data in dataset:46 47 image_path = data["image"]48 prompt = data["prompt"]49 transformed_image_path = canny_convert(image_path)50 51 new_data = {52 "original_image": image,53 "prompt": prompt,54 "transformed_image": transformed_image,55 }56 dataset_list.append(new_data)57 58```