pytorch-TP-GAN icon indicating copy to clipboard operation
pytorch-TP-GAN copied to clipboard

have anyone run this code? how it performances?

Open hiredd opened this issue 6 years ago • 9 comments

hiredd avatar Jun 19 '18 11:06 hiredd

i am trying to run it but until now i get this error

/TP-GAN/net_input_everything_featparts.py in init(self, datasplit, Random, LOAD_60_LABEL, MIRROR_TO_ONE_SIDE, RANDOM_VERIFY, GENERATE_MASK, source, testing) 66 split_f = self.csvpath.format(source, self.split) 67 split_f_test = self.csvpath.format(source, 'test') ---> 68 self.indices = open(split_f, 'r').read().splitlines() 69 self.indices_test = open(split_f_test, 'r').read().splitlines() 70 self.size = len(self.indices)

FileNotFoundError: [Errno 2] No such file or directory: '/data/FS/train.csv'

redaghanem avatar Jan 22 '20 18:01 redaghanem

log_file = open('/'.join( [tb.path,'train','log.txt'] ) , 'w' ) 24 ---> 25 train_img_list = open(config.train['train_img_list'],'r').read().split('\n') 26 train_img_list.pop() 27 val_img_list = open(config.train['val_img_list'],'r').read().split('\n')

FileNotFoundError: [Errno 2] No such file or directory: 'pretrain_train.list'

redaghanem avatar Jan 31 '20 21:01 redaghanem

Code actually works, if you create image lists by yourself. Pick the right training protocol from original paper. For 90-degrees and for 60-degrees it is different.

unrealgeometry avatar Feb 03 '20 11:02 unrealgeometry

Please can you tell me how to make this file and what structure of dataset should be

Floder subfolders files

Please help me

redaghanem avatar Feb 03 '20 15:02 redaghanem

  • to reproduce you need MultiPIE dataset
  • to create correct list of files, you will need 5 (landmark) points annotations for subset of MultiPIE images, you can find paper authors zip-file with annotations, https://drive.google.com/open?id=1bbMH71SNnX09r7kZj7ExqRLTEUHZVkno
  • format of this list files can be understood when you read pdf-description of MultiPIE dataset. Basically, it is a list of files with full path. This code then automatically detects frontal images by subfolder name '051'. See TrainDataset class source code.
  • many answers can be found in tensorflow original implementation https://github.com/HRLTY/TP-GAN and their README
  • you also need to pretrain LightCNN on MultiPIE faces. You need to create pretrain_train.list and it should be in the form .../<integer_person_ID>any_other_stuff.jpg as you may deriver from PretrainDataset source code: person_label = int( self.img_list[idx].split('/')[-1].split('')[0] )
  • please, put some feedback here and frontalized images if you succeed, especially if you try it on new dataset or plan to verify some new ideas ;)

unrealgeometry avatar Feb 06 '20 10:02 unrealgeometry

I am having trouble getting the MultiPIE dataset. How did you get it? When I clicked on their link it just says the page cannot be found.

xiyichen avatar May 25 '20 12:05 xiyichen

MultiPIE is a private dataset. Maybe your scientific advisor can help if your work requires it.

unrealgeometry avatar May 25 '20 15:05 unrealgeometry

log_file = open('/'.join( [tb.path,'train','log.txt'] ) , 'w' ) 24 ---> 25 train_img_list = open(config.train['train_img_list'],'r').read().split('\n') 26 train_img_list.pop() 27 val_img_list = open(config.train['val_img_list'],'r').read().split('\n')

FileNotFoundError: [Errno 2] No such file or directory: 'pretrain_train.list'

Have you solved your problem? How did you solve it? about No such file or directory: 'pretrain_train.list' Thank U!

zcxxlshirley avatar Aug 10 '20 07:08 zcxxlshirley

Hello to all. I am PhD student and developing the TPGAN code and if anyone interested in cooperating work with me to get better result. you can rech me via email or my github page. [email protected] https://github.com/MahmoodHB

MahmoodHB avatar Aug 31 '20 11:08 MahmoodHB