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

Function loadModel

SRGAN/mainWindows.py:133–151  ·  view source on GitHub ↗

:param model: :return:

(model,root)

Source from the content-addressed store, hash-verified

131tkImage0 = ''
132tkImage3 = ''
133def loadModel(model,root):
134 """
135 :param model:
136 :return:
137 """
138 # 注意这里的变量,一定要声明为全局变量,不然后面显示不出来图片
139 global tkImage0
140 global tkImage3
141 #生成图片
142 generagedImage(model)
143 time.sleep(0.5)
144 #从保存的生成器生成图片中读取该图片并显示出来
145 canvas0,canvas1 = Canvas_(root)
146 img0 = cv2.imread(imagePath['filename'])
147 img1 = cv2.imread('cur.png')
148 tkImage0 = showImage(img0)
149 tkImage3 = showImage(img1)
150 canvas0.create_image(0, 0, anchor='nw', image=tkImage0)
151 canvas1.create_image(0, 0, anchor='nw', image=tkImage3)
152
153
154#点击生成图片按钮

Callers 1

ButtonImageFunction · 0.70

Calls 3

generagedImageFunction · 0.70
Canvas_Function · 0.70
showImageFunction · 0.70

Tested by

no test coverage detected