tensorflow / models

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

objection detection data augmentation - random_jpeq_quality error #7875

Open ecatkins opened 4 years ago

ecatkins commented 4 years ago

System information

Describe the problem

I have tried to add in different data augumentations to the config file to train a Faster R-CNN with Resnet-101. When I try to add random_jpeg_quality I receive the following error

  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/gen_image_ops.py", line 1324, in encode_jpeg
    quality = _execute.make_int(quality, "quality")
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/eager/execute.py", line 108, in make_int
    (arg_name, repr(v)))
TypeError: Expected int for argument 'quality' not <tf.Tensor 'RandomJpegQuality/cond/random_uniform:0' shape=() dtype=int32>.

This is the way I have added it to the data_augmentation_options in the config file (but I have also tried it with no arguments i.e. just leaving it to the defaults)

    random_jpeg_quality {
      random_coef: 0.5
      min_jpeg_quality: 40
      max_jpeg_quality: 90
    }
roger1993 commented 4 years ago

I met the same problem, random_jpeg_quality doesnt work.