DeepCreamPy fails
Opened this issue · 3 comments
Kuroonehalf commented
Hi. I believe i've set up all the necessary pre-requisites and loaded up the indicated models, but the process doesn't seem to work. I get the following error during DeepCreamPy.
[08:34:27PM] ----- DeepCreamPy modified by Gusbell -----
C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\keras\engine\base_layer_v1.py:1694: UserWarning: `layer.apply` is deprecated and will be removed in a future version. Please use `layer.__call__` method instead.
warnings.warn('`layer.apply` is deprecated and '
Traceback (most recent call last):
File "C:\Users\Kuro\Downloads\DLs\Tsuki_1.2.0-hotfix\Tsuki-main\Modules\DeepCreamPy\decensor.py", line 156, in <module>
decensor = Decensor()
File "C:\Users\Kuro\Downloads\DLs\Tsuki_1.2.0-hotfix\Tsuki-main\Modules\DeepCreamPy\decensor.py", line 22, in __init__
self.load_model()
File "C:\Users\Kuro\Downloads\DLs\Tsuki_1.2.0-hotfix\Tsuki-main\Modules\DeepCreamPy\decensor.py", line 31, in load_model
self.model = InpaintNN(bar_model_name="./models/bar/Train_775000.meta", bar_checkpoint_name="./models/bar/", mosaic_model_name="./models/mosaic/Train_290000.meta", mosaic_checkpoint_name="./models/mosaic/", is_mosaic=self.is_mosaic)
File "C:\Users\Kuro\Downloads\DLs\Tsuki_1.2.0-hotfix\Tsuki-main\Modules\DeepCreamPy\model.py", line 22, in __init__
self.build_model()
File "C:\Users\Kuro\Downloads\DLs\Tsuki_1.2.0-hotfix\Tsuki-main\Modules\DeepCreamPy\model.py", line 88, in build_model
Restore = tf.compat.v1.train.import_meta_graph(self.bar_model_name)
File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\training\saver.py", line 1565, in import_meta_graph
return _import_meta_graph_with_return_elements(meta_graph_or_file,
File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\training\saver.py", line 1581, in _import_meta_graph_with_return_elements
meta_graph_def = meta_graph.read_meta_graph_file(meta_graph_or_file)
File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\meta_graph.py", line 634, in read_meta_graph_file
raise IOError("File does not exist. Received: {filename}.")
OSError: File does not exist. Received: {filename}.
Any idea what's wrong?
Gusb3ll commented
Seems like it can't find your model
InpaintNN(bar_model_name="./models/bar/Train_775000.meta", bar_checkpoint_name="./models/bar/", mosaic_model_name="./models/mosaic/Train_290000.meta", mosaic_checkpoint_name="./models/mosaic/", is_mosaic=self.is_mosaic)
You could try changing the model name to match the input name here
Kuroonehalf commented
Hm? I'm a bit confused. Isn't the model file supposed to be model.h5? What's this Train_775000.meta/Train_290000.meta? :o
Kuroonehalf commented
I found the issue. Turns out the models you need are this, which come with bar and mosaic folders and those train files. https://drive.google.com/open?id=1IMwzqZUuRnTv5jcuKdvZx-RZweknww5x
Found this in https://github.com/Deepshift/DeepCreamPy/blob/master/docs/INSTALLATION.md