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

[CodeCamp2023-154] Add semantic label to the segmentation visualization results #3229

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

CastleDream
Copy link
Contributor

@CastleDream CastleDream commented Jul 24, 2023

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

corresponding issue: 跑出来结果之后怎么在结果图片上获取各个语意部分的区域信息? #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
image

Add semantic label
image

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)
image

demo/inference_demo.ipynb test results:
image


Drawbacks

config opencv thickness according to image size
image

I have no idea of dealing with label overlapping for the time being

@CastleDream CastleDream changed the base branch from main to dev-1.x July 25, 2023 00:25
@xiexinch xiexinch merged commit 1235217 into open-mmlab:dev-1.x Aug 1, 2023
1 of 2 checks passed
angiecao pushed a commit to angiecao/mmsegmentation that referenced this pull request Aug 31, 2023
…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:/open-mmlab/mmsegmentation/assets/35064479/6ef6ce02-1d82-46f8-bde9-a1d69ff62df8">


**Add semantic label**
<img width="637" alt="image"
src="https:/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:/open-mmlab/mmsegmentation/assets/35064479/6792b7d2-2512-4ea9-8500-1a7ed2d5e0dc">

**demo/inference_demo.ipynb** test results:
<img width="966" alt="image"
src="https:/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:/open-mmlab/mmsegmentation/assets/35064479/0a54d72c-62b1-422c-89ae-69dc753fe0fc">

I have no idea of dealing with label overlapping for the time being
emily-lin pushed a commit to emily-lin/mmsegmentation that referenced this pull request Nov 18, 2023
…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:/open-mmlab/mmsegmentation/assets/35064479/6ef6ce02-1d82-46f8-bde9-a1d69ff62df8">


**Add semantic label**
<img width="637" alt="image"
src="https:/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:/open-mmlab/mmsegmentation/assets/35064479/6792b7d2-2512-4ea9-8500-1a7ed2d5e0dc">

**demo/inference_demo.ipynb** test results:
<img width="966" alt="image"
src="https:/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:/open-mmlab/mmsegmentation/assets/35064479/0a54d72c-62b1-422c-89ae-69dc753fe0fc">

I have no idea of dealing with label overlapping for the time being
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
…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:/open-mmlab/mmsegmentation/assets/35064479/6ef6ce02-1d82-46f8-bde9-a1d69ff62df8">


**Add semantic label**
<img width="637" alt="image"
src="https:/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:/open-mmlab/mmsegmentation/assets/35064479/6792b7d2-2512-4ea9-8500-1a7ed2d5e0dc">

**demo/inference_demo.ipynb** test results:
<img width="966" alt="image"
src="https:/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:/open-mmlab/mmsegmentation/assets/35064479/0a54d72c-62b1-422c-89ae-69dc753fe0fc">

I have no idea of dealing with label overlapping for the time being
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants