File size: 558 Bytes
0e5ae7a cf791ca 0e5ae7a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/bash
# Step 1: Get the token by making a request to the API
TOKEN=$(curl -s https://acdc.vision.ee.ethz.ch/api/getPackageUri/6436f2259880d97633275dfc | jq -r '.token')
# Step 2: Use the token to download the file using wget
if [ -n "$TOKEN" ]; then
wget "https://acdc.vision.ee.ethz.ch/api/downloadPackage/${TOKEN}/rgb_anon_trainvaltest.zip" -O ./datasets/acdc.zip
unzip ./datasets/acdc.zip -d ./datasets/
# rename datasets/rgb_anon to datasets/acdc
mv ./datasets/rgb_anon ./datasets/acdc
else
echo "Failed to retrieve token"
exit 1
fi
|