diff --git a/src/twomartens/masterthesis/cli.py b/src/twomartens/masterthesis/cli.py index 8343a46..eaffc81 100644 --- a/src/twomartens/masterthesis/cli.py +++ b/src/twomartens/masterthesis/cli.py @@ -305,8 +305,8 @@ def prepare(args: argparse.Namespace) -> None: from twomartens.masterthesis import data - file_names_photos, file_names_instances, instances = data.prepare_scenenet_val(args.scenenet_path, - args.protobuf_path) + 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: pickle.dump(file_names_photos, file) with open(f"{args.ground_truth_path}/instance_paths.bin", "wb") as file: diff --git a/src/twomartens/masterthesis/data.py b/src/twomartens/masterthesis/data.py index 98ce058..883d1ec 100644 --- a/src/twomartens/masterthesis/data.py +++ b/src/twomartens/masterthesis/data.py @@ -21,6 +21,7 @@ Functions: load_coco_train(...): loads the COCO training data into a Tensorflow data set load_coco_val(...): loads the COCO validation data into a Tensorflow data set load_scenenet_data(...): loads the SceneNet RGB-D data into a Tensorflow data set + prepare_scenenet_data(...): prepares the SceneNet RGB-D data and returns it in Python format """ from typing import Callable, List, Mapping, Tuple from typing import Sequence @@ -361,9 +362,9 @@ def _load_images_ssd_callback(resized_shape: Sequence[int]) \ return _load_images_ssd -def prepare_scenenet_val(data_path: str, protobuf_path: str) -> Tuple[List[List[str]], - List[List[str]], - List[List[List[dict]]]]: +def prepare_scenenet_data(data_path: str, protobuf_path: str) -> Tuple[List[List[str]], + List[List[str]], + List[List[List[dict]]]]: """ Prepares the SceneNet RGB-D data and returns it in Python format.