Closed rahulkishan-mobbed closed 5 years ago
Yes, the computed attributes.npz is only used for demo2.
If I recall correctly, the facemodel template was computed by:
template=compute_template(globspec='images/celeba_aligned/*.jpg',image_dims=[218,178],center_crop=[160,160],subsample=1000)
with open('images/celeba_dlib_template.npz','wb') as f: numpy.savez(f,template=template)
If you want to use our face attribute classifier model weights then you need to use the same template since it was trained that way. Otherwise, the main code of DFI does not depend on the attribute template, it simply needs a model which returns a vector of attribute scores.
I believe the attribute feature model is based on this paper. https://www.cv-foundation.org/openaccess/content_iccv_2015/html/Liu_Deep_Learning_Face_ICCV_2015_paper.html
Okay that helps. Thanks a lot for answering my questions!
@rahulkishan-mobbed were you able to generate attributes.npz file?
@AidasK yes, i got it for CelebA
Hi, i am trying some experiments for changing high resolution images. Following info would be helpful for me to proceed as i would like to prepare my own database.
You mention the use of attribute classifiers in the paper. As i can see in dataset_rebuild.py which u have provided, the attributes.npz are generated when i first run the file, can you please clarify if these calculated attributes are the one used during the test of demo2.
with open('datasets/facemodel/attributes.npz','wb') as f: numpy.savez(f,scores=new_scores,landmarks=new_landmarks,filelist=new_filelist)
Is the celeba template generated using this method i found here :
def compute_template(globspec='images/lfw_aegan/*/*.png', ...):
Also if possible, can you provide some information or reference for the facemodel used to get the feature vector given below:
url='https://www.dropbox.com/s/18s63zomyfacjfs/facemodel.t7?dl=1'
Thanks!