diff --git a/experiments/ssl4eo/download_ssl4eo.py b/experiments/ssl4eo/download_ssl4eo.py index ae312e63aca..7389dbf24f0 100755 --- a/experiments/ssl4eo/download_ssl4eo.py +++ b/experiments/ssl4eo/download_ssl4eo.py @@ -52,6 +52,7 @@ import json import os import time +import warnings from collections import defaultdict from datetime import date, timedelta from multiprocessing.dummy import Lock, Pool @@ -473,9 +474,15 @@ def update(self, delta: int = 1) -> int: counter = Counter() def worker(idx: int) -> None: + # Skip if idx has already been downloaded if idx in ext_coords.keys(): return + # Skip if idx is not in pre-sampled coordinates + if idx not in match_coords.keys(): + warnings.warn(f"{idx} not found in {args.match_file}, skipping.") + return + worker_start = time.time() patches, center_coord = get_random_patches_match( idx,