deepfakes / faceswap-playground

User dedicated repo for the faceswap project
303 stars 194 forks source link

Error with Theano backend #91

Closed bryanlyon closed 6 years ago

bryanlyon commented 6 years ago

Traceback (most recent call last): File "faceswap.py", line 10, in from scripts.extract import ExtractTrainingData File "/superm/data/Projects/faceswap/scripts/extract.py", line 7, in from lib.cli import DirectoryProcessor File "/superm/data/Projects/faceswap/lib/cli.py", line 7, in from lib.faces_detect import detect_faces, DetectedFace File "/superm/data/Projects/faceswap/lib/faces_detect.py", line 1, in from lib import FaceLandmarksExtractor File "/superm/data/Projects/faceswap/lib/FaceLandmarksExtractor/init.py", line 1, in from .FaceLandmarksExtractor import extract File "/superm/data/Projects/faceswap/lib/FaceLandmarksExtractor/FaceLandmarksExtractor.py", line 6, in import keras File "/local/lib/python3.5/site-packages/keras/init.py", line 3, in from . import utils File "/local/lib/python3.5/site-packages/keras/utils/init.py", line 6, in from . import conv_utils File "/local/lib/python3.5/site-packages/keras/utils/conv_utils.py", line 3, in from .. import backend as K File "/local/lib/python3.5/site-packages/keras/backend/init.py", line 80, in from .theano_backend import * File "/home/nikkelitous/.local/lib/python3.5/site-packages/keras/backend/theano_backend.py", line 3, in import theano

File "/usr/local/lib/python3.5/dist-packages/theano/init.py", line 88, in from theano.configdefaults import config File "/usr/local/lib/python3.5/dist-packages/theano/configdefaults.py", line 137, in in_c_key=False) File "/usr/local/lib/python3.5/dist-packages/theano/configparser.py", line 287, in AddConfigVar configparam.get(root, type(root), delete_key=True) File "/usr/local/lib/python3.5/dist-packages/theano/configparser.py", line 335, in get self.set(cls, val_str) File "/usr/local/lib/python3.5/dist-packages/theano/configparser.py", line 346, in set self.val = self.filter(val) File "/usr/local/lib/python3.5/dist-packages/theano/configdefaults.py", line 116, in filter 'You are tring to use the old GPU back-end. ' ValueError: You are tring to use the old GPU back-end. It was removed from Theano. Use device=cuda* now. See https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29 for more information.

since https://github.com/deepfakes/faceswap/commit/232d9313afabc075e28c1a42047b22e0568200e6 theano is required and will not work with the newest version.

May be specific to Ubuntu Linux but comes from the keras backend being imported in conv_utils.py.

Either we need a supported version added to requirements or find a way to remove the import of keras/backend

Clorr commented 6 years ago

Hmm import backend as K just loads the configured backend, and the backend is chosen by your own config. Are you sure your keras backend config is correct?

bryanlyon commented 6 years ago

Ahhh, you're right. In that case, I'd suggest advising people to set their config to tensorflow instead.

Clorr commented 6 years ago

Ah ! Nice if you solved your issue. If you have a good way to warn people, fell free to propose, otherwise this issue should help those who have the problem (and take the time to search...)

bryanlyon commented 6 years ago

I'd suggest adding the notice into INSTALL. Since keras defaults (at least on Ubuntu) to Theano, which wont work due to the older version of keras we're using, we should add the notice to the INSTALL.md file. I can issue a PR if necessary.

Clorr commented 6 years ago

Feel free to propose the best solution you are thinking about. If updating keras version can solve this, maybe we can look into this too