Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get it working now days - solved #15

Open
zoldaten opened this issue May 3, 2023 · 0 comments
Open

how to get it working now days - solved #15

zoldaten opened this issue May 3, 2023 · 0 comments

Comments

@zoldaten
Copy link

zoldaten commented May 3, 2023

thanks for the code. spent the time to get it working with latest tf and keras.
here`s short memo to do:

  1. install dlib
wget http://dlib.net/files/dlib-19.9.tar.bz2
tar xvf dlib-19.9.tar.bz2
cd dlib-19.9/
mkdir build
cd build
cmake ..
cmake --build . --config Release
sudo make install
sudo ldconfig
cd ..
pkg-config --libs --cflags dlib-1
  1. install converter from https://github.com/ksachdeva/dlib-to-tf-keras-converter/
cd xml_generator
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release

and convert:
./bin/xml_generator
3. fix https://github.com/ksachdeva/dlib-to-tf-keras-converter/blob/master/converter/tensorflow.py

#import tensorflow as tf
#from tensorflow.keras import backend as K
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
from tensorflow.compat.v1.keras import backend as K

and final conversion:
python main.py --xml-weights xml_generator/build/dlib_face_recognition_resnet_model_v1.xml

success!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant