Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.vein
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.vein
Commits
f8ac0cd4
Commit
f8ac0cd4
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[rlt] Set seed, fixes
#2
parent
c4eab707
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!13
Annotation experiments
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/vein/extractors/RepeatedLineTracking.py
+7
-1
7 additions, 1 deletion
bob/bio/vein/extractors/RepeatedLineTracking.py
with
7 additions
and
1 deletion
bob/bio/vein/extractors/RepeatedLineTracking.py
+
7
−
1
View file @
f8ac0cd4
...
@@ -25,8 +25,9 @@ class RepeatedLineTracking (Extractor):
...
@@ -25,8 +25,9 @@ class RepeatedLineTracking (Extractor):
self
,
self
,
iterations
=
3000
,
# Maximum number of iterations
iterations
=
3000
,
# Maximum number of iterations
r
=
1
,
# Distance between tracking point and cross section of the profile
r
=
1
,
# Distance between tracking point and cross section of the profile
profile_w
=
21
,
# Width of profile (Error: profile_w must be odd)
profile_w
=
21
,
# Width of profile (Error: profile_w must be odd)
rescale
=
True
,
rescale
=
True
,
seed
=
0
,
# Seed for the algorithm's random walk
):
):
# call base class constructor
# call base class constructor
...
@@ -36,6 +37,7 @@ class RepeatedLineTracking (Extractor):
...
@@ -36,6 +37,7 @@ class RepeatedLineTracking (Extractor):
r
=
r
,
r
=
r
,
profile_w
=
profile_w
,
profile_w
=
profile_w
,
rescale
=
rescale
,
rescale
=
rescale
,
seed
=
seed
,
)
)
# block parameters
# block parameters
...
@@ -43,12 +45,16 @@ class RepeatedLineTracking (Extractor):
...
@@ -43,12 +45,16 @@ class RepeatedLineTracking (Extractor):
self
.
r
=
r
self
.
r
=
r
self
.
profile_w
=
profile_w
self
.
profile_w
=
profile_w
self
.
rescale
=
rescale
self
.
rescale
=
rescale
self
.
seed
=
seed
def
repeated_line_tracking
(
self
,
finger_image
,
mask
):
def
repeated_line_tracking
(
self
,
finger_image
,
mask
):
"""
Computes and returns the MiuraMax features for the given input
"""
Computes and returns the MiuraMax features for the given input
fingervein image
"""
fingervein image
"""
# Sets the random seed before starting to process
numpy
.
random
.
seed
(
self
.
seed
)
#Convert image to uint8
#Convert image to uint8
if
finger_image
.
dtype
!=
numpy
.
uint8
:
if
finger_image
.
dtype
!=
numpy
.
uint8
:
finger_image
=
bob
.
core
.
convert
(
finger_image
,
numpy
.
uint8
,(
0
,
255
),(
0
,
1
))
finger_image
=
bob
.
core
.
convert
(
finger_image
,
numpy
.
uint8
,(
0
,
255
),(
0
,
1
))
...
...
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