serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://bit.ly/deepface-py
MIT License
14.89k stars 2.25k forks source link

What's wrong? Can't find the file DeepFace. #228

Closed Tenlercy closed 3 years ago

Tenlercy commented 3 years ago

hi, I am a fresher of python and Github. I can't see the 'database' file like what's showed in the tutorial video. Is there anything wrong with my system?


ImportError Traceback (most recent call last)

in ----> 1 from deepface import DeepFace /srv/conda/envs/notebook/lib/python3.6/site-packages/deepface/DeepFace.py in 13 import pickle 14 ---> 15 from deepface.basemodels import VGGFace, OpenFace, Facenet, FbDeepFace, DeepID, DlibWrapper, ArcFace, Boosting 16 from deepface.extendedmodels import Age, Gender, Race, Emotion 17 from deepface.commons import functions, realtime, distance as dst /srv/conda/envs/notebook/lib/python3.6/site-packages/deepface/basemodels/Boosting.py in 6 import numpy as np 7 import gdown ----> 8 from deepface.commons import functions, distance as dst 9 10 def loadModel(): /srv/conda/envs/notebook/lib/python3.6/site-packages/deepface/commons/functions.py in 2 import numpy as np 3 import pandas as pd ----> 4 import cv2 5 from pathlib import Path 6 import gdown /srv/conda/envs/notebook/lib/python3.6/site-packages/cv2/__init__.py in 3 import sys 4 ----> 5 from .cv2 import * 6 from .data import * 7 ImportError: libGL.so.1: cannot open shared object file: No such file or directory ![image](https://user-images.githubusercontent.com/83601451/116903683-50178c80-ac6f-11eb-9951-8ea6a1727707.png)
serengil commented 3 years ago

it seems that your opencv installation is not oke. you should fix it because opencv is a dependency of the deepface library.

Tenlercy commented 3 years ago

it seems that your opencv installation is not oke. you should fix it because opencv is a dependency of the deepface library.

Sincerely thanks for your help, serengil I have download opencv with anaconda. But now I met another trouble: Image data of dtype object cannot be converted to float. I have no idea about it. If it's a stupid idea, plz forgive me... Below is the screenshot.

image

AnkS4 commented 1 year ago

Hi,

I'm facing same issue with opencv.

I have tried with different versions of pip 'opencv' package. i.e. opencv-python 4.6.0.66, 4.7.0.68

deepface==0.0.75

Log: https://gist.github.com/AnkS4/c7a0397972d12f4c17a1d49fc781b397

Edit: Installing libev-dev, libev4 on ubuntu machine didn't resolve it.

Edit2: latest deepface also had problem.

Edit3: Working after installing: sudo apt install libgl1-mesa-glx