Commit f9cf3f33 authored by Cresson Remi's avatar Cresson Remi
Browse files

ADD: pickle serialization

1 merge request!9Serialize collection
Pipeline #33258 passed with stages
in 1 minute and 18 seconds
Showing with 4 additions and 2 deletions
+4 -2
...@@ -3,12 +3,14 @@ from scenes import drs ...@@ -3,12 +3,14 @@ from scenes import drs
# Arguments # Arguments
parser = argparse.ArgumentParser(description="Test",) parser = argparse.ArgumentParser(description="Test",)
parser.add_argument("--root_dir", help="Root directory containing MS and PAN folders", required=True) parser.add_argument("--root_dir", nargs='+', help="Root directories containing MS and PAN folders", required=True)
parser.add_argument("--out_pickle", help="Output pickle file", required=True) parser.add_argument("--out_pickle", help="Output pickle file", required=True)
params = parser.parse_args() params = parser.parse_args()
# Get all scenes in the root_dir # Get all scenes in the root_dir
scenes = drs.get_spot67_scenes(params.root_dir) scenes = []
for root_dir in params.root_dir:
scenes += drs.get_spot67_scenes(root_dir)
# Save scenes in a pickle file # Save scenes in a pickle file
drs.save_scenes(scenes, params.out_pickle) drs.save_scenes(scenes, params.out_pickle)
Supports Markdown
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