Skip to content

Commit 721c720

Browse files
committed
Merge branch 'dev-1.x' into 1.x
2 parents 8a611e1 + 6eb1a95 commit 721c720

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2584
-795
lines changed

.circleci/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ workflows:
154154
- lint
155155
- build_cpu:
156156
name: maximum_version_cpu
157-
torch: 1.12.1
158-
torchvision: 0.13.1
157+
torch: 1.13.0
158+
torchvision: 0.14.0
159159
python: 3.9.0
160160
requires:
161161
- minimum_version_cpu

.github/workflows/merge_stage_test.yml

Lines changed: 65 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- 'demo/**'
1010
- '.dev_scripts/**'
1111
- '.circleci/**'
12+
- 'projects/**'
1213
branches:
1314
- dev-1.x
1415

@@ -33,10 +34,9 @@ jobs:
3334
with:
3435
python-version: ${{ matrix.python-version }}
3536
- 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'}}
37+
run: |
38+
pip install pip --upgrade
39+
pip install wheel
4040
- name: Install PyTorch
4141
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
4242
- name: Install mmseg dependencies
@@ -62,7 +62,8 @@ jobs:
6262
strategy:
6363
matrix:
6464
python-version: [3.7]
65-
torch: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, 1.11.0]
65+
torch: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.0]
66+
# torch: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.0, 1.13.0]
6667
include:
6768
- torch: 1.6.0
6869
torchvision: 0.7.0
@@ -76,14 +77,20 @@ jobs:
7677
torchvision: 0.11.2
7778
- torch: 1.11.0
7879
torchvision: 0.12.0
80+
- torch: 1.12.0
81+
torchvision: 0.13.0
82+
# - torch: 1.13.0
83+
# torchvision: 0.14.0
7984
steps:
8085
- uses: actions/checkout@v2
8186
- name: Set up Python ${{ matrix.python-version }}
8287
uses: actions/setup-python@v2
8388
with:
8489
python-version: ${{ matrix.python-version }}
8590
- name: Upgrade pip
86-
run: pip install pip --upgrade
91+
run: |
92+
pip install pip --upgrade
93+
pip install wheel
8794
- name: Install Pillow
8895
run: pip install Pillow==6.2.2
8996
- name: Install PyTorch
@@ -102,18 +109,19 @@ jobs:
102109
run: rm -rf .eggs && pip install -e .
103110
- name: Run unittests and generate coverage report
104111
# timm from v0.6.11 requires torch>=1.7
105-
if: ${{matrix.torch >= '1.7.0'}}
112+
if: ${{matrix.torch != '1.6.0'}}
106113
run: |
107114
pip install timm
108115
coverage run --branch --source mmseg -m pytest tests/
109116
coverage xml
110117
coverage report -m
111118
- name: Skip timm unittests and generate coverage report
119+
if: ${{matrix.torch == '1.6.0'}}
112120
run: |
113121
coverage run --branch --source mmseg -m pytest tests/ --ignore tests/test_models/test_backbones/test_timm_backbone.py
114122
coverage xml
115123
coverage report -m
116-
# Only upload coverage report for python3.7 && pytorch1.8.1 without timm
124+
# Only upload coverage report for python3.7 && pytorch1.8.1 with timm
117125
- name: Upload coverage to Codecov
118126
if: ${{matrix.torch == '1.8.1' && matrix.python-version == '3.7'}}
119127
uses: codecov/codecov-action@v2
@@ -141,14 +149,58 @@ jobs:
141149
with:
142150
python-version: ${{ matrix.python-version }}
143151
- name: Upgrade pip
144-
run: pip install pip --upgrade
152+
run: |
153+
pip install pip --upgrade
154+
pip install wheel
155+
- name: Fetch GPG keys
156+
run: |
157+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
158+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
159+
- name: Install Python-dev
160+
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
161+
- name: Install system dependencies
162+
run: |
163+
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
164+
- name: Install mmseg dependencies
165+
run: |
166+
python -V
167+
pip install -U openmim
168+
pip install git+https://github.com/open-mmlab/mmengine.git
169+
mim install 'mmcv>=2.0.0rc3'
170+
pip install git+https://github.com/open-mmlab/[email protected]
171+
pip install git+https://github.com/open-mmlab/[email protected]
172+
- name: Install unittest dependencies
173+
run: pip install -r requirements/tests.txt -r requirements/optional.txt
174+
- name: Build and install
175+
run: |
176+
python setup.py check -m -s
177+
TORCH_CUDA_ARCH_LIST=7.0 pip install -e .
178+
build_cu116:
179+
runs-on: ubuntu-18.04
180+
container:
181+
image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
182+
strategy:
183+
matrix:
184+
python-version: [3.7]
185+
include:
186+
- torch: 1.13.0
187+
cuda: 11.6
188+
steps:
189+
- uses: actions/checkout@v2
190+
- name: Set up Python ${{ matrix.python-version }}
191+
uses: actions/setup-python@v2
192+
with:
193+
python-version: ${{ matrix.python-version }}
194+
- name: Upgrade pip
195+
run: |
196+
pip install pip --upgrade
197+
pip install wheel
145198
- name: Fetch GPG keys
146199
run: |
147200
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
148201
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
149202
- name: Install Python-dev
150203
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
151-
if: ${{matrix.python-version != 3.9}}
152204
- name: Install system dependencies
153205
run: |
154206
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
@@ -180,7 +232,9 @@ jobs:
180232
with:
181233
python-version: ${{ matrix.python-version }}
182234
- name: Upgrade pip
183-
run: python -m pip install pip --upgrade
235+
run: |
236+
python -m pip install pip --upgrade
237+
pip install wheel
184238
- name: Install OpenCV
185239
run: pip install opencv-python>=3
186240
- name: Install PyTorch

