I'm trying to train a model from an existing checkpoint following the these instructions.
I have configured the Object Detection Training Pipeline using the faster_rcnn_resnet101_voc07.config configuration.
In checkpoint section I have set the directory where are located the checkpoint files of the pretrained model faster_rcnn_resnet101_coco.tar.gz
Acording the to this issue the fine_tune_checkpoint can be a path to a directory containing the three files: (.data-00000-of-00001, .index, .meta).
So I set the path to the directory "/home/docs/car_dataset/models/model/train"
gradient_clipping_by_norm: 10.0
fine_tune_checkpoint: "/home/docs/car_dataset/models/model/train"
from_detection_checkpoint: true
num_steps: 800000
data_augmentation_options {
random_horizontal_flip {
}
}
However when I execute the script for training:
python object_detection/train.py --logtostderr\
--pipeline_config_path=/home/docs/car_dataset/models/model/faster_rcnn_resnet101_voc07.config\
--train_dir=/home/docs/car_dataset/models/model/train\
--num_gpus=2
I got the error:
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /home/docs/car_dataset/models/model/train: Failed precondition: /home/docs/car_dataset/models/model/train: perhaps your file is in a different file format and you need to use a different restore operator?
I have also tried setting the path to every file in the directory
fine_tune_checkpoint: "/home/docs/car_dataset/models/model/train/model.ckpt.meta"
but I get the error:
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /home/docs/car_dataset/models/model/train/model.ckpt.meta: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
What is the correct way to define a pre trained model in the pipeline configuration having the three files: (.data-00000-of-00001, .index, .meta).
Tensorflow version: 1.2.1
Fine-Tuning: Unfreeze a few of the top layers of a frozen model base and jointly train both the newly-added classifier layers and the last layers of the base model. This allows us to "fine-tune" the higher-order feature representations in the base model in order to make them more relevant for the specific task.
This section describes more precise adjustment of the rules for Data Loss Prevention. Check Point Software Blade on a Security Gateway that detects and prevents the unauthorized transmission of confidential information outside the organization. Acronym: DLP. in your organization.
What you have to do is to specify the whole path without the ".meta", ".index" and ".data-00000-of-00001" extensions. In your case, this looks to be: "/home/docs/car_dataset/models/model/train/model.ckpt" (which you'll notice is more specific than the directory).
Setting the path the following way works for me, ~/faster_rcnn_inception_resnet_v2_640x640/checkpoint/ckpt-0
ckpt-0 is the name of the index file without the .index extension
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With