Open mhasnat opened 7 years ago
When I was reproducing results from the paper, I wrote a piece of python codes to help with. It worked out fine for me:)
Can u give me some directions on how to generate the examplar_vector.txt.
@TigistAbebaw sorry I didn't explain that I also altered part of visualize()
codes in utils.py such that the generated txt file would be used for visualization. Please take following steps:
generate_samples()
, which will create a sample_file.txt. DCGAN.main()
in test mode and make sure option=0
for visualize()
.alrithmetic_sample()
which performs arithmetic calculation between 3 examplar vectors and generates a new sample_file.txt.DCGAN.main()
in test mode and set option=0
in visualize()
. Now arithmetic result image will be generated.
Pardon me if the procedures are far more complicated than a single script file. But I believe it introduces more freedom in the process.Thank you for the clear explanation.
After doing the arithmetic, it has given me some result. But it is not as interesting as the "smiling man". Mine is not much different from the inputs.
I want to generate more samples by using the interpolation. I didn't understand the difference with the generate_samples using uniform distribution. How can we get more images generated from interpolation. thanks.
And If you have any suggestions to make arithmetic result significant.
Can you tell me more details on how to do this?
How can I make a vector with the desired pictures? (Example: sample_file.txt of man wearing glasses)
I just did it in a very straightforward fashion, which is handpicking the desired vectors based on their result images. For example, generate a sample_file.txt
filled with entirely random vectors and look for a man wearing glasses. If the k
th (row first) image is what I need, I will say that the k
th vector in the sample_file.txt
is the examplar vector.
I'm sure the author has far more experience in identifying the generated samples' relation to their vectors. My method to reproduce results in the paper is naive and unpolished, but the results are similar.
Here are some results: 1.vector arithmetic
2.[-0.5, +0.5] noise added to the arithmetic result
3.vector interpolation
Thank you for your kind reply.
I have one more question.
After creating sample_file.txt, I set visualize to 0 using test mode, but a dimension error occurs.
The executable code python main.py --is_crop False --is_train False --visualize 0
below picture is command and error
Try using is_crop as true. (Since the specified shape and found shape is different) Or use some other way to make the size consistent.
Hi,
I would like to perform vector arithmetic of face images. Have you written tensorflow version of the arithmetic.lua file? Or is there any other way with the existing code?
Thanks.