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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.face
Commits
5317f720
Commit
5317f720
authored
4 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Created a dummy baseline for test
parent
bd556dc2
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!64
Dask pipelines
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/bio/face/config/baseline/dummy.py
+50
-0
50 additions, 0 deletions
bob/bio/face/config/baseline/dummy.py
setup.py
+2
-0
2 additions, 0 deletions
setup.py
with
52 additions
and
0 deletions
bob/bio/face/config/baseline/dummy.py
0 → 100644
+
50
−
0
View file @
5317f720
from
bob.pipelines
import
wrap
from
sklearn.pipeline
import
make_pipeline
from
bob.bio.base.pipelines.vanilla_biometrics
import
(
Distance
,
VanillaBiometricsPipeline
,
)
from
bob.pipelines.transformers
import
SampleLinearize
if
"
database
"
in
locals
():
annotation_type
=
database
.
annotation_type
fixed_positions
=
database
.
fixed_positions
else
:
annotation_type
=
None
fixed_positions
=
None
import
bob.ip.color
from
sklearn.base
import
TransformerMixin
,
BaseEstimator
class
ToGray
(
TransformerMixin
,
BaseEstimator
):
def
transform
(
self
,
X
,
annotations
=
None
):
return
[
bob
.
ip
.
color
.
rgb_to_gray
(
data
)[
0
:
10
,
0
:
10
]
for
data
in
X
]
def
_more_tags
(
self
):
return
{
"
stateless
"
:
True
,
"
requires_fit
"
:
False
}
def
fit
(
self
,
X
,
y
=
None
):
return
self
def
load
(
annotation_type
,
fixed_positions
=
None
):
transform_extra_arguments
=
((
"
annotations
"
,
"
annotations
"
),)
transformer
=
make_pipeline
(
wrap
(
[
"
sample
"
],
ToGray
(),
transform_extra_arguments
=
transform_extra_arguments
,
),
SampleLinearize
(),
)
algorithm
=
Distance
()
return
VanillaBiometricsPipeline
(
transformer
,
algorithm
)
pipeline
=
load
(
annotation_type
,
fixed_positions
)
transformer
=
pipeline
.
transformer
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
0
View file @
5317f720
...
@@ -143,6 +143,7 @@ setup(
...
@@ -143,6 +143,7 @@ setup(
'
arcface_insight_tf = bob.bio.face.config.baseline.arcface_insight_tf:transformer
'
,
'
arcface_insight_tf = bob.bio.face.config.baseline.arcface_insight_tf:transformer
'
,
'
gabor_graph = bob.bio.face.config.baseline.gabor_graph:transformer
'
,
'
gabor_graph = bob.bio.face.config.baseline.gabor_graph:transformer
'
,
'
lgbphs = bob.bio.face.config.baseline.lgbphs:transformer
'
,
'
lgbphs = bob.bio.face.config.baseline.lgbphs:transformer
'
,
'
dummy = bob.bio.face.config.baseline.dummy:transformer
'
,
],
],
#baselines
#baselines
...
@@ -156,6 +157,7 @@ setup(
...
@@ -156,6 +157,7 @@ setup(
'
arcface_insight_tf = bob.bio.face.config.baseline.arcface_insight_tf:pipeline
'
,
'
arcface_insight_tf = bob.bio.face.config.baseline.arcface_insight_tf:pipeline
'
,
'
lgbphs = bob.bio.face.config.baseline.lgbphs:pipeline
'
,
'
lgbphs = bob.bio.face.config.baseline.lgbphs:pipeline
'
,
'
lda = bob.bio.face.config.baseline.lda:pipeline
'
,
'
lda = bob.bio.face.config.baseline.lda:pipeline
'
,
'
dummy = bob.bio.face.config.baseline.dummy:pipeline
'
,
],
],
...
...
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