Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to download UD checkpoint + UE codes #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions download.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,18 @@
# NOTE(julieta) encoder data is a framelist and 5 cameras that we hardcode here
"encoder": [
"frame_list.csv",
"encodings_framelist.csv",
"encodings_gt.pt",
"image/cam-cyclop.zip",
"image/cam-left-eye-atl-temporal.zip",
"image/cam-left-mouth.zip",
"image/cam-right-eye-atl-temporal.zip",
"image/cam-right-mouth.zip",
],
# NOTE(julieta) checkpoints of encoders and decoders
"checkpoints": [
"decoder/aeparams_1440000.pt",
],
}
)

Expand Down Expand Up @@ -219,6 +225,10 @@ def main():
to_path = output_dir / capture_path / "encoder" / asset_path
links_and_paths.append((from_url, to_path))

elif assets == "checkpoints":
# NOTE(julieta) checkpoints are per-dataset, not per-capture
continue

else:

# Generate donwload links for all the assets
Expand All @@ -227,6 +237,16 @@ def main():
to_path = output_dir / capture_path / "decoder" / asset_path
links_and_paths.append((from_url, to_path))

# Assets for the entire dataset, not per capture, such as checkpoints
for assets, asset_paths in args.assets.items():
if assets == "checkpoints":

# Special case for checkpoints
for asset_path in asset_paths:
from_url = dataset_path + "checkpoints/" + asset_path
to_path = output_dir / "checkpoints" / asset_path
links_and_paths.append((from_url, to_path))

# Done creating links, donwload everything
total_links = len(links_and_paths)
links_and_paths = [(i + 1, total_links, link, path) for i, (link, path) in enumerate(links_and_paths)]
Expand Down
Loading