EnriqueSolarte / direct_360_FPE

[RA-L'22] 360-DFPE: Leveraging Monocular 360-Layouts for Direct Floor Plan Estimation
https://enriquesolarte.github.io/360-dfpe/
53 stars 8 forks source link

Downloading dataset #1

Closed EnriqueSolarte closed 10 months ago

EnriqueSolarte commented 1 year ago

External Source:

"Hi Enrique,

Thanks a lot! I just downloaded your dataset. I'm using linux and have created a small script to download it since I couldn't using your script because the files are read-only in google drive. Maybe I've been doing something wrong. Just in case somebody has the same problem as me, I would like to share with you a small script in bash (it's attached).

In the script, there's some part uncompleted, that info is extracted following these steps: LINK "Here are step-by-step instructions to download a file from Google Drive using the command line API if the file is shared privately and needs authentication."

Thanks, again, for your hard work! We'll be in touch. Eva."

#!/usr/bin/env bash

# https://www.googleapis.com/drive/v3/files/XXXXX?alt=media 
URL='https://www.googleapis.com/drive/v3/files/'
URL_END='?alt=media'
FOLDER_PATH='mp3d_fpe/'
FILE_CSV='mp3d_fpe_google_drive_ids.csv'

while read line; do
  # echo "$line";
  firstItem="$(echo $line | cut -d',' -f1)"
  secondItem="$(echo $line | cut -d',' -f2)"
  echo $firstItem $secondItem 
  URL_SCENE=$URL$firstItem$URL_END
  OUTPUT=$FOLDER_PATH$secondItem 
  CODE=$(curl -H "Authorization: Bearer YYYYY" $URL_SCENE -o $OUTPUT)
  echo $CODE
done < $FILE_CSV

# RUN: sh download_mp3d_fpe.sh 2>&1 &