Skip to content

MRTater/AI6103-Project

Repository files navigation

AI6103-Project: Diffusion

Repo for AI6103 project.

Dataset

Pokemon Dataset by KVPRATAMA
Pokemon Dataset by HARSHITDWIVEDI
Face Dataset

DataLoader

- AI6103-Project
    - data
    - train.py
    - test.py
    - dataloader.py
    - ...

Data Acquisition

cd data
kaggle datasets download -d selfishgene/synthetic-faces-high-quality-sfhq-part-1
unzip selfishgene/synthetic-faces-high-quality-sfhq-part-1.zip

Environment Setting

conda create -n diffusion python=3.9
conda activate diffusion
pip install -r requirements.txt

Resize

python resize.py

Training

python train.py --batch_size 128 --img_size 64 --epochs 500 --T 300 --dataset_folder "YourPathToTheDatasetFolder"

Only --dataset_folder is required. More parameter setting details can be found in train.py.

Inferencing

python test.py --img_size 64 --model_path "YourPathToTheModel"

Only --model_path is required. More parameter setting details can be found in test.py.

Fid Computing

python -m pytorch_fid --device cuda:0 OriginalImageFolder GenerativeImageFolder

About

A small diffusion model, built based on DDPM

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •