Skip to content

Commit 6825bd3

Browse files
committed
Merge branch 'plyfager/fix-metafile' of github.com:plyfager/mmgeneration into fix-metafile-patch
2 parents 32f7c04 + 4b55ce0 commit 6825bd3

File tree

12 files changed

+239
-93
lines changed

12 files changed

+239
-93
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ jobs:
123123
coverage xml
124124
coverage report -m
125125
- name: Upload coverage to Codecov
126-
if: ${{matrix.torch == '1.9.0+cu102' && matrix.python-version == '3.7'}}
127126
uses: codecov/codecov-action@v2
128127
with:
129128
file: ./coverage.xml

.github/workflows/lint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ jobs:
1515
uses: actions/setup-python@v2
1616
with:
1717
python-version: 3.7
18+
- name: Install ruby
19+
run: |
20+
# markdownlint requires ruby >= 2.7
21+
sudo apt-get update
22+
sudo apt install ruby
1823
- name: Install pre-commit hook
1924
run: |
2025
# markdownlint requires ruby >= 2.7

.github/workflows/test_mim.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: test-mim
2+
3+
on:
4+
push:
5+
paths:
6+
- 'model-index.yml'
7+
- 'configs/**'
8+
9+
pull_request:
10+
paths:
11+
- 'model-index.yml'
12+
- 'configs/**'
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build_cpu:
20+
runs-on: ubuntu-18.04
21+
strategy:
22+
matrix:
23+
python-version: [3.7]
24+
torch: [1.8.0]
25+
include:
26+
- torch: 1.8.0
27+
torch_version: torch1.8
28+
torchvision: 0.9.0
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Upgrade pip
36+
run: pip install pip --upgrade
37+
- name: Install Pillow
38+
run: pip install Pillow==6.2.2
39+
if: ${{matrix.torchvision == '0.4.2'}}
40+
- name: Install PyTorch
41+
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
42+
- name: Install openmim
43+
run: pip install openmim
44+
- name: Build and install
45+
run: rm -rf .eggs && mim install -e .
46+
- name: test commands of mim
47+
run: mim search mmgeneration

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ repos:
3030
- id: docformatter
3131
args: ["--in-place", "--wrap-descriptions", "79"]
3232
- repo: https://github.com/executablebooks/mdformat
33-
rev: 0.7.14
33+
rev: 0.7.9
3434
hooks:
3535
- id: mdformat
3636
args: ["--number"]
3737
additional_dependencies:
38-
- mdformat-gfm
38+
- mdformat-openmmlab
3939
- mdformat_frontmatter
4040
- linkify-it-py
4141
- repo: https://github.com/codespell-project/codespell

README.md

Lines changed: 56 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,25 @@
1919
<div>&nbsp;</div>
2020
</div>
2121

