Configuration of CVPR2021 tracking algorithm STMTrack (Template-free Visual Tracking with Space-time Memory Networks)

1. Paper download address

STMTrack: Template-free Visual Tracking with Space-time Memory Networks CVPR (2021). [paper][code]

2. Code download address

https://github.com/fzh0917/STMTrack

3. Create a virtual environment and activate it

conda create -n STMTrack python=3.7 -y
source activate STMTrack  

4. Install torch and torchvision

pip install torch===1.4.0 -f https://download.pytorch.org/whl/torch_stable.html

pip install torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html

5. Install dependent libraries

pip install -r requirements.txt

 6. Download the pre-trained model

Link: https://pan.baidu.com/s/16aqJy4eMFTDjEXuWFxvlLg 
Extraction code: z4aj 

Place the downloaded pre-training model into the newly created pretrain_model path in the project directory

7. Experimental settings

打开~/STMTrack-main/experiments/stmtrack/test/otb/stmtrack-googlenet-otb.yaml

1) Change the path of the pre-trained model, which is the path where we stored it in step 6

2) Change device_num

3) Add the path where the data set is located

data_root: "/home1/publicData/Datasets/OTB100"

8. Run the code

 python main/test.py --config experiments/stmtrack/test/otb/stmtrack-googlenet-otb.yaml

You may encounter the following errors

File "pycocotools/_mask.pyx", line 1, in init pycocotools._mask
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

Solution

The numpy version is too low, so you need to upgrade the numpy version!

pip install --upgrade numpy

9. Run successfully

Guess you like

Origin blog.csdn.net/qq_17783559/article/details/117557506