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
Concatenate #16
Comments
Try resizing the input images to same size - as in the paper / implementation here. The problem can be, when you downsample from say image of size (5,5) to half , you get (2,2) and upsampling it gives (4,4) , hence the error. |
@MinuteswithMetrics could you further explain your setup? As in what are the dimensions of your images? What GAN implementation are you trying to train? And on what line do you get this error? |
Hey Erik,
I was attempting to implement both pix2pix and CycleGAN on the Kaggle Data
Science bowl 2018. The images and mask are various sizes. Images are
channel 3 and mask have 1 channel. I resized the to (128, 128).
…On Sat, Mar 31, 2018, 7:28 AM Erik Linder-Norén ***@***.***> wrote:
@MinuteswithMetrics <https://github.com/MinuteswithMetrics> could you
further explain your setup? As in what are the dimensions of your images?
What GAN implementation are you trying to train? And on what line do you
get this error?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMhu-Wew7zUYQCKBXLvAWc40NE1qAriks5tj3Z1gaJpZM4SjHgc>
.
|
How are you using the mask? If you follow the folder structure I use for CycleGAN and pix2pix (i.e. the ones that are created by using the download scripts for both models) and use the data loaders that I have implemented it should work. |
I was attempting to try costapt implementation.
https://github.com/costapt/vess2ret
…On Sat, Mar 31, 2018, 9:51 AM Erik Linder-Norén ***@***.***> wrote:
How are you using the mask? If you follow the folder structure I use for
CycleGAN and pix2pix (i.e. the ones that are created by using the download
scripts for both models) and use the data loaders that I have implemented
it should work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMhuxYBe_Gf3p7RsqO3mdkpXph1nXMKks5tj5f0gaJpZM4SjHgc>
.
|
So if you want the model to condition its prediction on the mask then you will need to scale both the mask and the images to the same dimensions, and also the same number of channels. The data loader for pix2pix assumes that the images are concatenated by width (like this https://raw.githubusercontent.com/affinelayer/pix2pix-tensorflow/master/docs/ab.png), where the image you want to condition on is positioned on the right and the image you would like the model to produce is on the left. If you arrange your images like this you should be able to use the data loader for pix2pix. |
Thank you. That makes perfect sense.
…On Sat, Mar 31, 2018, 12:55 PM Erik Linder-Norén ***@***.***> wrote:
So if you want the model to condition its prediction on the mask then you
will need to scale both the mask and the images to the same dimensions, and
also the same number of channels. The data loader for pix2pix assumes that
the images are concatenated by width (like this
https://raw.githubusercontent.com/affinelayer/pix2pix-tensorflow/master/docs/ab.png),
where the image you want to condition on is positioned on the right and the
image you would like the model to produce is on the left. If you arrange
your images like this you should be able to use the data loader for pix2pix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYMhu7rOnbkRyo0_H3P1HBWu4Qmpyyybks5tj8L2gaJpZM4SjHgc>
.
|
I notice that if I resize images to a power of 2, such as 128, it works. But if I try 200, I get the same error |
I got the following error when I tried to apply the code to my own data set:
ValueError: A
Concatenate
layer requires inputs with matching shapes except for the concat axis. Got inputs shapes: [(None, 64, 64, 128), (None, 63, 63, 128)]Any assistance will be greatly appreciated.
The text was updated successfully, but these errors were encountered: