models icon indicating copy to clipboard operation
models copied to clipboard

[object_detection] An error occurred when offline_eval_map_corloc was executed using pascal_voc_detection_metrics.

Open kurita236 opened this issue 8 years ago • 5 comments

Describe the problem

An error occurred when offline_eval_map_corloc was executed using pascal_voc_detection_metrics.

It will succeeded with coco_detection_metrics. It will failed with pascal_voc_detection_metrics, weighted_pascal_voc_detection_metrics and open_images_detection_metrics.

System information

  • What is the top-level directory of the model you are using:https://github.com/tensorflow/models/blob/master/research/object_detection/metrics/offline_eval_map_corloc.py
  • Have I written custom code:No
  • OS Platform and Distribution: Windows 7 64 bit
  • TensorFlow installed from (source or binary): pip install --upgrade tensorflow==1.8.0
  • TensorFlow version (use command below): b'v1.8.0-0-g93bc2e2072' 1.8.0
  • Bazel version (if compiling from source): None
  • CUDA/cuDNN version: None
  • GPU model and memory: None
  • Exact command to reproduce:

python object_detection/inference/infer_detections.py ^ --input_tfrecord_paths=./coco_val.record ^ --output_tfrecord_path=./detections.tfrecord-00000-of-00001 ^ --inference_graph=./frozen_inference_graph.pb ^ --discard_image_pixels

echo label_map_path: './object_detection/data/mscoco_label_map.pbtxt' > ./input_config.pbtxt echo tf_record_input_reader: { input_path: './detections.tfrecord-00000-of-00001' } >> ./input_config.pbtxt

echo metrics_set: 'pascal_voc_detection_metrics' > ./eval_config.pbtxt

python -m object_detection.metrics.offline_eval_map_corloc ^ --eval_dir=. ^ --eval_config_path=./eval_config.pbtxt ^ --input_config_path=./input_config.pbtxt

Logs

INFO:tensorflow:Processing file: .\detections.tfrecord-00000-of-00001 INFO:tensorflow:Processed 0 images... Traceback (most recent call last): File "C:\Users\user\Miniconda3\envs\tensorflow_detector\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\user\Miniconda3\envs\tensorflow_detector\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File ".\models\research\object_detection\metrics\offline_eval_map_corloc.py", line 173, in tf.app.run(main) File "C:\Users\user\Miniconda3\envs\tensorflow_detector\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run _sys.exit(main(argv)) File ".\models\research\object_detection\metrics\offline_eval_map_corloc.py", line 166, in main metrics = read_data_and_evaluate(input_config, eval_config) File ".\models\research\object_detection\metrics\offline_eval_map_corloc.py", line 124, in read_data_and_evaluate decoded_dict) File ".\models\research\object_detection\utils\object_detection_evaluation.py", line 195, in add_single_ground_truth_image_info (groundtruth_dict[standard_fields.InputDataFields.groundtruth_difficult] AttributeError: 'NoneType' object has no attribute 'size'

kurita236 avatar May 21 '18 09:05 kurita236

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. Have I written custom code Exact command to reproduce

tensorflowbutler avatar May 27 '18 03:05 tensorflowbutler

I added the following items.

Have I written custom code Exact command to reproduce

Also I changed from original tfrecord/pbtxt to mscoco's. It also reproduced when using mscoco's.

kurita236 avatar Jun 05 '18 09:06 kurita236

See https://stackoverflow.com/questions/47506730/tf-object-detection-api-compute-evaluation-measures-failed/50507864#50507864

NPetsky avatar Feb 05 '19 17:02 NPetsky

@NPetsky I do not find a file called object_detection/metrutils/object_detection_evaluation.py and in case you mean to change /utils/object_detection_evaluation.py I am not sure what to replace between line 195 and 198. @kurita236 Have you solved this issue?

paviddavid avatar Apr 17 '19 15:04 paviddavid

Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

tensorflowbutler avatar Jan 29 '20 23:01 tensorflowbutler