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

Fixes an issue in isaid.py #3010

Merged
merged 2 commits into from May 30, 2023
Merged

Fixes an issue in isaid.py #3010

merged 2 commits into from May 30, 2023

Conversation

Kedreamix
Copy link
Contributor

@Kedreamix Kedreamix commented May 12, 2023

Motivation

When processing data in the isaid experiment, generated images only have binary pixel values of 0 or 1 instead of the corresponding class values. This causes significant interference and prevents subsequent experiments from proceeding. After investigation, it was found that the issue was caused by using the wrong image format for saving the images. Saving the images as PNG resulted in binary pixel values, while saving the images as BMP resolved the issue and correctly saved the class values.

Modification

img_patch.save(save_path_image, format='BMP')

This code will save the image data as BMP format.

BC-breaking

Confirm that the modification does not introduce new issues and test that the modified code successfully resolves the original problem.

xiexinch and others added 2 commits April 26, 2023 10:14
## Motivation

Update repo information and URLs in README.

## Modification


## BC-breaking (Optional)


## Use cases (Optional)

---------

Co-authored-by: CSH <40987381+csatsurnh@users.noreply.github.com>
When processing data in the iSaid experiment, generated images only have binary pixel values of 0 or 1 instead of the corresponding class values. This causes significant interference and prevents subsequent experiments from proceeding. After investigation, it was found that the issue was caused by using the wrong image format for saving the images. Saving the images as PNG resulted in binary pixel values, while saving the images as BMP resolved the issue and correctly saved the class values.
@CLAassistant
Copy link

CLAassistant commented May 12, 2023

CLA assistant check
All committers have signed the CLA.

@xiexinch xiexinch changed the base branch from main to dev-1.x May 15, 2023 06:22
@xiexinch xiexinch merged commit b6ec4ab into open-mmlab:dev-1.x May 30, 2023
11 checks passed
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
## Motivation

When processing data in the isaid experiment, generated images only have
binary pixel values of 0 or 1 instead of the corresponding class values.
This causes significant interference and prevents subsequent experiments
from proceeding. After investigation, it was found that the issue was
caused by using the wrong image format for saving the images. Saving the
images as PNG resulted in binary pixel values, while saving the images
as BMP resolved the issue and correctly saved the class values.

## Modification

`img_patch.save(save_path_image, format='BMP')`

This code will save the image data as BMP format.

## BC-breaking 

Confirm that the modification does not introduce new issues and test
that the modified code successfully resolves the original problem.

---------

Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
Co-authored-by: CSH <40987381+csatsurnh@users.noreply.github.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