-
Couldn't load subscription status.
- Fork 45.4k
Description
I download the models: https://github.com/tensorflow/models
I installed all and I do in directory: /models-master/:
$ protoc object_detection/protos/*.proto --python_out=.
$ export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim
$ python object_detection/builders/model_builder_test.py
All fine, but, If I try do:
https://github.com/tensorflow/models/blob/master/object_detection/g3doc/running_locally.md
First I download annotations and images in directory: /object_detection/ , and I do in directory: /models-master/object_detection/
$ tar -xvf annotations.tar.gz
$ tar -xvf images.tar.gz
$ python create_pet_tf_record.py --data_dir=pwd --output_dir=pwd
In the pipeline I use the "faster_rcnn_resnet101_pets.config" and I changed the next:
fine_tune_checkpoint: "/home/fperez/Descargas/models-master/object_detection/model.ckpt"
I don't know, where the model.ckpt is. The other change is:
"""
train_input_reader: {
tf_record_input_reader {
input_path: "/home/fperez/Descargas/models-master/object_detection/pet_train.record"
}
label_map_path: "/home/fperez/Descargas/models-master/object_detection/data/pet_label_map.pbtxt"
}
eval_config: {
num_examples: 2000
}
eval_input_reader: {
tf_record_input_reader {
input_path: "/home/fperez/Descargas/models-master/object_detection/pet_val.record"
}
label_map_path: "/home/fperez/Descargas/models-master/object_detection/data/pet_label_map.pbtxt"
}
"""
I do in directory: /models-master/
$ python object_detection/train.py --logtostderr --pipeline_config_path=object_detection/ --train_dir=object_detection/
and I had the next error:
"""
Traceback (most recent call last):
File "object_detection/train.py", line 198, in
tf.app.run()
File "/home/fperez/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 143, in main
model_config, train_config, input_config = get_configs_from_pipeline_file()
File "object_detection/train.py", line 103, in get_configs_from_pipeline_file
text_format.Merge(f.read(), pipeline_config)
File "/home/fperez/.local/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 125, in read
pywrap_tensorflow.ReadFromStream(self._read_buf, length, status))
File "/usr/lib/python2.7/contextlib.py", line 24, in exit
self.gen.next()
File "/home/fperez/.local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.FailedPreconditionError: object_detection
"""
But, when I do "import object_detection" in python terminal, It works fine. What is it my problem? Sorry for the inconvenience