Object detection api训练教程踩过的坑----SSD moblienet迁移学习

先说下笔者的系统版本
windows 10 64bit
Python 3.6
tensorflow 1.19
  1. tensorflow是否有必要升级到2.0.
    看到有人用tensorflow 1.10也跑通了。我想针对已经有tensorflow的就没有必要强制升级到2.0。新装就直接上2.0吧
  2. 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)
Object detection api训练教程踩过的坑----SSD moblienet迁移学习

解压后,进入PythonAPI目录下,运行。
python setup.py build
如果编译通过,则继续
python setup.py install
Object detection api训练教程踩过的坑----SSD moblienet迁移学习
如果编译不通过,通常会遇到如下几种提示:
Object detection api训练教程踩过的坑----SSD moblienet迁移学习
Microsoft Visual C++ 14.0 is required.(版本提示不一定是14.0。补充下,14.0是VS的内部版本号,对外就是VS2015)
笔者写此文时,官网上能链接到的最接近VS2015,只有VS2017。
Object detection api训练教程踩过的坑----SSD moblienet迁移学习
微软官网下载
笔者下载Community社区版 vs_community_1664744170.1568599600.exe 才1.22MB
离线包如何下载https://blog.51cto.com/cfy10/2446960

另外说下,网上查
有安装Visual C++ Redistributable for Visual Studio 2015,微软官网下载
有安装Microsoft Visual C++ Compiler for Python 2.7,微软官网下载
上述安装后,还是报错
Object detection api训练教程踩过的坑----SSD moblienet迁移学习
再查这个错误,只能乖乖去安装Visual Studio 2017。所以从一开始就可以直接安装VS2017

  1. 在jupyter notebook中运行object_detection_tutorial.ipynb时,提示"服务似乎挂掉了,但是会立刻重启的."后无果。
    文章整理中...

Object detection api训练教程踩过的坑----SSD moblienet迁移学习

上一篇:高效整洁CSS代码原则 (下)


下一篇:【C#通用功能】1.DataTable与List等集合互转