Skip to content

Commit 95fe930

Browse files
authored
Update README.md
1 parent c6a2103 commit 95fe930

1 file changed

Lines changed: 26 additions & 19 deletions

File tree

README.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<div align="center">
33

44
# Diffusion
5-
65
<a href="https://pytorch.org/get-started/locally/"><img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-ee4c2c?logo=pytorch&logoColor=white"></a>
76
<a href="https://pytorchlightning.ai/"><img alt="Lightning" src="https://img.shields.io/badge/-Lightning-792ee5?logo=pytorchlightning&logoColor=white"></a>
87
<a href="https://hydra.cc/"><img alt="Config: Hydra" src="https://img.shields.io/badge/Config-Hydra-89b8cd"></a>
@@ -14,7 +13,7 @@
1413

1514
## Description
1615

17-
What it does
16+
At first, the repo is mainly about my process of implementing basic diffusion models from scratch when I'm studying diffusion models. Then, I started researching about image restoration problem and want to apply diffusion model, more specificially, on medical image, so this repo is more like a place where I record my researching journey. I may have made some (more like a lot :>) mistakes, I will certainly happy if you let me know about it.
1817

1918
## Installation
2019

@@ -23,7 +22,7 @@ What it does
2322
```bash
2423
# clone project
2524
git clone https://github.com/YourGithubName/your-repo-name
26-
cd your-repo-name
25+
cd diffusion_model
2726

2827
# [OPTIONAL] create conda environment
2928
conda create -n myenv python=3.9
@@ -32,24 +31,11 @@ conda activate myenv
3231
# install pytorch according to instructions
3332
# https://pytorch.org/get-started/
3433

35-
# install requirements
34+
# install requirements using pip
3635
pip install -r requirements.txt
36+
# or you can install requirements using conda
37+
conda
3738
```
38-
39-
#### Conda
40-
41-
```bash
42-
# clone project
43-
git clone https://github.com/YourGithubName/your-repo-name
44-
cd your-repo-name
45-
46-
# create conda environment and install dependencies
47-
conda env create -f environment.yaml -n myenv
48-
49-
# activate conda environment
50-
conda activate myenv
51-
```
52-
5339
## How to run
5440

5541
Train model with default configuration
@@ -73,3 +59,24 @@ You can override any parameter from command line like this
7359
```bash
7460
python src/train.py trainer.max_epochs=20 data.batch_size=64
7561
```
62+
You can test [MoDL](https://arxiv.org/pdf/1712.02862) by running this experiment & modify any params in it
63+
```bash
64+
python src/train.py experiment=modl.yaml
65+
```
66+
Or [DDIM](https://arxiv.org/pdf/2010.02502) by running this experiment & modify net params in it
67+
```bash
68+
python src/train.py experiment=diffusion.yaml
69+
```
70+
Or [DDPM](https://arxiv.org/abs/2006.11239) by running this experiment & modify net params in it
71+
```bash
72+
python src/train.py experiment=diffusion.yaml
73+
```
74+
You can see the result on wandb by run this script
75+
```bash
76+
export WANDB_API_KEY=
77+
python src/train.py experiment=diffusion.yaml
78+
```
79+
## My result
80+
I will update sooner or later :> (this is my happy face incase you don't know)
81+
<br>
82+
<sub>A little confession as usual. Recently, I have applied to lots of AI jobs, but I got rejected from all of them, which is sad. However, I believe that when one door shuts, another one opens. I want to try my best and learn a lot, so I won’t have any regrets one day. </sub>

0 commit comments

Comments
 (0)