GithubHelp home page GithubHelp logo

Comments (6)

serengil avatar serengil commented on June 10, 2024 1

I will add this into the source code! Thank you.

from retinaface.

serengil avatar serengil commented on June 10, 2024

Need to downgrade tf to 2.15

from retinaface.

Dobiasd avatar Dobiasd commented on June 10, 2024

Thanks for the quick response. 👍

Yeah, retinaface works fine with TF 2.15. However, TF 2.15 requires Python 3.11, i.e., it blocks me from updating to Python 3.12.

Are you planning on implementing a fix regarding retinaface with TF 2.16, or should I look for a different solution?

from retinaface.

serengil avatar serengil commented on June 10, 2024

Not soon even if it is going to be done

from retinaface.

serengil avatar serengil commented on June 10, 2024

@Dobiasd

1- would you please install pip install tf-keras

2- then, would you please add the following line before importing deepface & retinaface

import os
os.environ["TF_USE_LEGACY_KERAS"]="1"

from retinaface.

Dobiasd avatar Dobiasd commented on June 10, 2024

It works, awesome! 🚀

Here is the Dockerfile to confirm this:

FROM python:3.12.2

# libGL is needed to avoid "ImportError: libGL.so.1" in OpenCV
# libglib2.0-0 is needed to avoid "ImportError: libgthread-2.0.so.0" in OpenCV
RUN apt-get update && apt-get install -y \
  libglib2.0-0 \
  libgl1-mesa-glx \
  && rm -rf /var/lib/apt/lists/*

RUN pip3 install tensorflow==2.16.1
RUN pip3 install tf-keras==2.16.0
RUN pip3 install retina-face==0.0.15

RUN wget https://raw.githubusercontent.com/serengil/retinaface/master/tests/dataset/img3.jpg -O img3.jpg
RUN python3 -c "import os; os.environ['TF_USE_LEGACY_KERAS']='1'; from retinaface import RetinaFace; RetinaFace.detect_faces('img3.jpg')"

Thanks a lot! 😃

from retinaface.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.