Closed Terminazor closed 2 years ago
try this path: ~/.deepface/weights/
also you need to confirm that you copied the weight files not folder to here.
I checked the files again and the solution was to simply unzip VGGFace (and Dlib!) weights before building the docker image.
@Terminazor
How did you unzip weights before building docker image ?
Aren't they downloaded from internet in runtime ?
I'm using containerized gcp cloud run service... Same error....
@MertTanyur If you watch closely the logs when deepface downloads the models from internet, there is always a path written from where it gets the model. I just followed the links and downloaded the weights manually and saved it locally. In my usecase the user might not have internet so I had to download it beforehand!
The unzip had only to be done with VGGFace2 and dlib model (watch out: adapt the directory to your needs!):
unzip deepface_models/VGGFace2_DeepFace_weights_val-0.9034.h5.zip -d deepface_models/
bzip2 -dk deepface_models/dlib_face_recognition_resnet_model_v1.dat.bz2
Hello, I have a usecase where I have to recognize people from a livestream and I found your library and want to test it. I already have a good face-detection AI, so I'm only interested in the recognition part of deepface and use the DeepFace.find() function. I want to test all models: ["VGG-Face", "Facenet", "Facenet512", "OpenFace", "DeepFace", "DeepID", "ArcFace", "Dlib", "SFace"]
I have already downloaded all of the above models and saved them locally in a folder called deepface_models:
I also use Docker to save them where they seem to belong to:
COPY deepface_models/ /root/.deepface/weights/
My issue is now, that of all of the models only "DeepFace" (VGGFace2_Deepface) still gets downloaded externally (when DeepFace.find() gets called the first time with model="DeepFace") even though it is available in the "weights" folder. I just don't get it why all other models are loaded from the local folder, but DeepFace isn't.