Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TensorFlow Object Detection API: specifying multiple data_augmentation_options

I'm wondering if there's any difference between specifying the data augmentations like this:

data_augmentation_options {
  random_horizontal_flip {
  }
}
data_augmentation_options {
  ssd_random_crop {
  }
}

Or like this:

data_augmentation_options {
  random_horizontal_flip {
  }
  ssd_random_crop {
  }
}

In the object detection pipeline file?

All the samples in the models repo use the first format, but the second format is accepted as well.

like image 509
jvlier Avatar asked Nov 19 '18 21:11

jvlier


People also ask

How do you train a custom model for object detection?

Download pre-trained model There are many pre-trained object detection models available in the model zoo. In order to train them using our custom data set, the models need to be restored in Tensorflow using their checkpoints ( . ckpt files), which are records of previous model states.


1 Answers

The only correct format is the first one.

While the second one will not break the pipeline, it will only take the first specified option. You can verify this yourself by inspecting the created pipeline.config in model_dir. The reason for that is that data_augmentation_options is of type PreprocessingStep which consists of a oneof preprocessing_step. Note the oneof.

On the other hand, data_augmentation_options is repeated, thus you can specify

data_augmentation_options {
  augmentation_option_1 {
  }
}
data_augmentation_options {
  augmentation_option_2 {
  }
}
...

and so on, as many as you like.

like image 156
netanel-sam Avatar answered Sep 26 '22 19:09

netanel-sam