tensorflow / tensorflow/models

RuntimeError: Groundtruth tensor boxes has not been provided

Open
#9,775 0 comments 0 reactions 3 assignees View on GitHub

Nobody has claimed this yet.

models:research:odapi type:bug
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

I am working with tensorflow2 object detection API , And I am using faster rcnn model for transfer learning . I was training on Tree dataset scrapped from OpenImages dataset.
When ever training the code in colab it throwing this error ,

INFO:tensorflow:depth of additional conv before box predictor: 0 I0304 09:27:40.777933 139644899932032 convolutional_keras_box_predictor.py:154] depth of additional conv before box predictor: 0 Traceback (most recent call last): File "/content/models/research/object_detection/model_main_tf2.py", line 113, in <module> tf.compat.v1.app.run() File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/platform/app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 300, in run _run_main(main, args) File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "/content/models/research/object_detection/model_main_tf2.py", line 110, in main record_summaries=FLAGS.record_summaries) File "/usr/local/lib/python3.7/dist-packages/object_detection/model_lib_v2.py", line 523, in train_loop dummy_prediction_dict = detection_model.predict(dummy_image, dummy_shapes) File "/usr/local/lib/python3.7/dist-packages/object_detection/meta_architectures/faster_rcnn_meta_arch.py", line 830, in predict **side_inputs)) File "/usr/local/lib/python3.7/dist-packages/object_detection/meta_architectures/faster_rcnn_meta_arch.py", line 999, in _predict_second_stage image_shape, true_image_shapes) File "/usr/local/lib/python3.7/dist-packages/object_detection/meta_architectures/faster_rcnn_meta_arch.py", line 729, in _proposal_postprocess anchors, image_shape_2d, true_image_shapes) File "/usr/local/lib/python3.7/dist-packages/object_detection/meta_architectures/faster_rcnn_meta_arch.py", line 1754, in _postprocess_rpn ) = self._format_groundtruth_data(image_shapes) File "/usr/local/lib/python3.7/dist-packages/object_detection/meta_architectures/faster_rcnn_meta_arch.py", line 1891, in _format_groundtruth_data self.groundtruth_lists(fields.BoxListFields.boxes)) File "/usr/local/lib/python3.7/dist-packages/object_detection/core/model.py", line 118, in groundtruth_lists field)) RuntimeError: Groundtruth tensor boxes has not been provided

It works fine with efficientdet model upto 1000 epochs after then again it giving nan as loss .

I don't know why it throwing this error , what causes this problem .

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.