Skip to content
Snippets Groups Projects
Commit 120f1ec3 authored by Yannick DAYER's avatar Yannick DAYER
Browse files

Accelerate the replaymobile-img tests

parent 9ba8da7f
No related branches found
No related tags found
1 merge request!128Using sparse CSVDataset for replay-mobile
Pipeline #52229 canceled
...@@ -276,10 +276,7 @@ def test_replaymobile(): ...@@ -276,10 +276,7 @@ def test_replaymobile():
database = bob.bio.base.load_resource( database = bob.bio.base.load_resource(
"replaymobile-img", "database", preferred_package="bob.bio.face" "replaymobile-img", "database", preferred_package="bob.bio.face"
) )
samples = database.all_samples(groups=("dev", "eval")) sample = database.probes()[0][0]
assert len(samples) == 1557600, len(samples)
sample = samples[0]
del samples
assert hasattr(sample, "annotations") assert hasattr(sample, "annotations")
assert "reye" in sample.annotations assert "reye" in sample.annotations
assert "leye" in sample.annotations assert "leye" in sample.annotations
...@@ -292,16 +289,16 @@ def test_replaymobile(): ...@@ -292,16 +289,16 @@ def test_replaymobile():
# Only if data is available # Only if data is available
if rc.get("bob.db.replaymobile.directory", None): if rc.get("bob.db.replaymobile.directory", None):
assert sample.annotations == { assert sample.annotations == {
"bottomright": [785, 395], "bottomright": [734, 407],
"topleft": [475, 167], "topleft": [436, 182],
"leye": [587, 336], "leye": [541, 350],
"reye": [588, 238], "reye": [540, 245],
"mouthleft": [705, 252], "mouthleft": [655, 254],
"mouthright": [706, 326], "mouthright": [657, 338],
"nose": [643, 295], "nose": [591, 299],
} }
assert sample.data.shape == (3, 1280, 720) assert sample.data.shape == (3, 1280, 720)
assert sample.data[0, 0, 0] == 87 assert sample.data[0, 0, 0] == 110
@pytest.mark.skipif( @pytest.mark.skipif(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment