tensorflow / models

Models and examples built with TensorFlow
Other
77.18k stars 45.75k forks source link

eval.py evaluates same image multiple times #3543

Closed jkravanja closed 4 years ago

jkravanja commented 6 years ago

While evaluating a Mask RCNN model, i noticed that same images get evaluated multiple times. I counted the number of times images repeated and it was the same as 'num_readers' variable set in the configuration file. This was my initial configuration:

eval_config: {
  eval_interval_secs: 300
  num_examples: 500
  max_evals: 10
  num_visualizations: 500
  visualization_export_dir: "PATH/eval_detections/"
}
eval_input_reader: {
  tf_record_input_reader {
    input_path: "PATH/eval.record"
  }
  label_map_path: "PATH/labelmap.pbtxt"
  load_instance_masks: true
  mask_type: PNG_MASKS
  shuffle: false
  num_readers: 6
  queue_capacity: 10
  prefetch_size: 4
  min_after_dequeue: 4
}

Visualizations (images with bounding boxes) were saved to "PATH/eval_detections/". However, i found out that there were 6 instances of each image (which is exactly num_readers). After setting num_readers: 1, i get the correct output (one visualization per image)

Should the readers not read different files, but do this in parallel, instead of 6 readers reading the same image 6 times?

tensorflowbutler commented 6 years ago

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. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce

tensorflowbutler commented 4 years ago

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.