Merge branch 'dev-1.x' of github.com:open-mmlab/mmsegmentation into main
commit
b600f7cb26
|
@ -26,7 +26,7 @@ workflows:
|
|||
tools/.* lint_only false
|
||||
configs/.* lint_only false
|
||||
.circleci/.* lint_only false
|
||||
base-revision: dev-1.x
|
||||
base-revision: main
|
||||
# this is the path of the configuration we should trigger once
|
||||
# path filtering and pipeline parameter value updates are
|
||||
# complete. In this case, we are using the parent dynamic
|
||||
|
|
|
@ -62,8 +62,8 @@ jobs:
|
|||
pip install git+https://github.com/open-mmlab/mmengine.git@main
|
||||
pip install -U openmim
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
pip install mmcls==1.0.0rc6
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@main
|
||||
pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- run:
|
||||
name: Build and install
|
||||
|
@ -96,7 +96,6 @@ jobs:
|
|||
name: Clone Repos
|
||||
command: |
|
||||
git clone -b main --depth 1 https://github.com/open-mmlab/mmengine.git /home/circleci/mmengine
|
||||
git clone -b dev-1.x --depth 1 https://github.com/open-mmlab/mmclassification.git /home/circleci/mmclassification
|
||||
git clone -b dev-3.x --depth 1 https://github.com/open-mmlab/mmdetection.git /home/circleci/mmdetection
|
||||
- run:
|
||||
name: Build Docker image
|
||||
|
@ -109,7 +108,7 @@ jobs:
|
|||
docker exec mmseg pip install -e /mmengine
|
||||
docker exec mmseg pip install -U openmim
|
||||
docker exec mmseg mim install 'mmcv>=2.0.0rc4'
|
||||
docker exec mmseg pip install -e /mmclassification
|
||||
docker exec mmseg pip install mmcls==1.0.0rc6
|
||||
docker exec mmseg pip install -e /mmdetection
|
||||
docker exec mmseg pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- run:
|
||||
|
@ -130,8 +129,7 @@ workflows:
|
|||
branches:
|
||||
ignore:
|
||||
- dev-1.x
|
||||
- 1.x
|
||||
- master
|
||||
- main
|
||||
pr_stage_test:
|
||||
when:
|
||||
not:
|
||||
|
@ -143,8 +141,7 @@ workflows:
|
|||
branches:
|
||||
ignore:
|
||||
- dev-1.x
|
||||
- 1.x
|
||||
- master
|
||||
- main
|
||||
- build_cpu:
|
||||
name: minimum_version_cpu
|
||||
torch: 1.6.0
|
||||
|
@ -187,4 +184,4 @@ workflows:
|
|||
branches:
|
||||
only:
|
||||
- dev-1.x
|
||||
- 1.x
|
||||
- main
|
||||
|
|
|
@ -8,12 +8,12 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build-n-publish:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Build MMSegmentation
|
||||
|
|
|
@ -8,11 +8,11 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install pre-commit hook
|
||||
|
|
|
@ -19,7 +19,7 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build_cpu_py:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.8, 3.9]
|
||||
|
@ -28,9 +28,9 @@ jobs:
|
|||
- torch: 1.8.1
|
||||
torchvision: 0.9.1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
|
@ -45,8 +45,8 @@ jobs:
|
|||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
pip install mmcls==1.0.0rc6
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@main
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
|
@ -58,7 +58,7 @@ jobs:
|
|||
coverage xml
|
||||
coverage report -m
|
||||
build_cpu_pt:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
|
@ -82,9 +82,9 @@ jobs:
|
|||
# - torch: 1.13.0
|
||||
# torchvision: 0.14.0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
|
@ -101,8 +101,8 @@ jobs:
|
|||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
pip install mmcls==1.0.0rc6
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@main
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
|
@ -131,93 +131,6 @@ jobs:
|
|||
env_vars: OS,PYTHON
|
||||
name: codecov-umbrella
|
||||
fail_ci_if_error: false
|
||||
|
||||
build_cu102:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
include:
|
||||
- torch: 1.8.1
|
||||
cuda: 10.2
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
run: |
|
||||
pip install pip --upgrade
|
||||
pip install wheel
|
||||
- name: Fetch GPG keys
|
||||
run: |
|
||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||
- name: Install Python-dev
|
||||
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
|
||||
- name: Install mmseg dependencies
|
||||
run: |
|
||||
python -V
|
||||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
run: |
|
||||
python setup.py check -m -s
|
||||
TORCH_CUDA_ARCH_LIST=7.0 pip install -e .
|
||||
build_cu116:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
include:
|
||||
- torch: 1.13.0
|
||||
cuda: 11.6
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
run: |
|
||||
pip install pip --upgrade
|
||||
pip install wheel
|
||||
- name: Fetch GPG keys
|
||||
run: |
|
||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||
- name: Install Python-dev
|
||||
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6
|
||||
- name: Install mmseg dependencies
|
||||
run: |
|
||||
python -V
|
||||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
run: |
|
||||
python setup.py check -m -s
|
||||
TORCH_CUDA_ARCH_LIST=7.0 pip install -e .
|
||||
build_windows:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
@ -226,9 +139,9 @@ jobs:
|
|||
python: [3.7]
|
||||
platform: [cpu, cu111]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
|
@ -245,8 +158,8 @@ jobs:
|
|||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
pip install mmcls==1.0.0rc6
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@main
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
|
|
|
@ -17,7 +17,7 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build_cpu:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
|
@ -25,9 +25,9 @@ jobs:
|
|||
- torch: 1.8.1
|
||||
torchvision: 0.9.1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
|
@ -45,8 +45,8 @@ jobs:
|
|||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
pip install mmcls==1.0.0rc6
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@main
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
|
@ -66,49 +66,6 @@ jobs:
|
|||
env_vars: OS,PYTHON
|
||||
name: codecov-umbrella
|
||||
fail_ci_if_error: false
|
||||
|
||||
build_cu102:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
run: |
|
||||
pip install pip --upgrade
|
||||
pip install wheel
|
||||
- name: Fetch GPG keys
|
||||
run: |
|
||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
||||
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||
- name: Install Python-dev
|
||||
run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev
|
||||
if: ${{matrix.python-version != 3.9}}
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev
|
||||
- name: Install mmseg dependencies
|
||||
run: |
|
||||
python -V
|
||||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
run: |
|
||||
python setup.py check -m -s
|
||||
TORCH_CUDA_ARCH_LIST=7.0 pip install -e .
|
||||
build_windows:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
@ -117,9 +74,9 @@ jobs:
|
|||
python: [3.7]
|
||||
platform: [cpu, cu111]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
|
@ -136,8 +93,8 @@ jobs:
|
|||
pip install -U openmim
|
||||
pip install git+https://github.com/open-mmlab/mmengine.git
|
||||
mim install 'mmcv>=2.0.0rc4'
|
||||
pip install git+https://github.com/open-mmlab/mmclassification.git@dev-1.x
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x
|
||||
pip install mmcls==1.0.0rc6
|
||||
pip install git+https://github.com/open-mmlab/mmdetection.git@main
|
||||
- name: Install unittest dependencies
|
||||
run: pip install -r requirements/tests.txt -r requirements/optional.txt
|
||||
- name: Build and install
|
||||
|
|
|
@ -18,7 +18,7 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
build_cpu:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
|
@ -28,9 +28,9 @@ jobs:
|
|||
torch_version: torch1.8
|
||||
torchvision: 0.9.0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Upgrade pip
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include requirements/*.txt
|
||||
include mmseg/.mim/model-index.yml
|
||||
recursive-include mmseg/.mim/configs *.py *.yml
|
||||
recursive-include mmseg/.mim/configs *.py *.yaml
|
||||
recursive-include mmseg/.mim/tools *.py *.sh
|
||||
|
|
61
README.md
61
README.md
|
@ -20,14 +20,14 @@
|
|||
|
||||
[](https://pypi.org/project/mmsegmentation/)
|
||||
[](https://pypi.org/project/mmsegmentation)
|
||||
[](https://mmsegmentation.readthedocs.io/en/1.x/)
|
||||
[](https://mmsegmentation.readthedocs.io/en/main/)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/actions)
|
||||
[](https://codecov.io/gh/open-mmlab/mmsegmentation)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/blob/1.x/LICENSE)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/blob/main/LICENSE)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/issues)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/issues)
|
||||
|
||||
Documentation: <https://mmsegmentation.readthedocs.io/en/1.x/>
|
||||
Documentation: <https://mmsegmentation.readthedocs.io/en/main/>
|
||||
|
||||
English | [简体中文](README_zh-CN.md)
|
||||
|
||||
|
@ -58,7 +58,13 @@ English | [简体中文](README_zh-CN.md)
|
|||
MMSegmentation is an open source semantic segmentation toolbox based on PyTorch.
|
||||
It is a part of the OpenMMLab project.
|
||||
|
||||
The 1.x branch works with **PyTorch 1.6+**.
|
||||
The [main](https://github.com/open-mmlab/mmsegmentation/tree/main) branch works with PyTorch 1.6+.
|
||||
|
||||
### 🎉 Introducing MMSegmentation v1.0.0 🎉
|
||||
|
||||
We are thrilled to announce the official release of MMSegmentation's latest version! For this new release, the [main](https://github.com/open-mmlab/mmsegmentation/tree/main) branch serves as the primary branch, while the development branch is [dev-1.x](https://github.com/open-mmlab/mmsegmentation/tree/dev-1.x). The stable branch for the previous release remains as the [0.x](https://github.com/open-mmlab/mmsegmentation/tree/0.x) branch. Please note that the [master](https://github.com/open-mmlab/mmsegmentation/tree/master) branch will only be maintained for a limited time before being removed. We encourage you to be mindful of branch selection and updates during use. Thank you for your unwavering support and enthusiasm, and let's work together to make MMSegmentation even more robust and powerful! 💪
|
||||
|
||||
MMSegmentation v1.x brings remarkable improvements over the 0.x release, offering a more flexible and feature-packed experience. To utilize the new features in v1.x, we kindly invite you to consult our detailed [📚 migration guide](https://mmsegmentation.readthedocs.io/en/main/migration/interface.html), which will help you seamlessly transition your projects. Your support is invaluable, and we eagerly await your feedback!
|
||||
|
||||

|
||||
|
||||
|
@ -82,11 +88,12 @@ The 1.x branch works with **PyTorch 1.6+**.
|
|||
|
||||
## What's New
|
||||
|
||||
v1.0.0rc6 was released on 03/03/2023.
|
||||
v1.0.0 was released on 04/06/2023.
|
||||
Please refer to [changelog.md](docs/en/notes/changelog.md) for details and release history.
|
||||
|
||||
- Support MMSegInferencer ([#2413](https://github.com/open-mmlab/mmsegmentation/pull/2413), [#2658](https://github.com/open-mmlab/mmsegmentation/pull/2658))
|
||||
- Support REFUGE dataset ([#2554](https://github.com/open-mmlab/mmsegmentation/pull/2554))
|
||||
- Add Mapillary Vistas Datasets support to MMSegmentation Core Package ([#2576](https://github.com/open-mmlab/mmsegmentation/pull/2576))
|
||||
- Support PIDNet ([#2609](https://github.com/open-mmlab/mmsegmentation/pull/2609))
|
||||
- Support SegNeXt ([#2654](https://github.com/open-mmlab/mmsegmentation/pull/2654))
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -96,12 +103,12 @@ Please refer to [get_started.md](docs/en/get_started.md#installation) for instal
|
|||
|
||||
Please see [Overview](docs/en/overview.md) for the general introduction of MMSegmentation.
|
||||
|
||||
Please see [user guides](https://mmsegmentation.readthedocs.io/en/1.x/user_guides/index.html#) for the basic usage of MMSegmentation.
|
||||
Please see [user guides](https://mmsegmentation.readthedocs.io/en/main/user_guides/index.html#) for the basic usage of MMSegmentation.
|
||||
There are also [advanced tutorials](https://mmsegmentation.readthedocs.io/en/main/advanced_guides/index.html) for in-depth understanding of mmseg design and implementation .
|
||||
|
||||
A Colab tutorial is also provided. You may preview the notebook [here](demo/MMSegmentation_Tutorial.ipynb) or directly [run](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/1.x/demo/MMSegmentation_Tutorial.ipynb) on Colab.
|
||||
A Colab tutorial is also provided. You may preview the notebook [here](demo/MMSegmentation_Tutorial.ipynb) or directly [run](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/main/demo/MMSegmentation_Tutorial.ipynb) on Colab.
|
||||
|
||||
To migrate from MMSegmentation 1.x, please refer to [migration](docs/en/migration).
|
||||
To migrate from MMSegmentation 0.x, please refer to [migration](docs/en/migration).
|
||||
|
||||
## Benchmark and model zoo
|
||||
|
||||
|
@ -173,23 +180,23 @@ Results and models are available in the [model zoo](docs/en/model_zoo.md).
|
|||
<details open>
|
||||
<summary>Supported datasets:</summary>
|
||||
|
||||
- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#cityscapes)
|
||||
- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#pascal-voc)
|
||||
- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#ade20k)
|
||||
- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#pascal-context)
|
||||
- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#coco-stuff-10k)
|
||||
- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#coco-stuff-164k)
|
||||
- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#chase-db1)
|
||||
- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#drive)
|
||||
- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#hrf)
|
||||
- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#stare)
|
||||
- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#dark-zurich)
|
||||
- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#nighttime-driving)
|
||||
- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#loveda)
|
||||
- [x] [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isprs-potsdam)
|
||||
- [x] [Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isprs-vaihingen)
|
||||
- [x] [iSAID](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isaid)
|
||||
- [x] [Mapillary Vistas](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#mapillary-vistas-datasets)
|
||||
- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#cityscapes)
|
||||
- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#pascal-voc)
|
||||
- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#ade20k)
|
||||
- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#pascal-context)
|
||||
- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#coco-stuff-10k)
|
||||
- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#coco-stuff-164k)
|
||||
- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#chase-db1)
|
||||
- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#drive)
|
||||
- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#hrf)
|
||||
- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#stare)
|
||||
- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#dark-zurich)
|
||||
- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#nighttime-driving)
|
||||
- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#loveda)
|
||||
- [x] [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#isprs-potsdam)
|
||||
- [x] [Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#isprs-vaihingen)
|
||||
- [x] [iSAID](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#isaid)
|
||||
- [x] [Mapillary Vistas](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#mapillary-vistas-datasets)
|
||||
|
||||
</details>
|
||||
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
|
||||
[](https://pypi.org/project/mmsegmentation/)
|
||||
[](https://pypi.org/project/mmsegmentation)
|
||||
[](https://mmsegmentation.readthedocs.io/zh_CN/1.x/)
|
||||
[](https://mmsegmentation.readthedocs.io/zh_CN/main/)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/actions)
|
||||
[](https://codecov.io/gh/open-mmlab/mmsegmentation)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/blob/1.x/LICENSE)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/blob/main/LICENSE)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/issues)
|
||||
[](https://github.com/open-mmlab/mmsegmentation/issues)
|
||||
|
||||
文档: <https://mmsegmentation.readthedocs.io/zh_CN/latest>
|
||||
文档: <https://mmsegmentation.readthedocs.io/zh_CN/main>
|
||||
|
||||
[English](README.md) | 简体中文
|
||||
|
||||
|
@ -57,7 +57,13 @@
|
|||
|
||||
MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 OpenMMLab 项目的一部分。
|
||||
|
||||
1.x 分支代码目前支持 PyTorch 1.6 以上的版本。
|
||||
[main](https://github.com/open-mmlab/mmsegmentation/tree/main) 分支代码目前支持 PyTorch 1.6 以上的版本。
|
||||
|
||||
### 🎉 MMSegmentation v1.0.0 简介 🎉
|
||||
|
||||
我们非常高兴地宣布 MMSegmentation 最新版本的正式发布!在这个新版本中,主要分支是 [main](https://github.com/open-mmlab/mmsegmentation/tree/main) 分支,开发分支是 [dev-1.x](https://github.com/open-mmlab/mmsegmentation/tree/dev-1.x)。而之前版本的稳定分支保留为 [0.x](https://github.com/open-mmlab/mmsegmentation/tree/0.x) 分支。请注意,[master](https://github.com/open-mmlab/mmsegmentation/tree/master) 分支将只在有限的时间内维护,然后将被删除。我们鼓励您在使用过程中注意分支选择和更新。感谢您一如既往的支持和热情,让我们共同努力,使 MMSegmentation 变得更加健壮和强大!💪
|
||||
|
||||
MMSegmentation v1.x 在 0.x 版本的基础上有了显著的提升,提供了更加灵活和功能丰富的体验。为了更好使用 v1.x 中的新功能,我们诚挚邀请您查阅我们详细的 [📚 迁移指南](https://mmsegmentation.readthedocs.io/zh_CN/main/migration/interface.html),以帮助您无缝地过渡您的项目。您的支持对我们来说非常宝贵,我们热切期待您的反馈!
|
||||
|
||||

|
||||
|
||||
|
@ -81,7 +87,7 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
|
|||
|
||||
## 更新日志
|
||||
|
||||
最新版本 v1.0.0rc6 在 2023.03.03 发布。
|
||||
最新版本 v1.0.0 在 2023.04.06 发布。
|
||||
如果想了解更多版本更新细节和历史信息,请阅读[更新日志](docs/en/notes/changelog.md)。
|
||||
|
||||
## 安装
|
||||
|
@ -92,11 +98,11 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
|
|||
|
||||
请参考[概述](docs/zh_cn/overview.md)对 MMSegmetation 进行初步了解
|
||||
|
||||
请参考[用户指南](https://mmsegmentation.readthedocs.io/zh_CN/1.x/user_guides/index.html)了解 mmseg 的基本使用,以及[进阶指南](https://mmsegmentation.readthedocs.io/zh_CN/1.x/advanced_guides/index.html)深入了解 mmseg 设计和代码实现。
|
||||
请参考[用户指南](https://mmsegmentation.readthedocs.io/zh_CN/main/user_guides/index.html)了解 mmseg 的基本使用,以及[进阶指南](https://mmsegmentation.readthedocs.io/zh_CN/main/advanced_guides/index.html)深入了解 mmseg 设计和代码实现。
|
||||
|
||||
同时,我们提供了 Colab 教程。你可以在[这里](demo/MMSegmentation_Tutorial.ipynb)浏览教程,或者直接在 Colab 上[运行](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/1.x/demo/MMSegmentation_Tutorial.ipynb)。
|
||||
同时,我们提供了 Colab 教程。你可以在[这里](demo/MMSegmentation_Tutorial.ipynb)浏览教程,或者直接在 Colab 上[运行](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/main/demo/MMSegmentation_Tutorial.ipynb)。
|
||||
|
||||
若需要将0.x版本的代码迁移至新版,请参考[迁移文档](docs/zh_cn/migration)。
|
||||
若需要将 0.x 版本的代码迁移至新版,请参考[迁移文档](docs/zh_cn/migration)。
|
||||
|
||||
## 基准测试和模型库
|
||||
|
||||
|
@ -168,23 +174,23 @@ MMSegmentation 是一个基于 PyTorch 的语义分割开源工具箱。它是 O
|
|||
<details open>
|
||||
<summary>已支持的数据集:</summary>
|
||||
|
||||
- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#cityscapes)
|
||||
- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#pascal-voc)
|
||||
- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#ade20k)
|
||||
- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#pascal-context)
|
||||
- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#coco-stuff-10k)
|
||||
- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#coco-stuff-164k)
|
||||
- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#chase-db1)
|
||||
- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#drive)
|
||||
- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#hrf)
|
||||
- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#stare)
|
||||
- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#dark-zurich)
|
||||
- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#nighttime-driving)
|
||||
- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#loveda)
|
||||
- [x] [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#isprs-potsdam)
|
||||
- [x] [Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#isprs-vaihingen)
|
||||
- [x] [iSAID](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/zh_cn/dataset_prepare.md#isaid)
|
||||
- [x] [Mapillary Vistas](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#mapillary-vistas-datasets)
|
||||
- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#cityscapes)
|
||||
- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#pascal-voc)
|
||||
- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#ade20k)
|
||||
- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#pascal-context)
|
||||
- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#coco-stuff-10k)
|
||||
- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#coco-stuff-164k)
|
||||
- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#chase-db1)
|
||||
- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#drive)
|
||||
- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#hrf)
|
||||
- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#stare)
|
||||
- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#dark-zurich)
|
||||
- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#nighttime-driving)
|
||||
- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#loveda)
|
||||
- [x] [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#isprs-potsdam)
|
||||
- [x] [Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#isprs-vaihingen)
|
||||
- [x] [iSAID](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/zh_cn/dataset_prepare.md#isaid)
|
||||
- [x] [Mapillary Vistas](https://github.com/open-mmlab/mmsegmentation/blob/main/docs/en/user_guides/2_dataset_prepare.md#mapillary-vistas-datasets)
|
||||
|
||||
</details>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
ARG PYTORCH="1.11.0"
|
||||
ARG CUDA="11.3"
|
||||
ARG CUDNN="8"
|
||||
ARG MMCV="2.0.0rc4"
|
||||
ARG MMCV="2.0.0"
|
||||
|
||||
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ ARG CUDA="11.3"
|
|||
ARG CUDNN="8"
|
||||
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
|
||||
|
||||
ARG MMCV="2.0.0rc4"
|
||||
ARG MMSEG="1.0.0rc6"
|
||||
ARG MMCV="2.0.0"
|
||||
ARG MMSEG="1.0.0"
|
||||
|
||||
ENV PYTHONUNBUFFERED TRUE
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ We recommend that users follow our best practices to install MMSegmentation. How
|
|||
```shell
|
||||
pip install -U openmim
|
||||
mim install mmengine
|
||||
mim install "mmcv>=2.0.0rc1"
|
||||
mim install "mmcv>=2.0.0"
|
||||
```
|
||||
|
||||
**Step 1.** Install MMSegmentation.
|
||||
|
@ -62,7 +62,7 @@ pip install -v -e .
|
|||
Case b: If you use mmsegmentation as a dependency or third-party package, install it with pip:
|
||||
|
||||
```shell
|
||||
pip install "mmsegmentation>=1.0.0rc0"
|
||||
pip install "mmsegmentation>=1.0.0"
|
||||
```
|
||||
|
||||
### Verify the installation
|
||||
|
@ -136,15 +136,15 @@ MMCV contains C++ and CUDA extensions, thus depending on PyTorch in a complex wa
|
|||
|
||||
To install MMCV with pip instead of MIM, please follow [MMCV installation guides](https://mmcv.readthedocs.io/en/latest/get_started/installation.html). This requires manually specifying a find-url based on PyTorch version and its CUDA version.
|
||||
|
||||
For example, the following command install mmcv==2.0.0rc1 built for PyTorch 1.10.x and CUDA 11.3.
|
||||
For example, the following command install mmcv==2.0.0 built for PyTorch 1.10.x and CUDA 11.3.
|
||||
|
||||
```shell
|
||||
pip install mmcv==2.0.0rc1 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
|
||||
pip install mmcv==2.0.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
|
||||
```
|
||||
|
||||
#### Install on CPU-only platforms
|
||||
|
||||
MMSegmentation can be built for CPU only environment. In CPU mode you can train (requires MMCV-Lite version >= 2.0.0rc0), test or inference a model.
|
||||
MMSegmentation can be built for CPU only environment. In CPU mode you can train (requires MMCV version >= 2.0.0), test or inference a model.
|
||||
|
||||
#### Install on Google Colab
|
||||
|
||||
|
@ -156,7 +156,7 @@ thus we only need to install MMCV and MMSegmentation with the following commands
|
|||
```shell
|
||||
!pip3 install openmim
|
||||
!mim install mmengine
|
||||
!mim install "mmcv>=2.0.0rc1"
|
||||
!mim install "mmcv>=2.0.0"
|
||||
```
|
||||
|
||||
**Step 2.** Install MMSegmentation from the source.
|
||||
|
@ -173,7 +173,7 @@ thus we only need to install MMCV and MMSegmentation with the following commands
|
|||
```python
|
||||
import mmseg
|
||||
print(mmseg.__version__)
|
||||
# Example output: 1.0.0rc0
|
||||
# Example output: 1.0.0
|
||||
```
|
||||
|
||||
**Note:**
|
||||
|
|
|
@ -12,11 +12,11 @@ Or install the below packages manually.
|
|||
|
||||
1. [MMEngine](https://github.com/open-mmlab/mmengine): MMEngine is the core the OpenMMLab 2.0 architecture, and we splited many compentents unrelated to computer vision from MMCV to MMEngine.
|
||||
|
||||
2. [MMCV](https://github.com/open-mmlab/mmcv): The computer vision package of OpenMMLab. This is not a new dependency, but you need to upgrade it to above **2.0.0rc1** version.
|
||||
2. [MMCV](https://github.com/open-mmlab/mmcv): The computer vision package of OpenMMLab. This is not a new dependency, but you need to upgrade it to **2.0.0** version or above.
|
||||
|
||||
3. [MMClassification](https://github.com/open-mmlab/mmclassification)(Optional): The image classification toolbox and benchmark of OpenMMLab. This is not a new dependency, but you need to upgrade it to above **1.0.0rc0** version.
|
||||
3. [MMClassification](https://github.com/open-mmlab/mmclassification)(Optional): The image classification toolbox and benchmark of OpenMMLab. This is not a new dependency, but you need to upgrade it to **1.0.0rc6** version.
|
||||
|
||||
4. [MMDetection](https://github.com/open-mmlab/mmdetection)(Optional): The object detection toolbox and benchmark of OpenMMLab. This is not a new dependency, but you need to upgrade it to above **3.0.0rc0** version.
|
||||
4. [MMDetection](https://github.com/open-mmlab/mmdetection)(Optional): The object detection toolbox and benchmark of OpenMMLab. This is not a new dependency, but you need to upgrade it to **3.0.0** version or above.
|
||||
|
||||
## Train launch
|
||||
|
||||
|
@ -102,11 +102,11 @@ No changes in `model.backbone`, `model.neck`, `model.decode_head` and `model.los
|
|||
|
||||
Add `model.data_preprocessor` field to configure the `DataPreProcessor`, including:
|
||||
|
||||
- `mean`(Sequence, optional): The pixel mean of R, G, B channels. Defaults to None.
|
||||
- `mean` (Sequence, optional): The pixel mean of R, G, B channels. Defaults to None.
|
||||
|
||||
- `std`(Sequence, optional): The pixel standard deviation of R, G, B channels. Defaults to None.
|
||||
- `std` (Sequence, optional): The pixel standard deviation of R, G, B channels. Defaults to None.
|
||||
|
||||
- `size`(Sequence, optional): Fixed padding size.
|
||||
- `size` (Sequence, optional): Fixed padding size.
|
||||
|
||||
- `size_divisor` (int, optional): The divisor of padded size.
|
||||
|
||||
|
|
|
@ -1,5 +1,41 @@
|
|||
# Changelog of v1.x
|
||||
|
||||
## v1.0.0(04/06/2023)
|
||||
|
||||
### Highlights
|
||||
|
||||
- Add Mapillary Vistas Datasets support to MMSegmentation Core Package ([#2576](https://github.com/open-mmlab/mmsegmentation/pull/2576))
|
||||
- Support PIDNet ([#2609](https://github.com/open-mmlab/mmsegmentation/pull/2609))
|
||||
- Support SegNeXt ([#2654](https://github.com/open-mmlab/mmsegmentation/pull/2654))
|
||||
|
||||
### Features
|
||||
|
||||
- Support calculating FLOPs of segmentors ([#2706](https://github.com/open-mmlab/mmsegmentation/pull/2706))
|
||||
- Support multi-band image for Mosaic ([#2748](https://github.com/open-mmlab/mmsegmentation/pull/2748))
|
||||
- Support dump segment prediction ([#2712](https://github.com/open-mmlab/mmsegmentation/pull/2712))
|
||||
|
||||
### Bug fix
|
||||
|
||||
- Fix format_result and fix prefix param in cityscape metric, and rename CitysMetric to CityscapesMetric ([#2660](https://github.com/open-mmlab/mmsegmentation/pull/2660))
|
||||
- Support input gt seg map is not 2D ([#2739](https://github.com/open-mmlab/mmsegmentation/pull/2739))
|
||||
- Fix accepting an unexpected argument `local-rank` in PyTorch 2.0 ([#2812](https://github.com/open-mmlab/mmsegmentation/pull/2812))
|
||||
|
||||
### Documentation
|
||||
|
||||
- Add Chinese version of various documentation ([#2673](https://github.com/open-mmlab/mmsegmentation/pull/2673), [#2702](https://github.com/open-mmlab/mmsegmentation/pull/2702), [#2703](https://github.com/open-mmlab/mmsegmentation/pull/2703), [#2701](https://github.com/open-mmlab/mmsegmentation/pull/2701), [#2722](https://github.com/open-mmlab/mmsegmentation/pull/2722), [#2733](https://github.com/open-mmlab/mmsegmentation/pull/2733), [#2769](https://github.com/open-mmlab/mmsegmentation/pull/2769), [#2790](https://github.com/open-mmlab/mmsegmentation/pull/2790), [#2798](https://github.com/open-mmlab/mmsegmentation/pull/2798))
|
||||
- Update and refine various English documentation ([#2715](https://github.com/open-mmlab/mmsegmentation/pull/2715), [#2755](https://github.com/open-mmlab/mmsegmentation/pull/2755), [#2745](https://github.com/open-mmlab/mmsegmentation/pull/2745), [#2797](https://github.com/open-mmlab/mmsegmentation/pull/2797), [#2799](https://github.com/open-mmlab/mmsegmentation/pull/2799), [#2821](https://github.com/open-mmlab/mmsegmentation/pull/2821), [#2827](https://github.com/open-mmlab/mmsegmentation/pull/2827), [#2831](https://github.com/open-mmlab/mmsegmentation/pull/2831))
|
||||
- Add deeplabv3 model structure documentation ([#2426](https://github.com/open-mmlab/mmsegmentation/pull/2426))
|
||||
- Add custom metrics documentation ([#2799](https://github.com/open-mmlab/mmsegmentation/pull/2799))
|
||||
- Add faq in dev-1.x branch ([#2765](https://github.com/open-mmlab/mmsegmentation/pull/2765))
|
||||
|
||||
### New Contributors
|
||||
|
||||
- @liuruiqiang made their first contribution in https://github.com/open-mmlab/mmsegmentation/pull/2554
|
||||
- @wangjiangben-hw made their first contribution in https://github.com/open-mmlab/mmsegmentation/pull/2569
|
||||
- @jinxianwei made their first contribution in https://github.com/open-mmlab/mmsegmentation/pull/2557
|
||||
- @KKIEEK made their first contribution in https://github.com/open-mmlab/mmsegmentation/pull/2747
|
||||
- @Renzhihan made their first contribution in https://github.com/open-mmlab/mmsegmentation/pull/2765
|
||||
|
||||
## v1.0.0rc6(03/03/2023)
|
||||
|
||||
### Highlights
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# \[WIP\] Frequently Asked Questions (FAQ)
|
||||
# Frequently Asked Questions (FAQ)
|
||||
|
||||
We list some common troubles faced by many users and their corresponding solutions here. Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them. If the contents here do not cover your issue, please create an issue using the [provided templates](https://github.com/open-mmlab/mmsegmentation/blob/master/.github/ISSUE_TEMPLATE/error-report.md/) and make sure you fill in all required information in the template.
|
||||
We list some common troubles faced by many users and their corresponding solutions here. Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them. If the contents here do not cover your issue, please create an issue using the [provided templates](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/.github/ISSUE_TEMPLATE/error-report.md/) and make sure you fill in all required information in the template.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -8,13 +8,14 @@ The compatible MMSegmentation, MMCV and MMEngine versions are as below. Please i
|
|||
|
||||
| MMSegmentation version | MMCV version | MMEngine version | MMClassification (optional) version | MMDetection (optional) version |
|
||||
| :--------------------: | :----------------------------: | :---------------: | :---------------------------------: | :----------------------------: |
|
||||
| dev-1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
| 1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
| dev-1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| main branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0 | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0rc6 | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
| 1.0.0rc5 | mmcv >= 2.0.0rc4 | MMEngine >= 0.2.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc6 |
|
||||
| 1.0.0rc4 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4, \<=3.0.0rc5 |
|
||||
| 1.0.0rc3 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4 \<=3.0.0rc5 |
|
||||
| 1.0.0rc2 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4 \<=3.0.0rc5 |
|
||||
| 1.0.0rc3 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4, \<=3.0.0rc5 |
|
||||
| 1.0.0rc2 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4, \<=3.0.0rc5 |
|
||||
| 1.0.0rc1 | mmcv >= 2.0.0rc1, \<=2.0.0rc3> | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | Not required |
|
||||
| 1.0.0rc0 | mmcv >= 2.0.0rc1, \<=2.0.0rc3> | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | Not required |
|
||||
|
||||
|
@ -24,7 +25,102 @@ Notes:
|
|||
|
||||
- To install MMSegmentation 0.x and master branch, please refer to [the faq 0.x document](https://mmsegmentation.readthedocs.io/en/latest/faq.html#installation) to check compatible versions of MMCV.
|
||||
|
||||
- If you have installed an incompatible version of mmcv, please run `pip uninstall mmcv` to uninstall the installed mmcv first. If you have previously installed mmcv-full (which exists in OpenMMLab 1.x), please run `pip uninstall mmcv-full` to uninstall it.
|
||||
|
||||
- If "No module named 'mmcv'" appears, please follow the steps below;
|
||||
|
||||
1. Use `pip uninstall mmcv` to uninstall the existing mmcv in the environment.
|
||||
2. Install the corresponding mmcv according to the [installation instructions](https://mmsegmentation.readthedocs.io/en/dev-1.x/get_started.html#best-practices).
|
||||
|
||||
## How to know the number of GPUs needed to train the model
|
||||
|
||||
- Infer from the name of the config file of the model. You can refer to the `Config Name Style` part of [Learn about Configs](../user_guides/1_config.md). For example, for config file with name `segformer_mit-b0_8xb1-160k_cityscapes-1024x1024.py`, `8xb1` means training the model corresponding to it needs 8 GPUs, and the batch size of each GPU is 1.
|
||||
- Infer from the log file. Open the log file of the model and search `nGPU` in the file. The number of figures following `nGPU` is the number of GPUs needed to train the model. For instance, searching for `nGPU` in the log file yields the record `nGPU 0,1,2,3,4,5,6,7`, which indicates that eight GPUs are needed to train the model.
|
||||
|
||||
## What does the auxiliary head mean
|
||||
|
||||
Briefly, it is a deep supervision trick to improve the accuracy. In the training phase, `decode_head` is for decoding semantic segmentation output, `auxiliary_head` is just adding an auxiliary loss, the segmentation result produced by it has no impact to your model's result, it just works in training. You may read this [paper](https://arxiv.org/pdf/1612.01105.pdf) for more information.
|
||||
|
||||
## How to output the segmentation mask image when running the test script
|
||||
|
||||
In the test script, we provide `--out` argument to control whether output the painted images. Users might run the following command:
|
||||
|
||||
```shell
|
||||
python tools/test.py ${CONFIG_FILE} ${CHECKPOINT_FILE} --out ${OUTPUT_DIR}
|
||||
```
|
||||
|
||||
## How to handle binary segmentation task
|
||||
|
||||
MMSegmentation uses `num_classes` and `out_channels` to control output of last layer `self.conv_seg`. More details could be found [here](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/mmseg/models/decode_heads/decode_head.py).
|
||||
|
||||
`num_classes` should be the same as number of types of labels, in binary segmentation task, dataset only has two types of labels: foreground and background, so `num_classes=2`. `out_channels` controls the output channel of last layer of model, it usually equals to `num_classes`.
|
||||
But in binary segmentation task, there are two solutions:
|
||||
|
||||
- Set `out_channels=2`, using Cross Entropy Loss in training, using `F.softmax()` and `argmax()` to get prediction of each pixel in inference.
|
||||
|
||||
- Set `out_channels=1`, using Binary Cross Entropy Loss in training, using `F.sigmoid()` and `threshold` to get prediction of each pixel in inference. `threshold` is set 0.3 as default.
|
||||
|
||||
In summary, to implement binary segmentation methods users should modify below parameters in the `decode_head` and `auxiliary_head` configs. Here is a modification example of [pspnet_unet_s5-d16.py](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/_base_/models/pspnet_unet_s5-d16.py):
|
||||
|
||||
- (1) `num_classes=2`, `out_channels=2` and `use_sigmoid=False` in `CrossEntropyLoss`.
|
||||
|
||||
```python
|
||||
decode_head=dict(
|
||||
type='PSPHead',
|
||||
in_channels=64,
|
||||
in_index=4,
|
||||
num_classes=2,
|
||||
out_channels=2,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=128,
|
||||
in_index=3,
|
||||
num_classes=2,
|
||||
out_channels=2,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
|
||||
```
|
||||
|
||||
- (2) `num_classes=2`, `out_channels=1` and `use_sigmoid=True` in `CrossEntropyLoss`.
|
||||
|
||||
```python
|
||||
decode_head=dict(
|
||||
type='PSPHead',
|
||||
in_channels=64,
|
||||
in_index=4,
|
||||
num_classes=2,
|
||||
out_channels=1,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)),
|
||||
auxiliary_head=dict(
|
||||
type='FCNHead',
|
||||
in_channels=128,
|
||||
in_index=3,
|
||||
num_classes=2,
|
||||
out_channels=1,
|
||||
loss_decode=dict(
|
||||
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=0.4)),
|
||||
```
|
||||
|
||||
## Functionality of `reduce_zero_label`
|
||||
|
||||
The parameter type of `reduce_zero_label` in dataset is Boolean, which is default to False. It is used to ignore the dataset label 0. The specific method is to change label 0 to 255, and subtract 1 from the corresponding number of all the remaining labels. At the same time, set 255 as ignore index in the decode head, which means that it will not participate in the loss calculation.
|
||||
|
||||
Following is the specific implementation logic of `reduce_zero_label`:
|
||||
|
||||
```python
|
||||
if self.reduce_zero_label:
|
||||
# avoid using underflow conversion
|
||||
gt_semantic_seg[gt_semantic_seg == 0] = 255
|
||||
gt_semantic_seg = gt_semantic_seg - 1
|
||||
gt_semantic_seg[gt_semantic_seg == 254] = 255
|
||||
```
|
||||
|
||||
Whether your dataset needs to use `reduce_zero_label`, there are two types of situations:
|
||||
|
||||
- On [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isprs-potsdam) dataset, there are six classes: 0-Impervious surfaces, 1-Building, 2-Low vegetation, 3-Tree, 4-Car, 5-Clutter/background. However, this dataset provides two types of RGB labels, one with black pixels at the edges of the images, and the other without. For labels with black edges, in [dataset_converters.py](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/tools/dataset_converters/potsdam.py), it converts the black edges to label 0, and the other labels are 1-Impervious surfaces, 2-Building, 3-Low vegetation, 4-Tree, 5-Car, 6-Clutter/background. Therefore, in the dataset config [potsdam.py](https://github.com/open-mmlab/mmsegmentation/blob/ff95416c3b5ce8d62b9289f743531398efce534f/mmseg/datasets/potsdam.py#L23) `reduce_zero_label=True`。 If you are using labels without black edges, then there are only class 0-5 in the mask label. At this point, you should use `reduce_zero_label=False`. `reduce_zero_label` usage needs to be considered with your actual situation.
|
||||
- On a dataset with class 0 as the background class, if you need to separate the background from the rest of your classes ultimately then you do not need to use `reduce_zero_label`, which in the dataset config settings should be `reduce_zero_label=False`
|
||||
|
||||
**Note:** Please confirm the number of original classes in the dataset. If there are only two classes, you should not use `reduce_zero_label` which is `reduce_zero_label=False`.
|
||||
|
|
|
@ -43,7 +43,7 @@ conda install pytorch torchvision cpuonly -c pytorch
|
|||
```shell
|
||||
pip install -U openmim
|
||||
mim install mmengine
|
||||
mim install "mmcv>=2.0.0rc1"
|
||||
mim install "mmcv>=2.0.0"
|
||||
```
|
||||
|
||||
**步骤 1.** 安装 MMSegmentation
|
||||
|
@ -62,7 +62,7 @@ pip install -v -e .
|
|||
情况 b: 如果您把 mmsegmentation 作为依赖库或者第三方库,可以通过 pip 安装:
|
||||
|
||||
```shell
|
||||
pip install "mmsegmentation>=1.0.0rc0"
|
||||
pip install "mmsegmentation>=1.0.0"
|
||||
```
|
||||
|
||||
### 验证是否安装成功
|
||||
|
@ -87,8 +87,7 @@ python demo/image_demo.py demo/demo.png configs/pspnet/pspnet_r50-d8_4xb2-40k_ci
|
|||
|
||||
您将在当前文件夹中看到一个新图像 `result.jpg`,其中所有目标都覆盖了分割 mask
|
||||
|
||||
选项 (b). 如果您通过 pip 安装 mmsegmentation, 打开您的 python
|
||||
解释器,复制粘贴以下代码:
|
||||
选项 (b). 如果您通过 pip 安装 mmsegmentation, 打开您的 python 解释器,复制粘贴以下代码:
|
||||
|
||||
```python
|
||||
from mmseg.apis import inference_model, init_model, show_result_pyplot
|
||||
|
@ -137,15 +136,15 @@ MMCV 包含 C++ 和 CUDA 扩展,因此与 PyTorch 的依赖方式比较复杂
|
|||
|
||||
为了使用 pip 而不是 MIM 安装 MMCV, 请参考 [MMCV 安装指南](https://mmcv.readthedocs.io/en/latest/get_started/installation.html). 这需要手动指定一个基于 PyTorch 版本及其 CUDA 版本的 find-url.
|
||||
|
||||
例如,以下命令可为 PyTorch 1.10.x and CUDA 11.3 安装 mmcv==2.0.0rc1
|
||||
例如,以下命令可为 PyTorch 1.10.x and CUDA 11.3 安装 mmcv==2.0.0
|
||||
|
||||
```shell
|
||||
pip install mmcv==2.0.0rc1 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
|
||||
pip install mmcv==2.0.0 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
|
||||
```
|
||||
|
||||
#### 在仅有 CPU 的平台安装
|
||||
|
||||
MMSegmentation 可以在仅有 CPU 的版本上运行。在 CPU 模式,您可以训练(需要 MMCV-Lite 版本 >= 2.0.0rc0),测试和推理模型。
|
||||
MMSegmentation 可以在仅有 CPU 的版本上运行。在 CPU 模式,您可以训练(需要 MMCV 版本 >= 2.0.0),测试和推理模型。
|
||||
|
||||
#### 在 Google Colab 上安装
|
||||
|
||||
|
@ -156,7 +155,7 @@ MMSegmentation 可以在仅有 CPU 的版本上运行。在 CPU 模式,您可
|
|||
```shell
|
||||
!pip3 install openmim
|
||||
!mim install mmengine
|
||||
!mim install "mmcv>=2.0.0rc1"
|
||||
!mim install "mmcv>=2.0.0"
|
||||
```
|
||||
|
||||
**Step 2.** 通过源码安装 MMSegmentation
|
||||
|
@ -173,7 +172,7 @@ MMSegmentation 可以在仅有 CPU 的版本上运行。在 CPU 模式,您可
|
|||
```python
|
||||
import mmseg
|
||||
print(mmseg.__version__)
|
||||
# 示例输出: 1.0.0rc0
|
||||
# 示例输出: 1.0.0
|
||||
```
|
||||
|
||||
**注意:**
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
:maxdepth: 1
|
||||
:caption: 迁移指引
|
||||
|
||||
migration.md
|
||||
migration/index.rst
|
||||
|
||||
.. toctree::
|
||||
:caption: 接口文档(英文)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## 引言
|
||||
|
||||
本指南介绍了 MMSegmentation 0.x 和 MMSegmentation1.x 在行为和 API 方面的基本区别,以及这些如何都与您的迁移过程相关。
|
||||
本指南介绍了 MMSegmentation 0.x 和 MMSegmentation1.x 在表现和 API 方面的基本区别,以及这些与迁移过程的关系。
|
||||
|
||||
## 新的依赖
|
||||
|
||||
|
@ -12,11 +12,11 @@ MMSegmentation 1.x 依赖于一些新的软件包,您可以准备一个新的
|
|||
|
||||
1. [MMEngine](https://github.com/open-mmlab/mmengine):MMEngine 是 OpenMMLab 2.0 架构的核心,我们将许多与计算机视觉无关的内容从 MMCV 拆分到 MMEngine 中。
|
||||
|
||||
2. [MMCV](https://github.com/open-mmlab/mmcv):OpenMMLab 的计算机视觉包。这不是一个新的依赖,但您需要将其升级到 **2.0.0rc1** 以上的版本。
|
||||
2. [MMCV](https://github.com/open-mmlab/mmcv):OpenMMLab 的计算机视觉包。这不是一个新的依赖,但您需要将其升级到 **2.0.0** 或以上的版本。
|
||||
|
||||
3. [MMClassification](https://github.com/open-mmlab/mmclassification)(可选):OpenMMLab 的图像分类工具箱和基准。这不是一个新的依赖,但您需要将其升级到 **1.0.0rc0** 以上的版本。
|
||||
3. [MMClassification](https://github.com/open-mmlab/mmclassification)(可选):OpenMMLab 的图像分类工具箱和基准。这不是一个新的依赖,但您需要将其升级到 **1.0.0rc6** 版本。
|
||||
|
||||
4. [MMDetection](https://github.com/open-mmlab/mmdetection)(可选): OpenMMLab 的目标检测工具箱和基准。这不是一个新的依赖,但您需要将其升级到 **3.0.0rc0** 以上的版本。
|
||||
4. [MMDetection](https://github.com/open-mmlab/mmdetection)(可选): OpenMMLab 的目标检测工具箱和基准。这不是一个新的依赖,但您需要将其升级到 **3.0.0** 或以上的版本。
|
||||
|
||||
## 启动训练
|
||||
|
||||
|
@ -46,7 +46,7 @@ OpenMMLab 2.0 的主要改进是发布了 MMEngine,它为启动训练任务的
|
|||
<td>--resume='auto'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>培训练期间是否不评估检查点</td>
|
||||
<td>训练期间是否不评估检查点</td>
|
||||
<td>--no-validate</td>
|
||||
<td>--cfg-options val_cfg=None val_dataloader=None val_evaluator=None</td>
|
||||
</tr>
|
||||
|
@ -102,11 +102,11 @@ OpenMMLab 2.0 的主要改进是发布了 MMEngine,它为启动训练任务的
|
|||
|
||||
- `mean`(Sequence,可选):R、G、B 通道的像素平均值。默认为 None。
|
||||
|
||||
- `std`(Sequence,可选):R、G、B通道的像素标准差。默认为 None。
|
||||
- `std`(Sequence,可选):R、G、B 通道的像素标准差。默认为 None。
|
||||
|
||||
- `size`(Sequence,可选):固定的填充大小。
|
||||
|
||||
- `size_divisor`(int,可选):填充大小的除法因子。
|
||||
- `size_divisor`(int,可选):填充图像可以被当前值整除。
|
||||
|
||||
- `seg_pad_val`(float,可选):分割图的填充值。默认值:255。
|
||||
|
||||
|
@ -154,14 +154,14 @@ train_dataloader = dict(
|
|||
batch_size=4,
|
||||
num_workers=4,
|
||||
dataset=dict(...),
|
||||
sampler=dict(type='DefaultSampler', shuffle=True) # necessary
|
||||
sampler=dict(type='DefaultSampler', shuffle=True) # 必须
|
||||
)
|
||||
|
||||
val_dataloader = dict(
|
||||
batch_size=4,
|
||||
num_workers=4,
|
||||
dataset=dict(...),
|
||||
sampler=dict(type='DefaultSampler', shuffle=False) # necessary
|
||||
sampler=dict(type='DefaultSampler', shuffle=False) # 必须
|
||||
)
|
||||
|
||||
test_dataloader = val_dataloader
|
||||
|
@ -417,10 +417,10 @@ runner = dict(type='IterBasedRunner', max_iters=20000)
|
|||
<td>
|
||||
|
||||
```python
|
||||
# The `val_interval` is the original `evaluation.interval`.
|
||||
# `val_interval` 是旧版本的 `evaluation.interval`。
|
||||
train_cfg = dict(type='IterBasedTrainLoop', max_iters=20000, val_interval=2000)
|
||||
val_cfg = dict(type='ValLoop') # Use the default validation loop.
|
||||
test_cfg = dict(type='TestLoop') # Use the default test loop.
|
||||
val_cfg = dict(type='ValLoop') # 使用默认的验证循环。
|
||||
test_cfg = dict(type='TestLoop') # 使用默认的测试循环。
|
||||
```
|
||||
|
||||
</td>
|
||||
|
@ -438,22 +438,22 @@ test_cfg = dict(type='TestLoop') # Use the default test loop.
|
|||
|
||||
```python
|
||||
default_hooks = dict(
|
||||
# record the time of every iterations.
|
||||
# 记录每次迭代的时间。
|
||||
timer=dict(type='IterTimerHook'),
|
||||
|
||||
# print log every 50 iterations.
|
||||
# 每50次迭代打印一次日志。
|
||||
logger=dict(type='LoggerHook', interval=50, log_metric_by_epoch=False),
|
||||
|
||||
# enable the parameter scheduler.
|
||||
# 启用参数调度程序。
|
||||
param_scheduler=dict(type='ParamSchedulerHook'),
|
||||
|
||||
# save checkpoint every 2000 iterations.
|
||||
# 每2000次迭代保存一次检查点。
|
||||
checkpoint=dict(type='CheckpointHook', by_epoch=False, interval=2000),
|
||||
|
||||
# set sampler seed in distributed environment.
|
||||
# 在分布式环境中设置采样器种子。
|
||||
sampler_seed=dict(type='DistSamplerSeedHook'),
|
||||
|
||||
# validation results visualization.
|
||||
# 验证结果可视化。
|
||||
visualization=dict(type='SegVisualizationHook'))
|
||||
```
|
||||
|
||||
|
@ -505,13 +505,13 @@ visualizer = dict(
|
|||
|
||||
```python
|
||||
env_cfg = dict(
|
||||
# whether to enable cudnn benchmark
|
||||
# 是否启用 cudnn_benchmark
|
||||
cudnn_benchmark=False,
|
||||
|
||||
# set multi process parameters
|
||||
# 设置多进程参数
|
||||
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
|
||||
|
||||
# set distributed parameters
|
||||
# 设置分布式参数
|
||||
dist_cfg=dict(backend='nccl'),
|
||||
)
|
||||
```
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#包结构更改
|
||||
# 包结构更改
|
||||
|
||||
本节包含您对 MMSeg 0.x 和 1.x 之间的变化感到好奇的内容。
|
||||
本节包含您对 MMSeg 0.x 和 1.x 之间的变化可能感到好奇的内容。
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -49,7 +49,7 @@
|
|||
|
||||
## `mmseg.ops`
|
||||
|
||||
`ops` 包包含 `encoding` 和 `wrappers`,它们被移到了 `mmseg.models.utils` 中。
|
||||
`ops` 包含 `encoding` 和 `wrappers`,它们被移到了 `mmseg.models.utils` 中。
|
||||
|
||||
## 增加的包
|
||||
|
||||
|
@ -110,4 +110,4 @@ OpenMMLab 2.0 将 `BaseDataset` 定义为数据集的函数和接口,MMSegment
|
|||
|
||||
### `mmseg.models`
|
||||
|
||||
`models` 没有太大变化,只是从以前的 `mmseg.ops` 中添加了 `encoding` 和 `wrappers`
|
||||
`models` 没有太大变化,只是从以前的 `mmseg.ops` 添加了 `encoding` 和 `wrappers`
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
|
||||
| MMSegmentation version | MMCV version | MMEngine version | MMClassification (optional) version | MMDetection (optional) version |
|
||||
| :--------------------: | :----------------------------: | :---------------: | :---------------------------------: | :----------------------------: |
|
||||
| dev-1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
| 1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
| dev-1.x branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| main branch | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0 | mmcv >= 2.0.0rc4 | MMEngine >= 0.7.1 | mmcls==1.0.0rc6 | mmdet >= 3.0.0 |
|
||||
| 1.0.0rc6 | mmcv >= 2.0.0rc4 | MMEngine >= 0.5.0 | mmcls>=1.0.0rc0 | mmdet >= 3.0.0rc6 |
|
||||
| 1.0.0rc5 | mmcv >= 2.0.0rc4 | MMEngine >= 0.2.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc6 |
|
||||
| 1.0.0rc4 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4, \<=3.0.0rc5 |
|
||||
| 1.0.0rc3 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4 \<=3.0.0rc5 |
|
||||
| 1.0.0rc2 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4 \<=3.0.0rc5 |
|
||||
| 1.0.0rc3 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4, \<=3.0.0rc5 |
|
||||
| 1.0.0rc2 | mmcv == 2.0.0rc3 | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | mmdet>=3.0.0rc4, \<=3.0.0rc5 |
|
||||
| 1.0.0rc1 | mmcv >= 2.0.0rc1, \<=2.0.0rc3> | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | Not required |
|
||||
| 1.0.0rc0 | mmcv >= 2.0.0rc1, \<=2.0.0rc3> | MMEngine >= 0.1.0 | mmcls>=1.0.0rc0 | Not required |
|
||||
|
||||
|
@ -112,7 +113,7 @@ if self.reduce_zero_label:
|
|||
|
||||
关于您的数据集是否需要使用 reduce_zero_label,有以下两类情况:
|
||||
|
||||
- 例如在 [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isprs-potsdam) 数据集上,有 0-不透水面、1-建筑、2-低矮植被、3-树、4-汽车、5-杂乱,六类。但该数据集提供了两种RGB标签,一种为图像边缘处有黑色像素的标签,另一种是没有黑色边缘的标签。对于有黑色边缘的标签,在 [dataset_converters.py](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/tools/dataset_converters/potsdam.py)中,其将黑色边缘转换为 label 0,其余标签分别为 1-不透水面、2-建筑、3-低矮植被、4-树、5-汽车、6-杂乱,那么此时,就应该在数据集 [potsdam.py](https://github.com/open-mmlab/mmsegmentation/blob/ff95416c3b5ce8d62b9289f743531398efce534f/mmseg/datasets/potsdam.py#L23) 中将`reduce_zero_label=True`。如果使用的是没有黑色边缘的标签,那么 mask label 中只有 0-5,此时就应该使`reduce_zero_label=False`。需要结合您的实际情况来使用。
|
||||
- 例如在第 0 类为background类别的数据集上,如果您最终是需要将背景和您的其余类别分开时,是不需要使用`reduce_zero_label`的,此时在数据集中应该将其设置为`reduce_zero_label=False`
|
||||
- 例如在 [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/1.x/docs/en/user_guides/2_dataset_prepare.md#isprs-potsdam) 数据集上,有 0-不透水面、1-建筑、2-低矮植被、3-树、4-汽车、5-杂乱,六类。但该数据集提供了两种 RGB 标签,一种为图像边缘处有黑色像素的标签,另一种是没有黑色边缘的标签。对于有黑色边缘的标签,在 [dataset_converters.py](https://github.com/open-mmlab/mmsegmentation/blob/dev-1.x/tools/dataset_converters/potsdam.py)中,其将黑色边缘转换为 label 0,其余标签分别为 1-不透水面、2-建筑、3-低矮植被、4-树、5-汽车、6-杂乱,那么此时,就应该在数据集 [potsdam.py](https://github.com/open-mmlab/mmsegmentation/blob/ff95416c3b5ce8d62b9289f743531398efce534f/mmseg/datasets/potsdam.py#L23) 中将`reduce_zero_label=True`。如果使用的是没有黑色边缘的标签,那么 mask label 中只有 0-5,此时就应该使`reduce_zero_label=False`。需要结合您的实际情况来使用。
|
||||
- 例如在第 0 类为 background 类别的数据集上,如果您最终是需要将背景和您的其余类别分开时,是不需要使用`reduce_zero_label`的,此时在数据集中应该将其设置为`reduce_zero_label=False`
|
||||
|
||||
**注意:** 使用 `reduce_zero_label` 请确认数据集原始类别个数,如果只有两类,需要关闭 `reduce_zero_label` 即设置 `reduce_zero_label=False`。
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright (c) OpenMMLab. All rights reserved.
|
||||
"""MMSegmentation provides 17 registry nodes to support using modules across
|
||||
"""MMSegmentation provides 21 registry nodes to support using modules across
|
||||
projects. Each node is a child of the root registry in MMEngine.
|
||||
|
||||
More details can be found at
|
||||
https://mmengine.readthedocs.io/en/latest/tutorials/registry.html.
|
||||
https://mmengine.readthedocs.io/en/latest/advanced_tutorials/registry.html.
|
||||
"""
|
||||
|
||||
from mmengine.registry import DATA_SAMPLERS as MMENGINE_DATA_SAMPLERS
|
||||
|
@ -46,10 +46,7 @@ HOOKS = Registry(
|
|||
# manage data-related modules
|
||||
DATASETS = Registry(
|
||||
'dataset', parent=MMENGINE_DATASETS, locations=['mmseg.datasets'])
|
||||
DATA_SAMPLERS = Registry(
|
||||
'data sampler',
|
||||
parent=MMENGINE_DATA_SAMPLERS,
|
||||
locations=['mmseg.datasets.samplers'])
|
||||
DATA_SAMPLERS = Registry('data sampler', parent=MMENGINE_DATA_SAMPLERS)
|
||||
TRANSFORMS = Registry(
|
||||
'transform',
|
||||
parent=MMENGINE_TRANSFORMS,
|
||||
|
@ -85,9 +82,7 @@ OPTIM_WRAPPER_CONSTRUCTORS = Registry(
|
|||
locations=['mmseg.engine.optimizers'])
|
||||
# mangage all kinds of parameter schedulers like `MultiStepLR`
|
||||
PARAM_SCHEDULERS = Registry(
|
||||
'parameter scheduler',
|
||||
parent=MMENGINE_PARAM_SCHEDULERS,
|
||||
locations=['mmseg.engine.schedulers'])
|
||||
'parameter scheduler', parent=MMENGINE_PARAM_SCHEDULERS)
|
||||
|
||||
# manage all kinds of metrics
|
||||
METRICS = Registry(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (c) Open-MMLab. All rights reserved.
|
||||
|
||||
__version__ = '1.0.0rc6'
|
||||
__version__ = '1.0.0'
|
||||
|
||||
|
||||
def parse_version_info(version_str):
|
||||
|
|
Loading…
Reference in New Issue