首页 > 解决方案 > Tensorflow 对象检测 NewRandomAccessFile 无法创建/打开

问题描述

我正在尝试在一组老鼠图像上运行对象检测 API,但它没有检测到我的.pbtxt文件。我正在运行 Windows 10、TensorFlow 1.13、Python 3.6.8。

这是我从对象检测目录运行的内容:

(mv) D:\training\Tensorflow\models\research\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config

我遇到了以下错误:

tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: D:\training\Tensorflow\models\research\object_detection\training\rat_face_detection.pbtxt : The system cannot find the file specified.; No such file or directory

这是我的\training目录:

05/22/2019  02:15 PM    <DIR>          .
05/22/2019  02:15 PM    <DIR>          ..
05/22/2019  02:38 PM             4,995 pipeline.config
05/22/2019  02:15 PM                42 rat_face_detection.pbtxt.txt
05/22/2019  02:37 PM             4,995 ssd_mobilenet_v1_pets.config
           3 File(s)         10,032 bytes
           2 Dir(s)  994,458,820,608 bytes free

所以文件确实在正确的位置。

这是 的值label_map_path"D:\\training\\Tensorflow\\models\\research\\object_detection\\training\\rat_face_detection.pbtxt"

我尝试过正斜杠,但在另一个线程上看到 Windows 需要反斜杠。

我知道这一点models\research\并且\models\research\slim正在路上。我还内置了两者\research\research\slim使用python setup.py buildpython setup.py install两者。

我究竟做错了什么?

标签: pythontensorflow

解决方案


推荐阅读