tg-bomze / StyleGAN2-Face-Modificator

Simple Encoder, Generator and Face Modificator with StyleGAN2
274 stars 51 forks source link

step :"Train a neural network" in colab (online mode)produce an error #3

Closed Iteravse closed 4 years ago

Iteravse commented 4 years ago

accordance the situation about the selection,if choose the high quality,then it will report the error like this:


FileNotFoundError Traceback (most recent call last)

in () ----> 1 get_ipython().run_cell_magic('time', '', '!rm -rf latent_representations/ generated_images/\n#@markdown **Choose an image encoding method:**\n\n#@markdown *Slow method works 2 times longer, but has much higher quality.*\nmetod = \'Slow (high quality)\' #@param ["Fast (low quality)", "Slow (high quality)"]\n#@markdown **Select a network that matches the type of face in the input image.:**\n\n#@markdown *Default network is universal, so if in doubt, choose default.*\nnetwork = \'default\' #@param ["default", "european", "asian", "asian beauty", "baby"]\nif network == \'default\':\n network_path = \'networks/\' + model\nelse:\n other_networks = !ls networks/other\n if networks_urls[network][1] in other_networks:\n network_path = \'networks/other/\' + networks_urls[network][1]\n else:\n network_url = networks_urls[network][0]\n try:\n !gdown $network_url\n network_name = networks_urls[network][1]\n !mv $network_name networks/other/$network_name\n network_path = \'networks/other/\' + network_name\n except BaseException:\n network_pkl = \'networks/other/\' + networks_urls[network][1]\n#@markdown **Set the number of iterations of network learning:**\n\n#@markdown *Recommended: 700*\niterat = 750 #@param {type:"slider", min:100, max:1500, step:50}\n#@markdown **Set learning rate:**\n\n#@markdown *Recommended: ... 3 frames in time(self, line, cell, local_ns) in () in display_sbs(folder1, folder2, res) 13 if folder2[-1] != '/': folder2 += '/' 14 ---> 15 imgs1 = sorted([f for f in os.listdir(folder1) if '.png' in f]) 16 imgs2 = sorted([f for f in os.listdir(folder2) if '.png' in f]) 17 if len(imgs1)!=len(imgs2): FileNotFoundError: [Errno 2] No such file or directory: 'generated_images/'

else if choose the low quality,then it will report the error like this:

Found different amount of images in aligned vs raw image directories. That's not supposed to happen... CPU times: user 99.2 ms, sys: 56.7 ms, total: 156 ms Wall time: 31.2 s

image

but as we see, it still are "generated_images/" problem, that just generated a folder but any images

i check it every step carefully,i discover it when run on frist step ,"install required compoments",it will encounter the error certainly:

ERROR: tensorflow 1.15.2 has requirement gast==0.2.2, but you'll have gast 0.3.3 which is incompatible. ERROR: tensorflow 1.15.2 has requirement tensorboard<1.16.0,>=1.15.0, but you'll have tensorboard 1.14.0 which is incompatible. ERROR: tensorflow 1.15.2 has requirement tensorflow-estimator==1.15.1, but you'll have tensorflow-estimator 1.14.0 which is incompatible.

is that problem? How do I solve these two problems? thanks for any help

Iteravse commented 4 years ago

i solved this problem,it just because i choose the image is png format,and it can't be program loading, it must be jpg or jpeg format image,else it should report error "Input images must be stored as RGB or grayscale",i can't discover it report because i do not choose show the log in selector, it work now, pretty good