Age Progression/Regression by Conditional Adversarial Autoencoder

Overview

Age Progression/Regression by Conditional Adversarial Autoencoder (CAAE)

TensorFlow implementation of the algorithm in the paper Age Progression/Regression by Conditional Adversarial Autoencoder.

Thanks to the Pytorch implementation by Mattan Serry, Hila Balahsan, and Dor Alt.

Pre-requisites

  • Python 2.7x

  • Scipy 1.0.0

  • TensorFlow (r0.12)

    • Please note that you will get errors if running with TensorFlow r1.0 because the definition of input arguments of some functions have changed, e.g., tf.concat and tf.nn.sigmoid_cross_entropy_with_logits.
  • The code is updated to run with Tensorflow 1.7.0, and an initial model is provided to better initialize the network. The old version is backed up to the folder old_version.

Datasets

Prepare the training dataset

You may use any dataset with labels of age and gender. In this demo, we use the UTKFace dataset. It is better to use aligned and cropped faces. Please save and unzip UTKFace.tar.gz to the folder data.

Training

$ python main.py

The training process has been tested on NVIDIA TITAN X (12GB). The training time for 50 epochs on UTKFace (23,708 images in the size of 128x128x3) is about two and a half hours.

During training, a new folder named save will be created, including four sub-folders: summary, samples, test, and checkpoint.

  • samples saves the reconstructed faces at each epoch.
  • test saves the testing results at each epoch (generated faces at different ages based on input faces).
  • checkpoint saves the model.
  • summary saves the batch-wise losses and intermediate outputs. To visualize the summary,
$ cd save/summary
$ tensorboard --logdir .

After training, you can check the folders samples and test to visualize the reconstruction and testing performance, respectively. The following shows the reconstruction (left) and testing (right) results. The first row in the reconstruction results (left) are testing samples that yield the testing results (right) in the age ascending order from top to bottom.

The reconstruction loss vs. epoch is shown below, which was passed through a low-pass filter for visualization purpose. The original record is saved in folder summary.

Custom Training

$ python main.py
    --dataset		default 'UTKFace'. Please put your own dataset in ./data
    --savedir		default 'save'. Please use a meaningful name, e.g., save_init_model.
    --epoch		default 50.
    --use_trained_model	default True. If use a trained model, savedir specifies the model name. 
    --use_init_model	default True. If load the trained model failed, use the init model save in ./init_model 

Testing

$ python main.py --is_train False --testdir your_image_dir --savedir save

Note: savedir specifies the model name saved in the training. By default, the trained model is saved in the folder save (i.e., the model name). Then, it is supposed to print out the following message.

  	Building graph ...

	Testing Mode

	Loading pre-trained model ...
	SUCCESS ^_^

	Done! Results are saved as save/test/test_as_xxx.png

Specifically, the testing faces will be processed twice, being considered as male and female, respectively. Therefore, the saved files are named test_as_male.png and test_as_female.png, respectively. To achieve better results, it is necessary to train on a large and diverse dataset.

A demo of training process

The first row shows the input faces of different ages, and the other rows show the improvement of the output faces at every other epoch. From top to bottom, the output faces are in the age ascending order.

Files

  • FaceAging.py is a class that builds and initializes the model, and implements training and testing related stuff
  • ops.py consists of functions called FaceAging.py to implement options of convolution, deconvolution, fully connection, leaky ReLU, load and save images.
  • main.py demonstrates FaceAging.py.

Citation

Zhifei Zhang, Yang Song, and Hairong Qi. "Age Progression/Regression by Conditional Adversarial Autoencoder." IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017.

@inproceedings{zhang2017age,
  title={Age Progression/Regression by Conditional Adversarial Autoencoder},
  author={Zhang, Zhifei and Song, Yang and Qi, Hairong},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2017}
}

Spotlight presentation

