mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 11:35:21 +00:00
Update path handling: fixes
This commit is contained in:
parent
0bb94a1a11
commit
d4a544f012
@ -70,7 +70,7 @@ def load_model(
|
||||
output = os.path.join(home, ".deepface/weights/age_model_weights.h5")
|
||||
|
||||
if not os.path.isfile(output):
|
||||
logger.info("age_model_weights.h5 will be downloaded...")
|
||||
logger.info(f"{os.path.basename(output)} will be downloaded...")
|
||||
gdown.download(url, output, quiet=False)
|
||||
|
||||
age_model.load_weights(output)
|
||||
|
@ -100,7 +100,7 @@ def load_model(
|
||||
output = os.path.join(home, ".deepface/weights/facial_expression_model_weights.h5")
|
||||
|
||||
if not os.path.isfile(output):
|
||||
logger.info("Facial_expression_model_weights.h5 will be downloaded...")
|
||||
logger.info(f"{os.path.basename(output)} will be downloaded...")
|
||||
gdown.download(url, output, quiet=False)
|
||||
|
||||
model.load_weights(output)
|
||||
|
@ -77,7 +77,7 @@ def load_model(
|
||||
output = os.path.join(home, ".deepface/weights/gender_model_weights.h5")
|
||||
|
||||
if not os.path.isfile(output):
|
||||
logger.info("gender_model_weights.h5 will be downloaded...")
|
||||
logger.info(f"{os.path.basename(output)} will be downloaded...")
|
||||
gdown.download(url, output, quiet=False)
|
||||
|
||||
gender_model.load_weights(output)
|
||||
|
@ -74,7 +74,7 @@ def load_model(
|
||||
output = os.path.join(home, ".deepface/weights/race_model_single_batch.h5")
|
||||
|
||||
if not os.path.isfile(output):
|
||||
logger.info("race_model_single_batch.h5 will be downloaded...")
|
||||
logger.info(f"{os.path.basename(output)} will be downloaded...")
|
||||
gdown.download(url, output, quiet=False)
|
||||
|
||||
race_model.load_weights(output)
|
||||
|
@ -73,7 +73,7 @@ class DlibResNet:
|
||||
# download pre-trained model if it does not exist
|
||||
if not os.path.isfile(weight_file):
|
||||
logger.info(f"{filename} is going to be downloaded")
|
||||
url = f"http://dlib.net/files/{filename + 'bz2'}"
|
||||
url = f"http://dlib.net/files/{filename + '.bz2'}"
|
||||
output = weight_file + ".bz2"
|
||||
gdown.download(url, output, quiet=False)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user