How to perform Vector Arithmetic of face images

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:

  1. Run generate_samples(), which will create a sample_file.txt.
  2. Run DCGAN.main() in test mode and make sure option=0 for visualize().
  3. Select images by hand from generated png file that you need for arithmetic calculation (take smiling woman for example), and copy corresponding sample vector (examplar vector) in sample_file.txt to a new txt file.
  4. Repeat 1-3 until you have 3 different examplar vectors (smiling woman, normal woman and normal man). Name this new txt file as exemplar_vector.txt.
  5. Run alrithmetic_sample() which performs arithmetic calculation between 3 examplar vectors and generates a new sample_file.txt.
  6. Run 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.

https://github.com/johnhany/DCGAN-tensorflow
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值