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

Add a line to retransform output image #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mraoaakash
Copy link

Hello!

While running your code on my dataset, I noticed your CRF output was not being displayed correctly. I realised that this was an error between line 688 and 694. You were computing the correct CRF, however, since it was a binary array generated you need to multiply it by 255 to have the appropriate image pixel values generated. Convert('L') does not seem to be having a desired effect on MacOS and Linux with an Nvidia A5000 (the bases on which I have tested your code). I hope this addition is valuable to your code and subsequent research.

Best,
Aakash

Hello!


While running your code on my dataset, I noticed your CRF output was not being displayed correctly. I realised that this was an error between line 688 and 694. You were computing the correct CRF, however, since it was a binary array generated you need to multiply it by 255 to have the appropriate image pixel values generated. Convert('L') does not seem to be having a desired effect on MacOS and Linux with an Nvidia A5000 (the bases on which I have tested your code). I hope this addition is valuable to your code and subsequent research.

Best,
Aakash
@lukemelas
Copy link
Owner

Should this be segmap_crf = (segmap_crf * 255).astype(np.uint8)?

I suppose if segmap_crf is binary than it doesn't matter, but if it is not binary and it takes values between 0 and 1 then they will get truncated when it gets casted to uint8.

@mraoaakash
Copy link
Author

Yes, the correction should be segmap_crf = (segmap_crf * 255).astype(np.uint8)

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.

2 participants