Models: from_detection_checkpoint missed in faster_rcnn_inception_resnet_v2_atrous_oid.config

Created on 10 Mar 2018  路  7Comments  路  Source: tensorflow/models

Hi,

It should be from_detection_checkpoint: true
inside https://github.com/tensorflow/models/blob/master/research/object_detection/samples/configs/faster_rcnn_inception_resnet_v2_atrous_oid.config

Without it model can't load checkpoint.

Most helpful comment

I see your point, but this configuration placed under object_detection folder, and have link from object_detection model zoo page.
It means that main purpose which it will be used should be object detection.

People who start using object detection model zoo will be very confused when they doing everything by instruction and get error at the end.

All 7 comments

It depends on what your use case is.

  • If you want to fine tune a trained detection checkpoint, then you should assign a detection ckpt path to fine_tune_checkpoint and set from_detection_checkpoint to true.
  • If you want to load a pre-trained classification checkpoint to initialize your training, you should provide a classification ckpt path to fine_tune_checkpoint and set from_detection_checkpoint to false.

I see your point, but this configuration placed under object_detection folder, and have link from object_detection model zoo page.
It means that main purpose which it will be used should be object detection.

People who start using object detection model zoo will be very confused when they doing everything by instruction and get error at the end.

When you start to modify the config file, you should go over this section, especially Model Parameter Initialization in your case.

@pkulzc I noticed that if from_detection_checkpoint is not set to true for the faster-rcnn model pretrained on oid, an error is thrown related to not having a variable to save the model...

By default fine_tune_checkpoint reads a classification checkpoint instead of a detection one. We will probably explicitly set that soon so people don't get confused any more.
See Model Parameter Initialization for details.

I was stuck with same problem and found the following discrepancy.

We get rid of the arg_scope (like FirstStageFeatureExtractor, SecondStageFeatureExtractor) while reading the model at (object_detection\meta_architectures\faster_rcnn_meta_arch.py: restore_from_classification_checkpoint_fn).
But, while finding available variable names in ckpt compare variable name with name including the arg_scope. (object_detection\utils\variables_helper.py: get_variables_available_in_checkpoint)
So, while trying to read the model without having _from_detection_checkpoint: true_ throws an error.

@pkulzc : Please correct me if I am wrong.

Hi There,
We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing.
If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.

Was this page helpful?
0 / 5 - 0 ratings