Skip to content

Latest commit

 

History

History

diffusion

Awesome License: MIT Made With Love

Diffusion Model Tutorials

diffusion

Created by
Sakhaa Alsaedi1 and Sara Althubaiti.1
King Abdullah University of Science and Technology (KAUST)1

This repository contains code for building a diffusion model to compress the FossilNET dataset and generate imges. This can generally be useful for high quality samples, or for model diversity.

Introduction

Diffusion models are a type of generative model used in machine learning to generate data that is similar to the data on which they are trained . They work by adding noise to the available training data and then gradually reducing the noise until the generated data closely resembles the training data. Diffusion models are a rising class of generative models because of their power-generating ability and tractability . They can also improve upon existing generative models, such as Generative Adversarial Networks (GANs), by being less reliant on adversarial training.

diffusion

Building the Diffusion Model steps:

Dataset 🐚 (Notebook 1)

We will be using the FossilNET Image dataset that had been collected and curated by Matt Hall and consists of 3000 colour images at 224x224 resolution, split over 10 classes:

  • Ammonites
  • Bivalues
  • Corals
  • Dinosaurs
  • Echinoderms
  • Fishes
  • Forams
  • Gastropods
  • Plants
  • Trilobites

MNIST-Dataset (Notebook 2)

Recognizing the Digits from 0-9 using their pixel values as attributes, using Deep Learning Model to Classify the Digits. The original dataset is in a format that is difficult for beginners to use. This dataset uses the work of Joseph Redmon to provide the MNIST dataset in a CSV format. The mnist_train.csv file contains the 60,000 training examples and labels. The mnist_test.csv contains 10,000 test examples and labels. Each row consists of 785 values: the first value is the label (a number from 0 to 9) and the remaining 784 values are the pixel values (a number from 0 to 255).

The dataset consists of two files:

  • Mnist_train.csv
  • Mnist_test.csv
  • Mnist_train.csv

Getting the data

  • Utilize the dataloader_fossilnet.py script in the notebook 1.
  • Use MNIST dataset loader from PyTorch in the notebook 2.

Dependencies

Google Colab provides all the necessary dependencies for running the code in this repository. You do not need to install any additional packages.

Scripts 👾

Notebook Open in Colab
Notebook 1 Open In Colab
Notebook 2 Open In Colab
  • ▬▬▬▬▬▬ Resources and Materials ▬▬▬▬▬▬
  • ▬▬▬▬▬▬▬ Papers ▬▬▬▬▬▬▬
  • Papers on Diffusion models ([Dhariwal, Nichol, 2021], [Ho et al., 2020] ect.)
  • DDPM
  • DDPM Improved