TensorFlow 安装测试无误,下载Tensorflow object detection API在cmd中运行
python object_detection/builders/model_builder_test.py
报错1 ModuleNotFoundError: No module named ‘absl’, 下载absl-py-0.1.10.tar.gz,通过cmd安装,问题解决,重新测试
报错2 No module named ‘object_detection’ 在 Tensorflow安装目录下的site-packages下,新建一个TensorFlow_model.txt文件,内容为两条路径models-master\research\slim 和 models-master\research (models-master是Tensorflow object detection API下载解压出来的文件夹),然后把后缀名改为.pth,问题解决,重新测试
报错3No module named ‘research’,此报错同上面原理一样,在环境变量中加入 models-master,同时在TensorFlow_model.pth中也加入这一路径即可。
报错4 module ‘tensorflow.python.keras’ has no attribute ‘Model’ 将tensorflow版本由1.4 更新到1.5 , 问题解决,重新测试
报错4 module ‘tensorflow.python.util.compat’ has no attribute 'v1’版本不兼容,最新的Tensorflow object detection API版本针对Tensorflow2.0做了大量更改,采用以前低版本的Tensorflow object detection API以及低版本的TensorFlow,问题解决