serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://www.youtube.com/watch?v=WnUVYQP4h44&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E&index=1
MIT License
10.85k stars 1.91k forks source link

[BUG]: <Exception while processing img1_path> #1266

Closed Abdivoitov-Shokhrukh closed 6 days ago

Abdivoitov-Shokhrukh commented 1 week ago

Before You Report a Bug, Please Confirm You Have Done The Following...

DeepFace's version

v0.0.92

Python version

3.12.3

Operating System

Windows 11

Dependencies

absl-py==2.1.0 astunparse==1.6.3 beautifulsoup4==4.12.3 blinker==1.8.2 certifi==2024.6.2 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 contourpy==1.2.1 cycler==0.12.1 deepface==0.0.92 filelock==3.15.4 fire==0.6.0 Flask==3.0.3 flatbuffers==24.3.25 fonttools==4.53.0 gast==0.5.5 gdown==5.2.0 google-pasta==0.2.0 grpcio==1.64.1 gunicorn==22.0.0 h5py==3.11.0 idna==3.7 itsdangerous==2.2.0 Jinja2==3.1.4 keras==3.4.0 kiwisolver==1.4.5 libclang==18.1.1 Markdown==3.6 markdown-it-py==3.0.0 MarkupSafe==2.1.5 matplotlib==3.9.0 mdurl==0.1.2 ml-dtypes==0.3.2 mtcnn==0.1.1 namex==0.0.8 numpy==1.26.4 opencv-python==4.10.0.84 opt-einsum==3.3.0 optree==0.11.0 packaging==24.1 pandas==2.2.2 pillow==10.3.0 protobuf==4.25.3 Pygments==2.18.0 pyparsing==3.1.2 PySocks==1.7.1 python-dateutil==2.9.0.post0 pytz==2024.1 requests==2.32.3 retina-face==0.0.17 rich==13.7.1 seaborn==0.13.2 setuptools==70.1.1 six==1.16.0 soupsieve==2.5 tensorboard==2.16.2 tensorboard-data-server==0.7.2 tensorflow==2.16.1 tensorflow-intel==2.16.1 termcolor==2.4.0 tf_keras==2.16.0 tqdm==4.66.4 typing_extensions==4.12.2 tzdata==2024.1 urllib3==2.2.2 Werkzeug==3.0.3 wheel==0.43.0 wrapt==1.16.0

Reproducible example

from deepface import DeepFace
models = [
    "VGG-Face",
    "Facenet",
    "OpenFace",
    "DeepFace",
    "DeepID",
    "ArcFace",
    "Dlib",
    "SFace",
    "GhostfaceNet"
]
img1_path = 'D:\Deep_Learning_Projects\DeepFace\test\Kit_Harington_1.jpeg'
img2_path = 'D:\\Deep_Learning_Projects\DeepFace\test\image_1.png'
result = DeepFace.verify(
    img1_path=img1_path,
    img2_path=img2_path,
    model_name=models[1],
)

Relevant Log Output

No response

Expected Result

No response

What happened instead?

i would have received tuple with result of verified and so on.

Additional Info

But I tried it on colab engine It worked

serengil commented 6 days ago

i cannot understand what is the problem from the issue

Abdivoitov-Shokhrukh commented 6 days ago

I issue that I encountered like this issue_1 When I use it on google colab it works. The issue here is that I can not pass a path of images to work with.

Abdivoitov-Shokhrukh commented 6 days ago

The code doesn't work on my local machine

serengil commented 6 days ago

Try using slash instead of backslash

Abdivoitov-Shokhrukh commented 6 days ago

I am sorry for so many questions. I got another issue. Can you also hepl with this? issue_2

serengil commented 6 days ago

Your tf installation is not okay

serengil commented 6 days ago

closing this because this is not a bug, an environmental issue

Abdivoitov-Shokhrukh commented 6 days ago

Can you provide step-by-step instruction for setting up environment? Thank you in advance for your help

On Thu, Jun 27, 2024 at 4:48 PM Sefik Ilkin Serengil < @.***> wrote:

closing this because this is not a bug, an environmental issue

— Reply to this email directly, view it on GitHub https://github.com/serengil/deepface/issues/1266#issuecomment-2194469366, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4UNHQOU3AGEMTWFADBNZ6LZJP32DAVCNFSM6AAAAABJ6H7MGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUGQ3DSMZWGY . You are receiving this because you authored the thread.Message ID: @.***>