CenterTrack 模型安装与demo测试

下载工程代码

git clone https://github.com/xingyizhou/CenterTrack.git

安装步骤

安装参考教程 https://github.com/xingyizhou/CenterTrack/blob/master/readme/INSTALL.md

配置conda环境,编译DCNv2时候,先设置CUDA_HOME,export CUDA_HOME=/usr/local/cuda-10.0

conda create --name CenterTrack python=3.6

conda activate CenterTrack

conda install pytorch torchvision -c pytorch

pip install cython; pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'

pip install -r requirements.txt

cd $CenterTrack_ROOT/src/lib/model/networks/
# git clone https://github.com/CharlesShang/DCNv2/ # clone if it is not automatically downloaded by `--recursive`.
cd DCNv2
./make.sh

 环境版本

(CenterTrack) cody@cody:~/PycharmProjects/CenterTrack/src/lib/model/networks/DCNv2$ conda list
# packages in environment at /home/cody/anaconda3/envs/CenterTrack:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
_pytorch_select           0.2                       gpu_0  
argon2-cffi               20.1.0                    <pip>
async-generator           1.10                      <pip>
attrs                     20.2.0                    <pip>
backcall                  0.2.0                     <pip>
blas                      1.0                         mkl  
bleach                    3.2.1                     <pip>
ca-certificates           2020.10.14                    0  
cachetools                4.1.1                     <pip>
certifi                   2020.6.20                py36_0  
cffi                      1.14.3           py36he30daa8_0  
cudatoolkit               10.0.130                      0  
cudnn                     7.6.5                cuda10.0_0  
cycler                    0.10.0                    <pip>
Cython                    0.29.21                   <pip>
DCNv2                     0.1                       <pip>
decorator                 4.4.2                     <pip>
defusedxml                0.6.0                     <pip>
descartes                 1.1.0                     <pip>
easydict                  1.9                       <pip>
entrypoints               0.3                       <pip>
fire                      0.3.1                     <pip>
flake8                    3.8.4                     <pip>
flake8-import-order       0.18.1                    <pip>
freetype                  2.10.3               h5ab3b9f_0  
importlib-metadata        2.0.0                     <pip>
iniconfig                 1.1.1                     <pip>
intel-openmp              2020.2                      254  
ipykernel                 5.3.4                     <pip>
ipython                   7.16.1                    <pip>
ipython-genutils          0.2.0                     <pip>
ipywidgets                7.5.1                     <pip>
jedi                      0.17.2                    <pip>
Jinja2                    2.11.2                    <pip>
joblib                    0.17.0                    <pip>
jpeg                      9b                   h024ee3a_2  
jsonschema                3.2.0                     <pip>
jupyter                   1.0.0                     <pip>
jupyter-client            6.1.7                     <pip>
jupyter-console           6.2.0                     <pip>
jupyter-core              4.6.3                     <pip>
jupyterlab-pygments       0.1.2                     <pip>
kiwisolver                1.2.0                     <pip>
lcms2                     2.11                 h396b838_0  
ld_impl_linux-64          2.33.1               h53a641e_7  
libedit                   3.1.20191231         h14c3975_1  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 9.1.0                hdf63c60_0  
libpng                    1.6.37               hbc83047_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
libtiff                   4.1.0                h2733197_1  
llvmlite                  0.34.0                    <pip>
lz4-c                     1.9.2                heb0550a_3  
MarkupSafe                1.1.1                     <pip>
matplotlib                3.3.2                     <pip>
mccabe                    0.6.1                     <pip>
mistune                   0.8.4                     <pip>
mkl                       2020.2                      256  
mkl-service               2.3.0            py36he904b0f_0  
mkl_fft                   1.2.0            py36h23d657b_0  
mkl_random                1.1.1            py36h0573a6f_0  
motmetrics                1.2.0                     <pip>
nbclient                  0.5.0                     <pip>
nbconvert                 6.0.7                     <pip>
nbformat                  5.0.8                     <pip>
ncurses                   6.2                  he6710b0_1  
nest-asyncio              1.4.1                     <pip>
ninja                     1.10.1           py36hfd86e86_0  
notebook                  6.1.4                     <pip>
numba                     0.51.2                    <pip>
numpy                     1.19.1           py36hbc911f0_0  
numpy-base                1.19.1           py36hfa32c7d_0  
nuscenes-devkit           1.1.0                     <pip>
olefile                   0.46                       py_0  
opencv-python             4.4.0.44                  <pip>
openssl                   1.1.1h               h7b6447c_0  
packaging                 20.4                      <pip>
pandas                    1.1.3                     <pip>
pandocfilters             1.4.2                     <pip>
parso                     0.7.1                     <pip>
pexpect                   4.8.0                     <pip>
pickleshare               0.7.5                     <pip>
pillow                    7.2.0            py36hb39fc2d_0  
pip                       20.2.3                   py36_0  
pluggy                    0.13.1                    <pip>
progress                  1.5                       <pip>
prometheus-client         0.8.0                     <pip>
prompt-toolkit            3.0.8                     <pip>
ptyprocess                0.6.0                     <pip>
py                        1.9.0                     <pip>
py-cpuinfo                7.0.0                     <pip>
pycocotools               2.0.2                     <pip>
pycodestyle               2.6.0                     <pip>
pycparser                 2.20                       py_2  
pyflakes                  2.2.0                     <pip>
Pygments                  2.7.1                     <pip>
pyparsing                 2.4.7                     <pip>
pyquaternion              0.9.9                     <pip>
pyrsistent                0.17.3                    <pip>
pytest                    6.1.1                     <pip>
pytest-benchmark          3.2.3                     <pip>
python                    3.6.12               hcff3b4d_2  
python-dateutil           2.8.1                     <pip>
pytorch                   1.3.1           cuda100py36h53c1284_0  
pytz                      2020.1                    <pip>
PyYAML                    5.3.1                     <pip>
pyzmq                     19.0.2                    <pip>
qtconsole                 4.7.7                     <pip>
QtPy                      1.9.0                     <pip>
readline                  8.0                  h7b6447c_0  
scikit-learn              0.22.2                    <pip>
scipy                     1.5.2                     <pip>
Send2Trash                1.5.0                     <pip>
setuptools                50.3.0           py36hb0f4dca_1  
Shapely                   1.7.1                     <pip>
six                       1.15.0                     py_0  
sqlite                    3.33.0               h62c20be_0  
termcolor                 1.1.0                     <pip>
terminado                 0.9.1                     <pip>
testpath                  0.4.4                     <pip>
tk                        8.6.10               hbc83047_0  
toml                      0.10.1                    <pip>
torchvision               0.4.2           cuda100py36hecfc37a_0  
tornado                   6.0.4                     <pip>
tqdm                      4.50.2                    <pip>
traitlets                 4.3.3                     <pip>
wcwidth                   0.2.5                     <pip>
webencodings              0.5.1                     <pip>
wheel                     0.35.1                     py_0  
widgetsnbextension        3.5.1                     <pip>
xmltodict                 0.12.0                    <pip>
xz                        5.2.5                h7b6447c_0  
zipp                      3.3.0                     <pip>
zlib                      1.2.11               h7b6447c_3  
zstd                      1.4.5                h9ceee32_0  

下载模型文件

下载地址:https://github.com/xingyizhou/CenterTrack/blob/master/readme/MODEL_ZOO.md

放置位置:CenterNet_ROOT/models/

测试视频位置:CenterNet_ROOT/videos/4.mp4

测试命令

python demo.py tracking --load_model ../models/coco_tracking.pth --demo /path/to/image/or/folder/or/video 

这里依然采用pycharm配置相关参数,具体详情看本系列其他文章,ID 互换的可能性比较大

  • 0
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 23
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 23
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值