Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cloud-volume
cloud-volume==11.1.5
joblib
tqdm
pillow
pillow
boto3==1.35.99
6 changes: 3 additions & 3 deletions vsvi2precomputed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def convert_precomputed_tiles(vsvi_root_path, vsvi_data, output_path):
'''
input_bucket, base_prefix = vsvi_root_path.replace("s3://", "").split("/", 1)

source_prefix = vsvi_data.get("SourceFileNameTemplate").split("/")[1]
prefix = "/".join([base_prefix, source_prefix])
source_prefix = vsvi_data.get("SourceFileNameTemplate").split("/")[:-2]
prefix = os.path.join(base_prefix, "/".join(source_prefix))

# Prepend "file://" if path is local and does not already have it
if output_path[:5] != "s3://" and output_path[:7] != "file://":
Expand All @@ -99,7 +99,7 @@ def convert_precomputed_tiles(vsvi_root_path, vsvi_data, output_path):
Parallel(n_jobs=-1)(delayed(_convert_tile)(vol, key, vsvi_data, input_bucket) for key in tqdm(_list_objects_cloud(input_bucket, prefix)))
# TODO: add log that counts number of objects copied
else:
search_dir = os.path.join(vsvi_root_path, source_prefix)
search_dir = os.path.join(vsvi_root_path, "/".join(source_prefix))
Parallel(n_jobs=-1)(delayed(_convert_tile)(vol, key, vsvi_data) for key in tqdm(_list_objects_local(search_dir)))
# TODO: add log that counts number of objects copied

Expand Down
Loading