.github/workflows/pr_stage_test.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- 'demo/**'
1010
- '.dev_scripts/**'
1111
- '.circleci/**'
12+
- 'projects/**'
1213

1314
concurrency:
1415
group: ${{ github.workflow }}-${{ github.ref }}
@@ -30,7 +31,10 @@ jobs:
3031
with:
3132
python-version: ${{ matrix.python-version }}
3233
- name: Upgrade pip
33-
run: pip install pip --upgrade
34+
run: |
35+
pip install pip --upgrade
36+
# Install wheel for source distribution build. https://github.com/pypa/pip/blob/main/src/pip/_internal/wheel_builder.py#L94
37+
pip install wheel
3438
- name: Install Pillow
3539
run: pip install Pillow==6.2.2
3640
if: ${{matrix.torchvision == '0.4.2'}}
@@ -49,10 +53,11 @@ jobs:
4953
run: rm -rf .eggs && pip install -e .
5054
- name: Run unittests and generate coverage report
5155
run: |
52-
coverage run --branch --source mmseg -m pytest tests/ --ignore tests/test_models/test_backbones/test_timm_backbone.py
56+
pip install timm
57+
coverage run --branch --source mmseg -m pytest tests/
5358
coverage xml
5459
coverage report -m
55-
# Upload coverage report for python3.7 && pytorch1.8.1 cpu without timm
60+
# Upload coverage report for python3.7 && pytorch1.8.1 cpu with timm
5661
- name: Upload coverage to Codecov
5762
uses: codecov/[email protected]
5863
with:
@@ -76,7 +81,9 @@ jobs:
7681
with:
7782
python-version: ${{ matrix.python-version }}
7883
- name: Upgrade pip
79-
run: pip install pip --upgrade
84+
run: |
85+
pip install pip --upgrade
86+
pip install wheel
8087
- name: Fetch GPG keys
8188
run: |
8289
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
@@ -116,7 +123,9 @@ jobs:
116123
with:
117124
python-version: ${{ matrix.python-version }}
118125
- name: Upgrade pip
119-
run: python -m pip install pip --upgrade
126+
run: |
127+
python -m pip install pip --upgrade
128+
pip install wheel
120129
- name: Install OpenCV
121130
run: pip install opencv-python>=3
122131
- name: Install PyTorch

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
3030
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
3131

32-
Documentation: https://mmsegmentation.readthedocs.io/en/1.x/
32+
Documentation: <https://mmsegmentation.readthedocs.io/en/1.x/>
3333

3434
English | [简体中文](README_zh-CN.md)
3535

@@ -62,10 +62,11 @@ The 1.x branch works with **PyTorch 1.6+**.
6262

6363
## What's New
6464

65-
v1.0.0rc2 was released in 6/12/2022.
65+
v1.0.0rc3 was released in 31/12/2022.
6666
Please refer to [changelog.md](docs/en/notes/changelog.md) for details and release history.
6767

