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
Use the pytorch-grad-cam tool to visualize Class Activation Maps (CAM).
## Modification
Use the pytorch-grad-cam tool to visualize Class Activation Maps (CAM).
requirement: pip install grad-cam
run commad: python tools/analysis_tools/visualization_cam.py
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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. The documentation has been modified accordingly, like docstring or
example tutorials.
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
Support inference and visualization of VPD
## Modification
1. add a new VPD model that does not generate black border in
predictions
2. update `SegLocalVisualizer` to support depth visualization
3. update `MMSegInferencer` to support save predictions of depth
estimation in method `postprocess`
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## Use cases (Optional)
Run inference with VPD using the this command
```sh
python demo/image_demo_with_inferencer.py demo/classroom__rgb_00283.jpg vpd_depth --out-dir vis_results
```
The following image will be saved under `vis_results/vis`

## Checklist
1. Pre-commit or other linting tools are used to fix the potential lint
issues.
4. The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
5. If the modification has potential influence on downstream projects,
this PR should be tested with downstream projects, like MMDet or
MMDet3D.
6. The documentation has been modified accordingly, like docstring or
example tutorials.
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
Support depth estimation algorithm [VPD](https://github.com/wl-zhao/VPD)
## Modification
1. add VPD backbone
2. add VPD decoder head for depth estimation
3. add a new segmentor `DepthEstimator` based on `EncoderDecoder` for
depth estimation
4. add an integrated metric that calculate common metrics in depth
estimation
5. add SiLog loss for depth estimation
6. add config for VPD
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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.
7. The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
8. If the modification has potential influence on downstream projects,
this PR should be tested with downstream projects, like MMDet or
MMDet3D.
9. The documentation has been modified accordingly, like docstring or
example tutorials.
## Motivation
## Modification
The confusion_matrix.py is not compatible with the current version of
mmseg.
---------
Co-authored-by: xiexinch <xiexinch@outlook.com>
## Motivation
Supports inference for ultra-large-scale remote sensing images.
## Modification
Add RSImageInference.py in demo.
## Use cases
Taking the inference of Vaihingen dataset images using PSPNet as an
example, the following settings are required:
**img**: Specify the path of the image.
**model**: Provide the configuration file for the model.
**checkpoint**: Specify the weight file for the model.
**out**: Set the output path for the results.
**batch_size**: Determine the batch size used during inference.
**win_size**: Specify the width and height(512x512) of the sliding
window.
**stride**: Set the stride(400x400) for sliding the window.
**thread(default: 1)**: Specify the number of threads to be used for
inference.
**Inference device (default: cuda:0)**: Specify the device for inference
(e.g., cuda:0 for CPU).
```shell
python demo/rs_image_inference.py demo/demo.png projects/pp_mobileseg/configs/pp_mobileseg/pp_mobileseg_mobilenetv3_2x16_80k_ade20k_512x512_tiny.py pp_mobileseg_mobilenetv3_2xb16_3rdparty-tiny_512x512-ade20k-a351ebf5.pth --batch-size 8 --device cpu --thread 2
```
---------
Co-authored-by: xiexinch <xiexinch@outlook.com>
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
Please describe the motivation of this PR and the goal you want to
achieve through this PR.
Support metrics for the depth estimation task, including RMSE, ABSRel,
and etc.
## Modification
Please briefly describe what modification is made in this PR.
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## Use cases (Optional)
Using the following configuration to compute depth metrics on NYU
```python
dataset_type = 'NYUDataset'
data_root = 'data/nyu'
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(dict(type='LoadDepthAnnotation', depth_rescale_factor=1e-3)),
dict(
type='PackSegInputs',
meta_keys=('img_path', 'depth_map_path', 'ori_shape', 'img_shape',
'pad_shape', 'scale_factor', 'flip', 'flip_direction',
'category_id'))
]
val_dataloader = dict(
batch_size=1,
num_workers=4,
persistent_workers=True,
sampler=dict(type='DefaultSampler', shuffle=False),
dataset=dict(
type=dataset_type,
data_root=data_root,
test_mode=True,
data_prefix=dict(
img_path='images/test', depth_map_path='annotations/test'),
pipeline=test_pipeline))
test_dataloader = val_dataloader
val_evaluator = dict(type='DepthMetric', max_depth_eval=10.0, crop_type='nyu')
test_evaluator = val_evaluator
```
Example log:

## 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.
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
It's OpenMMLab Codecamp task.
## Modification
Implementd Kullback-Leibler divergence loss and also added tests for it.
## 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.
---------
Co-authored-by: xiexinch <xiexinch@outlook.com>
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
translate doc for docs/zh_cn/user_guides/5_deployment.md
## Modification
update `docs/en/user_guides/5_deployment.md`
fix `docs/zh_cn/user_guides/5_deployment.md`
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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.
---------
Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
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
Please describe the motivation of this PR and the goal you want to
achieve through this PR.
## Modification
Please briefly describe what modification is made in this PR.
1. add `NYUDataset`class
2. add script to process NYU dataset
3. add transforms for loading depth map
4. add docs & unittest
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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.
5. The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
6. If the modification has potential influence on downstream projects,
this PR should be tested with downstream projects, like MMDet or
MMDet3D.
7. The documentation has been modified accordingly, like docstring or
example tutorials.
## Motivation
Add a model deployment example.
## Modification
Add an inference script and update the README.
## BC-breaking (Optional)
None
## Use cases (Optional)
In README.
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
there is a code mistake in `docs\zh_cn\get_started.md` and
`docs\en\get_started.md`,it use the 0.x api,which is changed in 1.x
## Modification
`docs\zh_cn\get_started.md` ,`docs\en\get_started.md`
fix inference_segmentor --> inference_model
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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.
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
Support CAT-Seg open-vocabulary semantic segmentation (CVPR2023).
## Modification
Support CAT-Seg open-vocabulary semantic segmentation (CVPR2023).
- [x] Support CAT-Seg model training.
- [x] CLIP model based `backbone` (R101 & Swin-B), aggregation layers
based `neck`, and `decoder` head.
- [x] Provide customized coco-stuff164k_384x384 training configs.
- [x] Language model supports for `open vocabulary` (OV) tasks.
- [x] Support CLIP-based pretrained language model (LM) inference.
- [x] Add commonly used prompts templates.
- [x] Add README tutorials.
- [x] Add zero-shot testing scripts.
**Working on the following tasks.**
- [x] Add unit test.
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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.
---------
Co-authored-by: xiexinch <xiexinch@outlook.com>
Added ignore_index param to forward(),
also implemented one hot encoding to ensure the dims of target matches
pred.
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
Please describe the motivation of this PR and the goal you want to
achieve through this PR.
Attempted to solve the problems mentioned by #3172
## Modification
Please briefly describe what modification is made in this PR.
Added ignore_index into forward function (although the dice loss itself
does not actually take account for it for some reason).
Added _expand_onehot_labels_dice, which takes the target with shape [N,
H, W] into [N, num_classes, H, W].
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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.
This is my first time contributing to open-source code, so I might have
made some stupid mistakes. Please don't hesitate to point it out.
## Motivation
- 'PascalContextDataset' object has no attribute 'file_client', it will
cause an error.
- The attribute ‘ann_file’ is not allowed to be empty, otherwise, an
error will be reported.
## Modification
- Replace file_client with fileio
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
https://github.com/open-mmlab/mmsegmentation/issues/3181https://github.com/open-mmlab/mmsegmentation/issues/2965https://github.com/open-mmlab/mmsegmentation/issues/2644https://github.com/open-mmlab/mmsegmentation/issues/1645https://github.com/open-mmlab/mmsegmentation/issues/1444https://github.com/open-mmlab/mmsegmentation/issues/1370https://github.com/open-mmlab/mmsegmentation/issues/125
## Modification
Remove the assertion at data_preprocessor
## BC-breaking (Optional)
Does the modification introduce changes that break the
backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the
downstream projects should modify their code to keep compatibility with
this PR.
## 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.
## Motivation
Some links for datasets in README_zh-CN don't point to the correct
addresses.
## Modification
Update some links in README_zh-CN.
Co-authored-by: xiexinch <xiexinch@outlook.com>
## Motivation
When using the - tta command for multi-scale prediction, and the test
set is not annotated, although format_only has been set true in
test_evaluator, but SegTTAModel class still threw error 'AttributeError:
'SegDataSample' object has no attribute '_gt_sem_seg''.
## Modification
The reason is SegTTAModel didn't determine if there were annotations in
the dataset, so I added the code to make the judgment and let the
program run normally on my computer.
## Motivation
Please describe the motivation of this PR and the goal you want to
achieve through this PR.
## Modification
- add dataset-index.yml
## Dependencies
- [ ] https://github.com/open-mmlab/mim/pull/212
## Motivation
Change the dependency `mmcls` to `mmpretrain`
## Modification
- modify `mmcls` to `mmpretrain`
- modify CI requirements
## BC-breaking (Optional)
If users have installed mmcls but not install mmpretrain, it might raise some error.