简体   繁体   中英

Unable to load finetune_checkpoint in object detection training

I am following this tutorial .

I am using Oxford-IIIT Pet data and config file similar to this .

In the pipeline_config file, I have specified fine tune check point as

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

But when I run, python object_detection/train.py ... --train_dir=${PATH_TO_TRAIN_DIR}

I am getting a list of warnings.

WARNING:root:Variable [MobilenetV1/Conv2d_0/BatchNorm/beta] not available in checkpoint.

.

.

.

WARNING:root:Variable [MobilenetV1/Conv2d_9_pointwise/weights] not available in checkpoint

and program exits saying

ValueError: No variables to save

I have inspected the ckpt in python using

print_tensors_in_checkpoint_file('{PATH TO}/ssd_mobilenet_v1_coco_11_06_2017/model.ckpt/model.ckpt', '',"")

The output was a list.

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

.

.

.

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

Note :Training script runs fine when finetune_checkpoint is disabled by

from_detection_checkpoint: true

in pipeline config file

Setting from_detection_checkpoint: true is actually required for the checkpoint file that you are using because that model was trained as a detector (so nothing is being disabled).

You would only set from_detection_checkpoint: false if you wanted to train starting from one of the Slim models that was pre-trained for Imagenet classification.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM