matlab-deep-learning / pix2pix

Image to Image Translation Using Generative Adversarial Networks
Other
30 stars 12 forks source link

Plot utility does not work in number of input Channels is different than 1 or 3 #5

Closed abaydou1 closed 4 years ago

abaydou1 commented 4 years ago

Hey Justin,

It seems that the plot utility during training does not work when the Input channels is different than 1 or 3. I tried with inputs having 2 channels and it did not.

Do you have a quick fix for that ?

Thanks, Atallah

justinpinkney commented 4 years ago

That's right, the plot expects images to have 1 or 3 channels. What would you expect for a 2 channel image? To display in the R and G channels of an RGB image perhaps, or to show the two channels separately side by side?

abaydou1 commented 4 years ago

So my channels number depends on the Data I am feeding to the network, and as you probably have inferred, they are not RGB images. I think if the plot can display the First channel of the input regardless of the number of channels, it will be good.

abaydou1 commented 4 years ago

By the way, do you think that this code might have any pitfall that makes it non suitable for 2 channels input ?

justinpinkney commented 4 years ago

This has been added with the behaviour you described above in the recent update.

There shouldn't be anything in particular that would not be suitable for 2 channel input.

abaydou1 commented 4 years ago

Thanks Justin!!