Download download_CancerVerse_data.sh from BodyMaps/CancerVerse: direct link, hf CLI and curl.
- Browser
- Download file 868 Bytes
-
https://huggingface.co/datasets/BodyMaps/CancerVerse/resolve/main/download_CancerVerse_data.sh
- Command line
-
hf download hf://datasets/BodyMaps/CancerVerse/download_CancerVerse_data.sh
-
curl -L -o download_CancerVerse_data.sh https://huggingface.co/datasets/BodyMaps/CancerVerse/resolve/main/download_CancerVerse_data.sh
868 Bytes
| set -e | |
| # CancerVerse CT volumes and metadata from https://huggingface.co/datasets/BodyMaps/CancerVerse | |
| # Needs the Hugging Face CLI: pip install -U "huggingface_hub[cli]" | |
| if ! command -v hf > /dev/null; then | |
| echo "The Hugging Face CLI (hf) is not installed. Run: pip install -U \"huggingface_hub[cli]\"" | |
| exit 1 | |
| fi | |
| # Download CancerVerse_dataset_metadata.csv and CancerVerse/CV_XXXXXXXX/ct.nii.gz (24,422 CTs, ~3 TB) into this folder. | |
| # hf download skips files it already has, so an interrupted download (e.g. a rate limit) resumes where it stopped. | |
| echo "Downloading CancerVerse CT volumes and metadata..." | |
| until hf download BodyMaps/CancerVerse --repo-type dataset --local-dir . \ | |
| --include "CancerVerse_dataset_metadata.csv" "CancerVerse/*"; do | |
| echo "Download interrupted at $(date). Retrying in 30 minutes..." | |
| sleep 1800 | |
| done | |