Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(OLD) [Feature] Support LoveDA dataset #1006

Closed
wants to merge 22 commits into from

Conversation

Junjue-Wang
Copy link
Contributor

@Junjue-Wang Junjue-Wang commented Oct 31, 2021

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

Invited by MengzhangLI, I would like to add LoveDA dataset into mmsegmentation.

Modification

The corresponding dataset api and dataset_prepare.md has been updated.

BC-breaking (Optional)

None.

Use cases (Optional)

The users can easily use the LoveDA dataset and benchmarked segmentation models with MMSegmentation.

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.

@CLAassistant
Copy link

CLAassistant commented Oct 31, 2021

CLA assistant check
All committers have signed the CLA.

docs/dataset_prepare.md Outdated Show resolved Hide resolved
docs/dataset_prepare.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 31, 2021

Codecov Report

Attention: Patch coverage is 91.37931% with 5 lines in your changes missing coverage. Please review.

Project coverage is 89.76%. Comparing base (845098b) to head (a493897).
Report is 308 commits behind head on master.

Files Patch % Lines
mmseg/models/backbones/timm_backbone.py 83.33% 3 Missing and 1 partial ⚠️
mmseg/datasets/loveda.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1006      +/-   ##
==========================================
+ Coverage   89.73%   89.76%   +0.02%     
==========================================
  Files         118      120       +2     
  Lines        6568     6614      +46     
  Branches     1021     1030       +9     
==========================================
+ Hits         5894     5937      +43     
- Misses        473      476       +3     
  Partials      201      201              
Flag Coverage Δ
unittests 89.76% <91.37%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Junjun2016 Junjun2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to check the inference and training performance between mmsegmentaion and the original paper implementation.

@Junjun2016
Copy link
Collaborator

Hi @Junjue-Wang
Thanks for your contribution, nice feature!
Please fix the lint error.

@Junjue-Wang
Copy link
Contributor Author

We need to check the inference and training performance between mmsegmentaion and the original paper implementation.

The original paper reports the accuracies on the test set. However, the labels of the test set are private. If you really want to test. Please submit the predictions on this Contest and you will get the scores smoothly. Or you can directly report the accuracies on the providied validation set.

@Junjue-Wang
Copy link
Contributor Author

Hi @Junjue-Wang Thanks for your contribution, nice feature! Please fix the lint error.

Thanks for your careful revision. Am I going to re-pull request after modification? Or you can directly help me fix the lint errors?

@Junjun2016 Junjun2016 changed the title update LoveDA dataset api [Feature] Support LoveDA dataset Oct 31, 2021
@MengzhangLI
Copy link
Contributor

Hi @Junjue-Wang Thanks for your contribution, nice feature! Please fix the lint error.

Thanks for your careful revision. Am I going to re-pull request after modification? Or you can directly help me fix the lint errors?

For further participation of our open source codebase project, I suggest you follow these links Chinese article and English document, you need to use pre-commit to make codes of your PR as uniform style like codebase.

Feel free to ask us if you have any problems.

Best,

@MengzhangLI MengzhangLI added the WIP Work in process label Oct 31, 2021
@MengzhangLI
Copy link
Contributor

Hi, @Junjue-Wang . Thanks for your nice help!

We would test your code and try to train several models of MMSegmentation on LoveDA next week.

From your paper, it seems that HRNet is best model, maybe we can try some transformer models such as Swin Transformer and Segformer.

Best,

@Junjue-Wang
Copy link
Contributor Author

Hi, @Junjue-Wang . Thanks for your nice help!

We would test your code and try to train several models of MMSegmentation on LoveDA next week.

From your paper, it seems that HRNet is best model, maybe we can try some transformer models such as Swin Transformer and Segformer.

Best,

Yes, I wish you all the best on the test. If you encounter any problems, please feel free to contact me.

