无法在对象检测训练中加载 finetune_checkpoint

Unable to load finetune_checkpoint in object detection training

我正在关注这个tutorial

我正在使用类似于 this 的 Oxford-IIIT Pet 数据和配置文件。

在pipeline_config文件中,我指定微调检查点为

fine_tune_checkpoint: "{PATH TO}/ssd_mobilenet_v1_coco_11_06_2017/model.ckpt"
from_detection_checkpoint: false

但是当我运行, python object_detection/train.py ... --train_dir=${PATH_TO_TRAIN_DIR}

我收到警告列表。

警告:root:变量 [MobilenetV1/Conv2d_0/BatchNorm/beta] 在检查点中不可用。

.

.

.

警告:根:变量[MobilenetV1/Conv2d_9_pointwise/weights]在检查点

中不可用

程序退出说

ValueError: 没有要保存的变量

我已经使用

检查了 python 中的 ckpt
print_tensors_in_checkpoint_file('{PATH TO}/ssd_mobilenet_v1_coco_11_06_2017/model.ckpt/model.ckpt', '',"")

输出是一个列表。

FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/beta (DT_FLOAT) [32]

.

.

.

FeatureExtractor/MobilenetV1/Conv2d_9_pointwise/weights (DT_FLOAT) [1,1,512,512]

注意:当finetune_checkpoint被

禁用时,训练脚本运行很好
from_detection_checkpoint: true

在管道配置文件中

您正在使用的检查点文件实际上需要设置 from_detection_checkpoint: true,因为该模型被训练为检测器(因此没有禁用任何东西)。

如果您想从为 Imagenet 分类预训练的 Slim models 之一开始训练,您只需设置 from_detection_checkpoint: false