faceit icon indicating copy to clipboard operation
faceit copied to clipboard

ModuleNotFoundError: No module named 'lib.utils' from colab Environment for faceit as deepfake project

Open soheilpaper opened this issue 4 years ago • 0 comments

i am trying to test the faceit by colab google via this link:

but when i try o install this part of its code:

import faceit
# Create the model with params: model name, person A name, person B name.
faceit = FaceIt('fallon_to_oliver', 'fallon', 'oliver')
 
# Add any number of videos for person A by specifying the YouTube url of the video.
faceit.add_video('fallon', 'fallon_emmastone1.mp4', 'https://www.youtube.com/watch?v=9p5_6eicatI')
faceit.add_video('fallon', 'fallon_single1.mp4', 'https://www.youtube.com/watch?v=bEQl6Pt-654')
faceit.add_video('fallon', 'fallon_sesamestreet1.mp4', 'https://www.youtube.com/watch?v=72ElvvAjvHc')
 
# Do the same for person B.
faceit.add_video('oliver', 'oliver_trumpcard1.mp4', 'https://www.youtube.com/watch?v=jZjmlJPJgug')
faceit.add_video('oliver', 'oliver_taxreform1.mp4', 'https://www.youtube.com/watch?v=z4gBMw64aqk')
faceit.add_video('oliver', 'oliver_zazu1.mp4', 'https://www.youtube.com/watch?v=1f2iawp0y5Y')
 

i get this erroro:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-60-5b08ef1ca42e> in <module>()
----> 1 import faceit
      2 # Create the model with params: model name, person A name, person B name.
      3 faceit = FaceIt('fallon_to_oliver', 'fallon', 'oliver')
      4 
      5 # Add any number of videos for person A by specifying the YouTube url of the video.

/content/faceit/faceit.py in <module>()
     16 sys.path.append('faceswap')
     17 
---> 18 from lib.utils import FullHelpArgumentParser
     19 from scripts.extract import ExtractTrainingData
     20 from scripts.train import TrainingProcessor

ModuleNotFoundError: No module named 'lib.utils'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

So i have tried to use some old version of faceswap ( the 1 version in my GitHub repo):

!git clone http://github.com/So-AI-love/Deepface-faceswap.git


and try install faceswap by myself like this:

%cd 'Deepface-faceswap'
!python setup.py build_ext --inplace

, or try install different Linux util library by this command:

!sudo apt-get update -y
!sudo apt-get install -y staden-io-lib-utils
!sudo apt-get install python.lib.utils
!sudo apt install python3-darts.lib.utils.lru

But it was not successful.

I would appropriate, any help to solve it.

Asked also here:

https://stackoverflow.com/questions/63867511/modulenotfounderror-no-module-named-lib-utils-from-colab-environment-for-face Thanks.

soheilpaper avatar Sep 13 '20 05:09 soheilpaper