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
4892e072
Commit
4892e072
authored
3 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Updated hash strategy. I was pretty stupid.
parent
497aa635
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!124
Resolve "IJBC database will fail on non-Idiap filesystems"
Pipeline
#51948
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/face/database/ijbc.py
+3
-4
3 additions, 4 deletions
bob/bio/face/database/ijbc.py
with
3 additions
and
4 deletions
bob/bio/face/database/ijbc.py
+
3
−
4
View file @
4892e072
...
...
@@ -5,21 +5,20 @@ from bob.extension import rc
import
os
import
bob.io.image
from
functools
import
partial
import
uuid
from
bob.pipelines.utils
import
hash_string
def
_make_sample_from_template_row
(
row
,
image_directory
):
# Appending this
hash
, so we can handle parallel writting done correctly
# Appending this
key
, so we can handle parallel writting done correctly
# paying the penalty of having duplicate files
hashstr
=
str
(
uuid
.
uuid4
()
)
key
=
os
.
path
.
splitext
(
row
[
"
FILENAME
"
])[
0
]
+
"
-
"
+
str
(
row
[
"
TEMPLATE_ID
"
]
)
return
DelayedSample
(
load
=
partial
(
bob
.
io
.
image
.
load
,
os
.
path
.
join
(
image_directory
,
row
[
"
FILENAME
"
])),
reference_id
=
str
(
row
[
"
TEMPLATE_ID
"
]),
subject_id
=
str
(
row
[
"
SUBJECT_ID
"
]),
key
=
os
.
path
.
splitext
(
row
[
"
FILENAME
"
])[
0
]
+
"
-
"
+
hashstr
,
key
=
key
,
gender
=
row
[
"
GENDER
"
],
indoor_outdoor
=
row
[
"
INDOOR_OUTDOOR
"
],
skintone
=
row
[
"
SKINTONE
"
],
...
...
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