CastleDream
1235217667
[CodeCamp2023-154] Add semantic label to the segmentation visualization results ( #3229 )
...
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
[Add semantic label to the segmentation visualization results
分割可视化结果中加上语义信息
#154 ](https://github.com/open-mmlab/OpenMMLabCamp/discussions/154 )
corresponding issue: [跑出来结果之后怎么在结果图片上获取各个语意部分的区域信息?
#2578 ](https://github.com/open-mmlab/mmsegmentation/issues/2578 )
## Modification
1. mmseg/apis/inference.py, add withLabels in visualizer.add_datasample
call, to indicate whether add semantic label
2. mmseg/visualization/local_visualizer.py, add semantic labels by
opencv; modify the demo comment description
3. mmseg/utils/__init__.py, add bdd100k datasets to test
local_visualizer.py
**Current visualize result**
<img width="637" alt="image"
src="https://github.com/open-mmlab/mmsegmentation/assets/35064479/6ef6ce02-1d82-46f8-bde9-a1d69ff62df8 ">
**Add semantic label**
<img width="637" alt="image"
src="https://github.com/open-mmlab/mmsegmentation/assets/35064479/00716679-b43a-4794-8499-9bfecdb4b78b ">
## Test results
**tests/test_visualization/test_local_visualizer.py** test
results:(MMSegmentation/tests/data/pseudo_cityscapes_dataset/leftImg8bit/val/frankfurt/frankfurt_000000_000294_leftImg8bit.png)
<img width="643" alt="image"
src="https://github.com/open-mmlab/mmsegmentation/assets/35064479/6792b7d2-2512-4ea9-8500-1a7ed2d5e0dc ">
**demo/inference_demo.ipynb** test results:
<img width="966" alt="image"
src="https://github.com/open-mmlab/mmsegmentation/assets/35064479/dfc0147e-fb1a-490a-b6ff-a8b209352d9b ">
-----
## Drawbacks
config opencv thickness according to image size
<img width="496" alt="image"
src="https://github.com/open-mmlab/mmsegmentation/assets/35064479/0a54d72c-62b1-422c-89ae-69dc753fe0fc ">
I have no idea of dealing with label overlapping for the time being
2023-08-01 14:38:33 +08:00
谢昕辰
8806b4e548
[Fix] Fix visualizor ( #3154 )
...
## Motivation
**Current visualize result**

**Fixed the visualization result**

## Modification
remove mmengine `draw_binary_masks` api
2023-07-03 09:43:00 +08:00
谢昕辰
039ba5d4ca
[Feature] Support auto import modules from registry. ( #2481 )
...
## Motivation
The registry now supports auto-import modules from the given location.
register_all_modules before running is no longer needed. The modules
will be lazy-imported during building.
- [x] This PR can be merged after
https://github.com/open-mmlab/mmengine/pull/643 . The MMEngine version
should be updated.
Ref: https://github.com/open-mmlab/mmdetection/pull/9143
2023-02-23 20:33:17 +08:00
谢昕辰
37af545f6b
[Fix] Fix inference api and support setting palette to SegLocalVisualizer ( #2475 )
...
as title
Co-authored-by: MengzhangLI <mcmong@pku.edu.cn>
2023-01-20 21:40:13 +08:00
谢昕辰
2eaf7ee8b3
[Doc] Update inference doc ( #2052 )
...
* refactor inference doc
* introduce segdatasample
* add vis example
* fix
* Update docs/en/user_guides/3_inference.md
* update link
Co-authored-by: Miao Zheng <76149310+MeowZheng@users.noreply.github.com>
2022-11-01 21:37:29 +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
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
Miao Zheng
2724d47f71
[Fix] Add out-file in demo and show_result_pyplot ( #2004 )
2022-08-31 17:44:41 +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
谢昕辰
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
谢昕辰
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
zhengmiao
4b76f277a6
[Refactory] MMSegmentation Content
2022-07-15 15:47:29 +00:00
xiexinch
c1c870af31
rename init/inference_segmentor to init/inference_model
2022-07-12 16:19:59 +08:00
Junjun2016
2fe0bddf5e
[Dcos] Add header for files ( #796 )
...
* Add header for files
* Delete header in config files
2021-08-16 23:16:55 -07:00
q.yao
bc2dc1277a
add dynamic export and visualize to pytorch2onnx ( #463 )
...
* add dynamic export and visualize to pytorch2onnx
* update document
* fix lint
* fix dynamic error and add visualization
* fix lint
* update docstring
* update doc
* Update help info for --show
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
* fix lint
Co-authored-by: maningsheng <maningsheng@sensetime.com>
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
2021-04-12 11:54:59 -07:00
David de la Iglesia Castro
9cbb4b1288
Add opacity option to show_result ( #425 )
2021-03-22 20:34:38 -07:00
Jerry Jiarui XU
4423d32702
[Improvement] Move train_cfg/test_cfg inside model ( #341 )
...
* [Improvement] Move train_cfg/test_cfg inside model
* fixed config dict
* fixed config dict
2021-01-19 17:06:23 -08:00
Youqing Xiaozhua
d5712c4d38
Bugfix: num of augmentations and image meta not match when run TTA on CPU ( #276 )
...
* add inference test
* fix E501 line too long (81 > 79 characters
* fix wrong config path
* fix num of augmentations (2) != num of image meta (1)
* Update test_inference.py
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
2020-12-13 23:51:42 -08:00
David de la Iglesia Castro
e385842557
Fix cpu inference ( #152 )
...
* Add missing map_location
* Add docstring
* Update mmseg/apis/inference.py
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
* Update inference.py
* Update inference.py
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
2020-09-25 01:34:40 +08:00
Jiarui XU
b2724da80b
init commit
2020-07-10 02:39:01 +08:00