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] Modify interface of MMSeginferencer and add docs #2658

Merged
merged 14 commits into from Mar 3, 2023

Conversation

MeowZheng
Copy link
Collaborator

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

Make MMSeginferencer easier to be used

Modification

  1. Add _load_weights_to_model to MMSeginferencer, it is for get dataset_meta from ckpt
  2. Modify and remove some parameters of __call__, visualization and postprocess
  3. Add function of save seg mask, remove dump pkl.
  4. Refine docstring of MMSeginferencer and SegLocalVisualizer
  5. Add the user documentation of MMSeginferencer

BC-breaking (Optional)

yes, remove some parameters, we need to discuss whether keep them with deprecated waring or just remove them as the MMSeginferencer just merged in mmseg a few days.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

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.

@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Patch coverage: 72.58% and project coverage change: +0.03 🎉

Comparison is base (eca61d3) 83.44% compared to head (5d349ff) 83.48%.

❗ Current head 5d349ff differs from pull request most recent head 085c6bb. Consider uploading reports for the commit 085c6bb to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2658      +/-   ##
===========================================
+ Coverage    83.44%   83.48%   +0.03%     
===========================================
  Files          147      147              
  Lines         8620     8664      +44     
  Branches      1293     1301       +8     
===========================================
+ Hits          7193     7233      +40     
+ Misses        1205     1202       -3     
- Partials       222      229       +7     
Flag Coverage Δ
unittests 83.48% <72.58%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
mmseg/apis/mmseg_inferencer.py 74.38% <71.66%> (+0.02%) ⬆️
mmseg/models/segmentors/cascade_encoder_decoder.py 91.66% <100.00%> (+0.17%) ⬆️
mmseg/visualization/local_visualizer.py 98.27% <100.00%> (ø)
mmseg/datasets/transforms/transforms.py 90.40% <0.00%> (+0.90%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MeowZheng MeowZheng requested a review from csatsurnh March 1, 2023 06:11
Copy link
Collaborator

@csatsurnh csatsurnh left a comment

Choose a reason for hiding this comment

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

For classes and palette docstring in local_visualizer, whether delete default to cityscapes in classes or add default to cityscapes in palette, not sure which is better.

docs/en/user_guides/3_inference.md Outdated Show resolved Hide resolved
docs/en/user_guides/3_inference.md Outdated Show resolved Hide resolved
mmseg/apis/mmseg_inferencer.py Outdated Show resolved Hide resolved
mmseg/visualization/local_visualizer.py Outdated Show resolved Hide resolved
mmseg/apis/mmseg_inferencer.py Outdated Show resolved Hide resolved
@MeowZheng MeowZheng merged commit 310ec4a into open-mmlab:dev-1.x Mar 3, 2023
@MeowZheng MeowZheng deleted the inferencer-doc branch March 3, 2023 06:38
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* create updated nav for index

* fix header

* apply feedback
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
…mmlab#2658)

## Motivation

Make MMSeginferencer easier to be used

## Modification

1. Add `_load_weights_to_model` to MMSeginferencer, it is for get
`dataset_meta` from ckpt
2. Modify and remove some parameters of `__call__`, `visualization` and
`postprocess`
3. Add function of save seg mask, remove dump pkl.
4. Refine docstring of MMSeginferencer and SegLocalVisualizer
5. Add the user documentation of MMSeginferencer

## BC-breaking (Optional)

yes, remove some parameters, we need to discuss whether keep them with
deprecated waring or just remove them as the MMSeginferencer just merged
in mmseg a few days.

Co-authored-by: xiexinch <xiexinch@outlook.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.

None yet

3 participants