MCPcopy Create free account
hub / github.com/3DAnimals/3DAnimals / download_pascal_annotations

Function download_pascal_annotations

evaluation/evaluate.py:134–152  ·  view source on GitHub ↗
(acsm_annotations_root)

Source from the content-addressed store, hash-verified

132
133
134def download_pascal_annotations(acsm_annotations_root):
135 # download pascal annotations from dropbox (https://github.com/nileshkulkarni/acsm/blob/master/docs/setup.md)
136
137 # The Dropbox link
138 url = "https://www.dropbox.com/s/3tj037gnk4gz11t/cachedir.tar?dl=1"
139
140 # Location to save the downloaded tar file temporarily
141 tar_file = Path(acsm_annotations_root) / "cachedir.tar"
142
143 # Download the file
144 print(f"Downloading {url} to {tar_file}")
145 download_file(url, tar_file)
146
147 # Untar the file to the desired location
148 print(f"Extracting {tar_file} to {acsm_annotations_root}")
149 with tarfile.open(tar_file, "r") as archive:
150 archive.extractall(path=acsm_annotations_root)
151
152 print(f"File extracted to {acsm_annotations_root}")
153
154
155def load_pascal_annotations(pascal_annotations_path):

Callers 1

__init__Method · 0.85

Calls 1

download_fileFunction · 0.85

Tested by

no test coverage detected