Thanks for your contribution and we appreciate it a lot. The following
instructions would make your pull request more healthy and more easily
get feedback. If you do not understand some items, don't worry, just
make the pull request and seek help from maintainers.
## Motivation
The focal Tversky loss was proposed in https://arxiv.org/abs/1810.07842.
It has nearly 600 citations and has been shown to be extremely useful
for highly imbalanced (medical) datasets. To add support for the focal
Tversky loss, only few lines of changes are needed for the Tversky loss.
## Modification
Add `gamma` as (optional) argument in the constructor of `TverskyLoss`.
This parameter is then passed to `tversky_loss` to compute the focal
Tversky loss.
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases
here, and update the documentation.
## Checklist
1. Pre-commit or other linting tools are used to fix the potential lint
issues.
2. The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
3. If the modification has potential influence on downstream projects,
this PR should be tested with downstream projects, like MMDet or
MMDet3D.
4. The documentation has been modified accordingly, like docstring or
example tutorials.
Reopening of previous
[PR](https://github.com/open-mmlab/mmsegmentation/pull/2783).
Note that this PR is a modified version of the withdrawn PR
https://github.com/open-mmlab/mmsegmentation/pull/1748
## Motivation
In the last years, panoptic segmentation has become more into the focus
in reseach. Weber et al.
[[Link]](http://www.cvlibs.net/publications/Weber2021NEURIPSDATA.pdf)
have published a quite nice dataset, which is in the same style like
Cityscapes, but for KITTI sequences. Since Cityscapes and KITTI-STEP
share the same classes and also a comparable domain (dashcam view),
interesting investigations, e.g. about relations in the domain e.t.c.
can be done.
Note that KITTI-STEP provices panoptic segmentation annotations which
are out of scope for mmsegmentation.
## Modification
Mostly, I added the new dataset and dataset preparation file. To
simplify the first usage of the new dataset, I also added configs for
the dataset, segformer and deeplabv3plus.
## BC-breaking (Optional)
No BC-breaking
## Use cases (Optional)
Researchers want to test their new methods, e.g. for interpretable AI in
the context of semantic segmentation. They want to show, that their
method is reproducible on comparable datasets. Thus, they can compare
Cityscapes and KITTI-STEP.
---------
Co-authored-by: CSH <40987381+csatsurnh@users.noreply.github.com>
Co-authored-by: csatsurnh <cshan1995@126.com>
Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
## Motivation
Support SegNeXt.
Due to many commits & changed files caused by WIP too long (perhaps it
could be resolved by `git merge` or `git rebase`).
This PR is created only for backup of old PR
https://github.com/open-mmlab/mmsegmentation/pull/2247
Co-authored-by: MeowZheng <meowzheng@outlook.com>
Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
The documentation of the use_sigmoid argument in CrossEntropyLoss
currently suggests the sigmoid would be applied in addition to the
softmax function. This change fixes this typo.
## Motivation
Through this PR, I (1) fix a bug, and (2) perform some associated cleanup, and (3) add a unit test. The bug occurs during evaluation when two options -- `reduce_zero_label=True`, and custom classes are used. The bug was that the `reduce_zero_label` is not properly propagated (see details below).
## Modification
1. **Bugfix**
The bug occurs [in the initialization of `CustomDataset`](5d49918b3c/mmseg/datasets/custom.py (L108-L110)) where the `reduce_zero_label` flag is not propagated to its member `self.gt_seg_map_loader_cfg`:
```python
self.gt_seg_map_loader = LoadAnnotations(
) if gt_seg_map_loader_cfg is None else LoadAnnotations(
**gt_seg_map_loader_cfg)
```
Because the `reduce_zero_label` flag was not being propagated, the zero label reduction was being [unnecessarily and explicitly duplicated during the evaluation](5d49918b3c/mmseg/core/evaluation/metrics.py (L66-L69)).
As pointed in a previous PR (#2500), `reduce_zero_label` must occur before applying the `label_map`. Due to this bug, the order gets reversed when both features are used simultaneously.
This has been fixed to:
```python
self.gt_seg_map_loader = LoadAnnotations(
reduce_zero_label=reduce_zero_label, **gt_seg_map_loader_cfg)
```
2. **Cleanup**
Due to the bug fix, since both `reduce_zero_label` and `label_map` are being applied in `get_gt_seg_map_by_idx()` (i.e. `LoadAnnotations.__call__()`), the evaluation does not need perform them anymore. However, for backwards compatibility, the evaluation keeps previous input arguments.
This was pointed out for `label_map` in a previous issue (#1415) that the `label_map` should not be applied in the evaluation. This was handled by [passing an empty dict](5d49918b3c/mmseg/datasets/custom.py (L306-L311)):
```python
# as the labels has been converted when dataset initialized
# in `get_palette_for_custom_classes ` this `label_map`
# should be `dict()`, see
# https://github.com/open-mmlab/mmsegmentation/issues/1415
# for more ditails
label_map=dict(),
reduce_zero_label=self.reduce_zero_label))
```
Similar to this, I now also set `reduce_label=False` since it is now also being handled by `get_gt_seg_map_by_idx()` (i.e. `LoadAnnotations.__call__()`).
3. **Unit test**
I've added a unit test that tests the `CustomDataset.pre_eval()` function when `reduce_zero_label=True` and custom classes are used. The test fails on the original `master` branch but passes with this fix.
## BC-breaking (Optional)
I do not anticipate this change braking any backward-compatibility.
## Checklist
- [x] Pre-commit or other linting tools are used to fix the potential lint issues.
- _I've fixed all linting/pre-commit errors._
- [x] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
- _I've added a test that passes when the fix is introduced, and fails on the original master branch._
- [x] If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D.
- _I don't think this change affects MMDet or MMDet3D._
- [x] The documentation has been modified accordingly, like docstring or example tutorials.
- _This change fixes an existing bug and doesn't require modifying any documentation/docstring._
## Motivation
This fixes#2493. When the `label_map` is created, the index for ignored
classes was being set to -1, whereas the index that is actually ignored
is 255. This worked indirectly since -1 was underflowed to 255 when
converting to uint8.
The same fix was made in the 1.x by #2332 but this fix was never made to
`master`.
## Modification
The only small modification is setting the index of ignored classes to
255 instead of -1.
## Checklist
- [x] Pre-commit or other linting tools are used to fix the potential
lint issues.
- _I've fixed all linting/pre-commit errors._
- [x] The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
- _No unit tests need to be added. Unit tests that are affected were
modified.
- [x] If the modification has potential influence on downstream
projects, this PR should be tested with downstream projects, like MMDet
or MMDet3D.
- _I don't think this change affects MMDet or MMDet3D._
- [x] The documentation has been modified accordingly, like docstring or
example tutorials.
- _This change fixes an existing bug and doesn't require modifying any
documentation/docstring._
## Motivation
I want to fix a bug through this PR. The bug occurs when two options --
`reduce_zero_label=True`, and custom classes are used.
`reduce_zero_label` remaps the GT seg labels by remapping the zero-class
to 255 which is ignored. Conceptually, this should occur *before* the
`label_map` is applied, which maps *already reduced labels*. However,
currently, the `label_map` is applied before the zero label is reduced.
## Modification
The modification is simple:
- I've just interchanged the order of the two operations by moving 4
lines from bottom to top.
- I've added a test that passes when the fix is introduced, and fails on
the original `master` branch.
## BC-breaking (Optional)
I do not anticipate this change braking any backward-compatibility.
## Checklist
- [x] Pre-commit or other linting tools are used to fix the potential
lint issues.
- _I've fixed all linting/pre-commit errors._
- [x] The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
- _I've added a unit test._
- [x] If the modification has potential influence on downstream
projects, this PR should be tested with downstream projects, like MMDet
or MMDet3D.
- _I don't think this change affects MMDet or MMDet3D._
- [x] The documentation has been modified accordingly, like docstring or
example tutorials.
- _This change fixes an existing bug and doesn't require modifying any
documentation/docstring._
## Motivation
Based on the ImageNet dataset, we propose the ImageNet-S dataset has 1.2 million training images and 50k high-quality semantic segmentation annotations to support unsupervised/semi-supervised semantic segmentation on the ImageNet dataset.
paper:
Large-scale Unsupervised Semantic Segmentation (TPAMI 2022)
[Paper link](https://arxiv.org/abs/2106.03149)
## Modification
1. Support imagenet-s dataset and its' configuration
2. Add the dataset preparation in the documentation
## Motivation
Please describe the motivation of this PR and the goal you want to
achieve through this PR.
support get_classes, get_palette for Occluded Face dataset.
## Modification
Please briefly describe what modification is made in this PR.
add occludedface_classes()
add occludedface_palette()
modified dataset_aliases
## Motivation
Introducing new models and features into OpenMMLab's algorithm libraries
has long been complained to be troublesome due to the rigorous
requirements on code quality, which could hinder the fast iteration of
SOTA models and might discourage potential contributors from sharing
their latest outcome here.
Ref: https://github.com/open-mmlab/mmsegmentation/pull/2412
## Modification
This PR adds a new `projects/` folder, which will be a place for some
experimental models/features. Implementations inside might be not quite
perfect but already fine to produce some exciting results. We hope that
this PR can help us better embrace the contribution from our community.
We also add the first example project to illustrate what we expect a
good project to have.
## Motivation
The docstring in the class PascalContextDataset59 is misleading. Try to fix it.
## Modification
The docstring in the class PascalContextDataset59 is changed.
add custom dataset
add face occlusion dataset
add config file for occlusion face
fix format
update prepare.md
formatting
formatting
fix typo error for doc
update downloading process
Update dataset_prepare.md
PR fix version to original repository. change to original repository.
* [Feature] Add model ensemble tool
* [Enhance] Add en and zh_cn instructions for model_ensemble
* [Enhance] Add default-value for --out and modify instruction
* [Enhance] Add arg-type for --out
* [Enhance] Delete redundant code