Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zrthxn/diffusion
A basic diffusion model to generate human faces from noise, from scratch.
https://github.com/zrthxn/diffusion
diffusion-models machine-learning
Last synced: 29 days ago
JSON representation
A basic diffusion model to generate human faces from noise, from scratch.
- Host: GitHub
- URL: https://github.com/zrthxn/diffusion
- Owner: zrthxn
- Created: 2022-11-11T17:44:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-28T02:45:28.000Z (about 1 year ago)
- Last Synced: 2023-12-29T02:41:36.133Z (about 1 year ago)
- Topics: diffusion-models, machine-learning
- Language: Python
- Homepage:
- Size: 36.4 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Diffusion Model
A basic diffusion model based on the seminal paper by [Jonathan Ho et al.](https://arxiv.org/pdf/2006.11239.pdf)
### Generated Images
These are a few examples of what this model generated after **a lot** of debugging.
### Trained Model
Find a few trained models and other things **[on HuggingFace.](https://huggingface.co/zrthxn/diffusion)**
### Dataset
[Smiling or Not Face Data](https://www.kaggle.com/datasets/chazzer/smiling-or-not-face-data)
from Kaggle.The smiling or not smiling is not relevant to me, I just want to generate a face.
I will combine all the categories of faces into one single dataset.## Usage
Installation
```bash
pipenv shell
pipenv install
```Download Dataset
```bash
git clone https://huggingface.co/datasets/zrthxn/SmilingOrNot data/faces
unzip data/faces/Archive.zip -d data/faces
```Dryrun Sanity Check
```bash
python main.py train --dryrun
```Full Training
```bash
python main.py train \
--batch_size=128 \
--device=cuda \
--lr=0.001 \
--epochs=100
```## Resources
Papers
- [Denoising Diffusion Probabilistic Models](https://arxiv.org/pdf/2006.11239.pdf)
- [Deep Unsupervised Learning using Nonequilibrium Thermodynamics](https://arxiv.org/pdf/1503.03585.pdf)
- [Improved Denoising Diffusion Probabilistic Models](https://arxiv.org/pdf/2102.09672.pdf)Videos and Code
- https://www.youtube.com/watch?v=HoKDTa5jHvg
- https://www.youtube.com/watch?v=a4Yfz2FxXiY
- https://amaarora.github.io/2020/09/13/unet.html
- https://lilianweng.github.io/posts/2021-07-11-diffusion-models/
- https://colab.research.google.com/drive/1sjy9odlSSy0RBVgMTgP7s99NXsqglsUL