TensorFlow对象检测管道配置中data_augmentation_options的可能值是什么?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TensorFlow对象检测管道配置中data_augmentation_options的可能值是什么?相关的知识,希望对你有一定的参考价值。

我已成功使用TensorFlow训练了一个物体检测模型,其中的样本配置如下:https://github.com/tensorflow/models/tree/master/object_detection/samples/configs

现在我想微调我的配置以获得更好的结果。我在其中看到的一个有前景的选项是“train_config”下的“data_augmentation_options”。目前,它看起来像这样:

train_config: {
  batch_size: 1
  ...
  data_augmentation_options {
    random_horizontal_flip {
    }
  }
}

还有其他选项可以进行随机缩放,裁剪或调整亮度吗?

答案

preprocessor.proto中提供了选项列表:

NormalizeImage normalize_image = 1;
RandomHorizontalFlip random_horizontal_flip = 2;
RandomPixelValueScale random_pixel_value_scale = 3;
RandomImageScale random_image_scale = 4;
RandomRGBtoGray random_rgb_to_gray = 5;
RandomAdjustBrightness random_adjust_brightness = 6;
RandomAdjustContrast random_adjust_contrast = 7;
RandomAdjustHue random_adjust_hue = 8;
RandomAdjustSaturation random_adjust_saturation = 9;
RandomDistortColor random_distort_color = 10;
RandomJitterBoxes random_jitter_boxes = 11;
RandomCropImage random_crop_image = 12;
RandomPadImage random_pad_image = 13;
RandomCropPadImage random_crop_pad_image = 14;
RandomCropToAspectRatio random_crop_to_aspect_ratio = 15;
RandomBlackPatches random_black_patches = 16;
RandomResizeMethod random_resize_method = 17;
ScaleBoxesToPixelCoordinates scale_boxes_to_pixel_coordinates = 18;
ResizeImage resize_image = 19;
SubtractChannelMean subtract_channel_mean = 20;
SSDRandomCrop ssd_random_crop = 21;
SSDRandomCropPad ssd_random_crop_pad = 22;
SSDRandomCropFixedAspectRatio ssd_random_crop_fixed_aspect_ratio = 23;

您可以在preprocessor.py中查看有关每个选项的详细信息。参数可以作为键值对提供。

  data_augmentation_options {
    ssd_random_crop {
    }
  }
  data_augmentation_options {
    random_pixel_value_scale {
      minval: 0.6
    }
  }

以上是关于TensorFlow对象检测管道配置中data_augmentation_options的可能值是什么?的主要内容,如果未能解决你的问题,请参考以下文章

TensorFlow对象检测管道配置中data_augmentation_options的可能值是什么?

TensorFlow对象检测配置文件中的“num_examples:2000”是啥意思?

如何修改 ssd mobilenet 配置以使用 tensorflow 对象检测 API 检测小对象?

在 Tensorboard 中显示更多图像 - Tensorflow 对象检测

TensorFlow 对象检测 API 中的超参数优化

如何使用 Tensorflow 2 对象检测 API 恢复微调模型以进行测试?