先说下笔者的系统版本
windows 10 64bit
Python 3.6
tensorflow 1.19python
- Tensorflow是否有必要升级到2.0.
建议不要,不要,不要升级到2.X。
缘由:Tensorflow 2.0 开始不集成contrib(2.0的安装whl才49MB,1.14.0+的whl都295MB。明显集成更多)
并且关键是升级到2.0反而原来一些跑通的代码报AttributeError: module 'tensorflow' has no attribute 'GraphDef'
等各类attribute找不到
固然,大牛本身编译集成就不在此列
- pycocotools在win10下如何安装
运行
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
提示
fatal: unable to access 'https://github.com/philferriere/cocoapi.git/': error:1407742E:SSL routines:SSL23GETSERVERHELLO:tlsv1 alert protocol version
Command "git clone -q https://github.com/philferriere/cocoapi.git C:\Users\A56\AppData\Local\Temp\pip-req-build-a6ghuq8" failed with error code 128 in None
看提示内容是github未经过SSL验证。因为笔者的git使用有一段时间了,不知道是否曾经绑定过其它验证证书或帐号。故没法验证经过。(在其它未安装过git的win10机器上,能够跑通。无此提示)
笔者在该状况下使用的方法是,直接到该git库下下载zip包(cocoapi-master.zip)
git
解压后,进入PythonAPI目录下,运行。
python setup.py build
若是编译经过,则继续
python setup.py install

若是编译不经过,一般会遇到以下几种提示:

Microsoft Visual C++ 14.0 is required.(版本提示不必定是14.0。补充下,14.0是VS的内部版本号,对外就是VS2015)
笔者写此文时,官网上能连接到的最接近VS2015,只有VS2017。

微软官网下载
笔者下载Community社区版 vs_community_1664744170.1568599600.exe 才1.22MB
离线包如何下载https://blog.51cto.com/cfy10/2446960github
另外说下,网上查
有安装Visual C++ Redistributable for Visual Studio 2015,微软官网下载
有安装Microsoft Visual C++ Compiler for Python 2.7,微软官网下载
上述安装后,仍是报错

再查这个错误,只能乖乖去安装Visual Studio 2017。因此从一开始就能够直接安装VS2017windows
- 在jupyter notebook中运行object_detection_tutorial.ipynb时,提示"服务彷佛挂掉了,可是会马上重启的."后无果。问题解决了https://blog.51cto.com/cfy10/2447113这篇笔记里会写问题修正,并开始运行训练集。