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

How to use this on a test image using the pretrained model #11

Open
Abhi001vj opened this issue Apr 8, 2018 · 2 comments
Open

How to use this on a test image using the pretrained model #11

Abhi001vj opened this issue Apr 8, 2018 · 2 comments

Comments

@Abhi001vj
Copy link

I thought I could load the model and load the saved weights and then execute this step to generate the results.
completion = sess.run(model.completion, feed_dict={x: img, mask: mask_img, is_training: False}) sample = np.array((completion[0] + 1) * 127.5, dtype=np.uint8) cv2.imwrite('./output.jpg', cv2.cvtColor(sample, cv2.COLOR_RGB2BGR))
I used the images you given as test results.

This is the error I got.

You must feed a value for placeholder tensor 'Placeholder' with dtype float and shape [16,128,128,3]
	 [[Node: Placeholder = Placeholder[dtype=DT_FLOAT, shape=[16,128,128,3], _device="/job:localhost/replica:0/task:0/device:GPU:0"]

Thank you for the implementation.

@muyue1238
Copy link

I've achieved on testing images using the author's model, though you maybe don't need answer half years later. First generate a *.npy file using data/to_npy.py, and use it as the input of src/test/test.py, and the outcome pictures will be stored in /src/test/output folder.

@Erizu91
Copy link

Erizu91 commented Dec 17, 2021

Hello, I am trying to do a test on an image after training with my own data set but I get an error because it cannot find this file "lfw.npy '"

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

3 participants