forked from open-mmlab/mmsegmentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeCamp2023-154] Add semantic label to the segmentation visualizati…
…on results (open-mmlab#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 分割可视化结果中加上语义信息 open-mmlab#154](open-mmlab/OpenMMLabCamp#154) corresponding issue: [跑出来结果之后怎么在结果图片上获取各个语意部分的区域信息? open-mmlab#2578](open-mmlab#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
- Loading branch information
1 parent
30a3f94
commit 887ae9f
Showing
3 changed files
with
87 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters