tensorflow / tensorflow/models
"The `eval_input_config` must be a input_reader_pb2.InputReader" in object detection training
@pkulzc is already working on this.
Since May 22, 2020.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
#5764 # System information
- What is the top-level directory of the model you are using: None
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04
- TensorFlow installed from (source or binary): pip install tensorflow==1.15
- TensorFlow version (use command below):1.15 cpu
- Bazel version (if compiling from source):None
- CUDA/cuDNN version:None
- GPU model and memory:None
- Exact command to reproduce:
Describe the problem
I am trying to train a SSD_mobilenet object detection model with Tensorflow object detection API. I have cloned the latest version and convert my dataset to tfrecord as the sample provided. Also I used sample config file and just changed the num_classes, fine_tune_checkpoint and path to train and test record.
after I run model_main.py after a few iterations the program stops with this error:
Traceback (most recent call last):
File "/home/soheilkoohi/models/research/object_detection/model_main.py", line 111, in
tf.app.run()
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "/home/soheilkoohi/models/research/object_detection/model_main.py", line 107, in main
tf.estimator.train_and_evaluate(estimator, train_spec, eval_specs[0])
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/training.py", line 473, in train_and_evaluate
return executor.run()
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/training.py", line 613, in run
return self.run_local()
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/training.py", line 714, in run_local
saving_listeners=saving_listeners)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 370, in train
loss = self._train_model(input_fn, hooks, saving_listeners)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1161, in _train_model
return self._train_model_default(input_fn, hooks, saving_listeners)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1195, in _train_model_default
saving_listeners)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1494, in _train_with_estimator_spec
_, loss = mon_sess.run([estimator_spec.train_op, estimator_spec.loss])
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/training/monitored_session.py", line 754, in run
run_metadata=run_metadata)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/training/monitored_session.py", line 1259, in run
run_metadata=run_metadata)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/training/monitored_session.py", line 1360, in run
raise six.reraise(*original_exc_info)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/six.py", line 703, in reraise
raise value
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/training/monitored_session.py", line 1345, in run
return self._sess.run(*args, **kwargs)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/training/monitored_session.py", line 1426, in run
run_metadata=run_metadata))
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/training/basic_session_run_hooks.py", line 594, in after_run
if self._save(run_context.session, global_step):
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_core/python/training/basic_session_run_hooks.py", line 619, in _save
if l.after_save(session, step):
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/training.py", line 519, in after_save
self._evaluate(global_step_value) # updates self.eval_result
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/training.py", line 539, in _evaluate
self._evaluator.evaluate_and_export())
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/training.py", line 920, in evaluate_and_export
hooks=self._eval_spec.hooks)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 480, in evaluate
name=name)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 522, in _actual_eval
return _evaluate()
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 504, in _evaluate
self._evaluate_build_graph(input_fn, hooks, checkpoint_path))
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1511, in _evaluate_build_graph
self._call_model_fn_eval(input_fn, self.config))
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1544, in _call_model_fn_eval
input_fn, ModeKeys.EVAL)
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1025, in _get_features_and_labels_from_input_fn
self._call_input_fn(input_fn, mode))
File "/home/soheilkoohi/models/venv/lib/python3.5/site-packages/tensorflow_estimator/python/estimator/estimator.py", line 1116, in _call_input_fn
return input_fn(**kwargs)
File "./research/object_detection/inputs.py", line 625, in _eval_input_fn
params=params)
File "./research/object_detection/inputs.py", line 681, in eval_input
raise TypeError('The eval_input_config must be a '
TypeError: The eval_input_config must be a input_reader_pb2.InputReader.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.