68-
- Support MaskFormer and Mask2Former ([#2215](https://github.com/open-mmlab/mmsegmentation/pull/2215), [2255](https://github.com/open-mmlab/mmsegmentation/pull/2255))
68+
- Support test time augmentation ([#2184](https://github.com/open-mmlab/mmsegmentation/pull/2184))
69+
- Add 'Projects/' folder and the first example project ([#2412](https://github.com/open-mmlab/mmsegmentation/pull/2412))
6970

7071
## Installation
7172

README_zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
3030
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
3131

32-
文档: https://mmsegmentation.readthedocs.io/zh_CN/latest
32+
文档: <https://mmsegmentation.readthedocs.io/zh_CN/latest>
3333

3434
[English](README.md) | 简体中文
3535

@@ -61,7 +61,7 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
6161

6262
## 更新日志
6363

64-
最新版本 v1.0.0rc2 在 2022.12.6 发布。
64+
最新版本 v1.0.0rc3 在 2022.12.31 发布。
6565
如果想了解更多版本更新细节和历史信息,请阅读[更新日志](docs/en/notes/changelog.md)
6666

6767
## 安装

configs/_base_/datasets/ade20k.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@
2323
dict(type='LoadAnnotations', reduce_zero_label=True),
2424
dict(type='PackSegInputs')
2525
]
26+
img_ratios = [0.5, 0.75, 1.0, 1.25, 1.5, 1.75]
27+
tta_pipeline = [
28+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
29+
dict(
30+
type='TestTimeAug',
31+
transforms=[
32+
[
33+
dict(type='Resize', scale_factor=r, keep_ratio=True)
34+
for r in img_ratios
35+
],
36+
[
37+
dict(type='RandomFlip', prob=0., direction='horizontal'),
38+
dict(type='RandomFlip', prob=1., direction='horizontal')
39+
], [dict(type='LoadAnnotations')], [dict(type='PackSegInputs')]
40+
])
41+
]
2642
train_dataloader = dict(
2743
batch_size=4,
2844
num_workers=4,

configs/_base_/datasets/ade20k_640x640.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@
2323
dict(type='LoadAnnotations', reduce_zero_label=True),
2424
dict(type='PackSegInputs')
2525
]
26+
img_ratios = [0.5, 0.75, 1.0, 1.25, 1.5, 1.75]
27+
tta_pipeline = [
28+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
29+
dict(
30+
type='TestTimeAug',
31+
transforms=[
32+
[
33+
dict(type='Resize', scale_factor=r, keep_ratio=True)
34+
for r in img_ratios
35+
],
36+
[
37+
dict(type='RandomFlip', prob=0., direction='horizontal'),
38+
dict(type='RandomFlip', prob=1., direction='horizontal')
39+
], [dict(type='LoadAnnotations')], [dict(type='PackSegInputs')]
40+
])
41+
]
2642
train_dataloader = dict(
2743
batch_size=4,
2844
num_workers=4,

configs/_base_/datasets/chase_db1.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@
2424
dict(type='LoadAnnotations'),
2525
dict(type='PackSegInputs')
2626
]
27+
img_ratios = [0.5, 0.75, 1.0, 1.25, 1.5, 1.75]
28+
tta_pipeline = [
29+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
30+
dict(
31+
type='TestTimeAug',
32+
transforms=[
33+
[
34+
dict(type='Resize', scale_factor=r, keep_ratio=True)
35+
for r in img_ratios
36+
],
37+
[
38+
dict(type='RandomFlip', prob=0., direction='horizontal'),
39+
dict(type='RandomFlip', prob=1., direction='horizontal')
40+
], [dict(type='LoadAnnotations')], [dict(type='PackSegInputs')]
41+
])
42+
]
2743

2844
train_dataloader = dict(
2945
batch_size=4,

configs/_base_/datasets/cityscapes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@
2323
dict(type='LoadAnnotations'),
2424
dict(type='PackSegInputs')
2525
]
26+
img_ratios = [0.5, 0.75, 1.0, 1.25, 1.5, 1.75]
27+
tta_pipeline = [
28+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
29+
dict(
30+
type='TestTimeAug',
31+
transforms=[
32+
[
33+
dict(type='Resize', scale_factor=r, keep_ratio=True)
34+
for r in img_ratios
35+
],
36+
[
37+
dict(type='RandomFlip', prob=0., direction='horizontal'),
38+
dict(type='RandomFlip', prob=1., direction='horizontal')
39+
], [dict(type='LoadAnnotations')], [dict(type='PackSegInputs')]
40+
])
41+
]
2642
train_dataloader = dict(
2743
batch_size=2,
2844
num_workers=2,

configs/_base_/datasets/coco-stuff10k.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@
2323
dict(type='LoadAnnotations', reduce_zero_label=True),
2424
dict(type='PackSegInputs')
2525
]
26+
img_ratios = [0.5, 0.75, 1.0, 1.25, 1.5, 1.75]
27+
tta_pipeline = [
28+
dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
29+
dict(
30+
type='TestTimeAug',
31+
transforms=[
32+
[
33+
dict(type='Resize', scale_factor=r, keep_ratio=True)
34+
for r in img_ratios
35+
],
36+
[
37+
dict(type='RandomFlip', prob=0., direction='horizontal'),
38+
dict(type='RandomFlip', prob=1., direction='horizontal')
39+
], [dict(type='LoadAnnotations')], [dict(type='PackSegInputs')]
40+
])
41+
]
2642
train_dataloader = dict(
2743
batch_size=4,
2844
num_workers=4,

0 commit comments

Comments
 (0)