22-
Documentation: https://mmgeneration.readthedocs.io/
23-
24-
## Introduction
22+
[![PyPI](https://img.shields.io/pypi/v/mmgen)](https://pypi.org/project/mmgen)
23+
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmgeneration.readthedocs.io/en/latest/)
24+
[![badge](https://github.com/open-mmlab/mmgeneration/workflows/build/badge.svg)](https://github.com/open-mmlab/mmgeneration/actions)
25+
[![codecov](https://codecov.io/gh/open-mmlab/mmgeneration/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmgeneration)
26+
[![license](https://img.shields.io/github/license/open-mmlab/mmgeneration.svg)](https://github.com/open-mmlab/mmgeneration/blob/master/LICENSE)
27+
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmgeneration.svg)](https://github.com/open-mmlab/mmgeneration/issues)
28+
[![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmgeneration.svg)](https://github.com/open-mmlab/mmgeneration/issues)
29+
30+
[📘Documentation](https://mmgeneration.readthedocs.io/en/latest/) |
31+
[🛠️Installation](https://mmgeneration.readthedocs.io/en/latest/get_started.html#installation) |
32+
[👀Model Zoo](https://mmgeneration.readthedocs.io/en/latest/modelzoo_statistics.html) |
33+
[🆕Update News](https://github.com/open-mmlab/mmgeneration/blob/master/docs/en/changelog.md) |
34+
[🚀Ongoing Projects](https://github.com/open-mmlab/mmgeneration/projects) |
35+
[🤔Reporting Issues](https://github.com/open-mmlab/mmgeneration/issues)
2536

2637
English | [简体中文](README_zh-CN.md)
2738

39+
## Introduction
40+
2841
MMGeneration is a powerful toolkit for generative models, especially for GANs now. It is based on PyTorch and [MMCV](https://github.com/open-mmlab/mmcv). The master branch works with **PyTorch 1.5+**.
2942

3043
<div align="center">
@@ -79,6 +92,42 @@ MMGeneration is a powerful toolkit for generative models, especially for GANs no
7992

8093
v0.7.1 was released on 30/04/2022. Please refer to [changelog.md](docs/en/changelog.md) for details and release history.
8194

95+
## Installation
96+
97+
MMGeneration depends on [PyTorch](https://pytorch.org/) and [MMCV](https://github.com/open-mmlab/mmcv).
98+
Below are quick steps for installation.
99+
100+
**Step 1.**
101+
Install PyTorch following [official instructions](https://pytorch.org/get-started/locally/), e.g.
102+
103+
```python
104+
pip3 install torch torchvision
105+
106+
```
107+
108+
**Step 2.**
109+
Install MMCV with [MIM](https://github.com/open-mmlab/mim).
110+
111+
```
112+
pip3 install openmim
113+
mim install mmcv-full
114+
```
115+
116+
**Step 3.**
117+
Install MMGeneration from source.
118+
119+
```
120+
git clone https://github.com/open-mmlab/mmgeneration.git
121+
cd mmgeneration
122+
pip3 install -e .[all]
123+
```
124+
125+
Please refer to [get_started.md](docs/en/get_started.md) for more detailed instruction.
126+
127+
## Getting Started
128+
129+
Please see [get_started.md](docs/en/get_started.md) for the basic usage of MMGeneration. [docs/en/quick_run.md](docs/en/quick_run.md) can offer full guidance for quick run. For other details and tutorials, please go to our [documentation](https://mmgeneration.readthedocs.io/).
130+
82131
## ModelZoo
83132

84133
These methods have been carefully studied and supported in our frameworks:
@@ -134,46 +183,6 @@ These methods have been carefully studied and supported in our frameworks:
134183

135184
-[MMGEN-FaceStylor](https://github.com/open-mmlab/MMGEN-FaceStylor)
136185

137-
## License
138-
139-
This project is released under the [Apache 2.0 license](LICENSE). Some operations in `MMGeneration` are with other licenses instead of Apache2.0. Please refer to [LICENSES.md](LICENSES.md) for the careful check, if you are using our code for commercial matters.
140-
141-
## Installation
142-
143-
MMGeneration depends on [PyTorch](https://pytorch.org/) and [MMCV](https://github.com/open-mmlab/mmcv).
144-
Below are quick steps for installation.
145-
146-
**Step 1.**
147-
Install PyTorch following [official instructions](https://pytorch.org/get-started/locally/), e.g.
148-
149-
```python
150-
pip3 install torch torchvision
151-
152-
```
153-
154-
**Step 2.**
155-
Install MMCV with [MIM](https://github.com/open-mmlab/mim).
156-
157-
```
158-
pip3 install openmim
159-
mim install mmcv-full
160-
```
161-
162-
**Step 3.**
163-
Install MMGeneration from source.
164-
165-
```
166-
git clone https://github.com/open-mmlab/mmgeneration.git
167-
cd mmgeneration
168-
pip3 install -e .[all]
169-
```
170-
171-
Please refer to [get_started.md](docs/en/get_started.md) for more detailed instruction.
172-
173-
## Getting Started
174-
175-
Please see [get_started.md](docs/en/get_started.md) for the basic usage of MMGeneration. [docs/en/quick_run.md](docs/en/quick_run.md) can offer full guidance for quick run. For other details and tutorials, please go to our [documentation](https://mmgeneration.readthedocs.io/).
176-
177186
## Contributing
178187

179188
We appreciate all contributions to improve MMGeneration. Please refer to [CONTRIBUTING.md](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md) in MMCV for more details about the contributing guideline.
@@ -191,6 +200,10 @@ If you find this project useful in your research, please consider cite:
191200
}
192201
```
193202

203+
## License
204+
205+
This project is released under the [Apache 2.0 license](LICENSE). Some operations in `MMGeneration` are with other licenses instead of Apache2.0. Please refer to [LICENSES.md](LICENSES.md) for the careful check, if you are using our code for commercial matters.
206+
194207
## Projects in OpenMMLab
195208

196209
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab foundational library for computer vision.

README_zh-CN.md

Lines changed: 71 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,43 @@
11
<div align="center">
22
<img src="https://user-images.githubusercontent.com/12726765/114528756-de55af80-9c7b-11eb-94d7-d3224ada1585.png" width="400"/>
3+
<div>&nbsp;</div>
4+
<div align="center">
5+
<b><font size="5">OpenMMLab 官网</font></b>
6+
<sup>
7+
<a href="https://openmmlab.com">
8+
<i><font size="4">HOT</font></i>
9+
</a>
10+
</sup>
11+
&nbsp;&nbsp;&nbsp;&nbsp;
12+
<b><font size="5">OpenMMLab 开放平台</font></b>
13+
<sup>
14+
<a href="https://platform.openmmlab.com">
15+
<i><font size="4">TRY IT OUT</font></i>
16+
</a>
17+
</sup>
18+
</div>
19+
<div>&nbsp;</div>
320
</div>
421

5-
文档: https://mmgeneration.readthedocs.io/
6-
7-
## 简介
22+
[![PyPI](https://img.shields.io/pypi/v/mmgen)](https://pypi.org/project/mmgen)
23+
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmgeneration.readthedocs.io/en/latest/)
24+
[![badge](https://github.com/open-mmlab/mmgeneration/workflows/build/badge.svg)](https://github.com/open-mmlab/mmgeneration/actions)
25+
[![codecov](https://codecov.io/gh/open-mmlab/mmgeneration/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmgeneration)
26+
[![license](https://img.shields.io/github/license/open-mmlab/mmgeneration.svg)](https://github.com/open-mmlab/mmgeneration/blob/master/LICENSE)
27+
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmgeneration.svg)](https://github.com/open-mmlab/mmgeneration/issues)
28+
[![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmgeneration.svg)](https://github.com/open-mmlab/mmgeneration/issues)
29+
30+
[📘使用文档](https://mmgeneration.readthedocs.io/en/latest/) |
31+
[🛠️安装教程](https://mmgeneration.readthedocs.io/en/latest/get_started.html#installation) |
32+
[👀模型库](https://mmgeneration.readthedocs.io/en/latest/modelzoo_statistics.html) |
33+
[🆕更新记录](https://github.com/open-mmlab/mmgeneration/blob/master/docs/en/changelog.md) |
34+
[🚀进行中的项目](https://github.com/open-mmlab/mmgeneration/projects) |
35+
[🤔提出问题](https://github.com/open-mmlab/mmgeneration/issues)
836

937
[English](README.md) | 简体中文
1038

39+
## 简介
40+
1141
MMGeneration 是一个基于 PyTorch 和[MMCV](https://github.com/open-mmlab/mmcv)的强有力的生成模型工具箱,尤其专注于 GAN 模型。
1242
主分支目前支持 **PyTorch 1.5** 以上的版本。
1343

@@ -63,6 +93,40 @@ MMGeneration 是一个基于 PyTorch 和[MMCV](https://github.com/open-mmlab/mmc
6393

6494
v0.7.1 在 30/04/2022 发布。 关于细节和发布历史,请参考 [changelog.md](docs/zh_cn/changelog.md)
6595

96+
## 安装
97+
98+
MMGeneration 依赖 [PyTorch](https://pytorch.org/)[MMCV](https://github.com/open-mmlab/mmcv),以下是安装的简要步骤。
99+
100+
**步骤 1.**
101+
依照[官方教程](https://pytorch.org/get-started/locally/)安装PyTorch,例如
102+
103+
```python
104+
pip3 install torch torchvision
105+
```
106+
107+
**步骤 2.**
108+
使用 [MIM](https://github.com/open-mmlab/mim) 安装 MMCV
109+
110+
```
111+
pip3 install openmim
112+
mim install mmcv-full
113+
```
114+
115+
**步骤 3.**
116+
从源码安装 MMGeneration
117+
118+
```
119+
git clone https://github.com/open-mmlab/mmgeneration.git
120+
cd mmgeneration
121+
pip3 install -e .[all]
122+
```
123+
124+
更详细的安装指南请参考 [get_started.md](docs/zh/get_started.md) .
125+
126+
## 快速入门
127+
128+
对于 `MMGeneration` 的基本使用请参考 [快速入门](docs/zh_cn/get_started.md)。其他细节和教程,请参考我们的[文档](https://mmgeneration.readthedocs.io/)
129+
66130
## 模型库
67131

68132
这些算法在我们的框架中得到了认真研究和支持。
@@ -114,52 +178,10 @@ v0.7.1 在 30/04/2022 发布。 关于细节和发布历史,请参考 [changel
114178

115179
</details>
116180

117-
## 安装
118-
119-
MMGeneration 依赖 [PyTorch](https://pytorch.org/)[MMCV](https://github.com/open-mmlab/mmcv),以下是安装的简要步骤。
120-
121-
**步骤 1.**
122-
依照[官方教程](https://pytorch.org/get-started/locally/)安装PyTorch,例如
123-
124-
```python
125-
pip3 install torch torchvision
126-
```
127-
128-
**步骤 2.**
129-
使用 [MIM](https://github.com/open-mmlab/mim) 安装 MMCV
130-
131-
```
132-
pip3 install openmim
133-
mim install mmcv-full
134-
```
135-
136-
**步骤 3.**
137-
从源码安装 MMGeneration
138-
139-
```
140-
git clone https://github.com/open-mmlab/mmgeneration.git
141-
cd mmgeneration
142-
pip3 install -e .[all]
143-
```
144-
145-
更详细的安装指南请参考 [get_started.md](docs/zh/get_started.md) .
146-
147181
## 相关应用
148182

149183
-[MMGEN-FaceStylor](https://github.com/open-mmlab/MMGEN-FaceStylor)
150184

151-
## 开源许可证
152-
153-
该项目采用 [Apache 2.0 license](LICENSE) 开源许可证。`MMGeneration` 中的一些操作使用了其他许可证。如果您使用我们的代码进行商业事务,请参考 [许可证](LICENSES.md) 并仔细检查。
154-
155-
## 安装
156-
157-
请参考[快速入门](docs/zh_cn/get_started.md)进行安装。
158-
159-
## 快速入门
160-
161-
对于 `MMGeneration` 的基本使用请参考 [快速入门](docs/zh_cn/get_started.md)。其他细节和教程,请参考我们的[文档](https://mmgeneration.readthedocs.io/)
162-
163185
## 贡献指南
164186

165187
我们感谢所有的贡献者为改进和提升 MMGeneration 所作出的努力。请参考[贡献指南](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md)来了解参与项目贡献的相关指引。
@@ -177,6 +199,10 @@ pip3 install -e .[all]
177199
}
178200
```
179201

202+
## 开源许可证
203+
204+
该项目采用 [Apache 2.0 license](LICENSE) 开源许可证。`MMGeneration` 中的一些操作使用了其他许可证。如果您使用我们的代码进行商业事务,请参考 [许可证](LICENSES.md) 并仔细检查。
205+
180206
## OpenMMLab 的其他项目
181207

182208
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab 计算机视觉基础库

requirements/docs.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ docutils==0.16.0
33
m2r
44
mmcls==0.18.0
55
myst-parser
6-
opencv-python
6+
opencv-python!=4.5.5.62,!=4.5.5.64
7+
# Skip problematic opencv-python versions
8+
# MMCV depends opencv-python instead of headless, thus we install opencv-python
9+
# Due to a bug from upstream, we skip this two version
10+
# https://github.com/opencv/opencv-python/issues/602
11+
# https://github.com/opencv/opencv/issues/21366
12+
# It seems to be fixed in https://github.com/opencv/opencv/pull/21382opencv-python
713
prettytable
814
-e git+https://github.com/open-mmlab/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
915
scipy

requirements/miminstall.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mmcv-full>=1.3.17

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,12 @@ def add_mim_extension():
194194
author_email='[email protected]',
195195
license='Apache License 2.0',
196196
include_package_data=True,
197-
install_requires=parse_requirements('requirements.txt'),
197+
install_requires=parse_requirements('requirements/runtime.txt'),
198+
extras_require={
199+
'all': parse_requirements('requirements.txt'),
200+
'tests': parse_requirements('requirements/tests.txt'),
201+
'mim': parse_requirements('requirements/miminstall.txt'),
202+
},
198203
cmdclass={'build_ext': BuildExtension},
199204
extras_require={
200205
'all': parse_requirements('requirements.txt'),

0 commit comments

Comments
 (0)