Gaze-LIPE / src /data /download_meta_fix.py
thanhhuyvan's picture
Publish KD reproducibility investigation
178f61f
Raw
History Blame Contribute Delete
821 Bytes
import requests
import os
def download_file(url, save_path):
print(f"Downloading {url}...")
try:
response = requests.get(url, stream=True, timeout=30)
response.raise_for_status()
with open(save_path, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print(f"Successfully downloaded to {save_path} (Size: {os.path.getsize(save_path)} bytes)")
except Exception as e:
print(f"Failed to download: {e}")
if __name__ == "__main__":
# Nguồn metadata chính thức từ GitHub của tác giả
url = "https://raw.githubusercontent.com/erkil1452/gaze360/master/metadata.mat"
save_path = "data/raw/metadata.mat"
os.makedirs(os.path.dirname(save_path), exist_ok=True)
download_file(url, save_path)