Comments
  • TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

    TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

    I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 1 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 1: Y Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0) I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX 1080, pci bus id: 0000:02:00.0)

    Building graph ...
    

    Traceback (most recent call last): File "main.py", line 43, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 27, in main dataset_name=FLAGS.dataset # name of the dataset in the folder ./data File "/home/wangxiao/Downloads/Face-Aging-CAAE-master/FaceAging.py", line 91, in init tile_ratio=self.tile_ratio File "/home/wangxiao/Downloads/Face-Aging-CAAE-master/FaceAging.py", line 474, in generator z = concat_label(z, y, duplicate=duplicate) File "/home/wangxiao/Downloads/Face-Aging-CAAE-master/ops.py", line 76, in concat_label return tf.concat(1, [x, label]) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1029, in concat dtype=dtypes.int32).get_shape( File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 637, in convert_to_tensor as_ref=False) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 702, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 110, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 99, in constant tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 367, in make_tensor_proto _AssertCompatible(values, dtype) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible (dtype.name, repr(mismatch), type(mismatch).name)) TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

    opened by wangxiao5791509 5
  • AttributeError: module 'tensorflow' has no attribute 'AUTO_REUSE'

    AttributeError: module 'tensorflow' has no attribute 'AUTO_REUSE'

        Training Mode
    

    Traceback (most recent call last): File "main.py", line 70, in tf.app.run() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 59, in main use_init_model=FLAGS.use_init_model File "C:\Users\user\Downloads\Face-Aging-CAAE-master\FaceAging.py", line 218, in train with tf.variable_scope('opt', reuse=tf.AUTO_REUSE): AttributeError: module 'tensorflow' has no attribute 'AUTO_REUSE'

    opened by ghost 4
  • test problem

    test problem

    I use this code to test $ python main.py --is_train False --testdir your_image_dir but the result is as follows: image my test image has the same format as UTKFace, and can you tell me how to solve this problem

    opened by Romeo-CC 4
  • ValueError: invalid literal for int() with base 10: 'data\\UTKFace\\25'

    ValueError: invalid literal for int() with base 10: 'data\\UTKFace\\25'

    File "G:\faceAging\FaceAgingMaster\FaceAging.py", line 282, in train label = int(str(sample_files[i]).split('/')[-1].split('_')[0]) ValueError: invalid literal for int() with base 10: 'data\UTKFace\25'

    I was running, the emergence of this problem, is there any problem with the code?

    opened by okmmsky888 4
  • ValueError: Variable E_conv0/w/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

    ValueError: Variable E_conv0/w/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

    I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 960, pci bus id: 0000:01:00.0)

    Building graph ...
    
    Training Mode
    

    Traceback (most recent call last): File "main.py", line 43, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 32, in main num_epochs=FLAGS.epoch, # number of epochs File "/paseam/git/Face-Aging-CAAE/FaceAging.py", line 224, in train var_list=self.E_variables + self.G_variables File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 298, in minimize name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 412, in apply_gradients self._create_slots(var_list) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/adam.py", line 119, in _create_slots self._zeros_slot(v, "m", self._name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/optimizer.py", line 656, in _zeros_slot named_slots[var] = slot_creator.create_zeros_slot(var, op_name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 123, in create_zeros_slot colocate_with_primary=colocate_with_primary) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 101, in create_slot return _create_slot_var(primary, val, '') File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/slot_creator.py", line 55, in _create_slot_var slot = variable_scope.get_variable(scope, initializer=val, trainable=False) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 988, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 890, in get_variable custom_getter=custom_getter) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 348, in get_variable validate_shape=validate_shape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 333, in _true_getter caching_device=caching_device, validate_shape=validate_shape) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/variable_scope.py", line 657, in _get_single_variable "VarScope?" % name) ValueError: Variable E_conv0/w/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

    opened by Paseam 4
  • why I cann't run this code?   Trainning  model has this problem,Can anyong tell me how to deal with this problem?

    why I cann't run this code? Trainning model has this problem,Can anyong tell me how to deal with this problem?

    Traceback (most recent call last): File "/home/lj/CAAE/main.py", line 43, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "/home/lj/CAAE/main.py", line 32, in main num_epochs=FLAGS.epoch, # number of epochs File "/home/lj/CAAE/FaceAging.py", line 424, in train self.sample(sample_images, sample_label_age, sample_label_gender, name) File "/home/lj/CAAE/FaceAging.py", line 634, in sample self.gender: gender File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run run_metadata_ptr) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 943, in _run % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape()))) ValueError: Cannot feed value of shape (0,) for Tensor u'input_images:0', which has shape '(100, 128, 128, 3)'

    thank you very much!!!

    opened by superjiajia26 2
  • ValueError: Variable E_conv0/w/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

    ValueError: Variable E_conv0/w/Adam/ does not exist, or was not created with tf.get_variable(). Did you mean to set reuse=None in VarScope?

    I run the train code , but in # optimizer for discriminator on image self.D_img_optimizer = tf.train.AdamOptimizer( learning_rate=EG_learning_rate, beta1=beta1 ).minimize( loss=self.loss_Di, var_list=self.D_img_variables ) tell me ValueError: Variable E_conv0/w/Adam/ does not exist how should I do ?

    opened by PHPerWu 2
  • Execution ends early with no error output for my 1050 Ti 4 gb

    Execution ends early with no error output for my 1050 Ti 4 gb

    I am new to TensorFlow so it is likely an easy problem. The code works on my CPU0 (took around 3 days) However, it terminates early on GPU with no error output.

    In [1]: runfile('/media/.../face-aging-caae/Face-Aging-CAAE-master/main.py', wdir='/media/.../face-aging-caae/Face-Aging-CAAE-master')
    Namespace(dataset='UTKFace', epoch=50, is_train=True, savedir='save', testdir='None', use_init_model=True, use_trained_model=True)
    
            Building graph ...
    WARNING:tensorflow:From /home/abdullah/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
    Instructions for updating:
    Use the retry module or similar alternatives.
    
            Training Mode
    
            Loading pre-trained model ...
            FAILED >_<!
    
            Loading init model ...
    INFO:tensorflow:Restoring parameters from init_model/model-init
    
    In [1]:
    

    I have tested other codes on GPU and it works.

    The code seems to exit during execution of this block on "FaceAging.py":

                    # update
                    _, _, _, EG_err, Ez_err, Dz_err, Dzp_err, Gi_err, DiG_err, Di_err, TV = self.session.run(
                        fetches = [
                            self.EG_optimizer,
                            self.D_z_optimizer,
                            self.D_img_optimizer,
                            self.EG_loss,
                            self.E_z_loss,
                            self.D_z_loss_z,
                            self.D_z_loss_prior,
                            self.G_img_loss,
                            self.D_img_loss_G,
                            self.D_img_loss_input,
                            self.tv_loss
                        ],
                        feed_dict={
                            self.input_image: batch_images,
                            self.age: batch_label_age,
                            self.gender: batch_label_gender,
                            self.z_prior: batch_z_prior
                        }
                    )
    

    My GPU is GTX 1050 Ti 4 gb. How do I fix this problem? Thank you.

    opened by agznawi 1
  • AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor'

    AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor'

    PS C:\Users\user\Downloads\Face-Aging-CAAE-master> python main.py C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Namespace(dataset='UTKFace', epoch=50, is_train=True, savedir='save', testdir='None', use_init_model=True, use_trained_model=True) Building graph ... Traceback (most recent call last): File "main.py", line 70, in tf.app.run() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "main.py", line 43, in main dataset_name=FLAGS.dataset # name of the dataset in the folder ./data File "C:\Users\user\Downloads\Face-Aging-CAAE-master\FaceAging.py", line 95, in init is_training=self.is_training File "C:\Users\user\Downloads\Face-Aging-CAAE-master\FaceAging.py", line 554, in discriminator_z current = tf.contrib.layers.batch_norm( File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 53, in getattr module = self._load() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 42, in load module = importlib.import_module(self.name) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\importlib_init.py", line 126, in import_module return _bootstrap.gcd_import(name[level:], package, level) File "", line 994, in gcd_import File "", line 971, in find_and_load File "", line 955, in find_and_load_unlocked File "", line 665, in load_unlocked File "", line 678, in exec_module File "", line 219, in call_with_frames_removed File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib_init.py", line 39, in from tensorflow.contrib import distributions File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\distributions_init.py", line 40, in from tensorflow.contrib.distributions.python.ops.estimator import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\distributions\python\ops\estimator.py", line 21, in from tensorflow.contrib.learn.python.learn.estimators.head import compute_weighted_loss File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn_init.py", line 95, in from tensorflow.contrib.learn.python.learn import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn\python_init.py", line 28, in from tensorflow.contrib.learn.python.learn import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn_init.py", line 40, in from tensorflow.contrib.learn.python.learn.experiment import Experiment File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\experiment.py", line 39, in from tensorflow.contrib.tpu.python.tpu import tpu_estimator File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu_init.py", line 55, in from tensorflow.contrib.tpu.python import profiler File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu\python\profiler_init.py", line 23, in from tensorflow.contrib.tpu.profiler.tpu_profiler_analysis_pb2 import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu\profiler\tpu_profiler_analysis_pb2.py", line 16, in from tensorflow.contrib.tpu.profiler import tpu_profiler_pb2 as tensorflow_dot_contrib_dot_tpu_dot_profiler_dot_tpu__profiler__pb2 File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu\profiler\tpu_profiler_pb2.py", line 402, in _sym_db.RegisterServiceDescriptor(TPUPROFILER) AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor' PS C:\Users\user\Downloads\Face-Aging-CAAE-master> python main.py C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py_init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Namespace(dataset='UTKFace', epoch=50, is_train=True, savedir='save', testdir='None', use_init_model=True, use_trained_model=True)

        Building graph ...
    

    Traceback (most recent call last): File "main.py", line 70, in tf.app.run() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "main.py", line 43, in main dataset_name=FLAGS.dataset # name of the dataset in the folder ./data File "C:\Users\user\Downloads\Face-Aging-CAAE-master\FaceAging.py", line 95, in init is_training=self.is_training File "C:\Users\user\Downloads\Face-Aging-CAAE-master\FaceAging.py", line 554, in discriminator_z current = tf.contrib.layers.batch_norm( File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 53, in getattr module = self._load() File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 42, in load module = importlib.import_module(self.name) File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\importlib_init.py", line 126, in import_module return _bootstrap.gcd_import(name[level:], package, level) File "", line 994, in gcd_import File "", line 971, in find_and_load File "", line 955, in find_and_load_unlocked File "", line 665, in load_unlocked File "", line 678, in exec_module File "", line 219, in call_with_frames_removed File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib_init.py", line 39, in from tensorflow.contrib import distributions File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\distributions_init.py", line 40, in from tensorflow.contrib.distributions.python.ops.estimator import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\distributions\python\ops\estimator.py", line 21, in from tensorflow.contrib.learn.python.learn.estimators.head import compute_weighted_loss File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn_init.py", line 95, in from tensorflow.contrib.learn.python.learn import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn\python_init.py", line 28, in from tensorflow.contrib.learn.python.learn import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn_init.py", line 40, in from tensorflow.contrib.learn.python.learn.experiment import Experiment File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\learn\python\learn\experiment.py", line 39, in from tensorflow.contrib.tpu.python.tpu import tpu_estimator File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu_init.py", line 55, in from tensorflow.contrib.tpu.python import profiler File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu\python\profiler_init.py", line 23, in from tensorflow.contrib.tpu.profiler.tpu_profiler_analysis_pb2 import * File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu\profiler\tpu_profiler_analysis_pb2.py", line 16, in from tensorflow.contrib.tpu.profiler import tpu_profiler_pb2 as tensorflow_dot_contrib_dot_tpu_dot_profiler_dot_tpu__profiler__pb2 File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\contrib\tpu\profiler\tpu_profiler_pb2.py", line 402, in _sym_db.RegisterServiceDescriptor(_TPUPROFILER) AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor'

    opened by ghost 1
  • train problem

    train problem

    For i run the modle with tensorflow 1.1.0-rc2, i modify the input arguments of tf.concat in ops.py and tf.nn.sigmoid_cross_entropy_with_logits in FaceAging.py. To avoid the error[ValueError: Variable E_conv0/w/Adam/ does not exist], i try GradientDescentOptimizer instead of AdamOptimizer. It runs successfully. But, the jpgs in save/sample are all like this
    37

    opened by soledad-deng 1
  • About batch_size?

    About batch_size?

    Hello,firstly, thanks for your sharing! now,i run this code,but i got the error which called "out of memory",so i want to know how to change the batch_size,meantime,i can get 10 age group images for per people,can you tell me how should i change the code?thank you very much!

    opened by wjxdp 0
  • invalid literal for int

    invalid literal for int

    Hello ,when train the module ,I meet the problem ValueError: could not convert string to float: './data\UTKFace\25_0_1_20170116003121821.jpg.chip.jpg' I have change "str" to "float"

    opened by Jessiny 0
  • How To Train In GPU

    How To Train In GPU

    Hello I was able to start training on my computer, however it takes too long to train on CPU.

    is there any way to rain on GPU?

    is it my environment not enough to train on GPU?

    plz help :'(

    image

    opened by Nakkoon 0
  • about the dataset

    about the dataset

    I want to know that if I want to use the datatset of the UTKface,I have to download the original image data and the label file?If I use the code to do the image restructution,is a label file required?

    opened by lzzlxxlsz 0
  • Is it mode collapse?

    Is it mode collapse?

    I trained this code on CACD dataset and changed 10 labels to five. But the generated face look the same, it seems face aging doesn't work. Did you meet this problem? @ZZUTK

    opened by chengxiqiao 3
