microsoft / SwinBERT

Research code for CVPR 2022 paper "SwinBERT: End-to-End Transformers with Sparse Attention for Video Captioning"
https://arxiv.org/abs/2111.13196
MIT License
237 stars 35 forks source link

can't download pretrained models from the https://datarelease.blob.core.windows.net/swinbert/ #11

Open gurinvlad45 opened 2 years ago

gurinvlad45 commented 2 years ago

Hi, guys! Thank you for the project a lot. But I have an issue with downloading pretrained models using download_models.sh. I've tied different networks, but it fails all the time. Do you have another source of the pretrained models? Or are there any chances to move them somewhere? Thank you in advance

kevinlin311tw commented 2 years ago

Can you please provide more details about the error messages you get? Do you encounter issues for other downloads?

gurinvlad45 commented 2 years ago

Can you please provide more details about the error messages you get? Do you encounter issues for other downloads?

The error always is about network issue or operation timed out. And I have tried different networks, to be honest I have only downloaded VATEX pretrained model (vatex-table1)

20%[===> ] 554,33M --.-KB/s in 59m 47s 2022-05-27 17:52:32 (158 KB/s) - Read error at byte 581255168/2850556753 (Operation timed out). Retrying.

And it is retrying indefinitely, and fails all the time. Also, I've tried 32frames version for vatex and it is the same story

kevinlin311tw commented 2 years ago

Thanks for letting us know. We plan to use github as an alternative place to store the files. Please stay tuned.

kevinlin311tw commented 2 years ago

Hi @gurinvlad45 Due to some limitations of the file size, it seems like Github couldn't hold a file greater than 2GB :(

Therefore, I would suggest another method - downloading the large files with AzCopy (it usually provides faster speed).

AzCopy executable tools can be downloaded here. Decompress the azcopy tar file and put the executable in any path. In the example below, I put the executable file at your/path/to/azcopy

To download the model files with AzCopy, please try the following command.

# --------------------------------
# Setup
# --------------------------------
export REPO_DIR=$PWD
if [ ! -d $REPO_DIR/models ] ; then
    mkdir -p $REPO_DIR/models
fi
if [ ! -d $REPO_DIR/models/table1 ] ; then
    mkdir -p $REPO_DIR/models/table1
fi
if [ ! -d $REPO_DIR/models/32frm ] ; then
    mkdir -p $REPO_DIR/models/32frm
fi
BLOB='https://datarelease.blob.core.windows.net/swinbert'

# --------------------------------
# Download our best performing checkpoints for each dataset (corresponding to Table 1 in paper)
# --------------------------------

for DATASET in 'vatex' 'msrvtt' 'tvc' 'youcook2' 'msvd'
do
    your/path/to/azcopy copy $BLOB/models/${DATASET}-table1.zip  $REPO_DIR/models/table1/${DATASET}-table1.zip
    unzip $REPO_DIR/models/table1/${DATASET}-table1.zip -d $REPO_DIR/models/table1/${DATASET}/
    rm $REPO_DIR/models/table1/${DATASET}-table1.zip
done

# same for other downloads...

Hope this helps.