Windows安装部署Tensorflow object detect过程中的问题处理

在配置Tensorflow过程中有一行命令是

python object_detection/builders/model_builder_test.py

过程中出现了

NameError: name 'xrange' is not defined

解决方法:

打开这个文件

object_detection\anchor_gen
erators\multiscale_grid_anchor_generator.py

把其中的xrange改成range

原因:

这是由于python新版本的变化导致的问题,使用python2.x的话不会出现...

2

问题提示:

Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated.

解决方法:

pip install h5py==2.8.0rc1

原因:

h5py和numpy 版本冲突,更新到rc1版本即可

3

问题:

在开始的时候通过pip install --upgrade --ignore-installed tensorflow这个命令安装tensorflow,有可能提示这个:

distributed 1.21.8 requires msgpack, which is not installed

解决:

pip install msgpack

原因:

没安装msgpack

4

问题:

找不到train.py

解决&原因:

在Tensorflow Object Detection API最新版本中,训练文件已经改为

model_main.py

点评:这是最坑的

5

问题:

训练时

No module named 'pycocotools'

解决

pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

原因:

缺少coco这个库

但是官方版本不支持windows.以上这个git地址是别人改的windows版