Skip to content

Commit 0f89272

Browse files
authored
Merge pull request #1151 from serengil/feat-task-2803-facenet-documentation
docstrings updated
2 parents 329606f + c22152f commit 0f89272

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

deepface/basemodels/Facenet.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,14 @@ def scaling(x, scale):
9797
return x * scale
9898

9999

100-
def InceptionResNetV2(dimension: int = 128) -> Model:
100+
def InceptionResNetV1(dimension: int = 128) -> Model:
101101
"""
102-
InceptionResNetV2 model
102+
InceptionResNetV1 model heavily inspired from
103+
github.com/davidsandberg/facenet/blob/master/src/models/inception_resnet_v1.py
104+
As mentioned in Sandberg's repo's readme, pre-trained models are using Inception ResNet v1
105+
Besides training process is documented at
106+
sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/
107+
103108
Args:
104109
dimension (int): number of dimensions in the embedding layer
105110
Returns:
@@ -1685,7 +1690,7 @@ def load_facenet128d_model(
16851690
Returns:
16861691
model (Model)
16871692
"""
1688-
model = InceptionResNetV2()
1693+
model = InceptionResNetV1()
16891694

16901695
# -----------------------------------
16911696

@@ -1715,7 +1720,7 @@ def load_facenet512d_model(
17151720
model (Model)
17161721
"""
17171722

1718-
model = InceptionResNetV2(dimension=512)
1723+
model = InceptionResNetV1(dimension=512)
17191724

17201725
# -------------------------
17211726

0 commit comments

Comments
 (0)