When you load a model from Deepface for the first time, it downloads the model weights .h5 file in the home_folder/.deepface folder and loads them for use from there.
I want to store and fetch these weights in my project folder so that my code can run on any device without having to redownload them on every machine.
How do i execute this and is there an even better way to achieve this?
I tried to download the weights manually to my project folder but that didn't work.
If you set DEEPFACE_HOME
environment variable to the target folder, then deepface will use that folder for weights. If you don't have that env var, then it will use your home folder by default. Corresponding logic can be found here.