Skip to content

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 <[email protected]>
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
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: 谢昕辰 <[email protected]>
Co-authored-by: CSH <[email protected]>
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.

3 participants