Commit Graph

47 Commits (5fc197900f3ba1b031d998d604b01774b0914f5a)

Author SHA1 Message Date
CastleDream 057155d3ab
[Feature] add bdd100K datasets (#3158)
## Motivation
Integrate [BDD100K](https://paperswithcode.com/dataset/bdd100k) dataset.
It shares the same classes as Cityscapes, and it's commonly used for
evaluating segmentation/detection tasks in driving scenes, such as in
[RobustNet](https://arxiv.org/abs/2103.15597),
[WildNet](https://github.com/suhyeonlee/WildNet).

Enhancement for Add BDD100K Dataset #2808

---------

Co-authored-by: xiexinch <xiexinch@outlook.com>
2023-07-14 10:09:16 +08:00
WuFan b89c2c4cb7
[Feature] Support DSDL Dataset (#2925)
- support dsdl seg dataset 
- add dsdl dataset citest
- validated accuracy on voc2012 and cityscapes
2023-05-10 16:54:42 +08:00
谢昕辰 7ff58d7074
[Feature] Support albu transform (#2943)
## Motivation


3a14c35974/mmseg/datasets/pipelines/transforms.py (L1348)

## Modification

Add albu to dev-1.x
2023-04-24 13:44:20 +08:00
Junhwa Song cb2d8fe085
[Enhance] Support multi-band image for Mosaic (#2748)
## Modification

I changed the hardcoded 3 channel length to dynamic channel length in
`np.full` function arguments.
This modification enables `RandomMosaic` transform to support
multispectral image (e.g. RGB image with NIR band) or bi-temporal image
pairs for change detection task.

## 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.
2023-03-15 19:36:47 +08:00
Miao Zheng 3cc7ae2167
[Fix] Format shape check (#2753)
as title
2023-03-15 17:49:59 +08:00
Tianlong Ai 8c89ff3dd1
[Datasets] Add Mapillary Vistas Datasets to MMSeg Core Package. (#2576)
## [Datasets] Add Mapillary Vistas Datasets to MMSeg Core Package .
## Motivation
Add Mapillary Vistas Datasets to core package.
Old PR #2484 

## Modification
- Add Mapillary Vistas Datasets to core package.
- Delete `tools/datasets_convert/mapillary.py` , dataset does't need
converting.
- Add `schedule_240k.py`  config.
- Add configs files.  
  ```none
  deeplabv3plus_r101-d8_4xb2-240k_mapillay_v1-512x1024.py
  deeplabv3plus_r101-d8_4xb2-240k_mapillay_v2-512x1024.py
  maskformer_swin-s_4xb2-240k_mapillary_v1-512x1024.py
  maskformer_swin-s_4xb2-240k_mapillary_v2-512x1024.py
  maskformer_r101-d8_4xb2-240k_mapillary_v1-512x1024.py
  maskformer_r101-d8_4xb2-240k_mapillary_v2-512x1024.py
  pspnet_r101-d8_4xb2-240k_mapillay_v1-512x1024.py
  pspnet_r101-d8_4xb2-240k_mapillay_v2-512x1024.py
  ```
- Synchronized changes to `projects/mapillary_datasets`

---------

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
Co-authored-by: xiexinch <xiexinch@outlook.com>
2023-03-15 14:44:38 +08:00
Miao Zheng 6ba4696648
[Enhancement] Support input gt seg map is not 2D (#2739)
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

fix #2593

## Modification

1. Only when gt seg map is 2D, extend its shape to 3D PixelData 
2. If seg map is not 2D, we raised warning for users.

---------

Co-authored-by: xiexinch <xiexinch@outlook.com>
2023-03-14 23:14:41 +08:00
谢昕辰 039ba5d4ca
[Feature] Support auto import modules from registry. (#2481)
## Motivation

The registry now supports auto-import modules from the given location.

register_all_modules before running is no longer needed. The modules
will be lazy-imported during building.

- [x] This PR can be merged after
https://github.com/open-mmlab/mmengine/pull/643. The MMEngine version
should be updated.

Ref: https://github.com/open-mmlab/mmdetection/pull/9143
2023-02-23 20:33:17 +08:00
谢昕辰 a947e3e754
[FIx] Set default `backend_args` values to None (#2597)
## 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`.
2023-02-16 15:33:52 +08:00
Andrew Lau 49b062e365
CodeCamp #139 [Feature] Support REFUGE dataset. (#2554)
## Motivation 
Add REFUGE datasets
Old PR: https://github.com/open-mmlab/mmsegmentation/pull/2420

---------

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2023-02-03 16:02:19 +08:00
谢昕辰 124b87ce90
[Refactor] Refactor fileio (#2543)
## 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.
2023-02-01 17:53:22 +08:00
Siddharth Ancha 74e8b89b17
[Fix] Switch order of `reduce_zero_label` and applying `label_map` in 1.x (#2517)
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._
2023-01-30 12:17:15 +08:00
Leeinsn 7fc8ca0312
CodeCamp #141 [Feature] Add BioMedical3DRandomFlip. (#2404)
## Motivation

Support for biomedical 3d images augmentation.

## Modification

Add BioMedical3DRandomFlip in mmseg/datasets/transforms/transforms.py.

Co-authored-by: MeowZheng <meowzheng@outlook.com>
2023-01-20 15:34:11 +08:00
Wencheng Wu 8dae9465a6
[Feature] Add `gt_edge_map` field. (#2466)
## 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`.
2023-01-11 11:51:29 +08:00
谢昕辰 f90f7a56d4
[Fix] Fix incorrect `img_shape` value assignment in RandomCrop (#2469)
## Motivation

Fix incorrect `img_shape` value assignment.

## Modification

- mmseg/datasets/transforms/transforms.py
2023-01-10 18:03:43 +08:00
王永韬 2d67e51db3
CodeCamp #140 [New] [Feature] Add synapse dataset and data augmentation in dev-1.x. (#2432)
## Motivation

Add Synapse dataset in MMSegmentation.
Old PR: https://github.com/open-mmlab/mmsegmentation/pull/2372.
2023-01-06 16:14:54 +08:00
legendchilli 6af2b8eab9
[Feature] Add BioMedical3DPad (#2383)
## Motivation
Add the 3d pad transform for biomedical images, which follows the design
of the nnUNet.
2023-01-03 13:37:48 +08:00
Fivethousand 3ca690bad3
[Feature] Add BioMedicalRandomGamma (#2406)
Add the random gamma correction transform for biomedical images, which
follows the design of the nnUNet.
2023-01-02 21:29:03 +08:00
Haoyu Wang 26f3df7a45
[Feature] nnUNet-style Gaussian Noise and Blur (#2373)
## Motivation

implement nnUNet-style Gaussian Noise and Blur
2023-01-02 20:43:15 +08:00
谢昕辰 da4125587e [Refactor] Support TTA (#2184)
* tta init

* use mmcv transform

* test city

* add multiscale

* fix merge

* add softmax to post process

* add ut

* add tta pipeline to other datasets

* remove softmax

* add encoder_decoder_tta ut

* add encoder_decoder_tta ut

* rename

* rename file

* rename config

* rm aug_test

* move flip to post process

* fix channel
2022-12-30 22:52:07 +08:00
Jin Ye 79e8578bfc [Feature] Add Biomedical 3D array random crop transform (#2378)
* [Feature] Add Biomedical 3D array random crop transform

* fix lint

* fix gen crop bbox

* fix gen crop bbox

* docstring

* typo

Co-authored-by: MeowZheng <meowzheng@outlook.com>
2022-12-30 22:52:07 +08:00
xiexinch 721afaec31 add docstring 2022-11-24 16:22:07 +08:00
xiexinch 68e3b25560 use mmcv.RandomChoiceResize as entry 2022-11-24 14:55:25 +08:00
xiexinch 721f4d01f3 add ut 2022-11-23 15:15:38 +08:00
Miao Zheng b21df463d4
[Feature] LIP dataset (#2187)
* [WIP] LIP dataset

* wip

* keep473

* lip dataset prepare

* add ut and test data
2022-10-31 20:47:52 +08:00
Miao Zheng 3d8fd35e26
[Feature]Add Decathlon dataset (#2227)
* [Feature]Add Decathlon dataset

* fix test data

* add file

* remove order

* revise default value for prefix

* modify example

* revise based on  comments

* add comments for ut
2022-10-26 20:10:42 +08:00
Miao Zheng ac9ee8c355
[Feature]Generate Edge for dataset (#2210)
* [WIP]Generate Edge for dataset

* add ut

* add repr

* add inti
2022-10-20 16:45:31 +08:00
Miao Zheng 20c7dc689c
[Feature] Add BioMedical data loading (#2176)
* [WIP] Add BioMedical data loading

* add depends nibabel

* fix bug

* fix ut

* fix

* add test data

* xyz2zyx zyx2xyz

* format

* remove ignore empty

* remove ignore empty

* remove with seg in LoadBiomedicalAnnotation

* float32

* docstring

* toxyz

* docstring
2022-10-18 16:30:08 +08:00
MengzhangLI f3cd44bebf
[Fix] Fix ResizeToMultiple transform in MMSeg 1.x (#2185) 2022-10-14 15:37:35 +08:00
谢昕辰 230246f557
[Refactor] Add pyupgrade pre-commit hook (#2078)
* add pyupgrade hook

* run pyupgrade precommit hook
2022-09-19 14:06:29 +08:00
Miao Zheng 8de0050f25
[Refactor] data flow (#1956)
* [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
2022-08-26 15:54:23 +08:00
Miao Zheng 50546da85c
[Fix]Remove modules from mmcv.runner and mmcv.utils (#1966)
* [WIP] mmcv-clean

* [WIP]Remove modules from mmcv.runner and mmcv.utils

* wip

* fix import mmengine

* remove ut

* loadcheckpoint in mae
2022-08-25 15:15:21 +08:00
谢昕辰 167f94a70b rename data to structures (#1854) 2022-08-19 20:50:02 +08:00
MengzhangLI ecab73a892 [Feature] Add P1 DataTransform (#1843)
* [Feature] Add P1 DataTransform

* fix unit test error

* fix @cache_randomness location
2022-08-19 20:50:01 +08:00
MengzhangLI 6758b148b3
[Fix] Fix DATASETS not imported error (#1827) 2022-07-26 14:46:59 +08:00
MengzhangLI 3cf2bbda2a
[Fix] Change CustomDataset to BaseSegDataset (#1791) 2022-07-26 12:01:40 +08:00
谢昕辰 ba4d1d62aa
[Feature] Add LoadImageFromNdArray pipeline (#1810)
* add load image from ndarray pipeline

* fix import
2022-07-22 19:40:00 +08:00
Miao Zheng 4de57b49c5
[Fix] Fix register_all_modules and imports (#1793)
* [Fix] Fix register_all_modules and imports

* fix transforms import
2022-07-21 22:44:42 +08:00
zhengmiao 4b76f277a6 [Refactory] MMSegmentation Content 2022-07-15 15:47:29 +00:00
zhengmiao 89d6f89dfc Merge branch 'linfangjian/refactor_citysmetric' into 'refactor_dev'
[Refactor] Refactor cityscapes metrics

See merge request openmmlab-enterprise/openmmlab-ce/mmsegmentation!46
2022-06-28 03:21:33 +00:00
linfangjian.vendor 6053345b3d [Refactor] Refactor cityscapes metrics 2022-06-28 03:21:33 +00:00
limengzhang.vendor f2bac79f03 [Refactor] Refactor DatasetWrapper 2022-06-27 14:36:18 +00:00
zhengmiao b23982d1b3 [Refactory] Refactory BaseSegmentor based BaseModel 2022-06-19 06:32:09 +00:00
zhengmiao f59ef99b00 [Fix]Add label_map and reduce_zero_label in metainfo of dataset and deprecate reduce_zero_label in load annotation 2022-06-09 12:23:36 +00:00
MeowZheng fcb948295c [Enhancement] Revise RandomCrop 2022-05-27 21:52:49 +08:00
zhengmiao 1af338e496 [Refactory] Dataset refactory 2022-05-26 09:13:40 +00:00
linfangjian.vendor f6d3291064 [Refactor] Refactor RandomCrop and PhotoMetricDistortion 2022-05-25 01:58:37 +00:00