Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.face
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.face
Commits
c0983e3f
Commit
c0983e3f
authored
4 years ago
by
Yannick DAYER
Browse files
Options
Downloads
Patches
Plain Diff
Adapt to all_samples method of bob.bio.base db
parent
32394265
No related branches found
No related tags found
1 merge request
!80
Port display-face-annotations script
Pipeline
#46052
passed
4 years ago
Stage: build
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/bio/face/script/display_face_annotations.py
+2
-22
2 additions, 22 deletions
bob/bio/face/script/display_face_annotations.py
bob/bio/face/test/test_scripts.py
+2
-2
2 additions, 2 deletions
bob/bio/face/test/test_scripts.py
with
4 additions
and
24 deletions
bob/bio/face/script/display_face_annotations.py
+
2
−
22
View file @
c0983e3f
...
@@ -154,28 +154,8 @@ def display_face_annotations(
...
@@ -154,28 +154,8 @@ def display_face_annotations(
"""
"""
Plots annotations on the corresponding face picture.
Plots annotations on the corresponding face picture.
"""
"""
logger
.
debug
(
"
Retrieving background model samples from database.
"
)
logger
.
debug
(
"
Retrieving samples from database.
"
)
background_model_samples
=
database
.
background_model_samples
()
samples
=
database
.
all_samples
(
groups
)
logger
.
debug
(
"
Retrieving references and probes samples from database.
"
)
references_samplesets
=
[]
probes_samplesets
=
[]
for
group
in
groups
:
references_samplesets
.
extend
(
database
.
references
(
group
=
group
))
probes_samplesets
.
extend
(
database
.
probes
(
group
=
group
))
# Unravels all samples in one list (no SampleSets)
samples
=
background_model_samples
samples
.
extend
([
sample
for
r
in
references_samplesets
for
sample
in
r
.
samples
])
samples
.
extend
([
sample
for
p
in
probes_samplesets
for
sample
in
p
.
samples
])
logger
.
debug
(
f
"
{
len
(
samples
)
}
samples loaded from database.
"
)
logger
.
debug
(
f
"
{
len
(
samples
)
}
samples loaded from database.
"
)
...
...
This diff is collapsed.
Click to expand it.
bob/bio/face/test/test_scripts.py
+
2
−
2
View file @
c0983e3f
...
@@ -18,7 +18,7 @@ def test_display_annotations():
...
@@ -18,7 +18,7 @@ def test_display_annotations():
display_face_annotations
,
display_face_annotations
,
args
=
(
args
=
(
'
--database
'
,
'
dummy
'
,
'
--database
'
,
'
dummy
'
,
'
--groups
'
,
'
dev
'
,
'
--groups
'
,
'
world
'
,
'
--groups
'
,
'
dev
'
,
'
--annotations-dir
'
,
annotations_dir
,
'
--annotations-dir
'
,
annotations_dir
,
'
--output-dir
'
,
tmp_dir
,
'
--keep-all
'
,
'
--output-dir
'
,
tmp_dir
,
'
--keep-all
'
,
'
--self-test
'
,
'
--self-test
'
,
...
@@ -28,7 +28,7 @@ def test_display_annotations():
...
@@ -28,7 +28,7 @@ def test_display_annotations():
'
Command exited with this output: `{}
\'
\n
'
'
Command exited with this output: `{}
\'
\n
'
'
If the output is empty, you can run this script locally to see
'
'
If the output is empty, you can run this script locally to see
'
'
what is wrong:
\n
'
'
what is wrong:
\n
'
'
$ bob bio display_face_annotations -vvv -d dummy -g dev -a ./annotations/ -o /tmp/temp_annotated
'
'
$ bob bio display_face_annotations -vvv -d dummy -g
world -g
dev -a ./annotations/ -o /tmp/temp_annotated
'
''
.
format
(
result
.
output
))
''
.
format
(
result
.
output
))
assert
result
.
exit_code
==
0
,
assertion_error_message
assert
result
.
exit_code
==
0
,
assertion_error_message
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment