Skip to content

Commit

Permalink
linting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
serengil committed Oct 6, 2024
1 parent ee4f8e6 commit 6d71177
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions deepface/models/face_detection/YuNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

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"


Expand Down
17 changes: 9 additions & 8 deletions deepface/models/facial_recognition/Facenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@
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"
)

# --------------------------------

Expand Down Expand Up @@ -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

Expand All @@ -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
3 changes: 1 addition & 2 deletions deepface/models/facial_recognition/FbDeepFace.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@
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
Expand Down

0 comments on commit 6d71177

Please sign in to comment.