ddpm-butterflies-64 / README.md
gnokit's picture
add training script
392181e verified
metadata
license: apache-2.0
language:
  - en
library_name: diffusers

image image image image

Model Name: Unconditional Image Generator for 64x64 Butterfly Images

  • Model Version: 1.0
  • Model Description: This model is a deep learning architecture based on the UNet framework, specifically designed to generate realistic 64x64 butterfly images. The model takes random noise as input and produces butterfly images with diverse colors, shapes, and patterns.

Intended Use:

The model is intended for generating synthetic butterfly images for various purposes, including artistic design, data augmentation, and educational applications. It is not designed for generating real or identifiable butterfly species, and the generated images should not be considered as accurate representations of specific butterfly species.

Model Architecture:

The model architecture is a simple UNet architecture, which consists of an encoder and a decoder network.

from diffusers import UNet2DModel

unet = UNet2DModel(
    in_channels=3,
    sample_size=64,
    block_out_channels=(64,128,256,512),
    down_block_types=(
        "DownBlock2D",
        "DownBlock2D",
        "AttnDownBlock2D",
        "AttnDownBlock2D"
    ),
    up_block_types=(
        "AttnUpBlock2D",
        "AttnUpBlock2D",
        "UpBlock2D",
        "UpBlock2D",
    )
)

The encoder network captures the high-level features and abstract representations of the input noise. The decoder network uses the encoded features to generate the final butterfly image with a resolution of 64x64 pixels. The training process follow the tutorial guide of HuggingFace

Training Data:

The model was trained using a subset of the Smithsonian Butterfly Dataset 🤗 available on the Hugging Face model hub. The dataset contains a collection of butterfly images curated by the Smithsonian Institution. The training data was preprocessed to ensure consistent resolution and remove any identifying information or copyrighted images. The total size of the training dataset was approximately X images.

Training Script

Usage Examples:

Example Python code snippets and instructions for using the model to generate butterfly images.

from diffusers import DDPMPipeline

pipeline = DDPMPipeline.from_pretrained("gnokit/ddpm-butterflies-64", use_safetensors=True, variant="fp16").to("cuda")
images = pipeline(batch_size=4).images

for idx, img in enumerate(images):
    img.save(f"bf-{idx}.png")

license: apache-2.0 pipeline_tag: unconditional-image-generation