import error of ArcFace using python in jupyternotebbok

804 views Asked by At

When I am importing the package ArcFace.

from arcface.metrics import ArcFace

It is showning the import error. Like this,

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-4-fe2759a1802e> in <module>
     15 from keras.layers.convolutional import MaxPooling2D
     16 from keras.layers.core import Activation, Flatten, Dropout, Dense
---> 17 from arcface.metrics import ArcFace
     18 from keras.layers import Input
     19 from keras import backend as K

ModuleNotFoundError: No module named 'arcface'

I have searched for importing it for Anaconda and pip too. I have not found any results. Please help me to solve this.

2

There are 2 answers

0
furas On BEST ANSWER

This is part of project keras-arcface but it is not part of keras so you have to install/copy it separatelly.

If you put it in your project in subfolder arcface then it should work.

0
sefiks On

You can run ArcFace within deepface. The framework is mainly based on keras and tensorflow. It handles model building and downloading pre-trained weights in the background. Besides, it covers face recognition pipeline stages includign detect, align.

#!pip install deepface
from deepface import DeepFace
resp = DeepFace.verify("img1.jpg", "img2.jpg", model_name = 'ArcFace')