Commit ac1753ba authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge branch 'fix-naming-tests' into 'dask-pipelines'

Fix transformers naming in tests

See merge request !72
parents 176353c2 73eabc81
Pipeline #44596 failed with stage
in 46 minutes
...@@ -13,3 +13,4 @@ sphinx ...@@ -13,3 +13,4 @@ sphinx
dist dist
record.txt record.txt
build/ build/
bob/bio/face/embeddings/data
...@@ -57,12 +57,12 @@ def get_fake_samples_for_training(): ...@@ -57,12 +57,12 @@ def get_fake_samples_for_training():
] ]
def run_baseline(baseline, samples_for_training=[]): def run_baseline(baseline, samples_for_training=[]):
biometric_references = get_fake_sample_set(purpose="bioref") biometric_references = get_fake_sample_set(purpose="bioref")
probes = get_fake_sample_set(purpose="probe") probes = get_fake_sample_set(purpose="probe")
# Regular pipeline # Regular pipeline
pipeline = load_resource(baseline, "pipeline") pipeline = load_resource(baseline, "pipeline")
scores = pipeline(samples_for_training, biometric_references, probes) scores = pipeline(samples_for_training, biometric_references, probes)
assert len(scores) == 1 assert len(scores) == 1
assert len(scores[0]) == 1 assert len(scores[0]) == 1
...@@ -72,7 +72,7 @@ def run_baseline(baseline, samples_for_training=[]): ...@@ -72,7 +72,7 @@ def run_baseline(baseline, samples_for_training=[]):
checkpoint_pipeline = checkpoint_vanilla_biometrics( checkpoint_pipeline = checkpoint_vanilla_biometrics(
copy.deepcopy(pipeline), base_dir=d copy.deepcopy(pipeline), base_dir=d
) )
checkpoint_scores = checkpoint_pipeline([], biometric_references, probes) checkpoint_scores = checkpoint_pipeline([], biometric_references, probes)
assert len(checkpoint_scores) == 1 assert len(checkpoint_scores) == 1
assert len(checkpoint_scores[0]) == 1 assert len(checkpoint_scores[0]) == 1
...@@ -104,23 +104,23 @@ def run_baseline(baseline, samples_for_training=[]): ...@@ -104,23 +104,23 @@ def run_baseline(baseline, samples_for_training=[]):
def test_facenet_baseline(): def test_facenet_baseline():
run_baseline("facenet_sanderberg") run_baseline("facenet-sanderberg")
def test_inception_resnetv2_msceleb(): def test_inception_resnetv2_msceleb():
run_baseline("inception_resnetv2_msceleb") run_baseline("inception-resnetv2-msceleb")
def test_inception_resnetv2_casiawebface(): def test_inception_resnetv2_casiawebface():
run_baseline("inception_resnetv2_casiawebface") run_baseline("inception-resnetv2-casiawebface")
def test_inception_resnetv1_msceleb(): def test_inception_resnetv1_msceleb():
run_baseline("inception_resnetv1_msceleb") run_baseline("inception-resnetv1-msceleb")
def test_inception_resnetv1_casiawebface(): def test_inception_resnetv1_casiawebface():
run_baseline("inception_resnetv1_casiawebface") run_baseline("inception-resnetv1-casiawebface")
def test_arcface_insight_tf(): def test_arcface_insight_tf():
...@@ -128,7 +128,7 @@ def test_arcface_insight_tf(): ...@@ -128,7 +128,7 @@ def test_arcface_insight_tf():
tf.compat.v1.reset_default_graph() tf.compat.v1.reset_default_graph()
run_baseline("arcface_insight_tf") run_baseline("arcface-insight-tf")
def test_gabor_graph(): def test_gabor_graph():
......
...@@ -11,8 +11,8 @@ def get_fake_sample(face_size=(160, 160), eyes={"leye": (46, 107), "reye": (46, ...@@ -11,8 +11,8 @@ def get_fake_sample(face_size=(160, 160), eyes={"leye": (46, 107), "reye": (46,
return Sample(data, key="1", annotations=annotations) return Sample(data, key="1", annotations=annotations)
def test_facenet(): def test_facenet():
transformer = load_resource("facenet_sanderberg", "transformer") transformer = load_resource("facenet-sanderberg", "transformer")
fake_sample = get_fake_sample() fake_sample = get_fake_sample()
...@@ -22,7 +22,7 @@ def test_facenet(): ...@@ -22,7 +22,7 @@ def test_facenet():
def test_inception_resnetv2_msceleb(): def test_inception_resnetv2_msceleb():
transformer = load_resource("inception_resnetv2_msceleb", "transformer") transformer = load_resource("inception-resnetv2-msceleb", "transformer")
fake_sample = get_fake_sample() fake_sample = get_fake_sample()
...@@ -32,7 +32,7 @@ def test_inception_resnetv2_msceleb(): ...@@ -32,7 +32,7 @@ def test_inception_resnetv2_msceleb():
def test_inception_resnetv2_casiawebface(): def test_inception_resnetv2_casiawebface():
transformer = load_resource("inception_resnetv2_casiawebface", "transformer") transformer = load_resource("inception-resnetv2-casiawebface", "transformer")
fake_sample = get_fake_sample() fake_sample = get_fake_sample()
...@@ -42,7 +42,7 @@ def test_inception_resnetv2_casiawebface(): ...@@ -42,7 +42,7 @@ def test_inception_resnetv2_casiawebface():
def test_inception_resnetv1_msceleb(): def test_inception_resnetv1_msceleb():
transformer = load_resource("inception_resnetv1_msceleb", "transformer") transformer = load_resource("inception-resnetv1-msceleb", "transformer")
fake_sample = get_fake_sample() fake_sample = get_fake_sample()
...@@ -52,7 +52,7 @@ def test_inception_resnetv1_msceleb(): ...@@ -52,7 +52,7 @@ def test_inception_resnetv1_msceleb():
def test_inception_resnetv1_casiawebface(): def test_inception_resnetv1_casiawebface():
transformer = load_resource("inception_resnetv1_casiawebface", "transformer") transformer = load_resource("inception-resnetv1-casiawebface", "transformer")
fake_sample = get_fake_sample() fake_sample = get_fake_sample()
...@@ -64,7 +64,7 @@ def test_inception_resnetv1_casiawebface(): ...@@ -64,7 +64,7 @@ def test_inception_resnetv1_casiawebface():
def test_arcface_insight_tf(): def test_arcface_insight_tf():
import tensorflow as tf import tensorflow as tf
tf.compat.v1.reset_default_graph() tf.compat.v1.reset_default_graph()
transformer = load_resource("arcface_insight_tf", "transformer") transformer = load_resource("arcface-insight-tf", "transformer")
fake_sample = get_fake_sample() fake_sample = get_fake_sample()
...@@ -74,7 +74,7 @@ def test_arcface_insight_tf(): ...@@ -74,7 +74,7 @@ def test_arcface_insight_tf():
def test_gabor_graph(): def test_gabor_graph():
transformer = load_resource("gabor_graph", "transformer") transformer = load_resource("gabor-graph", "transformer")
fake_sample = get_fake_sample() fake_sample = get_fake_sample()
transformed_sample = transformer.transform([fake_sample])[0] transformed_sample = transformer.transform([fake_sample])[0]
......
Supports Markdown
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