Updated prepare action to use new config
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -45,13 +45,19 @@ def prepare(args: argparse.Namespace) -> None:
|
||||
|
||||
from twomartens.masterthesis import data
|
||||
|
||||
file_names_photos, file_names_instances, instances = data.prepare_scenenet_data(args.scenenet_path,
|
||||
args.protobuf_path)
|
||||
with open(f"{args.ground_truth_path}/photo_paths.bin", "wb") as file:
|
||||
file_names_photos, file_names_instances, \
|
||||
instances = data.prepare_scenenet_data(conf.get_property("Paths.scenenet"),
|
||||
args.protobuf_path)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
|
||||
|
||||
|
||||
@ -36,6 +36,7 @@ _CONFIG_PROPS = {
|
||||
"Paths": {
|
||||
"coco": (str, ""),
|
||||
"scenenet": (str, ""),
|
||||
"scenenet_gt": (str, ""),
|
||||
"scenenet_gt_train": (str, ""),
|
||||
"scenenet_gt_val": (str, ""),
|
||||
"scenenet_gt_test": (str, ""),
|
||||
|
||||
Reference in New Issue
Block a user