Object detection API, training part: NewRandomAccessFile failed to Create/Open: data/object-detection.pbtxt
System information
- What is the top-level directory of the model you are using: Tensorflow\models\research\object_detection
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No, followed the tutorial about Object Detection API made by sentdex
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- TensorFlow installed from (source or binary): pip install, GPU version of Tensorflow
- TensorFlow version (use command below): 1.13.1
- Bazel version (if compiling from source): N/A
- CUDA/cuDNN version: 10.0.130 / 7.3.1
- GPU model and memory: NVIDIA GTX970M, 3GB
- Exact command to reproduce: python legacy\train.py --logtostderr --pipeline_config_path=training\faster_rcnn_inception_v2_pets.config --train_dir=training\
Describe the problem
When I try this command in the anaconda prompt: (from ...Tensorflow\models\research\object_detection)
python legacy/train.py --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config --logtostderr
It should start training to detect the objects I want but I get this error:
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: data/object-detection.pbtxt : Le fichier sp\udce9cifi\udce9 est introuvable. ; No such file or directory
And I can't figure why I get this error, the object-detection.pbtxt is in the right place, I have also tried to put entire path ( C:/folder1/folder2/.../data/object-detection.pbtxt ) in the config file. I tried to use normal / double slash or backslash in my command line and inside the config file.
Is it because of object-detection.pbtxt that is considered as a .txt file when I created it with the notepad ? Hoping to find a solution quick.
Source code / logs
Here is the part of the CONFIG file where I specified the different paths:
train_input_reader: {
tf_record_input_reader {
input_path: "data\train.record-?????-of-00010"
}
label_map_path: "data\objectdetection.pbtxt"
}
eval_config: {
metrics_set: "coco_detection_metrics"
num_examples: 1101
}
eval_input_reader: {
tf_record_input_reader {
input_path: "data\test.record-?????-of-00010"
}
label_map_path: "data\objectdetection.pbtxt"
shuffle: false
num_readers: 1
}
For me the combination of escaping the backslash AND using the full path worked:
eval_input_reader: {
tf_record_input_reader {
input_path: "D:\\Projects\\TFruns\\Run1\\data\\eval.record"
}
label_map_path: "D:\\Projects\\TFruns\\Run1\\data\\labelmap.pbtxt"
shuffle: false
num_readers: 1
}
Hope this helps.
In any case, I'm calling model_main: python object_detection/model_main.py , which might handle things differently.. Not sure, but you could try to use that instead.
For me the combination of escaping the backslash AND using the full path worked:
eval_input_reader: { tf_record_input_reader { input_path: "D:\\Projects\\TFruns\\Run1\\data\\eval.record" } label_map_path: "D:\\Projects\\TFruns\\Run1\\data\\labelmap.pbtxt" shuffle: false num_readers: 1 }Hope this helps.
In any case, I'm calling model_main:
python object_detection/model_main.py, which might handle things differently.. Not sure, but you could try to use that instead.
Thank you bro you solved my day