Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 876
Sreeragh A R Avatar asked Dec 04 '25 08:12

Sreeragh A R


1 Answers

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.

like image 134
Jonathan Huang Avatar answered Dec 05 '25 22:12

Jonathan Huang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!