Skip to content

Research code for CVPR 2022 paper "SwinBERT: End-to-End Transformers with Sparse Attention for Video Captioning"

License

Notifications You must be signed in to change notification settings

thuc-moreh/SwinBERT

 
 

Repository files navigation

[Moreh] Running Swin-BERT on Moreh AI Framework

Prepare

Data

  • The video for demo inference is already included in the repo
  • Data for training and evaluation have to be downloaded from source due to copyright issues. The video for demo inference is enough to reproduce the below errors

Code

git clone https://github.com/microsoft/SwinBERT.git
cd SwinBERT

Environment

On HAC machine

conda create -n swinbert python=3.8
conda activate swinbert

Run

  1. Reproduce the CUDA out of memory error

First, follow README.md to the step Before Running Code: Launch Docker Container. After that run

export REPO_DIR=$PWD
DATASETS=$REPO_DIR'/datasets/'
MODELS=$REPO_DIR'/models/'
OUTPUT_DIR=$REPO_DIR'/output/'
source launch_container.sh $DATASETS $MODELS $OUTPUT_DIR
  1. Reproduce Could not install packages due to an OSError: [Errno 2] No such file or directory: '/tmp/build/80754af9/attrs_1604765588209/work'

When you're inside the container, run

pip freeze > requirements.txt 

Then copy the requirements from container to host machine by

docker cp container_id:/videocap/requirement.txt SwinBERT_directory

replace container_id with the container id and SwinBERT_directory with the dicrectory of the SwinBERT repo on your machine.

Exit the container and run

pip install -r requirements.txt

About

Research code for CVPR 2022 paper "SwinBERT: End-to-End Transformers with Sparse Attention for Video Captioning"

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%