Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.base
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.base
Commits
a2c99938
There was a problem fetching the pipeline summary.
Commit
a2c99938
authored
6 years ago
by
Theophile GENTILHOMME
Browse files
Options
Downloads
Patches
Plain Diff
Add linestyle option
parent
4585d6cf
No related branches found
No related tags found
1 merge request
!146
Add 4-5-col files related functionalities and add click commands
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/bio/base/script/commands.py
+7
-0
7 additions, 0 deletions
bob/bio/base/script/commands.py
bob/bio/base/script/figure.py
+7
-7
7 additions, 7 deletions
bob/bio/base/script/figure.py
bob/bio/base/test/test_commands.py
+7
-7
7 additions, 7 deletions
bob/bio/base/test/test_commands.py
with
21 additions
and
14 deletions
bob/bio/base/script/commands.py
+
7
−
0
View file @
a2c99938
...
@@ -80,7 +80,9 @@ def metrics(ctx, scores, evaluation, **kargs):
...
@@ -80,7 +80,9 @@ def metrics(ctx, scores, evaluation, **kargs):
@common_options.y_label_option
()
@common_options.y_label_option
()
@common_options.const_layout_option
()
@common_options.const_layout_option
()
@common_options.style_option
()
@common_options.style_option
()
@common_options.linestyles_option
()
@common_options.figsize_option
()
@common_options.figsize_option
()
@common_options.min_far_option
()
@verbosity_option
()
@verbosity_option
()
@click.pass_context
@click.pass_context
def
roc
(
ctx
,
scores
,
evaluation
,
**
kargs
):
def
roc
(
ctx
,
scores
,
evaluation
,
**
kargs
):
...
@@ -120,8 +122,10 @@ def roc(ctx, scores, evaluation, **kargs):
...
@@ -120,8 +122,10 @@ def roc(ctx, scores, evaluation, **kargs):
@common_options.points_curve_option
()
@common_options.points_curve_option
()
@common_options.const_layout_option
()
@common_options.const_layout_option
()
@common_options.style_option
()
@common_options.style_option
()
@common_options.linestyles_option
()
@common_options.figsize_option
()
@common_options.figsize_option
()
@common_options.lines_at_option
()
@common_options.lines_at_option
()
@common_options.min_far_option
()
@verbosity_option
()
@verbosity_option
()
@click.pass_context
@click.pass_context
def
det
(
ctx
,
scores
,
evaluation
,
**
kargs
):
def
det
(
ctx
,
scores
,
evaluation
,
**
kargs
):
...
@@ -154,6 +158,7 @@ def det(ctx, scores, evaluation, **kargs):
...
@@ -154,6 +158,7 @@ def det(ctx, scores, evaluation, **kargs):
@common_options.points_curve_option
()
@common_options.points_curve_option
()
@common_options.const_layout_option
()
@common_options.const_layout_option
()
@common_options.style_option
()
@common_options.style_option
()
@common_options.linestyles_option
()
@common_options.figsize_option
()
@common_options.figsize_option
()
@verbosity_option
()
@verbosity_option
()
@click.pass_context
@click.pass_context
...
@@ -187,6 +192,7 @@ def epc(ctx, scores, **kargs):
...
@@ -187,6 +192,7 @@ def epc(ctx, scores, **kargs):
@common_options.x_rotation_option
()
@common_options.x_rotation_option
()
@common_options.const_layout_option
()
@common_options.const_layout_option
()
@common_options.style_option
()
@common_options.style_option
()
@common_options.linestyles_option
()
@common_options.figsize_option
()
@common_options.figsize_option
()
@verbosity_option
()
@verbosity_option
()
@click.pass_context
@click.pass_context
...
@@ -228,6 +234,7 @@ def cmc(ctx, scores, evaluation, **kargs):
...
@@ -228,6 +234,7 @@ def cmc(ctx, scores, evaluation, **kargs):
@rank_option
()
@rank_option
()
@common_options.const_layout_option
()
@common_options.const_layout_option
()
@common_options.style_option
()
@common_options.style_option
()
@common_options.linestyles_option
()
@common_options.figsize_option
()
@common_options.figsize_option
()
@verbosity_option
()
@verbosity_option
()
@click.pass_context
@click.pass_context
...
...
This diff is collapsed.
Click to expand it.
bob/bio/base/script/figure.py
+
7
−
7
View file @
a2c99938
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
click
import
click
import
matplotlib.pyplot
as
mpl
import
matplotlib.pyplot
as
mpl
import
bob.measure.script.figure
as
measure_figure
import
bob.measure.script.figure
as
measure_figure
import
bob.measure
import
bob.measure
from
bob.measure
import
plot
from
bob.measure
import
plot
from
tabulate
import
tabulate
from
tabulate
import
tabulate
...
@@ -39,7 +39,7 @@ class Cmc(measure_figure.PlotBase):
...
@@ -39,7 +39,7 @@ class Cmc(measure_figure.PlotBase):
:py:func:`bob.measure.plot.cmc`
'''
:py:func:`bob.measure.plot.cmc`
'''
mpl
.
figure
(
1
)
mpl
.
figure
(
1
)
if
self
.
_eval
:
if
self
.
_eval
:
linestyle
=
'
-
'
if
not
self
.
_split
else
measure_figure
.
LINESTYLES
[
idx
%
14
]
linestyle
=
'
-
'
if
not
self
.
_split
else
self
.
_linestyles
[
idx
]
rank
=
plot
.
cmc
(
rank
=
plot
.
cmc
(
input_scores
[
0
],
logx
=
self
.
_semilogx
,
input_scores
[
0
],
logx
=
self
.
_semilogx
,
color
=
self
.
_colors
[
idx
],
linestyle
=
linestyle
,
color
=
self
.
_colors
[
idx
],
linestyle
=
linestyle
,
...
@@ -49,7 +49,7 @@ class Cmc(measure_figure.PlotBase):
...
@@ -49,7 +49,7 @@ class Cmc(measure_figure.PlotBase):
linestyle
=
'
--
'
linestyle
=
'
--
'
if
self
.
_split
:
if
self
.
_split
:
mpl
.
figure
(
2
)
mpl
.
figure
(
2
)
linestyle
=
measure_figure
.
LINESTYLES
[
idx
%
14
]
linestyle
=
self
.
_linestyles
[
idx
]
rank
=
plot
.
cmc
(
rank
=
plot
.
cmc
(
input_scores
[
1
],
logx
=
self
.
_semilogx
,
input_scores
[
1
],
logx
=
self
.
_semilogx
,
...
@@ -60,7 +60,7 @@ class Cmc(measure_figure.PlotBase):
...
@@ -60,7 +60,7 @@ class Cmc(measure_figure.PlotBase):
else
:
else
:
rank
=
plot
.
cmc
(
rank
=
plot
.
cmc
(
input_scores
[
0
],
logx
=
self
.
_semilogx
,
input_scores
[
0
],
logx
=
self
.
_semilogx
,
color
=
self
.
_colors
[
idx
],
linestyle
=
measure_figure
.
LINESTYLES
[
idx
%
14
],
color
=
self
.
_colors
[
idx
],
linestyle
=
self
.
_linestyles
[
idx
],
label
=
self
.
_label
(
'
development
'
,
input_names
[
0
],
idx
)
label
=
self
.
_label
(
'
development
'
,
input_names
[
0
],
idx
)
)
)
self
.
_max_R
=
max
(
rank
,
self
.
_max_R
)
self
.
_max_R
=
max
(
rank
,
self
.
_max_R
)
...
@@ -81,7 +81,7 @@ class Dir(measure_figure.PlotBase):
...
@@ -81,7 +81,7 @@ class Dir(measure_figure.PlotBase):
:py:func:`bob.measure.plot.detection_identification_curve`
'''
:py:func:`bob.measure.plot.detection_identification_curve`
'''
mpl
.
figure
(
1
)
mpl
.
figure
(
1
)
if
self
.
_eval
:
if
self
.
_eval
:
linestyle
=
'
-
'
if
not
self
.
_split
else
measure_figure
.
LINESTYLES
[
idx
%
14
]
linestyle
=
'
-
'
if
not
self
.
_split
else
self
.
_linestyles
[
idx
]
plot
.
detection_identification_curve
(
plot
.
detection_identification_curve
(
input_scores
[
0
],
rank
=
self
.
_rank
,
logx
=
self
.
_semilogx
,
input_scores
[
0
],
rank
=
self
.
_rank
,
logx
=
self
.
_semilogx
,
color
=
self
.
_colors
[
idx
],
linestyle
=
linestyle
,
color
=
self
.
_colors
[
idx
],
linestyle
=
linestyle
,
...
@@ -90,7 +90,7 @@ class Dir(measure_figure.PlotBase):
...
@@ -90,7 +90,7 @@ class Dir(measure_figure.PlotBase):
linestyle
=
'
--
'
linestyle
=
'
--
'
if
self
.
_split
:
if
self
.
_split
:
mpl
.
figure
(
2
)
mpl
.
figure
(
2
)
linestyle
=
measure_figure
.
LINESTYLES
[
idx
%
14
]
linestyle
=
self
.
_linestyles
[
idx
]
plot
.
detection_identification_curve
(
plot
.
detection_identification_curve
(
input_scores
[
1
],
rank
=
self
.
_rank
,
logx
=
self
.
_semilogx
,
input_scores
[
1
],
rank
=
self
.
_rank
,
logx
=
self
.
_semilogx
,
...
@@ -100,7 +100,7 @@ class Dir(measure_figure.PlotBase):
...
@@ -100,7 +100,7 @@ class Dir(measure_figure.PlotBase):
else
:
else
:
plot
.
detection_identification_curve
(
plot
.
detection_identification_curve
(
input_scores
[
0
],
rank
=
self
.
_rank
,
logx
=
self
.
_semilogx
,
input_scores
[
0
],
rank
=
self
.
_rank
,
logx
=
self
.
_semilogx
,
color
=
self
.
_colors
[
idx
],
linestyle
=
measure_figure
.
LINESTYLES
[
idx
%
14
],
color
=
self
.
_colors
[
idx
],
linestyle
=
self
.
_linestyles
[
idx
],
label
=
self
.
_label
(
'
development
'
,
input_names
[
0
],
idx
)
label
=
self
.
_label
(
'
development
'
,
input_names
[
0
],
idx
)
)
)
...
...
This diff is collapsed.
Click to expand it.
bob/bio/base/test/test_commands.py
+
7
−
7
View file @
a2c99938
...
@@ -32,7 +32,7 @@ def test_metrics():
...
@@ -32,7 +32,7 @@ def test_metrics():
with
runner
.
isolated_filesystem
():
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
result
=
runner
.
invoke
(
commands
.
metrics
,
[
'
-l
'
,
'
tmp
'
,
'
-
ls
'
,
'
A,B
'
,
commands
.
metrics
,
[
'
-l
'
,
'
tmp
'
,
'
-
Z
'
,
'
A,B
'
,
dev1
,
test1
,
dev2
,
test2
]
dev1
,
test1
,
dev2
,
test2
]
)
)
assert
result
.
exit_code
==
0
,
(
result
.
exit_code
,
result
.
output
)
assert
result
.
exit_code
==
0
,
(
result
.
exit_code
,
result
.
output
)
...
@@ -104,7 +104,7 @@ def test_roc():
...
@@ -104,7 +104,7 @@ def test_roc():
'
data/test-5col.txt
'
)
'
data/test-5col.txt
'
)
with
runner
.
isolated_filesystem
():
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
commands
.
roc
,
[
'
--split
'
,
'
--output
'
,
result
=
runner
.
invoke
(
commands
.
roc
,
[
'
--split
'
,
'
--output
'
,
'
test.pdf
'
,
'
test.pdf
'
,
'
-S
'
,
dev1
,
test1
,
dev2
,
test2
])
dev1
,
test1
,
dev2
,
test2
])
if
result
.
output
:
if
result
.
output
:
click
.
echo
(
result
.
output
)
click
.
echo
(
result
.
output
)
...
@@ -124,7 +124,7 @@ def test_det():
...
@@ -124,7 +124,7 @@ def test_det():
'
data/dev-4col.txt
'
)
'
data/dev-4col.txt
'
)
runner
=
CliRunner
()
runner
=
CliRunner
()
with
runner
.
isolated_filesystem
():
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
commands
.
det
,
[
'
--no-evaluation
'
,
dev1
])
result
=
runner
.
invoke
(
commands
.
det
,
[
'
--no-evaluation
'
,
dev1
,
'
-S
'
])
if
result
.
output
:
if
result
.
output
:
click
.
echo
(
result
.
output
)
click
.
echo
(
result
.
output
)
assert
result
.
exit_code
==
0
,
(
result
.
exit_code
,
result
.
output
)
assert
result
.
exit_code
==
0
,
(
result
.
exit_code
,
result
.
output
)
...
@@ -166,7 +166,7 @@ def test_epc():
...
@@ -166,7 +166,7 @@ def test_epc():
'
data/test-5col.txt
'
)
'
data/test-5col.txt
'
)
with
runner
.
isolated_filesystem
():
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
commands
.
epc
,
[
'
--output
'
,
'
test.pdf
'
,
result
=
runner
.
invoke
(
commands
.
epc
,
[
'
--output
'
,
'
test.pdf
'
,
'
--legends
'
,
'
A,B
'
,
'
--legends
'
,
'
A,B
'
,
'
-S
'
,
dev1
,
test1
,
dev2
,
test2
])
dev1
,
test1
,
dev2
,
test2
])
if
result
.
output
:
if
result
.
output
:
click
.
echo
(
result
.
output
)
click
.
echo
(
result
.
output
)
...
@@ -199,7 +199,7 @@ def test_hist():
...
@@ -199,7 +199,7 @@ def test_hist():
with
runner
.
isolated_filesystem
():
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
commands
.
hist
,
[
'
--criterion
'
,
'
eer
'
,
'
--output
'
,
result
=
runner
.
invoke
(
commands
.
hist
,
[
'
--criterion
'
,
'
eer
'
,
'
--output
'
,
'
HISTO.pdf
'
,
'
-b
'
,
'
30
'
,
'
HISTO.pdf
'
,
'
-b
'
,
'
30
'
,
'
-
ls
'
,
'
A,B
'
,
dev1
,
test1
,
dev2
,
'
-
Z
'
,
'
A,B
'
,
dev1
,
test1
,
dev2
,
test2
])
test2
])
if
result
.
output
:
if
result
.
output
:
click
.
echo
(
result
.
output
)
click
.
echo
(
result
.
output
)
...
@@ -218,7 +218,7 @@ def test_cmc():
...
@@ -218,7 +218,7 @@ def test_cmc():
'
data/scores-cmc-4col.txt
'
)
'
data/scores-cmc-4col.txt
'
)
with
runner
.
isolated_filesystem
():
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
commands
.
cmc
,
[
'
--output
'
,
'
test.pdf
'
,
result
=
runner
.
invoke
(
commands
.
cmc
,
[
'
--output
'
,
'
test.pdf
'
,
'
--legends
'
,
'
A,B
'
,
'
--legends
'
,
'
A,B
'
,
'
-S
'
,
dev1
,
test1
,
dev1
,
test1
])
dev1
,
test1
,
dev1
,
test1
])
if
result
.
output
:
if
result
.
output
:
click
.
echo
(
result
.
output
)
click
.
echo
(
result
.
output
)
...
@@ -237,7 +237,7 @@ def test_dir():
...
@@ -237,7 +237,7 @@ def test_dir():
'
data/scores-nonorm-openset-dev
'
)
'
data/scores-nonorm-openset-dev
'
)
with
runner
.
isolated_filesystem
():
with
runner
.
isolated_filesystem
():
result
=
runner
.
invoke
(
commands
.
dir
,
[
'
--output
'
,
'
test.pdf
'
,
result
=
runner
.
invoke
(
commands
.
dir
,
[
'
--output
'
,
'
test.pdf
'
,
'
--legends
'
,
'
A,B
'
,
'
--legends
'
,
'
A,B
'
,
'
-S
'
,
dev1
,
test1
,
dev1
,
test1
])
dev1
,
test1
,
dev1
,
test1
])
if
result
.
output
:
if
result
.
output
:
click
.
echo
(
result
.
output
)
click
.
echo
(
result
.
output
)
...
...
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