(acsm_annotations_root)
| 132 | |
| 133 | |
| 134 | def 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 | |
| 155 | def load_pascal_annotations(pascal_annotations_path): |
no test coverage detected