/wdcgan

recording my process of learning GAN

Primary LanguagePython

WDCGAN

Recording my learning process of GAN. Baseline model is based on this. For details please refer to this paper

Directory Annotation

/
	|-- base_training.log 		#training log of baseline model
	|-- training.log 		#training log of improved model
	|-- dcgan.py 			#baseline model script
	|-- wdcgan.py 			#improved model script
	|-- test.py 			#test script of improved model
	|-- test_base.py 		#test script of baseline model
	|-- val_img_gen.py 		#some functional functions
	|-- *.pth 			#checkpoint files
	|-- crypko_data/ 		#put training data here 
	|-- logs/ 		    	#log pics of every epoch for improved model
	|-- logs_base/ 			# log pics of every epoch for baseline model
	|-- test/ 			# test set

Environment Preparation

torch
torchvision
cv2
pytorch_fid

Data Preparation

Download training data from BaiduNetdisk(extracting code:inle),uncompress it to crypko_data/

Training

Make sure your machine has Nvidia GPUs,simply run

python wdcgan.py

for improved model,or

python dcgan.py

for baseline model.

Test

python test.py

outputs FID score of improved model.

python test_base.py

outputs FID score of baseline model.

Sample image of improved model:

Sample image