Skip to content

Commit

Permalink
[Fix] Fix typo (#1815)
Browse files Browse the repository at this point in the history
* Fix typo

* Update doc TOC

* Linter passed
  • Loading branch information
ryanxingql authored Apr 26, 2023
1 parent 4094cb3 commit 05aac57
Show file tree
Hide file tree
Showing 111 changed files with 332 additions and 288 deletions.
2 changes: 1 addition & 1 deletion configs/_base_/datasets/imagenet_noaug_128.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# different from mmcls, we adopt the setting used in BigGAN.
# Remove `RandomFlip` augmentation and change `RandomCropLongEdge` to
# `CenterCropLongEdge` to elminiate randomness.
# `CenterCropLongEdge` to eliminate randomness.
# dataset settings
train_pipeline = [
dict(type='LoadImageFromFile', key='img'),
Expand Down
29 changes: 15 additions & 14 deletions docs/en/community/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ Welcome to the MMagic community, we are committed to building a Multimodal Advan

This section introduces following contents:

- [Pull Request Workflow](#pull-request-workflow)
- [1. fork and clone](#1-fork-and-clone)
- [2. configure pre-commit](#2-configure-pre-commit)
- [3. create a development branch](#3-create-a-development-branch)
- [4. commit the code and pass the unit test](#4-commit-the-code-and-pass-the-unit-test)
- [5. push the code to remote](#5-push-the-code-to-remote)
- [6. create a pull request](#6-create-a-pull-request)
- [7. resolve conflicts](#7-resolve-conflicts)
- [Guidance](#guidance)
- [unit test](#unit-test)
- [document rendering](#document-rendering)
- [Code Style](#code-style)
- [Python](#python)
- [C++ and CUDA](#c-and-cuda)
- [Contributing guidance](#contributing-guidance)
- [Pull Request Workflow](#pull-request-workflow)
- [1. Fork and clone](#1-fork-and-clone)
- [2. Configure pre-commit](#2-configure-pre-commit)
- [3. Create a development branch](#3-create-a-development-branch)
- [4. Commit the code and pass the unit test](#4-commit-the-code-and-pass-the-unit-test)
- [5. Push the code to remote](#5-push-the-code-to-remote)
- [6. Create a Pull Request](#6-create-a-pull-request)
- [7. Resolve conflicts](#7-resolve-conflicts)
- [Guidance](#guidance)
- [Unit test](#unit-test)
- [Document rendering](#document-rendering)
- [Code style](#code-style)
- [Python](#python)
- [C++ and CUDA](#c-and-cuda)
- [PR Specs](#pr-specs)

All kinds of contributions are welcomed, including but not limited to
Expand Down
13 changes: 9 additions & 4 deletions docs/en/get_started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
In this section, you will know about:

- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Best practices](#best-practices)
- [Customize installation](#customize-installation)
- [Developing with multiple MMagic versions](#developing-with-multiple-mmagic-versions)
- [Installation](#installation-1)
- [Prerequisites](#prerequisites)
- [Best practices](#best-practices)
- [Customize installation](#customize-installation)
- [CUDA Version](#cuda-version)
- [Install MMCV without MIM](#install-mmcv-without-mim)
- [Using MMagic with Docker](#using-mmagic-with-docker)
- [Trouble shooting](#trouble-shooting)
- [Developing with multiple MMagic versions](#developing-with-multiple-mmagic-versions)

## Installation

Expand Down
12 changes: 7 additions & 5 deletions docs/en/get_started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

Welcome to MMagic! In this section, you will know about

- [What is MMagic?](#what-is-mmagic)
- [Why should I use MMagic?](#why-should-i-use-mmagic)
- [Get started](#get-started)
- [User guides](#user-guides)
- [Advanced guides](#advanced-guides)
- [Overview](#overview)
- [What is MMagic?](#what-is-mmagic)
- [Why should I use MMagic?](#why-should-i-use-mmagic)
- [Get started](#get-started)
- [User guides](#user-guides)
- [Advanced guides](#advanced-guides)
- [How to](#how-to)

## What is MMagic?

Expand Down
9 changes: 7 additions & 2 deletions docs/en/howto/dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

In this document, we will introduce the design of each datasets in MMagic and how users can design their own dataset.

- [Prepare Your Own Datasets](#prepare-your-own-datasets)
- [How to prepare your own datasets](#how-to-prepare-your-own-datasets)
- [Supported Data Format](#supported-data-format)
- [BasicImageDataset](#basicimagedataset)
- [BasicFramesDataset](#basicframesdataset)
- [BasicConditonalDataset](#basicconditonaldataset)
- [1. Annotation file read by line (e.g., txt)](#1-annotation-file-read-by-line-eg-txt)
- [2. Dict-based annotation file (e.g., json):](#2-dict-based-annotation-file-eg-json)
- [3. Folder-based annotation (no annotation file need):](#3-folder-based-annotation-no-annotation-file-need)
- [ImageNet Dataset and CIFAR10 Dataset](#imagenet-dataset-and-cifar10-dataset)
- [AdobeComp1kDataset](#adobecomp1kdataset)
- [GrowScaleImgDataset](#growscaleimgdataset)
- [SinGANDataset](#singandataset)
Expand Down Expand Up @@ -442,7 +447,7 @@ def __getitem__(self, index):

### PairedImageDataset

`PairedImageDataset` is designed for translation models that needs paried training data (e.g., Pix2Pix).
`PairedImageDataset` is designed for translation models that needs paired training data (e.g., Pix2Pix).
The directory structure is shown below. Each image files are the concatenation of the image pair.

```
Expand Down
2 changes: 1 addition & 1 deletion docs/en/howto/losses.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ so that the new loss module can be adopted in our framework without extra effort

This guides includes:

- [Design Your Own Loss Functions](#design-your-own-loss-functions)
- [How to design your own loss functions](#how-to-design-your-own-loss-functions)
- [Introduction to supported losses](#introduction-to-supported-losses)
- [Design a new loss function](#design-a-new-loss-function)
- [An example of MSELoss](#an-example-of-mseloss)
Expand Down
21 changes: 11 additions & 10 deletions docs/en/howto/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ In this section, you will learn how to design your own models.

The structure of this guide are as follows:

- [Overview of models in MMagic](#overview-of-models-in-mmagic)
- [An example of SRCNN](#an-example-of-srcnn)
- [Define the network of SRCNN](#step-1-define-the-network-of-srcnn)
- [Define the model of SRCNN](#step-2-define-the-model-of-srcnn)
- [Start training SRCNN](#step-3-start-training-srcnn)
- [An example of DCGAN](#an-example-of-dcgan)
- [Define the network of DCGAN](#step-1-define-the-network-of-dcgan)
- [Define the model of DCGAN](#step-2-design-the-model-of-dcgan)
- [Start training DCGAN](#step-3-start-training-dcgan)
- [References](#references)
- [How to design your own models](#how-to-design-your-own-models)
- [Overview of models in MMagic](#overview-of-models-in-mmagic)
- [An example of SRCNN](#an-example-of-srcnn)
- [Step 1: Define the network of SRCNN](#step-1-define-the-network-of-srcnn)
- [Step 2: Define the model of SRCNN](#step-2-define-the-model-of-srcnn)
- [Step 3: Start training SRCNN](#step-3-start-training-srcnn)
- [An example of DCGAN](#an-example-of-dcgan)
- [Step 1: Define the network of DCGAN](#step-1-define-the-network-of-dcgan)
- [Step 2: Design the model of DCGAN](#step-2-design-the-model-of-dcgan)
- [Step 3: Start training DCGAN](#step-3-start-training-dcgan)
- [References](#references)

## Overview of models in MMagic

Expand Down
2 changes: 1 addition & 1 deletion docs/en/howto/transforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In this tutorial, we introduce the design of transforms pipeline in MMagic.

The structure of this guide are as follows:

- [Design Your Own Data Pipelines](#design-your-own-data-pipelines)
- [How to design your own data transforms](#how-to-design-your-own-data-transforms)
- [Data pipelines in MMagic](#data-pipelines-in-mmagic)
- [A simple example of data transform](#a-simple-example-of-data-transform)
- [An example of BasicVSR](#an-example-of-basicvsr)
Expand Down
6 changes: 4 additions & 2 deletions docs/en/migration/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

This section introduce the following contents in terms of migration from MMEditing 0.x

- [New dependencies](#new-dependencies)
- [Overall structures](#overall-structures)
- [Overview](#overview)
- [New dependencies](#new-dependencies)
- [Overall structures](#overall-structures)
- [Other config settings](#other-config-settings)

## New dependencies

Expand Down
34 changes: 25 additions & 9 deletions docs/en/user_guides/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@ If you wish to inspect the config file, you may run `python tools/misc/print_con

You can learn about the usage of our config system according to the following tutorials.

- [Modify config](#modify-config-through-script-arguments)
- [Config file structure](#config-file-structure)
- [Config name style](#config-name-style)
- [An example of EDSR](#an-example-of-edsr)
- [An example of StyleGAN2](#an-example-of-stylegan2)
- [Other examples](#other-examples)
- [An example of config system for inpainting](#an-example-of-config-system-for-inpainting)
- [An example of config system for matting](#an-example-of-config-system-for-matting)
- [An example of config system for restoration](#an-example-of-config-system-for-restoration)
- [Tutorial 1: Learn about Configs in MMagic](#tutorial-1-learn-about-configs-in-mmagic)
- [Modify config through script arguments](#modify-config-through-script-arguments)
- [Config file structure](#config-file-structure)
- [Config name style](#config-name-style)
- [An example of EDSR](#an-example-of-edsr)
- [Model config](#model-config)
- [Data config](#data-config)
- [Data pipeline](#data-pipeline)
- [Dataloader](#dataloader)
- [Evaluation config](#evaluation-config)
- [Training and testing config](#training-and-testing-config)
- [Optimization config](#optimization-config)
- [Hook config](#hook-config)
- [Runtime config](#runtime-config)
- [An example of StyleGAN2](#an-example-of-stylegan2)
- [Model config](#model-config-1)
- [Dataset and evaluator config](#dataset-and-evaluator-config)
- [Training and testing config](#training-and-testing-config-1)
- [Optimization config](#optimization-config-1)
- [Hook config](#hook-config-1)
- [Runtime config](#runtime-config-1)
- [Other examples](#other-examples)
- [An example of config system for inpainting](#an-example-of-config-system-for-inpainting)
- [An example of config system for matting](#an-example-of-config-system-for-matting)
- [An example of config system for restoration](#an-example-of-config-system-for-restoration)

## Modify config through script arguments

Expand Down
2 changes: 1 addition & 1 deletion docs/en/user_guides/dataset_prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ There are two ways to use datasets for training and testing models in MMagic:

The structure of this guide is as follows:

- [Tutorial 2: Prepare Datasets](#tutorial-2-prepare-datasets)
- [Tutorial 2: Prepare datasets](#tutorial-2-prepare-datasets)
- [Download datasets](#download-datasets)
- [Prepare datasets](#prepare-datasets)
- [The overview of the datasets in MMagic](#the-overview-of-the-datasets-in-mmagic)
Expand Down
15 changes: 8 additions & 7 deletions docs/en/user_guides/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ The latest deployment guide for MMagic can be found from [here](https://mmdeploy

This tutorial is organized as follows:

- [Installation](#installation)
- [Convert model](#convert-model)
- [Model specification](#model-specification)
- [Model inference](#model-inference)
- [Backend model inference](#backend-model-inference)
- [SDK model inference](#sdk-model-inference)
- [Supported models](#supported-models)
- [Tutorial 8: Deploy models in MMagic](#tutorial-8-deploy-models-in-mmagic)
- [Installation](#installation)
- [Convert model](#convert-model)
- [Model specification](#model-specification)
- [Model inference](#model-inference)
- [Backend model inference](#backend-model-inference)
- [SDK model inference](#sdk-model-inference)
- [Supported models](#supported-models)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/en/user_guides/inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image super-resolution, video super-resolution, video frame interpolation, image

In this section, we will specify how to play with our pre-trained models.

- [Tutorial 3: Inference with Pre-trained Models](#tutorial-3-inference-with-pre-trained-models)
- [Tutorial 3: Inference with pre-trained models](#tutorial-3-inference-with-pre-trained-models)
- [Sample images with unconditional GANs](#sample-images-with-unconditional-gans)
- [Sample images with conditional GANs](#sample-images-with-conditional-gans)
- [Sample images with diffusion models](#sample-images-with-diffusion-models)
Expand Down
35 changes: 18 additions & 17 deletions docs/en/user_guides/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@ Here, we will specify the details of different metrics one by one.

The structure of this guide are as follows:

01. [MAE](#mae)
02. [MSE](#mse)
03. [PSNR](#psnr)
04. [SNR](#snr)
05. [SSIM](#ssim)
06. [NIQE](#niqe)
07. [SAD](#sad)
08. [MattingMSE](#mattingmse)
09. [GradientError](#gradienterror)
10. [ConnectivityError](#connectivityerror)
11. [FID and TransFID](#fid-and-transfid)
12. [IS and TransIS](#is-and-transis)
13. [Precision and Recall](#precision-and-recall)
14. [PPL](#ppl)
15. [SWD](#swd)
16. [MS-SSIM](#ms-ssim)
17. [Equivarience](#equivarience)
- [Tutorial 5: Using metrics in MMagic](#tutorial-5-using-metrics-in-mmagic)
- [MAE](#mae)
- [MSE](#mse)
- [PSNR](#psnr)
- [SNR](#snr)
- [SSIM](#ssim)
- [NIQE](#niqe)
- [SAD](#sad)
- [MattingMSE](#mattingmse)
- [GradientError](#gradienterror)
- [ConnectivityError](#connectivityerror)
- [FID and TransFID](#fid-and-transfid)
- [IS and TransIS](#is-and-transis)
- [Precision and Recall](#precision-and-recall)
- [PPL](#ppl)
- [SWD](#swd)
- [MS-SSIM](#ms-ssim)
- [Equivarience](#equivarience)

## MAE

Expand Down
24 changes: 13 additions & 11 deletions docs/en/user_guides/train_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ In this section, we introduce how to test and train models in MMagic.

In this section, we provide the following guides:

- [Prerequisite](#prerequisite)
- [Test a model in MMagic](#test-a-model-in-mmagic)
- [Test with a single GPUs](#test-with-a-single-gpus)
- [Test with multiple GPUs](#test-with-multiple-gpus)
- [Test with Slurm](#test-with-slurm)
- [Test with specific metrics](#test-with-specific-metrics)
- [Train a model in MMagic](#train-a-model-in-mmagic)
- [Train with a single GPU](#train-with-a-single-gpu)
- [Train with multiple GPUs](#train-with-multiple-gpus)
- [Train with multiple nodes](#train-with-multiple-nodes)
- [Train with Slurm](#train-with-slurm)
- [Tutorial 4: Train and test in MMagic](#tutorial-4-train-and-test-in-mmagic)
- [Prerequisite](#prerequisite)
- [Test a model in MMagic](#test-a-model-in-mmagic)
- [Test with a single GPUs](#test-with-a-single-gpus)
- [Test with multiple GPUs](#test-with-multiple-gpus)
- [Test with Slurm](#test-with-slurm)
- [Test with specific metrics](#test-with-specific-metrics)
- [Train a model in MMagic](#train-a-model-in-mmagic)
- [Train with a single GPU](#train-with-a-single-gpu)
- [Train with multiple nodes](#train-with-multiple-nodes)
- [Train with multiple GPUs](#train-with-multiple-gpus)
- [Train with Slurm](#train-with-slurm)
- [Optional arguments](#optional-arguments)
- [Train with specific evaluation metrics](#train-with-specific-evaluation-metrics)

## Prerequisite
Expand Down
7 changes: 4 additions & 3 deletions docs/en/user_guides/useful_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ We provide lots of useful tools under `tools/` directory.

The structure of this guide is as follows:

- [Get the FLOPs and params](#get-the-flops-and-params)
- [Publish a model](#publish-a-model)
- [Print full config](#print-full-config)
- [Tutorial 7: Useful tools](#tutorial-7-useful-tools)
- [Get the FLOPs and params](#get-the-flops-and-params)
- [Publish a model](#publish-a-model)
- [Print full config](#print-full-config)

## Get the FLOPs and params

Expand Down
15 changes: 11 additions & 4 deletions docs/en/user_guides/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ The visualization of images is an important way to measure the quality of image
Using `visualizer` in config file can save visual results when training or testing. You can follow [MMEngine Documents](https://github.com/open-mmlab/mmengine/blob/main/docs/en/advanced_tutorials/visualization.md) to learn the usage of visualization. MMagic provides a rich set of visualization functions.
In this tutorial, we introduce the usage of the visualization functions provided by MMagic.

- [Overview](#overview)
- [Visualization hook](#visualization-hook)
- [Visualizer](#visualizer)
- [VisBackend](#visbackend)
- [Tutorial 6: Visualization](#tutorial-6-visualization)
- [Overview](#overview)
- [Visualization configuration of GANs](#visualization-configuration-of-gans)
- [Visualization configuration of image translation models](#visualization-configuration-of-image-translation-models)
- [Visualization configuration of diffusion models](#visualization-configuration-of-diffusion-models)
- [Visualization configuration of inpainting models](#visualization-configuration-of-inpainting-models)
- [Visualization configuration of matting models](#visualization-configuration-of-matting-models)
- [Visualization configuration of SISR/VSR/VFI models](#visualization-configuration-of-sisrvsrvfi-models)
- [Visualization Hook](#visualization-hook)
- [Visualizer](#visualizer)
- [VisBackend](#visbackend)

## Overview

Expand Down
2 changes: 1 addition & 1 deletion mmagic/apis/inferencers/eg3d_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def forward(self,
inputs (ForwardInputs): Model inputs. If data sample (the second
element of `inputs`) is not passed, will generate a sequence
of images corresponding to passed `interpolation` mode.
interpolation (str): The interplolation mode. Supported choices
interpolation (str): The interpolation mode. Supported choices
are 'both', 'conditioning', and 'camera'. Defaults to 'both'.
num_images (int): The number of frames of interpolation.
Defaults to 500.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def preprocess(self, img: InputsType, ref: InputsType = None) -> Dict:
Args:
img(InputsType): Image to be restored by models.
ref(InputsType): Reference image for resoration models.
ref(InputsType): Reference image for restoration models.
Defaults to None.
Returns:
Expand Down
2 changes: 1 addition & 1 deletion mmagic/datasets/basic_frames_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class BasicFramesDataset(BaseDataset):
template excludes the file extension. Default: '{}'.
search_key (str): The key used for searching the folder to get
data_list. Default: 'gt'.
backend_args (dict, optional): Arguments to instantiate the preifx of
backend_args (dict, optional): Arguments to instantiate the prefix of
uri corresponding backend. Defaults to None.
depth (int): The depth of path. Default: 1
num_input_frames (None | int): Number of input frames. Default: None.
Expand Down
2 changes: 1 addition & 1 deletion mmagic/datasets/basic_image_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class BasicImageDataset(BaseDataset):
template excludes the file extension. Default: dict().
search_key (str): The key used for searching the folder to get
data_list. Default: 'gt'.
backend_args (dict, optional): Arguments to instantiate the preifx of
backend_args (dict, optional): Arguments to instantiate the prefix of
uri corresponding backend. Defaults to None.
suffix (str or tuple[str], optional): File suffix
that we are interested in. Default: None.
Expand Down
Loading

0 comments on commit 05aac57

Please sign in to comment.