linting updates

This commit is contained in:
Sefik Ilkin Serengil 2024-10-06 10:18:58 +01:00
parent ee4f8e6f02
commit 6d71177ff2
3 changed files with 11 additions and 10 deletions

View File

@ -13,6 +13,7 @@ from deepface.commons.logger import Logger
logger = Logger()
# pylint:disable=line-too-long
WEIGHTS_URL = "https://github.com/opencv/opencv_zoo/raw/main/models/face_detection_yunet/face_detection_yunet_2023mar.onnx"

View File

@ -39,8 +39,13 @@ else:
from tensorflow.keras.layers import add
from tensorflow.keras import backend as K
FACENET128_WEIGHTS="https://github.com/serengil/deepface_models/releases/download/v1.0/facenet_weights.h5"
FACENET512_WEIGHTS="https://github.com/serengil/deepface_models/releases/download/v1.0/facenet512_weights.h5"
# pylint:disable=line-too-long
FACENET128_WEIGHTS = (
"https://github.com/serengil/deepface_models/releases/download/v1.0/facenet_weights.h5"
)
FACENET512_WEIGHTS = (
"https://github.com/serengil/deepface_models/releases/download/v1.0/facenet512_weights.h5"
)
# --------------------------------
@ -1671,9 +1676,7 @@ def load_facenet128d_model(
weight_file = weight_utils.download_weights_if_necessary(
file_name="facenet_weights.h5", source_url=url
)
model = weight_utils.load_model_weights(
model=model, weight_file=weight_file
)
model = weight_utils.load_model_weights(model=model, weight_file=weight_file)
return model
@ -1692,8 +1695,6 @@ def load_facenet512d_model(
weight_file = weight_utils.download_weights_if_necessary(
file_name="facenet512_weights.h5", source_url=url
)
model = weight_utils.load_model_weights(
model=model, weight_file=weight_file
)
model = weight_utils.load_model_weights(model=model, weight_file=weight_file)
return model

View File

@ -30,10 +30,9 @@ else:
Dropout,
)
# pylint: disable=line-too-long, too-few-public-methods
WEIGHTS_URL="https://github.com/swghosh/DeepFace/releases/download/weights-vggface2-2d-aligned/VGGFace2_DeepFace_weights_val-0.9034.h5.zip"
# -------------------------------------
# pylint: disable=line-too-long, too-few-public-methods
class DeepFaceClient(FacialRecognition):
"""
Fb's DeepFace model class