SparseTT: Visual Tracking with Sparse Transformers(IJCAI2022)
Arxiv
GitHub
-
conda create Sparsett python==3.7
-
source activate Sparsett
-
安装torch,cuda版本11.1
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
首先,torch版本安装1.9.0以上:代码中存在 nn.MultiheadAttention 包含 batch_first ,查了一下 torch.nn 的 doc,1.9.0版本以上的 MultiheadAttention 中才纳入了 batch_first 参数,安装 1.9.0 以下会报错;
-
安装基本库
conda install matplotlib pandas pip install numpy opencv-python Cython autoflake future ipython isort loguru numba pillow pre-commit pycocotools pylint scikit-image scipy shapely tensorboard tqdm wget yacs yapf protobuf==3.20
-
安装 mmcv,mmdet,具体安装方法参考文章
pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html
记录一个遇到的错误:
在安装过程中,我首先安装了 torch 1.9.1 ,然后在安装 mmcv-full 的过程中,一直卡在
Building wheel for mmcv-full (setup.py) …
更新了pip没用,将python版本从 3.8 降到 3.7 也没用
将torch更换为1.9.0后没问题了