Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.bio.face
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.bio.face
Commits
5612c3af
Commit
5612c3af
authored
Dec 05, 2020
by
Tiago de Freitas Pereira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[nosetests] Minor fixes in the tests
parent
39ab48c0
Pipeline
#46348
passed with stage
in 41 minutes and 39 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
17 deletions
+28
-17
MANIFEST.in
MANIFEST.in
+1
-1
bob/bio/face/database/meds.py
bob/bio/face/database/meds.py
+3
-1
bob/bio/face/test/test_embeddings.py
bob/bio/face/test/test_embeddings.py
+1
-1
bob/bio/face/test/test_scripts.py
bob/bio/face/test/test_scripts.py
+23
-14
No files found.
MANIFEST.in
View file @
5612c3af
include README.rst bootstrap-buildout.py buildout.cfg develop.cfg LICENSE version.txt requirements.txt
recursive-include doc *.py *.rst
recursive-include bob/bio/face/test/data *.hdf5 *.jpg *.pos *.png *.json
recursive-include bob/bio/face/test/data *.hdf5 *.jpg *.pos *.png *.json
*.tar.gz
bob/bio/face/database/meds.py
View file @
5612c3af
...
...
@@ -60,7 +60,9 @@ class MEDSDatabase(CSVDatasetDevEvalZTNorm):
csv_to_sample_loader
=
CSVToSampleLoader
(
data_loader
=
bob
.
io
.
base
.
load
,
metadata_loader
=
eyes_annotations_loader
,
dataset_original_directory
=
rc
[
"bob.db.meds.directory"
],
dataset_original_directory
=
rc
[
"bob.db.meds.directory"
]
if
rc
[
"bob.db.meds.directory"
]
else
""
,
extension
=
".jpg"
,
),
)
...
...
bob/bio/face/test/test_embeddings.py
View file @
5612c3af
...
...
@@ -40,7 +40,7 @@ def test_idiap_inceptionv2_msceleb_memory_demanding():
reference
=
bob
.
io
.
base
.
load
(
pkg_resources
.
resource_filename
(
"bob.bio.face.test"
,
"data/inception_resnet_v2_rgb.hdf5"
"bob.bio.face.test"
,
"data/inception_resnet_v2_
msceleb_
rgb.hdf5"
)
)
np
.
random
.
seed
(
10
)
...
...
bob/bio/face/test/test_scripts.py
View file @
5612c3af
...
...
@@ -4,36 +4,45 @@ import tempfile
import
shutil
import
os
def
test_display_annotations
():
from
bob.bio.face.script.display_face_annotations
import
display_face_annotations
try
:
tmp_dir
=
tempfile
.
mkdtemp
(
prefix
=
"bobtest_"
)
annotations_dir
=
pkg_resources
.
resource_filename
(
"bob.bio.face.test"
,
"data/annotations/"
"bob.bio.face.test"
,
"data/annotations/"
)
runner
=
CliRunner
()
result
=
runner
.
invoke
(
display_face_annotations
,
args
=
(
'--database'
,
'dummy'
,
'--groups'
,
'world'
,
'--groups'
,
'dev'
,
'--annotations-dir'
,
annotations_dir
,
'--output-dir'
,
tmp_dir
,
'--keep-all'
,
'--self-test'
,
)
"--database"
,
"dummy"
,
"--groups"
,
"train"
,
"--groups"
,
"dev"
,
"--annotations-dir"
,
annotations_dir
,
"--output-dir"
,
tmp_dir
,
"--keep-all"
,
"--self-test"
,
),
)
assertion_error_message
=
(
'Command exited with this output: `{}
\
'
\
n
'
'If the output is empty, you can run this script locally to see '
'what is wrong:
\
n
'
'$ bob bio display_face_annotations -vvv -d dummy -g world -g dev -a ./annotations/ -o /tmp/temp_annotated'
''
.
format
(
result
.
output
))
"Command exited with this output: `{}'
\
n
"
"If the output is empty, you can run this script locally to see "
"what is wrong:
\
n
"
"$ bob bio display-face-annotations -vvv -d dummy -g train -g dev -a ./annotations/ -o /tmp/temp_annotated"
""
.
format
(
result
.
output
)
)
assert
result
.
exit_code
==
0
,
assertion_error_message
# Checks if an annotated sample exists
sample_1_path
=
os
.
path
.
join
(
tmp_dir
,
"s1"
,
"1.png"
)
sample_1_path
=
os
.
path
.
join
(
tmp_dir
,
"s1"
,
"1.png"
)
assertion_error_message
=
"File '{}' not created."
.
format
(
sample_1_path
)
assert
os
.
path
.
isfile
(
sample_1_path
),
assertion_error_message
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment