This is an Assignment in the Seminar "Applied Hands-On Computer Vision" at HPI. It is about Denoising Diffusion Probabilistic Models (DDPM). The notebook uses a pretrained diffusion model to generate images of flowers. The weights for this model are stored in the releases section of this repo. The notebook downloads and uses these weights automatically.
The final dataset containing 128 generated images of flowers is uploaded to Huggingface:
https://huggingface.co/datasets/MatthiasCr/generated_flowers
The generated images and all metrics and metadata is logged to the following Weights & Biases project:
https://wandb.ai/matthiascr-hpi-team/diffusion_model_assessment
The notebook can be executed in Google Colab.
- Open the notebook
diffusion_models_assignment.ipynbin Colab by clicking the badge above. Execute the first cell in the notebook which contains:
import sys
# Colab-only setup
if "google.colab" in sys.modules:
print("Running in Google Colab. Setting up repo")
!git clone https://github.com/MatthiasCr/Diffusion-Models-Assignment.git
%cd Diffusion-Models-AssignmentThis clones the repo and sets it as working directory. Now the code inside the utils directory can be used by the notebook.
-
Huggingface Setup: Set a
HF_TOKEN=<your_huggingface_token>as Colab Secret so the notebook can load models and push the final dataset to huggingface. -
W&B Setup: Set the constants
WANDB_TEAM_NAMEto your W&B team name andWANDB_PROJECT_NAMEto a name for a (new) project. Execute the cell that containswandb.login()and insert your W&B token

