Commit 761e113d authored by Ketan Kotwal's avatar Ketan Kotwal

minor edits

parent 76da662e
......@@ -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))
#--------------------------------------
......
......@@ -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>\nSet\
<output-directory> to [YMU_DIRECTORY] in configuration file.".format(__name__))
<output-directory> to [YMU_DIRECTORY] in configuration file.".format(__file__))
exit(0)
input_directory = sys.argv[1]
......
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment