1.训练文件的配置
将生成的csv和record文件都放在新建的mydata文件夹下,并打开object_detection文件夹下的data文件夹,复制一个后缀为.pbtxt的文件到mtdata文件夹下,并重命名为gaoyue.pbtxt
用记事本打开该文件,因为我只分了一类,所以将其他内容删除,只剩下这一个类别,并将name改为gaoyue。
这时我们拥有的所有文件如下图所示。
我们在object_detection文件夹下新建一个training文件夹,在里面新建一个记事本文件并命名为 ssd_mobilenet_v1_coco.config
打开,输入以下代码,按右边注释进行修改
#SSD with Mobilenet v1 configuration for MSCOCO Dataset.#Users should configure the fine_tune_checkpoint field in the train config as#well as the label_map_path and input_path fields in the train_input_reader and#eval_input_reader. Search for "PATH_TO_BE_CONFIGURED" to find the fields that#should be configured.
model {
ssd {
num_classes:1 #你类别的数量,我这里只分了一类
box_coder {
faster_rcnn_box_coder {
y_scale:10.0x_scale:10.0height_scale:5.0width_scale:5.0}
}
matcher {
argmax_matcher {
matched_threshold:0.5unmatched_threshold:0.5ignore_thresholds: false
negatives_lower_than_unmatched: true
force_match_for_each_row: true
}
}
similarity_calculator {
iou_similarity {
}
}<