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
807bb498
Commit
807bb498
authored
3 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Final updates
parent
170379c5
No related branches found
No related tags found
1 merge request
!127
RFW
Pipeline
#52357
canceled
3 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/face/database/rfw.py
+3
-10
3 additions, 10 deletions
bob/bio/face/database/rfw.py
with
3 additions
and
10 deletions
bob/bio/face/database/rfw.py
+
3
−
10
View file @
807bb498
...
@@ -19,8 +19,10 @@ class RFWDatabase(Database):
...
@@ -19,8 +19,10 @@ class RFWDatabase(Database):
The RFW is a subset of the MS-Celeb 1M dataset, and it
'
s composed of 44332 images split into 11416 identities.
The RFW is a subset of the MS-Celeb 1M dataset, and it
'
s composed of 44332 images split into 11416 identities.
There are four
"
race
"
labels in this dataset (`African`, `Asian`, `Caucasian`, and `Indian`).
There are four
"
race
"
labels in this dataset (`African`, `Asian`, `Caucasian`, and `Indian`).
Furthermore, with the help of https://query.wikidata.org/ we
'
ve added information about gender and
country of birth.
About the evaluation protocols, we offer two
protocols.
We offer two evaluation
protocols.
The first one, called
"
original
"
is the original protocol from its publication. It contains ~24k comparisons in total.
The first one, called
"
original
"
is the original protocol from its publication. It contains ~24k comparisons in total.
Worth noting that this evaluation protocol has an issue. It considers only comparisons of pairs of images from the same
Worth noting that this evaluation protocol has an issue. It considers only comparisons of pairs of images from the same
"
race
"
.
"
race
"
.
...
@@ -104,8 +106,6 @@ class RFWDatabase(Database):
...
@@ -104,8 +106,6 @@ class RFWDatabase(Database):
self
.
_idiap_protocol_seed
=
652
self
.
_idiap_protocol_seed
=
652
# Number of samples used to Z-Norm and T-Norm (per race)
# Number of samples used to Z-Norm and T-Norm (per race)
# self._nzprobes = 50
# self._ntreferences = 50
self
.
_nzprobes
=
25
self
.
_nzprobes
=
25
self
.
_ntreferences
=
25
self
.
_ntreferences
=
25
...
@@ -152,7 +152,6 @@ class RFWDatabase(Database):
...
@@ -152,7 +152,6 @@ class RFWDatabase(Database):
def
_get_subject_from_key
(
self
,
key
):
def
_get_subject_from_key
(
self
,
key
):
return
key
[:
-
5
]
return
key
[:
-
5
]
# return key.split("/")[0]
def
_load_metadata
(
self
,
target_set
=
"
test
"
):
def
_load_metadata
(
self
,
target_set
=
"
test
"
):
for
race
in
self
.
_races
:
for
race
in
self
.
_races
:
...
@@ -168,8 +167,6 @@ class RFWDatabase(Database):
...
@@ -168,8 +167,6 @@ class RFWDatabase(Database):
key
=
f
"
{
l
[
0
]
}
_000
{
l
[
1
]
}
"
key
=
f
"
{
l
[
0
]
}
_000
{
l
[
1
]
}
"
subject_id
=
self
.
_get_subject_from_key
(
key
)
subject_id
=
self
.
_get_subject_from_key
(
key
)
dict_key
=
f
"
{
race
}
/
{
subject_id
}
/
{
key
}
"
dict_key
=
f
"
{
race
}
/
{
subject_id
}
/
{
key
}
"
# subject_id = self._get_subject_from_key(key)
# subject_id = key[:-5]
if
subject_id
not
in
self
.
_id_race
:
if
subject_id
not
in
self
.
_id_race
:
self
.
_id_race
[
subject_id
]
=
race
self
.
_id_race
[
subject_id
]
=
race
...
@@ -187,15 +184,11 @@ class RFWDatabase(Database):
...
@@ -187,15 +184,11 @@ class RFWDatabase(Database):
# Positive or negative pairs
# Positive or negative pairs
if
len
(
l
)
==
3
:
if
len
(
l
)
==
3
:
# k = f"{l[0]}_000{l[2]}"
# value = f"{self._get_subject_from_key(key)}/{k}"
k_value
=
f
"
{
l
[
0
]
}
_000
{
l
[
2
]
}
"
k_value
=
f
"
{
l
[
0
]
}
_000
{
l
[
2
]
}
"
dict_value
=
(
dict_value
=
(
f
"
{
race
}
/
{
self
.
_get_subject_from_key
(
k_value
)
}
/
{
k_value
}
"
f
"
{
race
}
/
{
self
.
_get_subject_from_key
(
k_value
)
}
/
{
k_value
}
"
)
)
else
:
else
:
# k = f"{l[2]}_000{l[3]}"
# value = f"{self._get_subject_from_key(key)}/{k}"
k_value
=
f
"
{
l
[
2
]
}
_000
{
l
[
3
]
}
"
k_value
=
f
"
{
l
[
2
]
}
_000
{
l
[
3
]
}
"
dict_value
=
(
dict_value
=
(
f
"
{
race
}
/
{
self
.
_get_subject_from_key
(
k_value
)
}
/
{
k_value
}
"
f
"
{
race
}
/
{
self
.
_get_subject_from_key
(
k_value
)
}
/
{
k_value
}
"
...
...
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