Skip to content

Commit

Permalink
Update: Modify README.
Browse files Browse the repository at this point in the history
  • Loading branch information
chairc committed Sep 18, 2023
1 parent 0cd6f57 commit 526134b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ We named this project IDDM: Industrial Defect Diffusion Model. It aims to reprod

```yaml
├── datasets
│ └── dataset_demo
│ ├── class_1
│ ├── class_2
│ └── class_3
├── model
│ ├── base.py
│ ├── ddim.py
Expand All @@ -22,11 +26,10 @@ We named this project IDDM: Industrial Defect Diffusion Model. It aims to reprod
├── test
│ ├── noising_test
│ │ ├── landscape
│ │ │ └── noising_test.jpg
│ │ └── noise
│ │ └── noise.jpg
│ └── test_module.py
├── tools
│   ├── deploy.py
│ ├── generate.py
│ └── train.py
├── utils
Expand All @@ -44,6 +47,7 @@ We named this project IDDM: Industrial Defect Diffusion Model. It aims to reprod
- [x] 4. Implement multi-GPU distributed training. (2023-07-15)
- [x] 5. Enable fast deployment and API on cloud servers. (2023-08-28)
- [x] 6. Adding DDIM Sampling Method. (2023-08-03)
- [x] 7. Support other image generation. (2023-09-16)

### Training

Expand Down Expand Up @@ -160,6 +164,8 @@ We named this project IDDM: Industrial Defect Diffusion Model. It aims to reprod
| --num_images | | Number of generated images | int | Number of images to generate |
| --weight_path | | Path to model weights | str | Path to the model weights file, required for network generation |
| --result_path | | Save path | str | Path to save the generated images |
| --sample | | Sampling method | str | Set the sampling method type, currently supporting DDPM and DDIM. |
| --act | | Activation function | str | Activation function selection. Currently supports gelu, silu, relu, relu6 and lrelu. If you do not set the same activation function as the model, mosaic phenomenon will occur. |
| --num_classes || Number of classes | int | Number of classes for classification |
| --class_name || Class name | int | Index of the class to generate images for |
| --cfg_scale || Classifier-free guidance weight | int | Weight for classifier-free guidance interpolation, for better generation model performance |
Expand Down Expand Up @@ -218,6 +224,18 @@ We conducted training on the following four datasets using the `DDPM` sampler wi

![wood_495](assets/wood_495.jpg)

**Animate face (~~JUST FOR FUN~~)**

![model_428_ema](assets/animate_face_428_ema.jpg)

![model_488_ema](assets/animate_face_488_ema.jpg)

![model_497_ema](assets/animate_face_497_ema.jpg)

![model_499_ema](assets/animate_face_499_ema.jpg)

![model_459_ema](assets/animate_face_459_ema.jpg)

### Deployment

To be continued.
Expand Down
24 changes: 21 additions & 3 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

```yaml
├── datasets
│ └── dataset_demo
│ ├── class_1
│ ├── class_2
│ └── class_3
├── model
│   ├── base.py
│   ├── ddim.py
Expand All @@ -22,11 +26,10 @@
├── test
│   ├── noising_test
│   │   ├── landscape
│   │   │   └── noising_test.jpg
│   │   └── noise
│   │   └── noise.jpg
│   └── test_module.py
├── tools
│   ├── deploy.py
│   ├── generate.py
│   └── train.py
├── utils
Expand All @@ -43,7 +46,8 @@
- [ ] 3. 更大尺寸的生成图像
- [x] 4. 多卡分布式训练(2023-07-15)
- [x] 5. 云服务器快速部署和接口(2023-08-28)
- [x] 6. 增加DDIM采样方法(2023-08-03)
- [x] 6. 增加DDIM采样方法(2023-08-03)
- [x] 7. 支持其它图像生成(2023-09-16)

### 训练

Expand Down Expand Up @@ -168,6 +172,8 @@
| --num_images | | 生成图片个数 | int | 单次生成图片个数 |
| --weight_path | | 权重路径 | str | 模型权重路径,网络生成需要加载文件 |
| --result_path | | 保存路径 | str | 保存路径 |
| --sample | | 采样方式 | str | 设置采样器类别,当前支持ddpm,ddim |
| --act | | 激活函数 | str | 激活函数选择,目前支持gelu、silu、relu、relu6和lrelu。如果不选择,会产生马赛克现象 |
| --num_classes || 类别个数 | int | 类别个数,用于区分类别 |
| --class_name || 类别名称 | int | 类别序号,用于对指定类别生成 |
| --cfg_scale || classifier-free guidance插值权重 | int | classifier-free guidance插值权重,用户更好生成模型效果 |
Expand Down Expand Up @@ -228,6 +234,18 @@

![wood_495](assets/wood_495.jpg)

**Animate face(整活生成)**

![model_428_ema](assets/animate_face_428_ema.jpg)

![model_488_ema](assets/animate_face_488_ema.jpg)

![model_497_ema](assets/animate_face_497_ema.jpg)

![model_499_ema](assets/animate_face_499_ema.jpg)

![model_459_ema](assets/animate_face_459_ema.jpg)

### 部署

未完待续
Expand Down

0 comments on commit 526134b

Please sign in to comment.