搭环境

作者: 南风无影 | 来源:发表于2017-12-26 17:44 被阅读63次
    1. 更新安装器
      apt-get update

    2. 安装git
      apt-get install git

    3. 安装ffmpeg
      sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
      sudo apt-get update
      sudo apt-get install ffmpeg

    4. 安装opencv
      opencv安装步骤,大概花到一个小时

    5. 安装Tracking-with-darkflow
      1 - Clone this repository : git clone https://github.com/bendidi/Tracking-with-darkflow.git
      2 - Initialize all submodules: git submodule update --init --recursive
      3 - Go to darkflow directory and do in place build: python setup.py build_ext --inplace
      step3:
      提示:ImportError: No module named Cython.Build

    Error: cython没安装

    sudo pip install Cython --install-option="--no-cython-compile"
    再执行step3, ok


    • 运行python run-file.py 之前,先做一些准备

    下载tensorflow的权重文件

    cd Tracking-with-darkflow/deep_sort
    下载地址
    tar -zxvf resource.tgz

    下载yolo的权重文件

    cd Tracking-with-darkflow/darkflow
    mkdir bin
    cd bin
    wget https://pjreddie.com/media/files/yolo.weights

    使用修改后git的最新配置文件

    git clone https://github.com/hailigu/pedestrian-attr.git
    cp ~/gongjia/pedestrian-attr/code/Tracking-with-darkflow/* Tracking-with-darkflow/

    使用修改后git的最新darkflow文件

    rm -rf Tracking-with-darkflow/darkflow
    ln -s ~/gongjia/pedestrian-attr/code/darkflow Tracking-with-darkflow/darkflow

    Error: sklearn 不能import

    sudo pip install sklearn

    Error: 找不到numpy.h gcc 出错
    image.png

    export CFLAGS=-I/usr/local/lib/python2.7/dist-packages/numpy/core/include

    最后执行:
    python run-file.py

    相关文章

      网友评论

        本文标题:搭环境

        本文链接:https://www.haomeiwen.com/subject/sjfjgxtx.html