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

[Enhancement] Support inherit cityscapes dataset #750

Merged
merged 3 commits into from
Aug 27, 2021

Conversation

xiexinch
Copy link
Collaborator

@xiexinch xiexinch commented Aug 4, 2021

Motivation

Support user custom dataset by inheriting CityscapesDataset class, the original implementation requires user's image suffix same with cityscapes, it's not flexible.

Modification

Set default value to the constructor function parameter.

Use cases (Optional)

@DATASETS.register_module()
class MyDataset(CityscapesDataset):
    """MyDatasett."""

    def __init__(self, **kwargs):
        super().__init__(
            img_suffix='_train.png',
            seg_map_suffix='_gt_mask.png',
            **kwargs)

@xiexinch xiexinch requested a review from xvjiarui August 4, 2021 12:28
@xiexinch xiexinch changed the title [Enhancement] support user inherit cityscapes dataset [Enhancement] support inherit cityscapes dataset Aug 4, 2021
@Junjun2016 Junjun2016 changed the title [Enhancement] support inherit cityscapes dataset [Enhancement] Support inherit cityscapes dataset Aug 4, 2021
@codecov
Copy link

codecov bot commented Aug 4, 2021

Codecov Report

Merging #750 (4abb6d0) into master (e235c1a) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 4abb6d0 differs from pull request most recent head 231258c. Consider uploading reports for the commit 231258c to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #750   +/-   ##
=======================================
  Coverage   87.64%   87.64%           
=======================================
  Files         108      108           
  Lines        5886     5886           
  Branches      958      958           
=======================================
  Hits         5159     5159           
  Misses        535      535           
  Partials      192      192           
Flag Coverage Δ
unittests 87.63% <100.00%> (ø)

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

Impacted Files Coverage Δ
mmseg/datasets/cityscapes.py 85.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e235c1a...231258c. Read the comment docs.

@Junjun2016 Junjun2016 merged commit 4686f1e into open-mmlab:master Aug 27, 2021
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
* rewrite init function

* init function parameters
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* Add back-compatibility to LMS timesteps

* style
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.

3 participants