代码拉取完成,页面将自动刷新
###
# @Description:
# @Autor: Jiachen Sun
# @Date: 2022-02-16 22:23:16
# @LastEditors: Jiachen Sun
# @LastEditTime: 2022-02-17 13:09:42
###
wgetgdrive(){
# $1 = file ID
# $2 = file name
URL="https://docs.google.com/uc?export=download&id=$1"
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate $URL -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$1" -O $2 && rm -rf /tmp/cookies.txt
}
mkdir -p tmp
key="$1"
case $key in
pretrained)
wgetgdrive 1qSkMYYK1qkT4wMMeAXerSI2Q7AxWujsS tmp/pretrained.zip
unzip -o tmp/pretrained.zip
;;
runs)
mkdir -p runs
cd runs
python ../gdrivedl.py https://drive.google.com/drive/folders/1UT-OfAsQ1OGSa6HSLZcK6YyJeIkaJUfF?usp=sharing
cd ..
;;
cor_exp)
mkdir -p cor_exp
cd cor_exp
python ../gdrivedl.py https://drive.google.com/drive/folders/1iYcJwFCFm9JWSiL1puIVfjpEgNF2dSoy?usp=sharing
cd ..
;;
modelnet40_c)
mkdir -p data/modelnet40_c
cd data/modelnet40_c
python ../../gdrivedl.py https://drive.google.com/drive/folders/10YeQRh92r_WdL-Dnog2zQfFr03UW4qXX?usp=sharing
cd ../..
;;
modelnet40)
wget --no-check-certificate https://shapenet.cs.stanford.edu/media/modelnet40_ply_hdf5_2048.zip
unzip modelnet40_ply_hdf5_2048.zip
mv modelnet40_ply_hdf5_2048 data
rm -r modelnet40_ply_hdf5_2048.zip
wgetgdrive 1jXe7UR6He-pV3B7vIxMAjEt63Vhy1bV8 tmp/modelnet40_ply_hdf5_2048_valid_small.zip
unzip -o tmp/modelnet40_ply_hdf5_2048_valid_small.zip
mv modelnet40_ply_hdf5_2048_valid_small/* data/modelnet40_ply_hdf5_2048/
rm -r modelnet40_ply_hdf5_2048_valid_small
wget http://modelnet.cs.princeton.edu/ModelNet40.zip
unzip ModelNet40.zip
mv ModelNet40 data
rm -r ModelNet40.zip
rm -rf modelnet40_ply_hdf5_2048
;;
mesh)
wget --no-check-certificate http://modelnet.cs.princeton.edu/ModelNet40.zip
unzip ModelNet40.zip
mv ModelNet40 data
rm -r ModelNet40.zip
;;
*)
echo "unknow argument $1" # unknown argument
;;
esac
rm -r tmp
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。