Commit Graph

407 Commits (72e20a88543a4764780803a66a87d3f4897bc944)

Author SHA1 Message Date
MengzhangLI a1f011dc0b
[Doc] Add Data Structures and Elements (#2070)
* [WIP][Doc] Add Data Structures and Elements

* fix

* add

* fix

* add chinses doc

* refactor

* fix

* fix typo

* fix

* fix

* fix typo

* Update docs/en/advanced_guides/structures.md

* Update docs/en/advanced_guides/structures.md

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-10-28 22:22:44 +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
谢昕辰 84e76492b9
mmengine requirement (#2186) 2022-10-13 20:43:44 +08:00
谢昕辰 8b392946bb
[Doc] Add evaluation doc (#2077)
* introduction

* add evaluator doc and fix typo

* fix ut

* add test dataflow

* add runner reference

* add dataloader config

* fix typo

* minor change
2022-10-13 14:55:04 +08:00
Miao Zheng b732fae265
Upgrade pre commit hooks (#2154)
* Upgrade pre commit hooks

* fix lint
2022-10-08 12:04:24 +08:00
Miao Zheng f87c05308b
[Fix] Fix MMSegmentation colab demo (#2089)
* [WIP] Fix MMSegmentation colab demo

* wip

* fix

* revise config

* seg branch

* colab link

* engine install

* demo image

* remove inference

* fix inference pipeline

* typo
2022-09-30 14:15:39 +08:00
谢昕辰 b3b7629d38
[Fix] Fix binary segmentation (#2101)
* add out_channels

* fix forward

* add decode_head ut

* add segmentor ut

* refine postprocess

* fix
2022-09-27 16:49:38 +08:00
Miao Zheng 2a183283f5
[Enhancement]Add `out_file` in add_datasample to directly save image (#2090)
* [Enhancement]Add `out_file` in add_datasample to for save vis image directly

* comments

* ut
2022-09-20 15:23:13 +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
MengzhangLI bff8a98d81
[Doc] Update Data Preparation and Visualization doc (#2054)
* [Doc] Update Data Preparation and Visualization doc

* upload visualization figure example

* fix

* fix

* delete demo image

* remove segvisualizer

* fix

* fix

* fix
2022-09-14 22:27:12 +08:00
Miao Zheng fffb9e2588
[Del] Remove ops (#2063) 2022-09-13 15:47:42 +08:00
Miao Zheng 211584ffa2
[Fix] Revise MMEngine mim version (#2008) 2022-08-31 22:09:48 +08:00
Miao Zheng 8ba80176a5
[Enhancement] version check codebase from openmmlab (#2006) 2022-08-31 18:46:43 +08:00
Miao Zheng 2724d47f71
[Fix] Add out-file in demo and show_result_pyplot (#2004) 2022-08-31 17:44:41 +08:00
MengzhangLI ee7f340dff
[Feature] Support Tversky Loss in dev-1.x branch (#2000) 2022-08-31 10:58:21 +08:00
Miao Zheng ef2152fd54
[Fix] Fix inputs dtype convert in data preprocessor (#1975) 2022-08-26 17:25:48 +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
谢昕辰 3d98c25052 fix base dataset (#1926) 2022-08-19 20:50:03 +08:00
Miao Zheng e0499d5a77 [Fix] Fix repo based on refactoring standard (#1869)
* [Fix] Fix repo based on refactory standard

* fix ut
2022-08-19 20:50:02 +08:00
谢昕辰 bfe0fbe04d support load v1/v2 ckpt (#1868) 2022-08-19 20:50:02 +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
Miao Zheng 76c5ce1396
[Fix] Fix after iter `SegVisualizationHook` (#1908)
* [Fix] Fix after iter `SegVisualizationHook`

* ut
2022-08-10 21:02:09 +08:00
Miao Zheng d265778b6f
[Fix] Import Sequential from mmengine (#1899) 2022-08-09 21:41:03 +08:00
MengzhangLI e4b9d72a11
[Fix] 2.0 Fix mDice metric for medical datasets (#1864) 2022-08-04 18:32:52 +08:00
Miao Zheng e2f26e3fde
[Fix] Import BaseModule from mmengien (#1862) 2022-08-04 09:35:05 +08:00
MengzhangLI 7369d50049
[Fix] Fix SegLocalVisualizer gt_sem_seg cuda tensor error (#1845)
* [Fix] Fix SegLocalVisualizer gt_sem_seg cuda tensor error

* fix ut error and add config visualizer dict

* fix ut error
2022-08-01 15:03:01 +08:00
谢昕辰 5d9650838e
[Fix] Fix demo scripts (#1815)
* [Feature] Add SegVisualizer

* change name to visualizer_example

* fix inference api

* fix video demo and refine inference api

* fix

* mmseg compose

* set default device to cuda:0

* fix import

* update dir

* rm engine/visualizer ut

* refine inference api and docs

* rename

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-07-29 18:37:20 +08:00
MengzhangLI 6873f9ece8
[Feature] Add SegVisualizer (#1792)
* [Feature] Add SegVisualizer

* change name to visualizer_example

* fix typo

* refactor folder structure
2022-07-27 16:28:09 +08:00
MengzhangLI 4079d6dfed
[Fix] Use MMEngine BaseModule (#1829)
* [Fix] Use MMEngine BaseModule

* delete auto_fp16
2022-07-27 15:35:12 +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
谢昕辰 b61347e246
update mmcv version (#1801) 2022-07-21 10:31:44 +08:00
zhengmiao 4b76f277a6 [Refactory] MMSegmentation Content 2022-07-15 15:47:29 +00:00
zhengmiao e324e8f3d4 Merge branch 'xiexinchen/rename_apis' into 'refactor_dev'
[Refactor] Rename APIs

See merge request openmmlab-enterprise/openmmlab-ce/mmsegmentation!63
2022-07-14 01:53:01 +00:00
zhengmiao ed4bb5b211 Merge branch 'xiexinchen/fix_stdcnet' into 'refactor_dev'
[Refactor] Fix STDCNet custom loss

See merge request openmmlab-enterprise/openmmlab-ce/mmsegmentation!61
2022-07-12 10:20:42 +00:00
xiexinchen.vendor 1b3a4876a1 [Refactor] Fix STDCNet custom loss 2022-07-12 10:20:41 +00:00
xiexinch c1c870af31 rename init/inference_segmentor to init/inference_model 2022-07-12 16:19:59 +08:00
xiexinchen.vendor d74dc89214 [Refactor] Fix load annotations by file 2022-07-11 11:31:38 +00:00
xiexinchen.vendor 3e8594d2dc [Refactor] Move tensor2list operation to EncoderDecoder 2022-07-08 10:34:03 +00:00
xiexinch 55b0c3aef5 fix cgnet configs and encnet forward error 2022-07-07 14:18:17 +08:00
xiexinch 761e1a9983 minor change 2022-07-05 20:43:33 +08: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
limengzhang.vendor c5ad7fb0b7 [Fix] Delete all **kwargs in Segmentor Forward function 2022-06-22 08:24:13 +00:00
zhengmiao ffa0616a68 [Refactory] KNet head 2022-06-20 04:04:48 +00:00
zhengmiao b23982d1b3 [Refactory] Refactory BaseSegmentor based BaseModel 2022-06-19 06:32:09 +00:00
linfangjian.vendor e445836bd4 [Fix] Fix iou metric 2022-06-15 08:18:26 +00:00
linfangjian.vendor 6ca42737b6 [Fix] Fix pred 2022-06-14 02:53:46 +00:00
linfangjian.vendor dd9c411335 [Refactor] Refactor decode_head and segmentors and add preprocess_cfg 2022-06-10 14:02:40 +00:00
MengzhangLI 7a78d6e483 [Fix] Fix METAINFO typo in ChaseDB1Dataset 2022-06-09 20:49:32 +08: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
MengzhangLI c061d6d30e [Fix] Fix omitting to_tensor in PackSegInputs 2022-06-09 11:01:56 +08:00
linfangjian.vendor 02677ac2f8 [Refactor] Refactor evaluation config, clean eval hook and metrics 2022-06-08 08:22:42 +00:00
MeowZheng ee025ea33b [Fix]Add build head 2022-06-08 13:05:41 +08:00
MengzhangLI dbb1316c47 [Fix] Fix wrong example in SegDataSample 2022-06-07 18:59:58 +08:00
linfangjian.vendor 593229eb16 [Refactor] Refactor IoU metrics 2022-06-02 14:15:28 +00:00
zhengmiao 478da81c8b [Fix] Optimizer-> OptimWrapper 2022-06-02 05:19:36 +00:00
zhengmiao cce9b70bfb Merge branch 'limengzhang/refactor_dataset_config' into 'refactor_dev'
[Refactor] Refactor Dataset and its Transform Config files

See merge request openmmlab-enterprise/openmmlab-ce/mmsegmentation!18
2022-05-31 14:28:42 +00:00
limengzhang.vendor 5b9c29f992 [Refactor] Refactor Dataset and its Transform Config files 2022-05-31 14:28:42 +00:00
zhengmiao f128fbb587 Merge branch 'zhengmiao/registry-pipeline' into 'refactor_dev'
[Fix] add default scope for pipelien

See merge request openmmlab-enterprise/openmmlab-ce/mmsegmentation!21
2022-05-31 11:56:43 +00:00
MeowZheng 60bcf2edf5 [Fix] add default scope for pipelien 2022-05-31 19:47:45 +08:00
MeowZheng fcb948295c [Enhancement] Revise RandomCrop 2022-05-27 21:52:49 +08:00
MeowZheng 1ad7bdcb5a [Feature] Add default scope and register modules 2022-05-27 20:57:38 +08:00
zhengmiao 1af338e496 [Refactory] Dataset refactory 2022-05-26 09:13:40 +00:00
limengzhang.vendor baaf9a4742 [Refactor] Add PackSegInputs and some Transforms 2022-05-26 03:06:02 +00:00
linfangjian.vendor f6d3291064 [Refactor] Refactor RandomCrop and PhotoMetricDistortion 2022-05-25 01:58:37 +00:00
limengzhang.vendor 30d75b75eb [Refactor] Add SegDataSample 2022-05-16 11:31:46 +00:00
linfangjian.vendor 7a32d610e4 [Refactor] Refactor all registries 2022-05-10 12:15:20 +00:00
MengzhangLI 7f1a72ac42 Bump version to v0.24.1 (#1541)
* Bump version to v0.24.1

* version.py

* changelog.md
2022-05-01 14:06:04 +08:00
Miao Zheng 28b42597a1 [Enhancement]Revise docstring and UT for layer decay LR (#1540)
* fix docstring

* fix ut for optimizer cosntructor
2022-05-01 13:13:53 +08:00
FangjianLin 40ae7edd49 [Fix] Add MAE LayerDecayOptimizerConstructor (#1539) 2022-05-01 12:42:49 +08:00
Miao Zheng f33b7cafc8 Bump version to v0.24.0 (#1533)
* [WIP] Bump version to v0.24.0

* changelog

* Update docs/en/changelog.md

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

* Update docs/en/changelog.md

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

* Update docs/en/changelog.md

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

* Update docs/en/changelog.md

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

* Update docs/en/changelog.md

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

* Update docs/en/changelog.md

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

* words

* typo

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-04-29 22:23:02 +08:00
wangbin 578d4d0c42 [Fix] Fix the bug in binary_cross_entropy (#1527)
* [Fix] Fix the bug in binary_cross_entropy

 Fix the bug in binary_cross_entropy
'label.max() <= 1' should mask out ignore_index, since the ignore_index often set as 255.

* [Fix] Fix the bug in binary_cross_entropy, add comments

As the ignore_index often set as 255, so the binary class label check should mask out ignore_index.

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

* [Fix] Fix the bug in binary_cross_entropy

As the ignore_index often set as 255, so the binary class label check should mask out ignore_index.

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
Co-authored-by: MeowZheng <meowzheng@outlook.com>
2022-04-29 19:32:12 +08:00
Yuan Liu 43b8a1d8dc [Feature]: Add MAE (#1307)
* [Fix]: Fix lint

* [WIP]: Add mae seg config

* [Feature]: Add MAE seg

* [Fix]: Fix mae dataset img scale bug

* [Fix]: Fix lint

* [Feature]: Change mae config to mae_segmentation's config

* [Feature]: Add interpolate pe when loading

* [Fix]: Fix pos_embed not used bug

* [Fix]: Fix lint

* [Fix]: Init rel pos embed with zeros

* [Fix]: Fix lint

* [Fix]: Change the type name of backbone to MAE

* [Fix]: Delete ade20k_512x512.py

* [Fix]: Use mmseg provided ade20k.py

* [Fix]: Change 1 sample per gpu to 2 samples per gpu

* [Fix]: Fix conflict

* [Refactor]: Use the TransformerEncoderLayer of  BEiT

* [Feature]: Add UT

* [Fix]: Change the default value of qv bias to False

* [Fix]: Initialize relative pos table with zeros

* [Fix]: Delete redundant code in mae

* [Fix]: Fix lint

* [Fix]: Rename qkv_bias to qv_bias

* [Fix]: Add docstring to weight_init of MAEAttention

* [Refactor]: Delete qv_bias param

* [Fix]: Add reference to fix_init_weight

* [Fix]: Fix lint

* [Fix]: Delete extra crop size

* [Refactor]: Rename mae

* [Fix]: Set bias to True

* [Fix]: Delete redundant params

* [Fix]: Fix lint

* [Fix]: Fix UT

* [Fix]: Add resize abs pos embed

* [Fix]: Fix UT

* [Refactor]: Use build layer

* [Fix]: Add licsense and fix docstring

* [Fix]: Fix docstring

* [Feature]: Add README metafile

* [Fix]: Change 640 to 512

* [Fix]: Fix README

* fix readme of MAE

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-04-28 00:54:20 +08:00
Miao Zheng d90e700284 [Refactor] Add build_pos_embed and build_layers for BEiT (#1517)
* [Refactor] Add build_pos_embed and build_layers for BEiT

* Update mmseg/models/backbones/beit.py
2022-04-27 11:37:03 +08:00
FangjianLin 7c3bf22885 [Refactory] Merge BEiT and ConvNext 's LR decay optimizer constructors (#1438)
* move layer_decay_optimizer_constructor

* fix

* fix

* merge test_core

* fix

* add DeprecationWarning

* fix DeprecationWarning

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix test

* fix

* fix

* fix

* fix

* fix ut

* fix

* fix

* Update tests/test_core/test_layer_decay_optimizer_constructor.py

* fix

* fix

* fix

* fix

Co-authored-by: MeowZheng <meowzheng@outlook.com>
Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-04-27 10:43:25 +08:00
Miao Zheng f64c7c331b [Refactor] Refactor transfomer encode layer in ViT and BEiT backbone (#1481)
* [Refactor] Refactor transfomer encoder layer

* fix ffn cfg

* fix drop path cfg

* private init func

* fix qv bias

* fix qkv bias

* fix qkv bias

* wH->Wh
2022-04-23 17:35:05 +08:00
Mladen Fernežir 9e17a0d364 Fix validation loss logging (#1494) 2022-04-22 15:25:32 +08:00
Wang Xinjiang b5d8c7dc6c Fix potential bugs in accuracy.py (#1496) 2022-04-21 10:18:37 +08:00
Miao Zheng 464ebab53e [Enhancement] MMCV maximum_version set to 1.6 (#1480)
* [Enhancement] MMCV maximum_version set to 1.6

* [Enhancement] MMCV maximum_version set to 1.6
2022-04-19 16:19:56 +08:00
FangjianLin e4b3604e50 [Fix] Register optimizer constructor with mmseg (#1456)
* [fix] register optimizer onstructor with mmseg

* fix lint

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Update tests/test_core/test_optimizer.py

* Update tests/test_core/test_optimizer.py

* Update tests/test_core/test_optimizer.py

* Update tests/test_core/test_optimizer.py

* fix lint

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-04-16 16:45:17 +08:00
Rockey 23b7cfc59d [Fix] Support single cahnnel `pred` for Binary Cross Entropy Loss (#1454)
* [Fix] Fix the bug that binary cross entropy loss doesn't support single channel input

* imcrease coverage

* modify implementation

* increase coverage

* add assert

* modify implementation

* enshollow condition judge

* fix
2022-04-14 11:26:02 +08:00
Miao Zheng cc3a0528fe [Fix] Input previous results for the last cascade_decode_head (#1450)
* [Fix] Input previous results for the latter cascade_decode_head

* minors
2022-04-13 21:16:29 +08:00
Miao Zheng f50bfe3e3d [Enhance] Add extra dataloader settings in configs (#1435)
* [Enhance] Add extra dataloader settings in configs

* val default samples

* val default samples

* del unuse

* del unused
2022-04-13 13:30:10 +08:00
panfeng-hover add835be3f Avoid converting label ids twice by label map during evaluation (#1417)
* Avoid converting label ids twice by label map during evaluation

* Update mmseg/datasets/custom.py

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

* lint

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
Co-authored-by: MeowZheng <meowzheng@outlook.com>
2022-04-12 18:26:25 +08:00
Miao Zheng a09df2c39d [Fix] inconsistent dtype ofseg_label in stdc decode (#1463) 2022-04-10 14:18:16 +08:00
Yzichen f45ddc97bb fix bug about label_map (#1445)
* fix bug about label_map

* Update mmseg/datasets/pipelines/loading.py

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

* lint

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
Co-authored-by: MeowZheng <meowzheng@outlook.com>
2022-04-09 21:11:47 +08:00
Miao Zheng 4bc2a30ea0 Add DistSamplerSeedHook for when runner is EpochBasedRunner (#1449)
* Add DistSamplerSeedHook for when runner is EpochBasedRunner

* add comment
2022-04-06 22:04:11 +08:00
jiangyitong 7b6953fd5f [Feature] Add with cp to mit and vit (#1431)
* add with cp to mit and vit

* add test unit

Co-authored-by: jiangyitong <jiangyitong1@sensetime.com>
2022-04-01 21:01:45 +08:00
Miao Zheng bf745ca09c Bump version to v0.23.0 (#1439)
* Bump version to v0.23.0

* new contributor

* rephrase

* tyoi

* typo

* get_started

* typo

* rephrase

* rephrase

* rephrase
2022-04-01 15:43:19 +08:00
MengzhangLI cc89c8d18d [Fix] Add avg_non_ignore in cross entropy loss (#1409)
* [Fix] Add avg_non_ignore in cross entropy loss

* [Fix] Add avg_non_ignore in cross entropy loss

* add docstring

* fix ut

* fix docstring and comments

* fix

* fix bce

* fix avg_factor in BCE and add more ut

* add avg_non_ignore

* add more ut

* fix part of ut

* fix part of ut

* test avg_non_ignore would not affect ce/bce when reduction none/sum

* test avg_non_ignore would not affect ce/bce when reduction none/sum/mean

* re-organize ut

* re-organize ut

* re-organize ut

* re-organize hardcode case

* fix parts of comments

* fix another parts of comments

* fix
2022-03-30 18:32:47 +08:00
FangjianLin d1b8eae35e [Feature] Add BEiT backbone (#1404)
* [Feature] Add BEiT backbone

* fix

* fix

* fix

* fix

* add readme

* fix

* fix

* fix

* fix

* fix

* add link

* fix memory

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix test_beit.py

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2022-03-30 15:25:10 +08:00
Miao Zheng fa316a1f85 [Feature] Support dataset initialization with file_client (#1402)
* [Feature] Support file_client in dataset initialization

* docstring

* revise osp.exist
2022-03-28 23:53:23 +08:00
MengzhangLI f15a21a30d [Enchance] Support random seed for distributed sampler (#1411)
* support random seed for distributed sampler

* move mmseg/utils/dist_util.py to mmseg/core/utils/dist_util.py

* move mmseg/utils/dist_util.py to mmseg/core/utils/dist_util.py

* change dist sampler

* change dist sampler

* fix docstring in sync_random_seed
2022-03-28 23:50:39 +08:00
Xiangxu-0103 7a8227b747 fix typo (#1405) 2022-03-23 10:36:27 +08:00
FangjianLin 415b20febd [Feature] Add multi machine `dist_train`. (#1383)
* Add training startup documentation

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2022-03-18 10:55:49 +08:00
CCODING 786a9f7902 Support #1375: add demo/image_demo.py support for STARE (#1376)
* Support #1375: add demo/image_demo.py support for STARE

* Update mmseg/core/evaluation/class_names.py

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-03-15 22:42:20 +08:00
Rockey 42df28c7bd [Feature] add nlc2nchw2nlc and nchw2nlc2nchw (#1249)
* [Feature] add nlc2nchw2nlc and nchw2nlc2nchw

* add example

* add test, add **kwargs to make it more universal
2022-03-10 20:27:28 +08:00
MengzhangLI 054dc66145 [Feature] Support K-Net (#1289)
* knet first commit

* fix import error in knet

* remove kernel update head from decoder head

* [Feature] Add kenerl updation for some decoder heads.

* [Feature] Add kenerl updation for some decoder heads.

* directly use forward_feature && modify other 3 decoder heads

* remover kernel_update attr

* delete unnecessary variables in forward function

* delete kernel update function

* delete kernel update function

* delete kernel_generate_head

* add unit test & comments in knet.py

* add copyright to fix lint error

* modify config names of knet

* rename swin-l 640

* upload models&logs and refactor knet_head.py

* modify docstrings and add some ut

* add url, modify docstring and add loss ut

* modify docstrings
2022-03-10 20:05:37 +08:00
Rockey da6bb2c8c5 [Feature]: Add diff seeds to diff ranks and set torch seed in worker_init_fn (#1362) 2022-03-10 09:41:16 +08:00
MengzhangLI 6b05790429 Bump v0.22.1 (#1361) 2022-03-09 20:05:44 +08:00
Rockey 6665b42159 [Fix] Fix the bug that when all pixels in an image is ignored, the ac… (#1336)
* [Fix] Fix the bug that when all pixels in an image is ignored, the accuracy calculation raises ZeroDivisionError

* use eps

* all close

* add ignore test

* add eps
2022-03-09 13:20:46 +08:00
MengzhangLI 67e0f9dd15 Bump v0.22.0 (#1347)
* change version to v0.22.0

* change version to v0.22.0

* add mmcls version in get_started.md

* add mmcls installation and move PR1299 into enhancement

* add mmcls installation and move PR1299 into enhancement

* remove MMCLS and make mmcv <=1.5.0 version in get_started.md

* fix typo
2022-03-04 22:17:29 +08:00
MengzhangLI befdc93dc3 [Feature] Support ConvNext (#1216)
* upload original backbone and configs

* ConvNext Refactor

* ConvNext Refactor

* convnext customization refactor with mmseg style

* convnext customization refactor with mmseg style

* add ade20k_640x640.py

* upload files for training

* delete dist_optimizer_hook and remove layer_decay_optimizer_constructor

* check max(out_indices) < num_stages

* add unittest

* fix lint error

* use MMClassification backbone

* fix bugs in base_1k

* add mmcls in requirements/mminstall.txt

* add mmcls in requirements/mminstall.txt

* fix drop_path_rate and layer_scale_init_value

* use logger.info instead of print

* add mmcls in runtime.txt

* fix f string && delete

* add doctring in LearningRateDecayOptimizerConstructor and fix mmcls version in requirements

* fix typo in LearningRateDecayOptimizerConstructor

* use ConvNext models in unit test for LearningRateDecayOptimizerConstructor

* add unit test

* fix typo

* fix typo

* add layer_wise and fix redundant backbone.downsample_norm in it

* fix unit test

* give a ground truth lr_scale and weight_decay

* upload models and readme

* delete 'backbone.stem_norm' and 'backbone.downsample_norm' in get_num_layer()

* fix unit test and use mmcls url

* update md2yml.py and metafile

* fix typo
2022-03-04 15:52:01 +08:00
FangjianLin 38df41ea19 [Feature] Add `min_size` arg in `Resize` to keep the shape after resize bigger than slide window (#1318)
* [Feature] add setr_resize

* fix a bug

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2022-03-01 16:25:48 +08:00
sshuair 06b3533ee5 fix dnl_head export onnx inference difference type Cast error (#1161)
* fix export onnx inference difference type Cast error

* fix export onnx inference difference type Cast error.

* use yapf format

* use same device type with pairwise_weight
2022-03-01 10:16:08 +08:00
MengzhangLI 2717ee62f9 [Feature] Support kenerl updation for some decoder heads. (#1299)
* [Feature] Add kenerl updation for some decoder heads.

* [Feature] Add kenerl updation for some decoder heads.

* directly use forward_feature && modify other 3 decoder heads

* remover kernel_update attr

* delete unnecessary variables in forward function

* delete kernel update function

* delete kernel update function

* delete unnecessary docstrings

* modify comments in self._forward_feature()

* modify docstrings in self._forward_feature()

* fix docstring

* modify uperhead
2022-02-27 11:35:29 +08:00
Miao Zheng b97cfa77d2 [Enhancement] Revise pre-commit-hooks (#1315) 2022-02-23 23:44:27 +08:00
Waterman0524 a93423e1fd [Feature] Support iSAID aerial dataset. (#1115)
* support iSAID aerial dataset

* Update and rename docs/dataset_prepare.md to 博士/dataset_prepare.md

* Update dataset_prepare.md

* fix typo

* fix typo

* fix typo

* remove imgviz

* fix wrong order in annotation name

* upload models&logs

* upload models&logs

* add load_annotations

* fix unittest coverage

* fix unittest coverage

* fix correct crop size in config

* fix iSAID unit test

* fix iSAID unit test

* fix typos

* fix wrong crop size in readme

* use smaller figure as test data

* add smaller dataset in test data

* add blank in docs

* use 0 bytes pseudo data

* add footnote and comments for crop size

* change iSAID to isaid and add default value in it

* change iSAID to isaid in _base_

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-02-17 19:07:32 +08:00
MengzhangLI 1abf76decf [Fix] Fix wrong palette value in vaihingen (#1292) 2022-02-16 22:41:39 +08:00
Hyeokjoon Kwon 4d451a09dc [Fix] Make accuracy take into account ignore_index (#1259)
* make accuracy take into account ignore_index

* add UT for accuracy
2022-02-15 00:39:59 +08:00
MengzhangLI 4de0c3708d [Fix] Fix type in Swin Transformer (#1274) 2022-02-09 19:08:32 +08:00
MengzhangLI 574adbe43b Bump v0.21.1 (#1273)
* Bump v0.21.1

* add improvements in changelog

* add improvements in changelog

* fix cn readme

* change changelog
2022-02-09 17:17:55 +08:00
Jerry Jiarui XU b405ce0506 [Improve] Add exception for PointRend for support CPU-only usage (#1271)
* [Improve] Add exception for PointRend for support CPU-only usage

* fixed linting
2022-02-09 00:52:56 -05:00
Jerry Jiarui XU 548eec9580 [Improve] Use MMCV load_state_dict func in ViT/Swin (#1272)
* [Improve] Use MMCV load_state_dict func in ViT/Swin

* use CheckpointLoader instead
2022-02-09 00:52:42 -05:00
MengzhangLI d4f5bb25fc [Enhancement] Upgrade isort in pre-commit hook (#1270) 2022-02-08 19:06:33 +08:00
MengzhangLI a83f715bb8 Bump v0.21.0 (#1258)
* change version to v0.21.0

* change version to v0.21.0

* change version to v0.21.0

* change version to v0.21.0
2022-01-29 18:30:13 +08:00
MengzhangLI 574b195be1 [Enhance] New-style CPU training and inference. (#1251)
* [Enhance] New-style CPU training and inference.

* assert mmcv version

* SyncBN to BN in training and testing

* SyncBN to BN in training and testing

* upload untracked files to this branch

* delete gpu_ids

* fix bugs

* assert args.gpu_id in train.py

* use cfg.gpu_ids = [args.gpu_id]

* use cfg.gpu_ids = [args.gpu_id]

* fix typo

* fix typo

* fix typos
2022-01-28 23:03:01 +08:00
MengzhangLI 46898b8e8a delete unnecessary lines of STDCHead (#1231) 2022-01-28 10:53:11 +08:00
MengzhangLI 2729a6d4d1 add multi-processes script (#1238) 2022-01-27 21:18:55 +08:00
rstrudel ee47c41740 [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
MengzhangLI fe42371297 [Feature] Support ISPRS Vaihingen Dataset. (#1171)
* Add Vaihingen

* upload models&logs of vaihingen

* fix unit test

* fix dataset pipeline

* fix unit test coverage

* fix vaihingen docstring
2022-01-22 20:27:51 +08:00
MengzhangLI bdecbdbdf1 [Fix] Add `COCOStuffDataset` in `class_names.py`. (#1222)
* add cocostuff in class_names

* add more class names
2022-01-22 18:03:24 +08:00
Kingdrone 634fbceab0 [Feature] Support ISPRS Potsdam Dataset. (#1097)
* add isprs potsdam dataset

* add isprs dataset configs

* fix lint error

* fix potsdam conversion bug

* fix error in potsdam class

* fix error in potsdam class

* add vaihingen dataset

* add vaihingen dataset

* add vaihingen dataset

* fix some description errors.

* fix some description errors.

* fix some description errors.

* upload models & logs of Potsdam

* remove vaihingen and add unit test

* add chinese readme

* add pseudodataset

* use mmcv and add class_names

* use f-string

* add new dataset unittest

* add docstring and remove global variables args

* fix metafile error in PSPNet

* fix pretrained value

* Add dataset info

* fix typo

Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2022-01-18 14:15:15 +08:00
Kyungmin Lee 88944e9935 [Feature] Add MultiImageMixDataset (#1105)
* Fix typo in usage example

* original MultiImageMixDataset code in mmdet

* Add MultiImageMixDataset unittests in test_dataset_wrapper

* fix lint error

* fix value name ann_file to ann_dir

* modify retrieve_data_cfg (#1)

* remove dynamic_scale & add palette

* modify retrieve_data_cfg method

* modify retrieve_data_cfg func

* fix error

* improve the unittests coverage

* fix unittests error

* Dataset (#2)

* add cfg-options

* Add unittest in test_build_dataset

* add blank line

* add blank line

* add a blank line

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

Co-authored-by: Younghoon-Lee <72462227+Younghoon-Lee@users.noreply.github.com>
Co-authored-by: MeowZheng <meowzheng@outlook.com>
Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-01-11 16:18:24 +08:00
Kyungmin Lee e9dd32b6e8 [Feature] Add Mosaic transform (#1093)
* Fix typo in usage example

* original mosaic code in mmdet

* Adjust mosaic to the semantic segmentation

* Remove bbox test in test_mosaic

* Add unittests

* Fix resize mode for seg_fields

* Fix repr error

* modify Mosaic docs

* modify from Mosaic to RandomMosaic

* Add docstring

* modify Mosaic docstring

* [Docs] Add a blank line before Returns:

* add blank lines

Co-authored-by: MeowZheng <meowzheng@outlook.com>
2022-01-11 16:17:36 +08:00
Rockey 43ad37b478 [Feature] add auto resume (#1172)
* [Feature] add auto resume

* Update mmseg/utils/find_latest_checkpoint.py

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

* Update mmseg/utils/find_latest_checkpoint.py

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

* modify docstring

* Update mmseg/utils/find_latest_checkpoint.py

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>

* add copyright

Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-01-11 12:27:24 +08:00
jbwang1997 44d4c3877e [Fix] Set random seed for generating `palette` if not given. (#1152)
* Fix colors

* fix comments

* Add comments

* Add comments. Add random seed in datasets
2021-12-23 09:51:50 +08:00
MengzhangLI 4a90241f91 [Docs] Refactor the structure of documentation (#1128)
* merge docs/ and docs_zh-CN/

* merge docs/ and docs_zh-CN/

* merge docs/ and docs_zh-CN/

* merge docs/ and docs_zh-CN/

* fix launch utility url

* fix launch utility url

* fix wrong pytorch doc url

* remove wrong links docs//
2021-12-16 18:56:45 +08:00
MengzhangLI fbcfa0568b Bump v0.20.2 #1141 2021-12-15 16:49:42 +08:00
MengzhangLI a87de3c025 Bump to v0.20.1 (#1138)
* bump version 0.20.1

* bump version 0.20.1
2021-12-14 22:32:11 +08:00
MengzhangLI 520372eec8 Bump v0.20.0 (#1124)
* change version to v0.20.0

* change version to v0.20.0

* change version to v0.20.0
2021-12-11 01:43:29 +08:00
MengzhangLI c1e72513c9 [Feature] Support STDC Network (new) (#995)
* refactor stdc code

* update key

* fix backbone inference

* remove comments

* fixing errors

* fixing version conflict

* fux typo

* use STDCHead

* upload models&logs

* adding model converters script and fix unittest

* fix error

* fix error

* fix error

* delete redundant keys in config

* fix errors in configs and unittest

* fix errors in configs and unittest

* fix errors in configs and unittest

* change Memory name

* refactor stdc2mmseg

* change name to STDC

* refactor stdc

* refactor stdc

* stdc refactor

* stdc refactor

* stdc refactor

* stdc refactor

* stdc refactor

* stdc refactor

* refactor stdc

* stdc refactor

Co-authored-by: xiexinch <xinchen.xie@qq.com>
2021-12-10 23:09:32 +08:00
Lxinyang cd246e3635 [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
Rockey a370777e3b [Fix] Fix the bug that mit cannot process init_cfg (#1102)
* [Fix] Fix the bug that mit cannot process init_cfg

* fix error
2021-12-08 23:17:43 -08:00
Rockey 0ad0303ebc [Fix] Remove the inplace operation in uper_head and fpn_neck (#1103)
* [Fix] Remove the inplace operation in  uper_head

* remove the inplace operation in fpn neck

* fix conflict

* increase the coverage
2021-12-09 12:12:31 +08:00
Han Zhang e06cbcd8b1 [Fix] Fix dist training infinite waiting issue (#1035)
* [#1034] fix dist training infinite waiting issue

* print log_vars keys in assertion msg

* linting issue
2021-12-08 21:02:41 +08:00
Zhaolun Zou 079c520e58 [Fix] Fix test error when using --show-dir (#1091)
* Fix test error when using --show-dir

* Move show before test

Co-authored-by: Jiarui XU <xvjiarui0826@gmail.com>
2021-12-06 08:10:18 -08:00
KangBK0120 3d58196e62 [Fix] Remove unexist arg in docstring #1106 2021-12-06 20:03:25 +08:00
Junjun2016 b8ca9b6d99 [Fix] Fix wrong init usage in transformer models (#1069)
* fix wrong trunc_normal_init usage

* fix mit init weights

* fix vit init weights

* fix mit init weights

* fix typo

* fix swin init weights
2021-12-06 19:59:33 +08:00
Rockey 07cd6c98e0 [Feature] Add focal loss (#1024)
* [Feature] add focal loss

* fix the bug of 'non' reduction type

* refine the implementation

* add class_weight and ignore_index; support different alpha values for different classes

* fixed some bugs

* fix bugs

* add comments

* modify test

* Update mmseg/models/losses/focal_loss.py

Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn>

* update test_focal_loss.py

* modified the implementation

* Update mmseg/models/losses/focal_loss.py

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* update focal_loss.py

Co-authored-by: Junjun2016 <hejunjun@sjtu.edu.cn>
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
2021-12-03 00:18:40 -08:00
MengzhangLI 6a2cfea73b [Feature] Support Real-time model ERFNet (#960)
* first commit

* Fixing Unittest Error

* first refactory of ERFNet

* Refactorying NonBottleneck1d Module

* uploading models&logs

* uploading models&logs

* fix partial bugs & typos

* ERFNet

* add ERFNet with FCNHead

* fix typos of ERFNet

* add name on README.md cover

* chane name to T-ITS'2017

* fix lint error
2021-12-01 23:54:39 -08:00
MengzhangLI defb21bf8a [Fix] Change the upper version of mmcv to 1.5.0 #1096 2021-12-01 21:16:23 +08:00