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

input files required for running code #3

Open
thisisnottaken opened this issue Jan 20, 2018 · 6 comments
Open

input files required for running code #3

thisisnottaken opened this issue Jan 20, 2018 · 6 comments

Comments

@thisisnottaken
Copy link

sir ,
QUE 1 ) https://github.com/ray0809/pix2pix/blob/master/data.py needs image files (jpg and png) in folder /home/ray/python_code/keras_examples/pix2pix/CMP_facade_DB_base/base .
How can I get those ?
QUE 2 ) My understanding is that parameters of neural network are learnt when we have pair of files labelled as corresponding input and output . After training we give an unknown input image and neural network generates output image using parameters it has learnt earlier . Is that alright ?
That leads me to think that pic folder should have atleast 2 files (jpg , one input and one output)
Target folder can have 1 png file if we desire to predict the output for this input png image .
Is that ok ?

Will wait for your reply.
Thanks for reading.

@ray0809
Copy link
Owner

ray0809 commented Jan 20, 2018

Hi,
the jpg and png correspon original picture and label,you can download the dataset to help you to understand the code in data.pyCMP Facade Dataset.
As you said ,the learned parameters are used for predict the label of input,and here input is jpg

@thisisnottaken
Copy link
Author

ok .
I will download http://cmp.felk.cvut.cz/~tylecr1/facade/CMP_facade_DB_base.zip and try to understand .

@thisisnottaken
Copy link
Author

sir ,
Thanks for replying.
Now I understand that , I should put real images in pic npy file and corresponding sketches in target npy file to train the neural network.
After training , our goal is to make a real image from sketch (in this case).
I think , you save unknown sketch as first image in target.npy . I assume the first image in pic.npy must be a blank image .The corresponding improved successive real image is generated after first , 50th and 100th epoch .
Is that correct ?

thanks.

@ray0809
Copy link
Owner

ray0809 commented Jan 21, 2018

Hi,
the trained model here is used for changing sketch to real one.the pic.npy is real one,target.npy is sketch.
there is no blank image in npy,the images in dataset are pair

@Srijita173
Copy link

Srijita173 commented Jul 17, 2018

Hi @ray0809 , @thisisnottaken ,
After training the network with pic and target pairs how do we get the output picture for a new sketch ?
For example, I have trained with the CMP_facade_DB_base dataset pairs . Now if I want to test for a new sketch how do I do that ?

@kerorojason
Copy link

You can run:
result = g.predict(img_array)
However, after trained on my custom dataset,
I got this image after prediction in every input data...
download

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

No branches or pull requests

4 participants