Owner
Zhifei Zhang
Zhifei Zhang
Only a Matter of Style: Age Transformation Using a Style-Based Regression Model

Only a Matter of Style: Age Transformation Using a Style-Based Regression Model The task of age transformation illustrates the change of an individual

null 444 Dec 30, 2022
Final project for machine learning (CSC 590). Detection of hepatitis C and progression through blood samples.

Hepatitis C Blood Based Detection Final project for machine learning (CSC 590). Dataset from Kaggle. Using data from previous hepatitis C blood panels

Jennefer Maldonado 1 Dec 28, 2021
Speech Enhancement Generative Adversarial Network Based on Asymmetric AutoEncoder

ASEGAN: Speech Enhancement Generative Adversarial Network Based on Asymmetric AutoEncoder 中文版简介 Readme with English Version 介绍 基于SEGAN模型的改进版本,使用自主设计的非

Nitin 53 Nov 17, 2022
Quantile Regression DQN a Minimal Working Example, Distributional Reinforcement Learning with Quantile Regression

Quantile Regression DQN Quantile Regression DQN a Minimal Working Example, Distributional Reinforcement Learning with Quantile Regression (https://arx

Arsenii Senya Ashukha 80 Sep 17, 2022
Hitters Linear Regression - Hitters Linear Regression With Python

Hitters_Linear_Regression Kullanacağımız veri seti Carnegie Mellon Üniversitesi'

AyseBuyukcelik 2 Jan 26, 2022
Image-to-Image Translation with Conditional Adversarial Networks (Pix2pix) implementation in keras

pix2pix-keras Pix2pix implementation in keras. Original paper: Image-to-Image Translation with Conditional Adversarial Networks (pix2pix) Paper Author

William Falcon 141 Dec 30, 2022
StudioGAN is a Pytorch library providing implementations of representative Generative Adversarial Networks (GANs) for conditional/unconditional image generation.

StudioGAN is a Pytorch library providing implementations of representative Generative Adversarial Networks (GANs) for conditional/unconditional image generation.

null 3k Jan 8, 2023
PyTorch implementation of "Image-to-Image Translation Using Conditional Adversarial Networks".

pix2pix-pytorch PyTorch implementation of Image-to-Image Translation Using Conditional Adversarial Networks. Based on pix2pix by Phillip Isola et al.

mrzhu 383 Dec 17, 2022
Unofficial implement with paper SpeakerGAN: Speaker identification with conditional generative adversarial network

Introduction This repository is about paper SpeakerGAN , and is unofficially implemented by Mingming Huang ([email protected]), Tiezheng Wang (wtz920729

null 7 Jan 3, 2023
Age and Gender prediction using Keras

cnn_age_gender Age and Gender prediction using Keras Dataset example : Description : UTKFace dataset is a large-scale face dataset with long age span

XN3UR0N 58 May 3, 2022
Implement face detection, and age and gender classification, and emotion classification.

YOLO Keras Face Detection Implement Face detection, and Age and Gender Classification, and Emotion Classification. (image from wider face dataset) Ove

Chloe 10 Nov 14, 2022
Face Detection & Age Gender & Expression & Recognition

Face Detection & Age Gender & Expression & Recognition

Sajjad Ayobi 188 Dec 28, 2022
Python implementation of a live deep learning based age/gender/expression recognizer

TUT live age estimator Python implementation of a live deep learning based age/gender/smile/celebrity twin recognizer. All components use convolutiona

Heikki Huttunen 80 Nov 21, 2022
This is an easy python software which allows to sort images with faces by gender and after by age.

Gender-age Classifier This is an easy python software which allows to sort images with faces by gender and after by age. Usage First install Deepface

Claudio Ciccarone 6 Sep 17, 2022
This is a Keras implementation of a CNN for estimating age, gender and mask from a camera.

face-detector-age-gender This is a Keras implementation of a CNN for estimating age, gender and mask from a camera. Before run face detector app, expr

Devdreamsolution 2 Dec 4, 2021
AgeGuesser: deep learning based age estimation system. Powered by EfficientNet and Yolov5

AgeGuesser AgeGuesser is an end-to-end, deep-learning based Age Estimation system, presented at the CAIP 2021 conference. You can find the related pap

null 5 Nov 10, 2022
A deep learning network built with TensorFlow and Keras to classify gender and estimate age.

Convolutional Neural Network (CNN). This repository contains a source code of a deep learning network built with TensorFlow and Keras to classify gend

Pawel Dziemiach 1 Dec 18, 2021
A deep learning network built with TensorFlow and Keras to classify gender and estimate age.

Convolutional Neural Network (CNN). This repository contains a source code of a deep learning network built with TensorFlow and Keras to classify gend

Pawel Dziemiach 1 Dec 19, 2021
Nicely is a real-time Feedback and Intervention Program Depression is a prevalent issue across all age groups, socioeconomic classes, and cultural identities.

Nicely is a real-time Feedback and Intervention Program Depression is a prevalent issue across all age groups, socioeconomic classes, and cultural identities.

null 1 Jan 16, 2022