windows+anaconda+tensorflow+obje
1. 下载anaconda
下载链接/参考[https://mirror.tuna.tsinghua.edu.cn/help/anaconda/]
2. 检验安装
conda -V
3. 创建虚拟环境
# 查看当前虚拟环境
conda env list
# 创建
conda create -n tensorflow python=3.6
# 进入
activate tensorflow
# 退出
deactivate tensorflow
4. 下载tensorflow
activate tensorflow
pip install tensorflow
pip install jupyter #启动jupyter notebook,目录时当前启动目录
pip install cython
...(相关包)
5. 校验tensorflow安装情况
#demo.py
# -*- encoding -*-
from tensorflow as tf
a = tf.constant(2)
b = tf.constant(3)
c = tf.add(a,b)
with tf.Session() as sess:
print(sess.run(c)) #5
6. 结合models(object_detection)
# 下载
[https://github.com/tensorflow/models]或[https://pan.baidu.com/s/1a9pBaejcr-OKLiai3htheQ]
# 检查依赖
[https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md]
# 安装protobuf[参考:https://blog.csdn.net/zhaoyoulin2016/article/details/80615687]
[https://github.com/protocolbuffers/protobuf]
# cmdr可以在windows中使用linux命令,若遇到gz压缩文件
将加压的目录放到c:\windows目录下,切换目录运行以下命令
protoc --python_out=. object_detection/protos/*.proto
# 校验,就在demo.py加入from object_detection.utils import label_map_util,由于object_detection没有加入windows-path中,所以需要切换到该目录下运行(虚拟环境中)
# 以上没有报错,就可以参考该博客文章[https://blog.csdn.net/dy_guox/article/details/79111949],接下来进行你漫长的西天取经之旅。