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
Merge requests
!131
Add annotator support
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add annotator support
annotator
into
master
Overview
48
Commits
17
Pipelines
12
Changes
17
Merged
Amir MOHAMMADI
requested to merge
annotator
into
master
7 years ago
Overview
16
Commits
17
Pipelines
12
Changes
17
Expand
Also adds a
bob bio ...
root command.
Depends on
bob.extension!67 (merged)
Edited
7 years ago
by
Amir MOHAMMADI
0
0
Merge request reports
Compare
master
version 10
d6d9b0c9
7 years ago
version 9
c56523ce
7 years ago
version 8
829a329b
7 years ago
version 7
84ab9119
7 years ago
version 6
28ef978a
7 years ago
version 5
bac9a003
7 years ago
version 4
828ecb36
7 years ago
version 3
cfb5e5c2
7 years ago
version 2
55b40a70
7 years ago
version 1
b58bbc10
7 years ago
master (base)
and
latest version
latest version
195503f2
17 commits,
7 years ago
version 10
d6d9b0c9
16 commits,
7 years ago
version 9
c56523ce
15 commits,
7 years ago
version 8
829a329b
14 commits,
7 years ago
version 7
84ab9119
13 commits,
7 years ago
version 6
28ef978a
13 commits,
7 years ago
version 5
bac9a003
11 commits,
7 years ago
version 4
828ecb36
10 commits,
7 years ago
version 3
cfb5e5c2
9 commits,
7 years ago
version 2
55b40a70
6 commits,
7 years ago
version 1
b58bbc10
8 commits,
7 years ago
17 files
+
360
−
13
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
17
Search (e.g. *.vue) (Ctrl+P)
bob/bio/base/annotator/Annotator.py
0 → 100644
+
40
−
0
Options
from
bob.bio.base
import
read_original_data
as
base_read
class
Annotator
(
object
):
"""
Annotator class for all annotators. This class is meant to be used in
conjunction with the bob bio annotate script.
Attributes
----------
read_original_data : callable
A function that loads the samples. The syntax is like
:any:`bob.bio.base.read_original_data`.
"""
def
__init__
(
self
,
read_original_data
=
None
,
**
kwargs
):
super
(
Annotator
,
self
).
__init__
(
**
kwargs
)
self
.
read_original_data
=
read_original_data
or
base_read
def
annotate
(
self
,
sample
,
**
kwargs
):
"""
Annotates a sample and returns annotations in a dictionary.
Parameters
----------
sample : numpy.ndarray
The sample that is being annotated.
**kwargs
The extra arguments that may be passed.
Returns
-------
dict
A dictionary containing the annotations of the biometric sample. If
the program fails to annotate the sample, it should return an empty
dictionary.
"""
raise
NotImplementedError
# Alias call to annotate
def
__call__
(
self
,
sample
,
**
kwargs
):
return
self
.
annotate
(
sample
,
**
kwargs
)
Loading