zoukankan      html  css  js  c++  java
  • 使用最新目标跟踪框mmtracking实现自己的目标跟踪项目

    使用最新目标跟踪框mmtracking实现自己的目标跟踪项目


    之前也一直在关注目标跟踪方面的项目,尤其是多目标跟踪,目前比较主流的多目标跟踪都是基于deepsort来做的,这方面开源的研究工作也比较少,最近突然看到Open-mmlab开源的mmtracking甚是欣喜,还是热乎的,准备好好研究一下!!!


    1 搭建环境

    1、创建虚拟环境

    conda create -n mmtrack python=3.7 -y

    2、激活虚拟环境

    conda activate mmtrack

    3、安装cudatoolkit

    conda install cudatookit=10.1

    如果安装失败,也可以去这里先下载cudatoolkit的离线包,然后再安装:

    conda install cudatoolkit-10.1.243-h6bb024c_0.tar.bz2

    4、安装torch和torchvision

    pip install torch==1.6.0 torchvision==0.7.0

    注意:

    torch和torchvision也是存在版本对应关系的!

    5、安装mmcv-fullmmdet

    pip install mmcv-full mmdet

    如果安装失败,也可以去pypi官网先下载编译好的whl安装包,然后再安装

    注意:

    mmcv-full 和mmdet存在版本依赖问题,可能会出现版本不对应的错误,因此我这里下载的都是最新版本的,mmcv-full=1.2.5、mmdet=2.8.0(安装时间20210106)

    6、克隆仓库代码

    git clone https://github.com/open-mmlab/mmtracking.git
    cd mmtracking

    7、安装和编译依赖

    pip install -r requirements/build.txt
    python setup.py develop

    编译成功打印输出信息如下:

    (mmtrack) shl@zhihui-mint:~/shl_res/1_project/mmtracking$ python setup.py develop
    running develop
    running egg_info
    writing mmtrack.egg-info/PKG-INFO
    writing dependency_links to mmtrack.egg-info/dependency_links.txt
    writing requirements to mmtrack.egg-info/requires.txt
    writing top-level names to mmtrack.egg-info/top_level.txt
    reading manifest file 'mmtrack.egg-info/SOURCES.txt'
    writing manifest file 'mmtrack.egg-info/SOURCES.txt'
    running build_ext
    Creating /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/mmtrack.egg-link (link to .)
    mmtrack 0.5.0 is already the active version in easy-install.pth
    
    Installed /home/shl/shl_res/1_project/mmtracking
    Processing dependencies for mmtrack==0.5.0
    Searching for flake8
    Reading https://pypi.org/simple/flake8/
    Downloading https://files.pythonhosted.org/packages/d4/ca/3971802ee6251da1abead1a22831d7f4743781e2f743bd266bdd2f46c19b/flake8-3.8.4-py2.py3-none-any.whl#sha256=749dbbd6bfd0cf1318af27bf97a14e28e5ff548ef8e5b1566ccfb25a11e7c839
    Best match: flake8 3.8.4
    Processing flake8-3.8.4-py2.py3-none-any.whl
    Installing flake8-3.8.4-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding flake8 3.8.4 to easy-install.pth file
    Installing flake8 script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/flake8-3.8.4-py3.7.egg
    Searching for setuptools_scm
    Reading https://pypi.org/simple/setuptools_scm/
    Downloading https://files.pythonhosted.org/packages/db/6e/2815f7c8561b088ccedc128681e64daac3d6b2e81a9918b007e244dad8b1/setuptools_scm-5.0.1-py2.py3-none-any.whl#sha256=62fa535edb31ece9fa65dc9dcb3056145b8020c8c26c0ef1018aef33db95c40d
    Best match: setuptools-scm 5.0.1
    Processing setuptools_scm-5.0.1-py2.py3-none-any.whl
    Installing setuptools_scm-5.0.1-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding setuptools-scm 5.0.1 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/setuptools_scm-5.0.1-py3.7.egg
    Searching for pytz>=2017.3
    Reading https://pypi.org/simple/pytz/
    Downloading https://files.pythonhosted.org/packages/89/06/2c2d3034b4d6bf22f2a4ae546d16925898658a33b4400cfb7e2c1e2871a3/pytz-2020.5-py2.py3-none-any.whl#sha256=16962c5fb8db4a8f63a26646d8886e9d769b6c511543557bc84e9569fb9a9cb4
    Best match: pytz 2020.5
    Processing pytz-2020.5-py2.py3-none-any.whl
    Installing pytz-2020.5-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding pytz 2020.5 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/pytz-2020.5-py3.7.egg
    Searching for py-cpuinfo
    Reading https://pypi.org/simple/py-cpuinfo/
    Downloading https://files.pythonhosted.org/packages/f6/f5/8e6e85ce2e9f6e05040cf0d4e26f43a4718bcc4bce988b433276d4b1a5c1/py-cpuinfo-7.0.0.tar.gz#sha256=9aa2e49675114959697d25cf57fec41c29b55887bff3bc4809b44ac6f5730097
    Best match: py-cpuinfo 7.0.0
    Processing py-cpuinfo-7.0.0.tar.gz
    Writing /tmp/easy_install-bq9yb6p8/py-cpuinfo-7.0.0/setup.cfg
    Running py-cpuinfo-7.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-bq9yb6p8/py-cpuinfo-7.0.0/egg-dist-tmp-d_xsyj0m
    zip_safe flag not set; analyzing archive contents...
    cpuinfo.__pycache__.cpuinfo.cpython-37: module references __file__
    creating /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/py_cpuinfo-7.0.0-py3.7.egg
    Extracting py_cpuinfo-7.0.0-py3.7.egg to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding py-cpuinfo 7.0.0 to easy-install.pth file
    Installing cpuinfo script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/py_cpuinfo-7.0.0-py3.7.egg
    Searching for toml
    Reading https://pypi.org/simple/toml/
    Downloading https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl#sha256=806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b
    Best match: toml 0.10.2
    Processing toml-0.10.2-py2.py3-none-any.whl
    Installing toml-0.10.2-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding toml 0.10.2 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/toml-0.10.2-py3.7.egg
    Searching for py>=1.8.2
    Reading https://pypi.org/simple/py/
    Downloading https://files.pythonhosted.org/packages/67/32/6fe01cfc3d1a27c92fdbcdfc3f67856da8cbadf0dd9f2e18055202b2dc62/py-1.10.0-py2.py3-none-any.whl#sha256=3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a
    Best match: py 1.10.0
    Processing py-1.10.0-py2.py3-none-any.whl
    Installing py-1.10.0-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding py 1.10.0 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/py-1.10.0-py3.7.egg
    Searching for pluggy<1.0.0a1,>=0.12
    Reading https://pypi.org/simple/pluggy/
    Downloading https://files.pythonhosted.org/packages/65/3e/e685d8a32b0f959bcfce51df06b2bdd0c8b14399ee0da22fe35a3e987842/pluggy-1.0.0.dev0-py2.py3-none-any.whl#sha256=467f0219e89bb5061a8429c6fc5cf055fa3983a0e68e84a1d205046306b37d9e
    Best match: pluggy 1.0.0.dev0
    Processing pluggy-1.0.0.dev0-py2.py3-none-any.whl
    Installing pluggy-1.0.0.dev0-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding pluggy 1.0.0.dev0 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/pluggy-1.0.0.dev0-py3.7.egg
    Searching for packaging
    Reading https://pypi.org/simple/packaging/
    Downloading https://files.pythonhosted.org/packages/b1/a7/588bfa063e7763247ab6f7e1d994e331b85e0e7d09f853c59a6eb9696974/packaging-20.8-py2.py3-none-any.whl#sha256=24e0da08660a87484d1602c30bb4902d74816b6985b93de36926f5bc95741858
    Best match: packaging 20.8
    Processing packaging-20.8-py2.py3-none-any.whl
    Installing packaging-20.8-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding packaging 20.8 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/packaging-20.8-py3.7.egg
    Searching for iniconfig
    Reading https://pypi.org/simple/iniconfig/
    Downloading https://files.pythonhosted.org/packages/9b/dd/b3c12c6d707058fa947864b67f0c4e0c39ef8610988d7baea9578f3c48f3/iniconfig-1.1.1-py2.py3-none-any.whl#sha256=011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3
    Best match: iniconfig 1.1.1
    Processing iniconfig-1.1.1-py2.py3-none-any.whl
    Installing iniconfig-1.1.1-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding iniconfig 1.1.1 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/iniconfig-1.1.1-py3.7.egg
    Searching for importlib-metadata>=0.12
    Reading https://pypi.org/simple/importlib-metadata/
    Downloading https://files.pythonhosted.org/packages/7a/85/ac225e35048e050a6351b6f1251cdb2b6060092f2c6840aff1d6319941b1/importlib_metadata-3.3.0-py3-none-any.whl#sha256=bf792d480abbd5eda85794e4afb09dd538393f7d6e6ffef6e9f03d2014cf9450
    Best match: importlib-metadata 3.3.0
    Processing importlib_metadata-3.3.0-py3-none-any.whl
    Installing importlib_metadata-3.3.0-py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding importlib-metadata 3.3.0 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/importlib_metadata-3.3.0-py3.7.egg
    Searching for attrs>=19.2.0
    Reading https://pypi.org/simple/attrs/
    Downloading https://files.pythonhosted.org/packages/c3/aa/cb45262569fcc047bf070b5de61813724d6726db83259222cd7b4c79821a/attrs-20.3.0-py2.py3-none-any.whl#sha256=31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6
    Best match: attrs 20.3.0
    Processing attrs-20.3.0-py2.py3-none-any.whl
    Installing attrs-20.3.0-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding attrs 20.3.0 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/attrs-20.3.0-py3.7.egg
    Searching for pycodestyle
    Reading https://pypi.org/simple/pycodestyle/
    Downloading https://files.pythonhosted.org/packages/10/5b/88879fb861ab79aef45c7e199cae3ef7af487b5603dcb363517a50602dd7/pycodestyle-2.6.0-py2.py3-none-any.whl#sha256=2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367
    Best match: pycodestyle 2.6.0
    Processing pycodestyle-2.6.0-py2.py3-none-any.whl
    Installing pycodestyle-2.6.0-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding pycodestyle 2.6.0 to easy-install.pth file
    Installing pycodestyle script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/pycodestyle-2.6.0-py3.7.egg
    Searching for pyflakes<2.3.0,>=2.2.0
    Reading https://pypi.org/simple/pyflakes/
    Downloading https://files.pythonhosted.org/packages/69/5b/fd01b0c696f2f9a6d2c839883b642493b431f28fa32b29abc465ef675473/pyflakes-2.2.0-py2.py3-none-any.whl#sha256=0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92
    Best match: pyflakes 2.2.0
    Processing pyflakes-2.2.0-py2.py3-none-any.whl
    Installing pyflakes-2.2.0-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding pyflakes 2.2.0 to easy-install.pth file
    Installing pyflakes script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/pyflakes-2.2.0-py3.7.egg
    Searching for mccabe<0.7.0,>=0.6.0
    Reading https://pypi.org/simple/mccabe/
    Downloading https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl#sha256=ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42
    Best match: mccabe 0.6.1
    Processing mccabe-0.6.1-py2.py3-none-any.whl
    Installing mccabe-0.6.1-py2.py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding mccabe 0.6.1 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/mccabe-0.6.1-py3.7.egg
    Searching for zipp>=0.5
    Reading https://pypi.org/simple/zipp/
    Downloading https://files.pythonhosted.org/packages/41/ad/6a4f1a124b325618a7fb758b885b68ff7b058eec47d9220a12ab38d90b1f/zipp-3.4.0-py3-none-any.whl#sha256=102c24ef8f171fd729d46599845e95c7ab894a4cf45f5de11a44cc7444fb1108
    Best match: zipp 3.4.0
    Processing zipp-3.4.0-py3-none-any.whl
    Installing zipp-3.4.0-py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding zipp 3.4.0 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/zipp-3.4.0-py3.7.egg
    Searching for typing-extensions>=3.6.4
    Reading https://pypi.org/simple/typing-extensions/
    Downloading https://files.pythonhosted.org/packages/60/7a/e881b5abb54db0e6e671ab088d079c57ce54e8a01a3ca443f561ccadb37e/typing_extensions-3.7.4.3-py3-none-any.whl#sha256=7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918
    Best match: typing-extensions 3.7.4.3
    Processing typing_extensions-3.7.4.3-py3-none-any.whl
    Installing typing_extensions-3.7.4.3-py3-none-any.whl to /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Adding typing-extensions 3.7.4.3 to easy-install.pth file
    
    Installed /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/typing_extensions-3.7.4.3-py3.7.egg
    Searching for terminaltables==3.1.0
    Best match: terminaltables 3.1.0
    Adding terminaltables 3.1.0 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for six==1.15.0
    Best match: six 1.15.0
    Adding six 1.15.0 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for seaborn==0.11.1
    Best match: seaborn 0.11.1
    Processing seaborn-0.11.1-py3.7.egg
    seaborn 0.11.1 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/seaborn-0.11.1-py3.7.egg
    Searching for numpy==1.19.5
    Best match: numpy 1.19.5
    Adding numpy 1.19.5 to easy-install.pth file
    Installing f2py script to /home/shl/anaconda3/envs/mmtrack/bin
    Installing f2py3 script to /home/shl/anaconda3/envs/mmtrack/bin
    Installing f2py3.7 script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for motmetrics==1.2.0
    Best match: motmetrics 1.2.0
    Processing motmetrics-1.2.0-py3.7.egg
    motmetrics 1.2.0 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/motmetrics-1.2.0-py3.7.egg
    Searching for mmpycocotools==12.0.3
    Best match: mmpycocotools 12.0.3
    Adding mmpycocotools 12.0.3 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for mmcls==0.7.0
    Best match: mmcls 0.7.0
    Processing mmcls-0.7.0-py3.7.egg
    mmcls 0.7.0 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/mmcls-0.7.0-py3.7.egg
    Searching for matplotlib==3.3.3
    Best match: matplotlib 3.3.3
    Adding matplotlib 3.3.3 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for dotty-dict==1.3.0
    Best match: dotty-dict 1.3.0
    Processing dotty_dict-1.3.0-py3.7.egg
    dotty-dict 1.3.0 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/dotty_dict-1.3.0-py3.7.egg
    Searching for scipy==1.6.0
    Best match: scipy 1.6.0
    Processing scipy-1.6.0-py3.7-linux-x86_64.egg
    scipy 1.6.0 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/scipy-1.6.0-py3.7-linux-x86_64.egg
    Searching for pandas==1.2.0
    Best match: pandas 1.2.0
    Processing pandas-1.2.0-py3.7-linux-x86_64.egg
    pandas 1.2.0 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/pandas-1.2.0-py3.7-linux-x86_64.egg
    Searching for xmltodict==0.12.0
    Best match: xmltodict 0.12.0
    Processing xmltodict-0.12.0-py3.7.egg
    xmltodict 0.12.0 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/xmltodict-0.12.0-py3.7.egg
    Searching for pytest-benchmark==3.2.3
    Best match: pytest-benchmark 3.2.3
    Processing pytest_benchmark-3.2.3-py3.7.egg
    pytest-benchmark 3.2.3 is already the active version in easy-install.pth
    Installing py.test-benchmark script to /home/shl/anaconda3/envs/mmtrack/bin
    Installing pytest-benchmark script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/pytest_benchmark-3.2.3-py3.7.egg
    Searching for pytest==6.2.1
    Best match: pytest 6.2.1
    Processing pytest-6.2.1-py3.7.egg
    pytest 6.2.1 is already the active version in easy-install.pth
    Installing py.test script to /home/shl/anaconda3/envs/mmtrack/bin
    Installing pytest script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/pytest-6.2.1-py3.7.egg
    Searching for flake8-import-order==0.18.1
    Best match: flake8-import-order 0.18.1
    Processing flake8_import_order-0.18.1-py3.7.egg
    flake8-import-order 0.18.1 is already the active version in easy-install.pth
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages/flake8_import_order-0.18.1-py3.7.egg
    Searching for Cython==0.29.21
    Best match: Cython 0.29.21
    Adding Cython 0.29.21 to easy-install.pth file
    Installing cygdb script to /home/shl/anaconda3/envs/mmtrack/bin
    Installing cython script to /home/shl/anaconda3/envs/mmtrack/bin
    Installing cythonize script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for setuptools==51.0.0.post20201207
    Best match: setuptools 51.0.0.post20201207
    Adding setuptools 51.0.0.post20201207 to easy-install.pth file
    Installing easy_install script to /home/shl/anaconda3/envs/mmtrack/bin
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for Pillow==8.1.0
    Best match: Pillow 8.1.0
    Adding Pillow 8.1.0 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for pyparsing==2.4.7
    Best match: pyparsing 2.4.7
    Adding pyparsing 2.4.7 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for python-dateutil==2.8.1
    Best match: python-dateutil 2.8.1
    Adding python-dateutil 2.8.1 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for cycler==0.10.0
    Best match: cycler 0.10.0
    Adding cycler 0.10.0 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Searching for kiwisolver==1.3.1
    Best match: kiwisolver 1.3.1
    Adding kiwisolver 1.3.1 to easy-install.pth file
    
    Using /home/shl/anaconda3/envs/mmtrack/lib/python3.7/site-packages
    Finished processing dependencies for mmtrack==0.5.0
    (mmtrack) shl@zhihui-mint:~/shl_res/1_project/mmtracking$
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301

    8、测试:

    python demo/demo_mot.py configs/mot/deepsort/sort_faster-rcnn_fpn_4e_mot17-private.py --input demo/demo.mp4 --output mot.mp4

    (mmtrack) shl@zhihui-mint:~/shl_res/1_project/mmtracking$ python demo/demo_mot.py configs/mot/deepsort/sort_faster-rcnn_fpn_4e_mot17-private.py --input demo/demo.mp4 --output mot.mp4
    2021-01-06 18:47:13,804 - mmtrack - INFO - load detector from: https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth
    Downloading: "https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth" to /home/shl/.cache/torch/hub/checkpoints/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth
    100.0%
    [>>>>>>                                            ] 1/8, 6.1 task/s, elapsed: 0s, ETA:     1s/home/shl/shl_res/1_project/mmtracking/mmtrack/models/mot/trackers/sort_tracker.py:192: UserWarning: This overload of nonzero is deprecated:
    	nonzero(Tensor input, *, Tensor out)
    Consider using one of the following signatures instead:
    	nonzero(Tensor input, *, bool as_tuple) (Triggered internally at  /pytorch/torch/csrc/utils/python_arg_parser.cpp:766.)
      active_dets = torch.nonzero(ids == -1).squeeze(1)
    [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 8/8, 8.3 task/s, elapsed: 1s, ETA:     0smaking the output video at mot.mp4 with a FPS of 3.0
    OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)'
    OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
    [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 8/8, 38.5 task/s, elapsed: 0s, ETA:     0s
    (mmtrack) shl@zhihui-mint:~/shl_res/1_project/mmtracking$ 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14

    注意:

    最新的输入和输出参数已经从-i-o,更改为了--input--output

    测试结果如下(我是从结果视频中随机截一张图示例),实际测试跟踪比较稳定和准确

    在这里插入图片描述

    2 mmtracking目标跟踪框及原理介绍

    持续更新中......

  • 相关阅读:
    vue开发常用技巧总结(一)
    js时间戳转固定日期格式输出处理
    vue恢复初始数据
    Feature Police导致iframe页面无法使用粘贴功能
    页面异步请求canceled 或 network中接口请求成功但无法查看返回值
    我在阿里云做云开发平台
    Python项目中的requirements文件
    Json常用格式
    浅谈开机启动_windows
    mmdetection 报错: AttributeError: ‘ConfigDict‘ object has no attribute ‘pipeline‘
  • 原文地址:https://www.cnblogs.com/shuimuqingyang/p/14325078.html
Copyright © 2011-2022 走看看