stylegan-human / StyleGAN-Human

StyleGAN-Human: A Data-Centric Odyssey of Human Generation
1.15k stars 144 forks source link

About the discriminator score #52

Open fwbx529 opened 11 months ago

fwbx529 commented 11 months ago

Hi, I want to use the discriminator for my research. But I have tested the discriminator in stylegan_human_v3_512.pkl and the output score for SHHQ-1.0 image (368.png) is -3.4994, while the score for my generated (really fake) images is about -4.18 Is this normal?

My code for testing the discriminator is as below:

D = legacy.load_network_pkl(open('stylegan_human_v3_512.pkl', 'rb'))['D']
img3 = cv2.imread('368.png')
img3 = cv2.resize(img3, (256, 512)) 
img3 = transforms.ToTensor()(img3) * 2 - 1 #normalize to -1~1
print(D(img3[[2,1,0]][None], 0)) #RGB to BGR for opencv

Thank you!