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

Fixed a bug in which gray images cause crash #32

Merged
merged 2 commits into from
Mar 15, 2023

Conversation

CallShaul
Copy link
Contributor

@CallShaul CallShaul commented Oct 5, 2021

Now functions support 2 dimensions gray images, not only 3 dimensions color images.

Now functions support 2 dimensions gray images, not only color 3 dimensions color images.
@nekhtiari
Copy link
Owner

Nice, LGTM

@chrieke
Copy link
Contributor

chrieke commented Jan 14, 2023

Hey @CallShaul, thank you for the PR and sorry about the longer inactivity.

Wouldn't this also need to be applied on the second image?

@CallShaul
Copy link
Contributor Author

@chrieke Hi, I'm not sure what you mean by "second image".

@nikooc2s
Copy link

@chrieke Hi, I'm not sure what you mean by "second image".

I think he meant the predicted one. Your changes are only for original image.

@CallShaul
Copy link
Contributor Author

@nikooc2s @chrieke No, there is no need to do anything else, using the expand_dims this way, adds a third dimension with size 1, so the argument in the for loop org_img.shape[2] will not fail, yet the number of iterations will be 1 in the case of a gray image. (image size will change from [row, col] to [row, col, 1])

Repository owner deleted a comment from nikooc2s Jan 20, 2023
@nekhtiari nekhtiari merged commit 77be4ba into nekhtiari:master Mar 15, 2023
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.

4 participants