## Motivation
Support `MMSegInferencer` for providing an easy and clean interface for
single or multiple images inferencing.
Ref: https://github.com/open-mmlab/mmengine/pull/773https://github.com/open-mmlab/mmocr/pull/1608
## Modification
- mmseg/apis/mmseg_inferencer.py
- mmseg/visualization/local_visualizer.py
- demo/image_demo_with_inferencer.py
## Use cases (Optional)
Based on https://github.com/open-mmlab/mmengine/tree/inference
Add a new image inference demo with `MMSegInferencer`
- demo/image_demo_with_inferencer.py
```shell
python demo/image_demo_with_inferencer.py demo/demo.png fcn_r50-d8_4xb2-40k_cityscapes-512x1024
```
---------
Co-authored-by: MeowZheng <meowzheng@outlook.com>
## Motivation
In MMEngine >= 0.2.0, it might directly determine what the backend is by
using the `data_root` path.
## Modification
Set all default `backend_args` values are `None`.
## Motivation
Use the new fileio from mmengine
https://github.com/open-mmlab/mmengine/pull/533
## Modification
1. Use `mmengine.fileio` to repalce FileClient in mmseg/datasets
2. Use `mmengine.fileio` to repalce FileClient in
mmseg/datasets/transforms
3. Use `mmengine.fileio` to repalce FileClient in mmseg/visualization
## BC-breaking (Optional)
we modify all the dataset configurations, so please use the latest config file.
This is an almost exact duplicate of #2500 (that was made to the
`master` branch) now applied to the `1.x` branch.
---
## 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 a few
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
Support for biomedical 3d images augmentation.
## Modification
Add BioMedical3DRandomFlip in mmseg/datasets/transforms/transforms.py.
Co-authored-by: MeowZheng <meowzheng@outlook.com>
## Motivation
The motivation of this PR is to add `gt_edge_map` field to support
boundary loss.
## Modification
- GenerateEdge
Modify `gt_edge` field to `gt_edge_map`.
- PackSegInputs
Add `gt_edge_map` to data_sample.
- stack_batch
Pad `gt_edge_map` to max_shape.
## BC-breaking (Optional)
No
## Use cases (Optional)
Reference `GenerateEdge`.
* [WIP] Refactor data flow
* model return
* [WIP] Refactor data flow
* support data_samples is optional
* fix benchmark
* fix base
* minors
* rebase
* fix api
* ut
* fix api inference
* comments
* docstring
* docstring
* docstring
* fix bug of slide inference
* add assert c > 1