MengzhangLI and others added 9 commits November 1, 2021 15:28
…on. (open-mmlab#1002)

* fix single loss type

* fix error in ohem & point_head

* fix coverage miss

* fix uncoverage error of PointHead loss

* fix coverage miss

* fix uncoverage error of PointHead loss

* nn.modules.container.ModuleList to nn.ModuleList

* more simple format

* merge unittest def
* add TIMMBackbone and unittests

* add timm to tests requirements

* deprecate pt1.3.1

* reduce the unittests input of timm backbone

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* fix ci

* remove unittests of large models of timm backbone

* generate coverage report for all unittests env

* reduce the unittests input of timm backbone

* reduce the unittests input of timm backbone
* change version to v0.19.0

* update changelog
open-mmlab#999)

* [Fix] Fix the bug that vit cannot load pretrain properly when using init_cfg to specify the pretrain scheme

* [Fix] fix the coverage problem

* Update mmseg/models/backbones/vit.py

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

* [Fix] make the predicate more concise and clearer

* [Fix] Modified the judgement logic

* Update tests/test_models/test_backbones/test_vit.py

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

* add comments

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

Please fix the lint error.
You could run

pre-commit run --all-files

before commit.

@Junjue-Wang
Copy link
Contributor Author

Please fix the lint error. You could run

pre-commit run --all-files

before commit.
I am not very familiar with the use of pre-commit, and encountered the following error. How should I adddress it?
image

@Junjun2016
Copy link
Collaborator

Please fix the lint error. You could run

pre-commit run --all-files

before commit.
I am not very familiar with the use of pre-commit, and encountered the following error. How should I adddress it?
image

@MengzhangLI

@Junjun2016
Copy link
Collaborator

@Junjun2016
Copy link
Collaborator

@Junjue-Wang
It seems that your pre-commit behaviors are not consistent with ours which leads to too many files being changed.
@MengzhangLI Could you please fix it?

@MengzhangLI
Copy link
Contributor

MengzhangLI commented Nov 8, 2021

Update:

Hi, @Junjue-Wang

Please grant authorization on me about your forked MMSegmentation followed here. Thus I could push my modifications on your branch.

Here is some results on validation and test set:

Val mIoU Test mIoU Model  backbone  Lr schd
50.28 47.51 DeepLabV3+ R-18-D8 80k
50.99 50.22 DeepLabV3+ R-50-D8 80k
51.47 49.60 DeepLabV3+ R-101-D8 80k
48.62 47.17 PSPNet R-18-D8 80k
50.46 50.32 PSPNet R-50-D8 80k
51.86 50.37 PSPNet R-101-D8 80k
49.3 47.57 HRNet FCN HRNetV2p-W18-Small 80k
50.87 49.25 HRNet FCN HRNetV2p-W18 80k
51.04 50.38 HRNet FCN HRNetV2p-W48 80k

FYI, the results of original paper:
image

TO DO:

  • Getting results of models above on test set.

  • Adding format-only in ./mmseg/datasets/loveda.py, enabling users of MMSegmentation could directly generating standard prediction output of test set for evaluation on official codaLab site.

@Junjue-Wang
Copy link
Contributor Author

Junjue-Wang commented Nov 8, 2021

Update:

Hi, @Junjue-Wang

Please grant authorization on me about your forked MMSegmentation followed here. Thus I could push my modifications on your branch.

Here is some results on validation set: image

FYI, the results of original paper: image

TO DO:

  • Getting results of models above on test set.
  • Adding format-only in ./mmseg/datasets/loveda.py, enabling users of MMSegmentation could directly generating standard prediction output of test set for evaluation on official codaLab site.

I have already granted the authorization to you. Please help me check the lint errors, Thank you!
https://github.com/Junjue-Wang/mmsegmentation/invitations

@MengzhangLI MengzhangLI self-assigned this Nov 9, 2021
@Junjun2016
Copy link
Collaborator

Too many files changed.
We may need to create a new PR.

'DarkZurichDataset',
'NightDrivingDataset',
'COCOStuffDataset',
'LoveDADataset',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'LoveDADataset',
'LoveDADataset'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MengzhangLI What should we do? Create a new PR for what?

@MengzhangLI
Copy link
Contributor

MengzhangLI commented Nov 10, 2021

Hi, @Junjue-Wang
This PR will be closed because of too much changed files.
Could you please create a new pr thus I could fetch your branch and push to it?

@MengzhangLI MengzhangLI changed the title [Feature] Support LoveDA dataset (OLD) [Feature] Support LoveDA dataset Nov 10, 2021
@MengzhangLI MengzhangLI removed the WIP Work in process label Nov 10, 2021
@Junjue-Wang Junjue-Wang deleted the LoveDA branch December 1, 2021 00:57
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* fix `upsample_nearest_nhwc` for large bsz

* fix `upsample_nearest_nhwc` for large bsz
wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this pull request Dec 3, 2023
* map location to cpu when load checkpoint (open-mmlab#1007)

* [Enhancement] Support minus output feature index in mobilenet_v3 (open-mmlab#1005)

* fix typo in mobilenet_v3

* fix typo in mobilenet_v3

* use -1 to indicate output tensors from final stage

* support negative out_indices

* [Enhancement] inference speed and flops tools. (open-mmlab#986)

* add the function to test the dummy forward speed of models.

* add tools to test the flops and inference speed of multiple models.

* [Fix] Update pose tracking demo to be compatible with latest mmtrakcing (open-mmlab#1014)

* update mmtracking demo

* support both track_bboxes and track_results

* add docstring

* [Fix] fix skeleton_info of coco wholebody dataset (open-mmlab#1010)

* fix wholebody base dataset

* fix lint

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>

* [Feature] Add ViPNAS models for wholebody keypoint detection (open-mmlab#1009)

* add configs

* add dark configs

* add checkpoint and readme

* update webcam demo

* fix model path in webcam demo

* fix unittest

* [Fix] Fix bbox label visualization (open-mmlab#1020)

* update model metafiles (open-mmlab#1001)

* update hourglass ae .md (open-mmlab#1027)

* [Feature] Add ViPNAS mbv3 (open-mmlab#1025)

* add vipnas mbv3

* test other variants

* submission for mmpose

* add unittest

* add readme

* update .yml

* fix lint

* rebase

* fix pytest

Co-authored-by: jin-s13 <jinsheng13@foxmail.com>

* [Enhancement] Set a random seed when the user does not set a seed (open-mmlab#1030)

* fix randseed

* fix lint

* fix import

* fix isort

* update yapf hook

* revert yapf version

* add cfg file for flops and speed test,  change the bulid_posenet to init_pose_model and fix some typo in cfg (open-mmlab#1028)

* [Enhancement] Add more functions for speed test tool (open-mmlab#1034)

* add batch size and device args in speed test script, and remove MMDataParallel warper

* add vipnas_mbv3 model

* fix dead link (open-mmlab#1038)

* Skip CI when some specific files were changed (open-mmlab#1041)

* update sigmas (open-mmlab#1040)

* add more configs, ckpts and logs for HRNet on PoseTrack18 (open-mmlab#1035)

* [Feature] Add PoseWarper dataset (open-mmlab#1006)

* add PoseWarper dataset and base class

* modify pipelines related to video

* add unittest for PoseWarper dataset

* add unittest for evaluation function in posetrack18-realted dataset, and add some annotations json files

* fix typo

* fix unittest CI failure

* fix typo

* add PoseWarper dataset and base class

* modify pipelines related to video

* add unittest for PoseWarper dataset

* add unittest for evaluation function in posetrack18-realted dataset, and add some annotations json files

* fix typo

* fix unittest CI failure

* fix typo

* modify some methods in the base class to improve code coverage rate

* recover some mistakenly-deleted notes

* remove test_dataset_info part for the new TopDownPoseTrack18VideoDataset class

* cancel uncompleted previous runs (open-mmlab#1053)

* [Doc] Add inference speed results (open-mmlab#1044)

* add docs related to inference speed results

* add corresponding Chinese docs and fix some typos

* add Chinese docs in readthedocs

* remove the massive table in readme

* minor modification to wording

Co-authored-by: ly015 <liyining0712@gmail.com>

* [Feature] Add PoseWarper detector model (open-mmlab#932)

* Add top down video detector module

* Add PoseWarper neck

* add function _freeze_stages

* fix typo

* modify PoseWarper detector and PoseWarperNeck

* fix typo

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* Add top down video detector module

* Add PoseWarper neck

* add function _freeze_stages

* fix typo

* modify PoseWarper detector and PoseWarperNeck

* fix typo

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* modify dependency on mmcv version in posewarper neck

* reduce memory cost in test

* modify flops tool for more flexible input format

* Add top down video detector module

* Add PoseWarper neck

* add function _freeze_stages

* fix typo

* modify PoseWarper detector and PoseWarperNeck

* fix typo

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* Add PoseWarper neck

* modify PoseWarper detector and PoseWarperNeck

* modify posewarper detector and neck

* Delete top_down_video.py

change the base class of `PoseWarper` detector from `TopDownVideo` to `TopDown`

* fix spell typo

* modify detector and neck

* add unittest for detector and neck

* modify unittest for posewarper forward

* modify dependency on mmcv version in posewarper neck

* reduce memory cost in test

* modify flops tool for more flexible input format

* modify the posewarper detector description

* modify some arguments and related fields

* modify default values for some args

* fix readthedoc bulid typo

* fix ignore path (open-mmlab#1059)

* [Doc]  Add related docs for PoseWarper (open-mmlab#1036)

* add related docs for PoseWarper

* add related readme docs for posewarper

* modify related args in posewarper stage2 config

* modify posewarper stage2 config path

* add description about val_boxes path for data preparation (open-mmlab#1060)

* bump version to v0.21.0 (open-mmlab#1061)

* [Feature] Add ViPNAS_Mbv3 wholebody model (open-mmlab#1055)

* add vipnas mbv3 coco_wholebody

* add vipnas mbv3 coco_wholebody md&yml

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>

Co-authored-by: Lumin <30328525+luminxu@users.noreply.github.com>
Co-authored-by: zengwang430521 <zengwang430521@gmail.com>
Co-authored-by: Jas <jinsheng@sensetime.com>
Co-authored-by: jin-s13 <jinsheng13@foxmail.com>
Co-authored-by: Qikai Li <87690686+liqikai9@users.noreply.github.com>
Co-authored-by: QwQ2000 <396707050@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants