资源分享:
PySOT:https://github.com/STVIR/pysot
预处理权重(model.pth):https://pan.baidu.com/s/1twTcDi2pzdLdlyZKQpOPvQ 提取码:dynb
UAV123:https://pan.baidu.com/s/1OAUG8IrdqTRpGbK4Nv-bhA 提取码:vp4r
由于Jetson Nano是armV8,Arch:aarch64,不能使用主流的方案使用miniforge创建python=3.7的虚拟环境,PS:支持cuda10的PyTorch没有python3.7,只找到了python3.6和python3.8。
因此,安装不了miniconda3和miniforge3。
系统环境
Ubuntu18.04
Jetpack4.6
CUDA10.2
python2=2.7
python3=3.6.9
直接将pysot放在Home目录下了
咨询一位大佬后,直接在源系统配置环境。
pip3 install numpy
pip3 install opencv-python
pip3 install pyyaml yacs tqdm colorama matplotlib cython tensorboardX
pip3 install pyyaml yacs tqdm colorama matplotlib cython tensorboardX
#Build extensions
cd pysot/
python3 setup.py build_ext --inplace
将model.pth预训练文件下载,放到对应的文件夹中
启动demo.py
直接启动报错了:ModuleNotFoundError: No module named ‘pysot.code’
export PYTHONPATH=/pysot:$PYTHONPATH
也可以直接写进.bashrc文件
vim ~/.bashrc
#末尾插入:
export PYTHONPATH=/pysot:$PYTHONPATH
#按Esc
:wq #保存并退出
source ~/.bashrc
可以启动了
#启动
python3 tools/demo.py \
--config experiments/siamrpn_r50_l234_dwxcorr/config.yaml \
--snapshot experiments/siamrpn_r50_l234_dwxcorr/model.pth \
--video demo/bag.avi
#启动,应用摄像头
python3 tools/demo.py \
--config experiments/siamrpn_r50_l234_dwxcorr/config.yaml \
--snapshot experiments/siamrpn_r50_l234_dwxcorr/model.pth
And then
Select a ROI and then press SPACE or ENTER button!
Cancel the selection process by pressing c button!
运行test.py
python3 tools/test.py \
--dataset UAV123 \
--snapshot experiments/siamrpn_alex_dwxcorr/model.pth --config experiments/siamrpn_alex_dwxcorr/config.yaml
运行eavl.py
python3 tools/eval.py --tracker_path results \
--dataset UAV123 --num 4 --tracker_prefix 'SiamMask'
配置 pysot-toolkit
pip3 install tqdm
pip3 install numpy
pip3 install glob3
pip3 install opencv-python
pip3 install colorama
pip3 install --user numba
安装numba出现问题
安装完重启
将各个算法处理结果存放于result文件夹中
python3 bin/eval.py --dataset_dir pysoy/datasets/UAV123 --dataset UAV123 --tracker_result_dir results/UAV123 --trackers SiamRPN_alex SiamRPN++_r50 SiamRPN++_Mobilev2 SiamMask_r50 --num 4 --show_video_level --vis