1 创建yolo环境
conda creat -n yolo python=3.6更换conda源,下载软件的时候会快些conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --set show_channel_urls yes创建后进入yolo环境,并安装Keras和tensorflow,我这块安装的是gpu版本的tensorflowsource activate yolo
pip install keras==2.1.5pip install tensorflow-gpu==1.6.0 #如果是gpu版本pip install tensorflow==1.6.0 #如果是cpu版本注意,这两个是二选一2 安装依赖在训练的过程中,会有很多依赖,所以提前安装一遍pip install Pillow
pip install matplotlibconda install ffmpegpip install opencv-contrib-pythonpip install opencv-python运行:
python yolo_video.py --gpu_num=1 –input=test.mp4 --output=2.mp4如果出现Failed to load the native TensorFlow runtime.
则,
解决办法就是:pip install --upgrade --ignore-installed tensorflow
更新一下tensorflow就好了