update: enhance README with dataset download instructions and non-LFS pull guidance
Browse files
README.md
CHANGED
|
@@ -12,7 +12,9 @@ The individual datasets are stored as zip files in the `zip` directory. The util
|
|
| 12 |
|
| 13 |
eg: `hf upload us-segmentator/us-segmentation-dataset local_path_to_zip_file.zip zips/<anatomy_name>/<zip_file_name>.zip --repo-type dataset --commit-message "add-dataset: <dataset_name>"`
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
1. Make sure you have git lfs installed
|
| 17 |
2. Run the following command:
|
| 18 |
```bash
|
|
@@ -25,3 +27,39 @@ hf download us-segmentator/us-segmentation-dataset --repo-type dataset --local-d
|
|
| 25 |
4. The dataset will be downloaded to the local directory.
|
| 26 |
|
| 27 |
> Note: The dataset can be downloaded without the --local-dir argument, but it will be downloaded the huggingface cache directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
eg: `hf upload us-segmentator/us-segmentation-dataset local_path_to_zip_file.zip zips/<anatomy_name>/<zip_file_name>.zip --repo-type dataset --commit-message "add-dataset: <dataset_name>"`
|
| 14 |
|
| 15 |
+
## Instructions for downloading the dataset
|
| 16 |
+
|
| 17 |
+
### CLI
|
| 18 |
1. Make sure you have git lfs installed
|
| 19 |
2. Run the following command:
|
| 20 |
```bash
|
|
|
|
| 27 |
4. The dataset will be downloaded to the local directory.
|
| 28 |
|
| 29 |
> Note: The dataset can be downloaded without the --local-dir argument, but it will be downloaded the huggingface cache directory.
|
| 30 |
+
|
| 31 |
+
### Python
|
| 32 |
+
|
| 33 |
+
Use the `huggingface_hub` library to download specific files programmatically:
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
from huggingface_hub import hf_hub_download
|
| 37 |
+
|
| 38 |
+
file_path = hf_hub_download(
|
| 39 |
+
repo_id="us-segmentator/us-segmentation-dataset",
|
| 40 |
+
filename="zips/<anatomy_name>/<zip_file_name>.zip",
|
| 41 |
+
repo_type="dataset",
|
| 42 |
+
local_dir="local_path_to_download_directory"
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
print(f"File downloaded to: {file_path}")
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Pulling non-LFS changes only
|
| 49 |
+
|
| 50 |
+
If you are only pulling repository updates like `README.md`, scripts, or other small files (and want to skip downloading large LFS zip datasets during pull), use:
|
| 51 |
+
Use case: This is useful when you are contributing documentation/code changes and do not need the dataset zip files on your machine.
|
| 52 |
+
|
| 53 |
+
### Linux/macOS
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
GIT_LFS_SKIP_SMUDGE=1 git pull
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
### Windows (PowerShell)
|
| 60 |
+
|
| 61 |
+
```powershell
|
| 62 |
+
$env:GIT_LFS_SKIP_SMUDGE=1
|
| 63 |
+
git pull
|
| 64 |
+
```
|
| 65 |
+
|