hugsim_web_server_0 / download_public_datas.py
hyzhou404's picture
download
669413d
import zipfile
import os
from pathlib import Path
from huggingface_hub import snapshot_download
def unzip(file):
file_path = file.as_posix()
dir_path = file.parent.as_posix()
with zipfile.ZipFile(file_path, 'r') as zip_ref:
zip_ref.extractall(dir_path)
print("Loading public dataset")
snapshot_download(repo_id='XDimLab/HUGSIM',revision='main',local_dir='/app/app_datas/',local_dir_use_symlinks=False,allow_patterns=['3DRealCar/**'],repo_type='dataset')
snapshot_download(repo_id='XDimLab/HUGSIM',revision='main',local_dir='/app/app_datas/',local_dir_use_symlinks=False,allow_patterns=['nusc_map_cache.zip'],repo_type='dataset')
unzip(Path("/app/app_datas/nusc_map_cache.zip"))