Updated mobilenet baseline

parent 7935dd97
Pipeline #51358 failed with stage
in 36 minutes and 43 seconds
......@@ -513,15 +513,15 @@ class MobileNetv2_MsCeleb_ArcFace_2021(TensorflowTransformer):
def __init__(self, memory_demanding=False):
urls = [
"https://www.idiap.ch/software/bob/data/bob/bob.bio.face/master/tf2/mobilenet-v2-msceleb-arcface-2021.tar.gz",
"http://www.idiap.ch/software/bob/data/bob/bob.bio.face/master/tf2/mobilenet-v2-msceleb-arcface-2021.tar.gz",
"https://www.idiap.ch/software/bob/data/bob/bob.bio.face/master/tf2/mobilenet-v2-msceleb-arcface-2021-e012cb66.tar.gz",
"http://www.idiap.ch/software/bob/data/bob/bob.bio.face/master/tf2/mobilenet-v2-msceleb-arcface-2021-e012cb66.tar.gz",
]
filename = get_file(
"mobilenet-v2-msceleb-arcface-2021.tar.gz",
"mobilenet-v2-msceleb-arcface-2021-e012cb66.tar.gz",
urls,
cache_subdir="data/tensorflow/mobilenet-v2-msceleb-arcface-2021",
file_hash="89da9399d36ac89a354b8e8beaed8647",
cache_subdir="data/tensorflow/mobilenet-v2-msceleb-arcface-2021-e012cb66",
file_hash="dd1399b86f01725c7b07b480b703e02a",
extract=True,
)
checkpoint_path = os.path.dirname(filename)
......@@ -532,14 +532,6 @@ class MobileNetv2_MsCeleb_ArcFace_2021(TensorflowTransformer):
memory_demanding=memory_demanding,
)
def inference(self, X):
if self.preprocessor is not None:
X = self.preprocessor(tf.cast(X, "float32"))
prelogits = self.model.predict_on_batch(X)[0]
embeddings = tf.math.l2_normalize(prelogits, axis=-1)
return embeddings
def facenet_template(embedding, annotation_type, fixed_positions=None):
"""
......
......@@ -158,6 +158,22 @@ def test_arcface_resnet50_vgg2_v1():
run_baseline("resnet50-vgg2-arcface-2021", target_scores=-0.0035127080413503986)
@pytest.mark.slow
@is_library_available("tensorflow")
def test_arcface_mobilenet_msceleb():
run_baseline(
"mobilenetv2-msceleb-arcface-2021", target_scores=-9.430960384781972e-05
)
@pytest.mark.slow
@is_library_available("tensorflow")
def test_arcface_resnet50_msceleb_20210521():
run_baseline(
"resnet50-msceleb-arcface-20210521", target_scores=-0.001238845659379595
)
def test_gabor_graph():
run_baseline("gabor_graph", target_scores=0.4385451147418939)
......@@ -201,4 +217,4 @@ def test_iresnet100():
@pytest.mark.slow
@is_library_available("cv2")
def test_vgg16_oxford():
run_baseline("vgg16-oxford", target_scores=-0.0003682451299356071)
run_baseline("vgg16-oxford", target_scores=-0.0019032474437553626)
......@@ -136,7 +136,7 @@ setup(
"resnet50-msceleb-arcface-2021 = bob.bio.face.config.baseline.resnet50_msceleb_arcface_2021:pipeline",
"resnet50-msceleb-arcface-20210521 = bob.bio.face.config.baseline.resnet50_msceleb_arcface_20210521:pipeline",
"resnet50-vgg2-arcface-2021 = bob.bio.face.config.baseline.resnet50_vgg2_arcface_2021:pipeline",
"mobilenetv2-msceleb-arcface-2021 = bob.bio.face.config.baseline.mobilenetv2_msceleb_arcface_2021",
"mobilenetv2-msceleb-arcface-2021 = bob.bio.face.config.baseline.mobilenetv2_msceleb_arcface_2021:pipeline",
"mxnet-tinyface = bob.bio.face.config.baseline.mxnet_tinyface:pipeline",
"afffe = bob.bio.face.config.baseline.afffe:pipeline",
"vgg16-oxford = bob.bio.face.config.baseline.vgg16_oxford:pipeline",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment