Skip to content

Commit

Permalink
rename to mmagic in tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-Fran committed Apr 19, 2023
1 parent b3c855b commit 2acc31c
Show file tree
Hide file tree
Showing 68 changed files with 171 additions and 171 deletions.
4 changes: 2 additions & 2 deletions tools/analysis_tools/get_flops.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from mmengine import Config
from mmengine.registry import init_default_scope

from mmedit.registry import MODELS
from mmagic.registry import MODELS

try:
from mmengine.analysis import get_model_complexity_info
Expand Down Expand Up @@ -83,7 +83,7 @@ def main():

cfg = Config.fromfile(args.config)

init_default_scope(cfg.get('default_scope', 'mmedit'))
init_default_scope(cfg.get('default_scope', 'mmagic'))

model = MODELS.build(cfg.model)
inputs = torch.randn(1, *input_shape)
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/celeba-hq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
Follow the instructions [here](https://github.com/tkarras/progressive_growing_of_gans#preparing-datasets-for-training) to prepare the dataset.

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/celeba-hq/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
请按照[此处](https://github.com/tkarras/progressive_growing_of_gans#preparing-datasets-for-training)准备数据集。

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/classic5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ The test datasets can be download from [here](https://github.com/cszn/DnCNN/tree
The folder structure should look like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/classic5/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
文件目录结构应如下所示:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
10 changes: 5 additions & 5 deletions tools/dataset_converters/comp1k/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ It is needed to merge `fg` with COCO data (training) or VOC data (test) before t
Use the following script to perform image composition and generate annotation files for training or testing:

```shell
# The script is run under the root folder of MMEditing
# The script is run under the root folder of MMagic
python tools/dataset_converters/matting/comp1k/preprocess_comp1k_dataset.py data/adobe_composition-1k data/coco data/VOCdevkit --composite
```

Expand All @@ -54,8 +54,8 @@ python tools/data/matting/comp1k/preprocess_comp1k_dataset.py data/adobe_composi
The result folder structure should look like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down Expand Up @@ -108,8 +108,8 @@ python tools/dataset_converters/matting/comp1k/extend_fg.py data/adobe_compositi
The final folder structure should look like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
10 changes: 5 additions & 5 deletions tools/dataset_converters/comp1k/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Adobe Composition-1k 数据集由前景图像及其相应的 alpha 图像组成
Adobe composition-1k 数据集仅包含 `alpha``fg`(以及测试集中的 `trimap`)。在训练或评估之前,需要将 `fg` 与 COCO 数据(训练)或 VOC 数据(测试)合并。使用以下脚本执行图像合成并生成用于训练或测试的注释文件:

```shell
#MMEditing 的根文件夹下运行脚本
#MMagic 的根文件夹下运行脚本
python tools/dataset_converters/matting/comp1k/preprocess_comp1k_dataset.py data/adobe_composition-1k data/coco data/VOCdevkit --composite
```

Expand All @@ -50,8 +50,8 @@ python tools/dataset_converters/matting/comp1k/preprocess_comp1k_dataset.py data
最终的文件夹结构应如下所示:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down Expand Up @@ -102,8 +102,8 @@ python tools/dataset_converters/matting/comp1k/extend_fg.py data/adobe_compositi
最终的文件夹结构应如下所示:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/comp1k/evaluate_comp1k.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import mmengine
import numpy as np

from mmedit.evaluation import gauss_gradient
from mmedit.utils import modify_args
from mmagic.evaluation import gauss_gradient
from mmagic.utils import modify_args


def sad(alpha, trimap, pred_alpha):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import numpy as np
from PIL import Image

from mmedit.utils import modify_args
from mmagic.utils import modify_args


def fix_png_files(directory):
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/denoising/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The test datasets (Set12, BSD68, CBSD68, Kodak, McMaster, Urban100) can be downl
The folder structure should look like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/denoising/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
文件目录结构应如下所示:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/deraining/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The test datasets (Rain100H, Rain100L, Test100, Test1200, Test2800) can be downl
The folder structure should look like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/deraining/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
文件目录结构应如下所示:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
8 changes: 4 additions & 4 deletions tools/dataset_converters/df2k_ost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
Please first put all the images into the `GT` folder (naming does not need to be in order):

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand All @@ -43,8 +43,8 @@ python tools/dataset_converters/df2k_ost/preprocess_df2k_ost_dataset.py --data-r
The generated data is stored under `df2k_ost` and the data structure is as follows, where `_sub` indicates the sub-images.

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
8 changes: 4 additions & 4 deletions tools/dataset_converters/df2k_ost/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
请先将所有图片放入 `GT` 文件夹(命名不需要按顺序):

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand All @@ -43,8 +43,8 @@ python tools/dataset_converters/df2k_ost/preprocess_df2k_ost_dataset.py --data-r
生成的数据存放在 `df2k_ost` 下,数据结构如下,其中 `_sub` 表示子图像。

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
8 changes: 4 additions & 4 deletions tools/dataset_converters/div2k/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
Note that we merge the original val dataset (image names from 0801 to 0900) to the original train dataset (image names from 0001 to 0800). The folder structure should look like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down Expand Up @@ -64,8 +64,8 @@ python tools/dataset_converters/div2k/preprocess_div2k_dataset.py --data-root ./
The generated data is stored under `DIV2K` and the data structure is as follows, where `_sub` indicates the sub-images.

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
8 changes: 4 additions & 4 deletions tools/dataset_converters/div2k/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
请注意,我们将原始的验证集(文件名 0801 到 0900)合并进了原始的训练集(文件名 0001 到 0800)。文件目录结构应如下所示:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down Expand Up @@ -64,8 +64,8 @@ python tools/dataset_converters/div2k/preprocess_div2k_dataset.py --data-root ./
生成的数据保存在 `DIV2K` 目录下,其文件结构如下所示,其中 `_sub` 表示子图:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/dpdd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The test datasets can be download from [here](https://drive.google.com/file/d/1d
The folder structure should look like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
4 changes: 2 additions & 2 deletions tools/dataset_converters/dpdd/README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
文件目录结构应如下所示:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
20 changes: 10 additions & 10 deletions tools/dataset_converters/glean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ python tools/dataset_converters/glean/preprocess_cat_train_dataset.py --lmdb-pat
The generated data is stored under `cat_train` and the folder structure is as follows.

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down Expand Up @@ -58,8 +58,8 @@ python tools/dataset_converters/glean/preprocess_cat_test_dataset.py --data-path
The generated data is stored under `cat_test` and the folder structure is as follows.

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down Expand Up @@ -99,8 +99,8 @@ python tools/dataset_converters/glean/preprocess_ffhq_celebahq_dataset.py --data
The generated data is stored under `ffhq` and the folder structure is as follows.

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down Expand Up @@ -140,8 +140,8 @@ python tools/dataset_converters/glean/preprocess_ffhq_celebahq_dataset.py --data
The generated data is stored under `CelebA-HQ` and the folder structure is as follows.

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configsdata
├── data
Expand All @@ -160,8 +160,8 @@ We merge FFHQ(`ffhq/images`) and CelebA-HQ(`CelebA-HQ/GT`) to generate FFHQ_Cele
The folder structure should looks like:

```text
mmediting
├── mmedit
mmagic
├── mmagic
├── tools
├── configs
├── data
Expand Down
Loading

0 comments on commit 2acc31c

Please sign in to comment.