|
--- |
|
library_name: diffusers |
|
license: cc-by-4.0 |
|
pipeline_tag: unconditional-image-generation |
|
--- |
|
|
|
# ddpm-spots-10-leopard |
|
|
|
This model is part of my work for my [Freshman Seminar](https://www.teach.ustc.edu.cn/?attachment_id=17309) |
|
of my university. |
|
|
|
It is an unconditional image generation model that outputs a $32\times 32$ grayscale image |
|
similar to those of 'leopard' category from the [SPOTS-10](https://github.com/Amotica/SPOTS-10) dataset. |
|
|
|
|
|
## Uses |
|
|
|
```py |
|
from diffusers import DDPMPipeline |
|
pipeline = DDPMPipeline.from_pretrained( |
|
"xinchengo/ddpm-spots-10-leopard", |
|
).to("cuda") |
|
image = pipeline().images[0] |
|
image |
|
``` |
|
|
|
## Training Details |
|
|
|
### Training Data |
|
|
|
the images labelled 'leopard' in the [SPOTS-10](https://github.com/Amotica/SPOTS-10) dataset |
|
|
|
### Training Procedure |
|
|
|
Mainly with [the procedure in the Diffusers tutorial](https://huggingface.co/docs/diffusers/tutorials/basic_training#train-a-diffusion-model) with a few modifications. |
|
|
|
|
|
### Training Hyperparameters |
|
|
|
```py |
|
from dataclasses import dataclass |
|
|
|
@dataclass |
|
class TrainingConfig: |
|
image_size = 32 |
|
train_batch_size = 64 |
|
eval_batch_size = 16 |
|
num_epochs = 50 |
|
gradient_accumulation_steps = 1 |
|
learning_rate = 1e-4 |
|
lr_warmup_steps = 500 |
|
save_image_epochs = 10 |
|
save_model_epochs = 10 |
|
mixed_precision = "fp16" |
|
output_dir = "ddpm-spots-10-leopard" |
|
|
|
push_to_hub = True |
|
hub_model_id = "xinchengo/ddpm-spots-10-leopard" |
|
hub_private_repo = None |
|
overwrite_output_dir = True |
|
seed = 0 |
|
``` |