Tag Archives: Face recognition learning notes

OSError: SavedModel file does not exist at: ./model/facenet_keras.h5

Today, when I imported the face recognition model built by keras into the Django framework to run, the system reported oseeeor, and the display file does not exist, but I can run it normally when I run the model alone. Finally, we get the following two solutions.

Solution

Method 1

This method is a problem encountered by others when I was looking for a solution, although it did not solve my problem:)
it may be that the environment of the framework was destroyed after the model was imported, and the file path was changed, which can be solved by re installing py

pip3 uninstall h5py
pip3 installl h5py

Method 2: path problem

It seems that this solution has not been mentioned, but it has solved my problem
although the relative path can be used to run the model alone, it should be changed to absolute path under Django. As for why, I’m not sure.