Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bob.paper.makeup_aim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.paper.makeup_aim
Commits
761e113d
Commit
761e113d
authored
Jul 19, 2019
by
Ketan Kotwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor edits
parent
76da662e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
bob/paper/makeup_aim/misc/generate_miw_db.py
bob/paper/makeup_aim/misc/generate_miw_db.py
+1
-1
bob/paper/makeup_aim/misc/generate_ymu_db.py
bob/paper/makeup_aim/misc/generate_ymu_db.py
+1
-1
generate_commands.py
generate_commands.py
+8
-8
No files found.
bob/paper/makeup_aim/misc/generate_miw_db.py
View file @
761e113d
...
...
@@ -59,7 +59,7 @@ class MIWGenerator:
formatted_line
=
"{}, {}"
.
format
(
fname
,
true_class
)
f
.
write
(
formatted_line
+
"
\
n
"
)
print
(
"Record file created and stored at {}"
.
format
(
record_file
))
print
(
"Record file created and stored at {}"
.
format
(
record_file
))
#--------------------------------------
...
...
bob/paper/makeup_aim/misc/generate_ymu_db.py
View file @
761e113d
...
...
@@ -107,7 +107,7 @@ if __name__ == "__main__":
print
(
"This script generates an HDF files for the YMU dataset"
)
if
len
(
sys
.
argv
)
!=
3
:
print
(
"Usage: {} <original-data-directory> <output-directory>
\
n
Set
\
<output-directory> to [YMU_DIRECTORY] in configuration file."
.
format
(
__
nam
e__
))
<output-directory> to [YMU_DIRECTORY] in configuration file."
.
format
(
__
fil
e__
))
exit
(
0
)
input_directory
=
sys
.
argv
[
1
]
...
...
generate_commands.py
View file @
761e113d
...
...
@@ -136,7 +136,7 @@ class CommandGenerator(object):
for
proto
in
proto_array
:
result_dir_proto
=
os
.
path
.
join
(
result_dir
,
proto
)
cmd
=
"{} {} {} {} --extracted-directory {} --protocol {} -s {}"
\
.
format
(
expt_command
,
db_config
,
expt_config
,
options
,
extracted_dir
,
proto
,
result_dir
_proto
)
.
format
(
expt_command
,
db_config
,
expt_config
,
options
,
extracted_dir
,
proto
,
result_dir
)
# + verbosity option
if
self
.
verbose
>
0
:
...
...
@@ -177,7 +177,7 @@ class CommandGenerator(object):
legend
=
proto_list
.
replace
(
"_"
,
" "
)
legend
=
legend
.
upper
()
roc_path
=
os
.
path
.
join
(
result_dir
,
"roc.pdf"
)
cmd
=
"{} -vv -e -o {} -la '' -lg '{}' {}/
scores-{{dev,eval}}"
.
format
(
plot_command
,
roc_path
,
legend
,
result_dir
)
cmd
=
"{} -vv -e -o {} -la '' -lg '{}' {}/
{{{}}}/scores-{{dev,eval}}"
.
format
(
plot_command
,
roc_path
,
legend
,
result_dir
,
proto_list
)
self
.
command_list3
.
append
(
cmd
)
self
.
command_list3
.
append
(
" "
)
...
...
@@ -186,13 +186,13 @@ class CommandGenerator(object):
def
generate_crossdb
(
self
,
train_db
):
if
train_db
==
"ymu"
:
test_db_list
=
[
"miw"
,
"mifs"
]
test_db_list
=
[
"miw"
,
"mifs
-makeup
"
]
for
test_db
in
test_db_list
:
tmp_commands
=
self
.
_generate_crossdb_pair
(
train_db
,
test_db
)
for
x
in
tmp_commands
:
self
.
command_list4
.
append
(
x
)
if
train_db
==
"mifs"
:
if
train_db
==
"mifs
-makeup
"
:
test_db_list
=
[
"miw"
,
"ymu"
]
for
test_db
in
test_db_list
:
tmp_commands
=
self
.
_generate_crossdb_pair
(
train_db
,
test_db
)
...
...
@@ -222,7 +222,7 @@ class CommandGenerator(object):
test_result_dir
=
os
.
path
.
join
(
base_dir1
,
"test_"
+
test_db
,
feat
)
options
=
"--skip-projector-training --projector-file {}"
.
format
(
train_projector_file
)
if
test_db
==
"ymu"
:
options
+=
"--protocol 'grandtest' --groups 'train'"
options
+=
"
--protocol 'grandtest' --groups 'train'"
cmd
=
"{} {} {} {} -s {} -vv"
.
format
(
expt_command
,
test_db
,
expt_config
,
options
,
test_result_dir
)
tmp_commands
.
append
(
cmd
)
...
...
@@ -304,8 +304,8 @@ class CommandGenerator(object):
f
.
write
(
"{}"
.
format
(
"
\
n
"
.
join
(
self
.
command_list4
)))
f
.
write
(
"
\
n
"
+
"="
*
80
+
"
\
n
\
n
"
)
f
.
write
(
"## CROSSDB [TRAIN:MIFS] ##
\
n
\
n
"
)
#
f.write("{}".format("\n".join(self.command_list5)))
f
.
write
(
"## CROSSDB [TRAIN:MIFS
-MAKEUP
] ##
\
n
\
n
"
)
f
.
write
(
"{}"
.
format
(
"
\
n
"
.
join
(
self
.
command_list5
)))
f
.
write
(
"
\
n
"
+
"="
*
80
+
"
\
n
\
n
"
)
#--------------------------------------
...
...
@@ -323,7 +323,7 @@ if __name__ == "__main__":
cg
.
generate_aim_pad
()
cg
.
generate_ymu_cv
()
cg
.
generate_crossdb
(
train_db
=
"ymu"
)
cg
.
generate_crossdb
(
train_db
=
"mifs"
)
cg
.
generate_crossdb
(
train_db
=
"mifs
-makeup
"
)
# write to file
cg
.
to_file
()
...
...
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