1

I am running this code but I am getting errors while importing the facenet_pytorch import MTCNN module. I have used the below code but I am unable to get the module in the Kaggle environment.

%%capture
!pip install /kaggle/input/facenet-pytorch-vggface2/facenet_pytorch-2.2.7-py3-none-any.whl


from facenet_pytorch import MTCNN
import cv2
from PIL import Image
import numpy as np
from matplotlib import pyplot as plt
from tqdm.notebook import tqdm

while running the above code I am getting this error.

ModuleNotFoundError                       Traceback (most recent call last)
/tmp/ipykernel_27/981336495.py in <module>
----> 1 from facenet_pytorch import MTCNN
      2 import cv2
      3 from PIL import Image
      4 import numpy as np
      5 from matplotlib import pyplot as plt

ModuleNotFoundError: No module named 'facenet_pytorch'
HoRn
  • 1,458
  • 5
  • 20
  • 25
Faizkh
  • 11
  • 2

0 Answers0