Configuring the Object Detection Training Pipeline
前言
TensorFlow官方文档:Configuring the Object Detection Training Pipeline
配置文件的骨架
# The model configuration. This defines what type of model will be trained (ie. meta-architecture, feature extractor).
model {
(... Add model config here...)
}
# The train_config, which decides what parameters should be used to train model parameters (ie. SGD parameters, input preprocessing and feature extractor initialization values).
train_config : {
(... Add train_config here...)
}
# The train_input_config, which defines what dataset the model should be trained on.
train_input_reader: {
(... Add train_input configuration here...)
}
# The eval_config, which determines what set of metrics will be reported for evaluation.
eval_config: {
}
# The eval_input_config, which defines what dataset the model will be evaluated on. Typically this should be different than the training input dataset.
eval_input_reader: {
(... Add eval_input configuration here...)
}
请注意,路径也可以指向谷歌云存储桶(例如。“gs://project_bucket/train.record”)用于谷歌云。
配置train_config
train_config
定义了培训过程的各个部分:
- 模型参数初始化。
- 输入预处理。
- SGD参数。
输入预处理
可以使用train_config
中的data_augmentation_options
指定训练数据的增强。这个字段是可选的。
SGD参数
train_config
中的剩余参数是梯度下降的超参数。请注意,在这些配置文件中提供的最佳学习率可能取决于训练设置的具体情况(例如workers的数量,gpu的类型)。
配置eval_config
eval_config
主要配置两个参数num_examples
和metrics_set
num_examples
参数表示一个评估周期使用的批数(当前batch size为1),通常是评估数据集的总大小。
metrics_set
参数表示在评估期间运行哪些指标(如:coco_detection_metrics
)