Download code/scripts/fetch_samples.sh from changh95/centerpoint-p150: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/changh95/centerpoint-p150/resolve/main/code/scripts/fetch_samples.sh
- Command line
-
hf download hf://changh95/centerpoint-p150/code/scripts/fetch_samples.sh
-
curl -L -o fetch_samples.sh https://huggingface.co/changh95/centerpoint-p150/resolve/main/code/scripts/fetch_samples.sh
1.56 kB
| # SPDX-License-Identifier: Apache-2.0 | |
| # Download helper for public data that centerpoint-p150 may NOT redistribute (license unstated or non-commercial) | |
| # into ${CENTERPOINT_SAMPLES:-$HOME/.cache/tt_centerpoint/samples}, sha256-checked. Nothing is fetched by default: | |
| # the shipped sample is code/tt_centerpoint/samples/test_pcd.npz (autoware_universe test.pcd, Apache-2.0). The card's | |
| # public-dataset frames (PandaSet; nuScenes v1.0-mini and Argoverse 2 val, both CC BY-NC-SA 4.0) are rebuilt in the | |
| # development workspace from the datasets with research/centerpoint/scripts/public_data_convert.py and never ship. | |
| # Nothing downloaded here is executed; parse it with numpy / sqlite3 only. | |
| set -euo pipefail | |
| DEST="${CENTERPOINT_SAMPLES:-$HOME/.cache/tt_centerpoint/samples}" | |
| mkdir -p "$DEST" | |
| fetch() { # fetch <url> <sha256> <file name> | |
| local url="$1" sum="$2" name="$3" | |
| if [ -f "$DEST/$name" ] && echo "$sum $DEST/$name" | sha256sum -c --status; then | |
| echo "ok $name"; return | |
| fi | |
| curl -fL --retry 3 -o "$DEST/$name.part" "$url" | |
| echo "$sum $DEST/$name.part" | sha256sum -c --status || { echo "sha256 mismatch: $name" >&2; exit 1; } | |
| mv "$DEST/$name.part" "$DEST/$name"; echo "fetched $name" | |
| } | |
| # Example (Autoware demo rosbag; pinned in autoware/ansible/roles/demo_artifacts/tasks/main.yaml:48-53): | |
| # fetch https://autoware-files.s3.us-west-2.amazonaws.com/recordings/bags/demos/sample-rosbag.zip \ | |
| # 5f9d36353393b3d249212153c19049822b1298db56512aa045b4f7f6fc37cf88 sample-rosbag.zip | |
| echo "samples in $DEST" | |