Updated prepare action to use new config

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-07-04 16:25:57 +02:00
parent f6c66d1d34
commit 3354a033fe
2 changed files with 12 additions and 5 deletions

View File

@ -45,13 +45,19 @@ def prepare(args: argparse.Namespace) -> None:
from twomartens.masterthesis import data from twomartens.masterthesis import data
file_names_photos, file_names_instances, instances = data.prepare_scenenet_data(args.scenenet_path, file_names_photos, file_names_instances, \
instances = data.prepare_scenenet_data(conf.get_property("Paths.scenenet"),
args.protobuf_path) args.protobuf_path)
with open(f"{args.ground_truth_path}/photo_paths.bin", "wb") as file: with open(f"{conf.get_property('Paths.scenenet_gt')}/"
f"{args.ground_truth_path}/photo_paths.bin", "wb") as file:
pickle.dump(file_names_photos, file) pickle.dump(file_names_photos, file)
with open(f"{args.ground_truth_path}/instance_paths.bin", "wb") as file:
with open(f"{conf.get_property('Paths.scenenet_gt')}/"
f"{args.ground_truth_path}/instance_paths.bin", "wb") as file:
pickle.dump(file_names_instances, file) pickle.dump(file_names_instances, file)
with open(f"{args.ground_truth_path}/instances.bin", "wb") as file:
with open(f"{conf.get_property('Paths.scenenet_gt')}/"
f"{args.ground_truth_path}/instances.bin", "wb") as file:
pickle.dump(instances, file) pickle.dump(instances, file)

View File

@ -36,6 +36,7 @@ _CONFIG_PROPS = {
"Paths": { "Paths": {
"coco": (str, ""), "coco": (str, ""),
"scenenet": (str, ""), "scenenet": (str, ""),
"scenenet_gt": (str, ""),
"scenenet_gt_train": (str, ""), "scenenet_gt_train": (str, ""),
"scenenet_gt_val": (str, ""), "scenenet_gt_val": (str, ""),
"scenenet_gt_test": (str, ""), "scenenet_gt_test": (str, ""),