Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.face
Commits
4892e072
Commit
4892e072
authored
Jun 30, 2021
by
Tiago de Freitas Pereira
Browse files
Updated hash strategy. I was pretty stupid.
parent
497aa635
Pipeline
#51948
passed with stage
in 312 minutes and 12 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
bob/bio/face/database/ijbc.py
View file @
4892e072
...
@@ -5,21 +5,20 @@ from bob.extension import rc
...
@@ -5,21 +5,20 @@ from bob.extension import rc
import
os
import
os
import
bob.io.image
import
bob.io.image
from
functools
import
partial
from
functools
import
partial
import
uuid
from
bob.pipelines.utils
import
hash_string
from
bob.pipelines.utils
import
hash_string
def
_make_sample_from_template_row
(
row
,
image_directory
):
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
# paying the penalty of having duplicate files
hashstr
=
str
(
uuid
.
uuid4
()
)
key
=
os
.
path
.
splitext
(
row
[
"FILENAME"
])[
0
]
+
"-"
+
str
(
row
[
"TEMPLATE_ID"
]
)
return
DelayedSample
(
return
DelayedSample
(
load
=
partial
(
bob
.
io
.
image
.
load
,
os
.
path
.
join
(
image_directory
,
row
[
"FILENAME"
])),
load
=
partial
(
bob
.
io
.
image
.
load
,
os
.
path
.
join
(
image_directory
,
row
[
"FILENAME"
])),
reference_id
=
str
(
row
[
"TEMPLATE_ID"
]),
reference_id
=
str
(
row
[
"TEMPLATE_ID"
]),
subject_id
=
str
(
row
[
"SUBJECT_ID"
]),
subject_id
=
str
(
row
[
"SUBJECT_ID"
]),
key
=
os
.
path
.
splitext
(
row
[
"FILENAME"
])[
0
]
+
"-"
+
hashstr
,
key
=
key
,
gender
=
row
[
"GENDER"
],
gender
=
row
[
"GENDER"
],
indoor_outdoor
=
row
[
"INDOOR_OUTDOOR"
],
indoor_outdoor
=
row
[
"INDOOR_OUTDOOR"
],
skintone
=
row
[
"SKINTONE"
],
skintone
=
row
[
"SKINTONE"
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment