mmsegmentation/README.md

200 lines
10 KiB
Markdown
Raw Normal View History

2020-07-07 20:52:19 +08:00
<div align="center">
<img src="resources/mmseg-logo.png" width="600"/>
<div>&nbsp;</div>
<div align="center">
<b><font size="5">OpenMMLab website</font></b>
<sup>
<a href="https://openmmlab.com">
<i><font size="4">HOT</font></i>
</a>
</sup>
&nbsp;&nbsp;&nbsp;&nbsp;
<b><font size="5">OpenMMLab platform</font></b>
<sup>
<a href="https://platform.openmmlab.com">
<i><font size="4">TRY IT OUT</font></i>
</a>
</sup>
</div>
<div>&nbsp;</div>
2020-07-07 20:52:19 +08:00
</div>
<br />
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmsegmentation)](https://pypi.org/project/mmsegmentation/)
[![PyPI](https://img.shields.io/pypi/v/mmsegmentation)](https://pypi.org/project/mmsegmentation)
[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmsegmentation.readthedocs.io/en/latest/)
[![badge](https://github.com/open-mmlab/mmsegmentation/workflows/build/badge.svg)](https://github.com/open-mmlab/mmsegmentation/actions)
[![codecov](https://codecov.io/gh/open-mmlab/mmsegmentation/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmsegmentation)
[![license](https://img.shields.io/github/license/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/blob/master/LICENSE)
[![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
[![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
Documentation: https://mmsegmentation.readthedocs.io/
2020-07-07 20:52:19 +08:00
2021-02-22 03:11:28 +08:00
English | [简体中文](README_zh-CN.md)
2020-07-07 20:52:19 +08:00
## Introduction
MMSegmentation is an open source semantic segmentation toolbox based on PyTorch.
It is a part of the OpenMMLab project.
The master branch works with **PyTorch 1.5+**.
2020-07-07 20:52:19 +08:00
![demo image](resources/seg_demo.gif)
### Major features
- **Unified Benchmark**
We provide a unified benchmark toolbox for various semantic segmentation methods.
- **Modular Design**
We decompose the semantic segmentation framework into different components and one can easily construct a customized semantic segmentation framework by combining different modules.
- **Support of multiple methods out of box**
The toolbox directly supports popular and contemporary semantic segmentation frameworks, *e.g.* PSPNet, DeepLabV3, PSANet, DeepLabV3+, etc.
- **High efficiency**
The training speed is faster than or comparable to other codebases.
## License
This project is released under the [Apache 2.0 license](LICENSE).
## Changelog
v0.21.0 was released in 2/9/2022.
2022-01-11 01:05:09 +08:00
Please refer to [changelog.md](docs/en/changelog.md) for details and release history.
2020-07-07 20:52:19 +08:00
## Benchmark and model zoo
Results and models are available in the [model zoo](docs/en/model_zoo.md).
2020-07-07 20:52:19 +08:00
Supported backbones:
- [x] ResNet (CVPR'2016)
- [x] ResNeXt (CVPR'2017)
- [x] [HRNet (CVPR'2019)](configs/hrnet)
- [x] [ResNeSt (ArXiv'2020)](configs/resnest)
- [x] [MobileNetV2 (CVPR'2018)](configs/mobilenet_v2)
- [x] [MobileNetV3 (ICCV'2019)](configs/mobilenet_v3)
- [x] [Vision Transformer (ICLR'2021)](configs/vit)
[Feature] Support Twins (NeurIPS2021) (#989) * debug * debug * debug * this is a debug step, and needs to be recovered * need recover * git * debug * git * git * git * git * git * git * debug need recover * debug * git * debug * debug * debug * debug * debug * debug * debug * debug * debugf * debug * debug * debug * debug * debug * debug * debug * debug * git * git * git * use config small/base/large * debug * debug * git * debug * git * debug * debug * debug args * debug * debug * git * git * debug * git * git * git * git * git * debug * debug * git * debug * git * debug * debug * debug * debug * git * debug * git * git * debug * debug * git * git * git * git * debug * debug * debug * debug * git * debug * debug * git * git * debug * debug * git * debug * debug * debug * git * debug * debug * debug * Please enter the commit message for your changes. Lines starting * git * git * debug * debug * debug * git * git * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * git * debug * debug * debug * debug * debug * debug * debug * git * fix pre-commit error * fix error * git * git * git * git * git * git * debug * debug * debug * debug * debug * debug * git * debug * debug * debug * debug * debug * debug * debug * debug * debug * git * git * git * debug * debug * debug * git * git * git * git * git * git * git * git * git * debug * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * fix unittest error * fix config errors * fix twins2mmseg bug * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * fix init_weights() in twins.py * git * git * git * git * fix comment * fix comment * fix comment * fix comment * fix unit test coverage in TwinsPR * Add Twins README * Add Twins README * twins refactor * twins refactor * delete init_cfg in FFN * delete init_cfg in FFN * Update mmseg/models/backbones/twins.py * Update mmseg/models/backbones/twins.py * Update mmseg/models/backbones/twins.py Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * Update mmseg/models/backbones/twins.py * add conference name Co-authored-by: linxinyang <linxinyang@meituan.com> Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn>
2021-12-09 19:18:10 +08:00
- [x] [Swin Transformer (ICCV'2021)](configs/swin)
- [x] [Twins (NeurIPS'2021)](configs/twins)
2020-07-07 20:52:19 +08:00
Supported methods:
- [x] [FCN (CVPR'2015/TPAMI'2017)](configs/fcn)
- [x] [ERFNet (T-ITS'2017)](configs/erfnet)
- [x] [UNet (MICCAI'2016/Nat. Methods'2019)](configs/unet)
- [x] [PSPNet (CVPR'2017)](configs/pspnet)
- [x] [DeepLabV3 (ArXiv'2017)](configs/deeplabv3)
- [x] [BiSeNetV1 (ECCV'2018)](configs/bisenetv1)
- [x] [PSANet (ECCV'2018)](configs/psanet)
- [x] [DeepLabV3+ (CVPR'2018)](configs/deeplabv3plus)
- [x] [UPerNet (ECCV'2018)](configs/upernet)
- [x] [ICNet (ECCV'2018)](configs/icnet)
- [x] [NonLocal Net (CVPR'2018)](configs/nonlocal_net)
- [x] [EncNet (CVPR'2018)](configs/encnet)
- [x] [Semantic FPN (CVPR'2019)](configs/sem_fpn)
- [x] [DANet (CVPR'2019)](configs/danet)
- [x] [APCNet (CVPR'2019)](configs/apcnet)
- [x] [EMANet (ICCV'2019)](configs/emanet)
- [x] [CCNet (ICCV'2019)](configs/ccnet)
- [x] [DMNet (ICCV'2019)](configs/dmnet)
- [x] [ANN (ICCV'2019)](configs/ann)
- [x] [GCNet (ICCVW'2019/TPAMI'2020)](configs/gcnet)
- [x] [FastFCN (ArXiv'2019)](configs/fastfcn)
- [x] [Fast-SCNN (ArXiv'2019)](configs/fastscnn)
- [x] [ISANet (ArXiv'2019/IJCV'2021)](configs/isanet)
- [x] [OCRNet (ECCV'2020)](configs/ocrnet)
- [x] [DNLNet (ECCV'2020)](configs/dnlnet)
- [x] [PointRend (CVPR'2020)](configs/point_rend)
- [x] [CGNet (TIP'2020)](configs/cgnet)
2021-10-13 11:35:58 +08:00
- [x] [BiSeNetV2 (IJCV'2021)](configs/bisenetv2)
- [x] [STDC (CVPR'2021)](configs/stdc)
- [x] [SETR (CVPR'2021)](configs/setr)
- [x] [DPT (ArXiv'2021)](configs/dpt)
[Feature] Support Segmenter (#955) * segmenter: add model * update * readme: update * config: update * segmenter: update readme * segmenter: update * segmenter: update * segmenter: update * configs: set checkpoint path to pretrain folder * segmenter: modify vit-s/lin, remove data config * rreadme: update * configs: transfer from _base_ to segmenter * configs: add 8x1 suffix * configs: remove redundant lines * configs: cleanup * first attempt * swipe CI error * Update mmseg/models/decode_heads/__init__.py Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * segmenter_linear: use fcn backbone * segmenter_mask: update * models: add segmenter vit * decoders: yapf+remove unused imports * apply precommit * segmenter/linear_head: fix * segmenter/linear_header: fix * segmenter: fix mask transformer * fix error * segmenter/mask_head: use trunc_normal init * refactor segmenter head * Fetch upstream (#1) * [Feature] Change options to cfg-option (#1129) * [Feature] Change option to cfg-option * add expire date and fix the docs * modify docstring * [Fix] Add <!-- [ABSTRACT] --> in metafile #1127 * [Fix] Fix correct num_classes of HRNet in LoveDA dataset #1136 * Bump to v0.20.1 (#1138) * bump version 0.20.1 * bump version 0.20.1 * [Fix] revise --option to --options #1140 Co-authored-by: Rockey <41846794+RockeyCoss@users.noreply.github.com> Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> * decode_head: switch from linear to fcn * fix init list formatting * configs: remove variants, keep only vit-s on ade * align inference metric of vit-s-mask * configs: add vit t/b/l * Update mmseg/models/decode_heads/segmenter_mask_head.py Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> * Update mmseg/models/decode_heads/segmenter_mask_head.py Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> * Update mmseg/models/decode_heads/segmenter_mask_head.py Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> * Update mmseg/models/decode_heads/segmenter_mask_head.py Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> * Update mmseg/models/decode_heads/segmenter_mask_head.py Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com> * model_converters: use torch instead of einops * setup: remove einops * segmenter_mask: fix missing imports * add necessary imported init funtion * segmenter/seg-l: set resolution to 640 * segmenter/seg-l: fix test size * fix vitjax2mmseg * add README and unittest * fix unittest * add docstring * refactor config and add pretrained link * fix typo * add paper name in readme * change segmenter config names * fix typo in readme * fix typos in readme * fix segmenter typo * fix segmenter typo * delete redundant comma in config files * delete redundant comma in config files * fix convert script * update lateset master version Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> Co-authored-by: Rockey <41846794+RockeyCoss@users.noreply.github.com> Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-01-26 13:50:51 +08:00
- [x] [Segmenter (ICCV'2021)](configs/segmenter)
[Feature] Support Twins (NeurIPS2021) (#989) * debug * debug * debug * this is a debug step, and needs to be recovered * need recover * git * debug * git * git * git * git * git * git * debug need recover * debug * git * debug * debug * debug * debug * debug * debug * debug * debug * debugf * debug * debug * debug * debug * debug * debug * debug * debug * git * git * git * use config small/base/large * debug * debug * git * debug * git * debug * debug * debug args * debug * debug * git * git * debug * git * git * git * git * git * debug * debug * git * debug * git * debug * debug * debug * debug * git * debug * git * git * debug * debug * git * git * git * git * debug * debug * debug * debug * git * debug * debug * git * git * debug * debug * git * debug * debug * debug * git * debug * debug * debug * Please enter the commit message for your changes. Lines starting * git * git * debug * debug * debug * git * git * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * git * debug * debug * debug * debug * debug * debug * debug * git * fix pre-commit error * fix error * git * git * git * git * git * git * debug * debug * debug * debug * debug * debug * git * debug * debug * debug * debug * debug * debug * debug * debug * debug * git * git * git * debug * debug * debug * git * git * git * git * git * git * git * git * git * debug * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * fix unittest error * fix config errors * fix twins2mmseg bug * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * git * fix init_weights() in twins.py * git * git * git * git * fix comment * fix comment * fix comment * fix comment * fix unit test coverage in TwinsPR * Add Twins README * Add Twins README * twins refactor * twins refactor * delete init_cfg in FFN * delete init_cfg in FFN * Update mmseg/models/backbones/twins.py * Update mmseg/models/backbones/twins.py * Update mmseg/models/backbones/twins.py Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn> * Update mmseg/models/backbones/twins.py * add conference name Co-authored-by: linxinyang <linxinyang@meituan.com> Co-authored-by: MengzhangLI <mcmong@pku.edu.cn> Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn>
2021-12-09 19:18:10 +08:00
- [x] [SegFormer (NeurIPS'2021)](configs/segformer)
2020-07-07 20:52:19 +08:00
Supported datasets:
- [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#cityscapes)
- [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#pascal-voc)
- [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#ade20k)
- [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#pascal-context)
- [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#coco-stuff-10k)
- [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#coco-stuff-164k)
- [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#chase-db1)
- [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#drive)
- [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#hrf)
- [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#stare)
- [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#dark-zurich)
- [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#nighttime-driving)
- [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#loveda)
2022-01-22 16:47:38 +08:00
- [x] [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#isprs-potsdam)
- [x] [Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#isprs-vaihingen)
- [x] [iSAID](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#isaid)
2020-07-07 20:52:19 +08:00
## Installation
Please refer to [get_started.md](docs/en/get_started.md#installation) for installation and [dataset_prepare.md](docs/en/dataset_prepare.md#prepare-datasets) for dataset preparation.
2020-07-07 20:52:19 +08:00
## Get Started
Please see [train.md](docs/en/train.md) and [inference.md](docs/en/inference.md) for the basic usage of MMSegmentation.
There are also tutorials for [customizing dataset](docs/en/tutorials/customize_datasets.md), [designing data pipeline](docs/en/tutorials/data_pipeline.md), [customizing modules](docs/en/tutorials/customize_models.md), and [customizing runtime](docs/en/tutorials/customize_runtime.md).
We also provide many [training tricks](docs/en/tutorials/training_tricks.md) for better training and [useful tools](docs/en/useful_tools.md) for deployment.
2020-07-07 20:52:19 +08:00
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/master/demo/MMSegmentation_Tutorial.ipynb) on Colab.
2021-01-05 15:52:40 +08:00
## Citation
If you find this project useful in your research, please consider cite:
```bibtex
2021-01-05 15:52:40 +08:00
@misc{mmseg2020,
2021-02-22 03:11:28 +08:00
title={{MMSegmentation}: OpenMMLab Semantic Segmentation Toolbox and Benchmark},
2021-01-05 15:52:40 +08:00
author={MMSegmentation Contributors},
howpublished = {\url{https://github.com/open-mmlab/mmsegmentation}},
year={2020}
}
```
2020-07-07 20:52:19 +08:00
## Contributing
We appreciate all contributions to improve MMSegmentation. Please refer to [CONTRIBUTING.md](.github/CONTRIBUTING.md) for the contributing guideline.
## Acknowledgement
MMSegmentation is an open source project that welcome any contribution and feedback.
We wish that the toolbox and benchmark could serve the growing research
community by providing a flexible as well as standardized toolkit to reimplement existing methods
and develop their own new semantic segmentation methods.
## Projects in OpenMMLab
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab foundational library for computer vision.
- [MMClassification](https://github.com/open-mmlab/mmclassification): OpenMMLab image classification toolbox and benchmark.
- [MMDetection](https://github.com/open-mmlab/mmdetection): OpenMMLab detection toolbox and benchmark.
- [MMDetection3D](https://github.com/open-mmlab/mmdetection3d): OpenMMLab's next-generation platform for general 3D object detection.
- [MMSegmentation](https://github.com/open-mmlab/mmsegmentation): OpenMMLab semantic segmentation toolbox and benchmark.
- [MMAction2](https://github.com/open-mmlab/mmaction2): OpenMMLab's next-generation action understanding toolbox and benchmark.
- [MMTracking](https://github.com/open-mmlab/mmtracking): OpenMMLab video perception toolbox and benchmark.
- [MMPose](https://github.com/open-mmlab/mmpose): OpenMMLab pose estimation toolbox and benchmark.
- [MMEditing](https://github.com/open-mmlab/mmediting): OpenMMLab image and video editing toolbox.
2021-04-22 07:08:59 +08:00
- [MMOCR](https://github.com/open-mmlab/mmocr): A Comprehensive Toolbox for Text Detection, Recognition and Understanding.
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): A powerful toolkit for generative models.
- [MIM](https://github.com/open-mmlab/mim): MIM Installs OpenMMLab Packages.
2021-11-18 21:57:30 +08:00
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab optical flow toolbox and benchmark.
2021-11-24 19:40:00 +08:00
- [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab few shot learning toolbox and benchmark.
- [MMHuman3D](https://github.com/open-mmlab/mmhuman3d): OpenMMLab 3D human parametric model toolbox and benchmark.
- [MMSelfSup](https://github.com/open-mmlab/mmselfsup): OpenMMLab self-supervised learning toolbox and benchmark.
- [MMRazor](https://github.com/open-mmlab/mmrazor): OpenMMLab Model Compression Toolbox and Benchmark.
2021-12-30 17:27:59 +08:00
- [MMDeploy](https://github.com/open-mmlab/mmdeploy): OpenMMLab Model Deployment Framework.
2022-02-21 18:13:15 +08:00
- [MMRotate](https://github.com/open-mmlab/mmrotate): OpenMMLab rotated object detection toolbox and benchmark.