I am training FasterRCNN for MobileNetV1.
This model zoos doesn't have pre-trained model for FasterRCNN for MobileNetV1.
So I used pre-trained model from here.
But I have error as variables are not available in checkpoint. Quite a lot of warnings and I showed some of them. These are warning and but training still can proceed with no pretrained weights.
My query is why I can't use these pretrained weights fro FasterRCNN.
In this tutorial, it is mentioned at the middle as "We typically initialize the weights of this feature extractor using those from the Slim Resnet-101 classification checkpoint, and we know that images were preprocessed when training this checkpoint by subtracting a channel mean from each input image. Thus, we implement the preprocess function to replicate the same channel mean subtraction behavior."
Why I can't use those weights?
I load pretrained model in the config file as
fine_tune_checkpoint: "object_detection/data/mobilenet_v1_1.0_224/mobilenet_v1_1.0_224.ckpt"
from_detection_checkpoint: true
The warnings are
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/beta] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/gamma] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_mean] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_variance] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_0/weights] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/beta] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/gamma] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_mean] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_variance] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_depthwise/depthwise_weights] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/beta] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/gamma] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_mean] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_variance] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_10_pointwise/weights] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_mean] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_variance] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_depthwise/depthwise_weights] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/beta] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/gamma] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_mean] is not available in checkpoint
WARNING:root:Variable [FirstStageFeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_variance] is not available in checkpoint
Yes pre-trained model from here can be used. What variables are needed to initialize and what variable are available from loaded checkpoint can be checked from variable_names_map. From there, select the variable and initialize to further fine tuning.
Need a bit of modification to the Tensorflow's code mainly at utils/variables_helper.py file.
What to be in FirstStage and SecondStage of FasterRCNN are decided at faster_rcnn_mobilenet_v1_feature_extractor.py