MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / loadModel

Function loadModel

StyleGAN/mainWindow.py:90–104  ·  view source on GitHub ↗

:param model: :return:

(model,root)

Source from the content-addressed store, hash-verified

88 plt.savefig('cur.png')
89
90def loadModel(model,root):
91 """
92 :param model:
93 :return:
94 """
95 # 注意这里的变量,一定要声明为全局变量,不然后面显示不出来图片
96 global tkImage
97 #生成图片
98 generagedImage(model)
99 time.sleep(1)
100 #从保存的生成器生成图片中读取该图片并显示出来
101 canvas = Canvas_(root)
102 img = cv2.imread('cur.png')
103 tkImage = showImage(img)
104 canvas.create_image(0, 0, anchor='nw', image=tkImage)
105
106#点击生成图片按钮
107def ButtonImage(model,root):

Callers 1

ButtonImageFunction · 0.70

Calls 3

generagedImageFunction · 0.70
Canvas_Function · 0.70
showImageFunction · 0.70

Tested by

no test coverage detected