Hello @Olfa,
This explanation going to be lengthy one as I am explaining you from beginning.
Once we restore weights from checkpoint, we use parts of RetinaNet to reuse for
feature extraction layers and bounding box regression layer. I am sharing images for each procedure being done in the assignment for better understanding
Once model is detected, we check the class variable in the detection model which shows how box predictor is related WeightSharedConvolutionalBoxPredictor
Further _box_predictor is inspected for the class type which gives the input you are mentioning object_detection.predictors.convolutional_keras_box_predictor.WeightSharedConvolutionalBoxPredictor
After inspection, variables are checked for the box_predictor, which gives the below details
So when one inspects the _box_prediction_head and _predictions head at convolution keras_box_predictor.py file, it will point towards the bounding box predictions and the class_predict_heads which is a list of heads that predict the classes.
Hence _box_predictor._prediction_heads contain a dictionary that points to both the prediction layers (bounding boxes and the class(category)).
Now while defining checkpoints for the desired layers, in this checkpoints for box predictor and then for the model which directs you to this box predictor as well as the prediction layers, model directs to the prediction box head from previously defined or determined bounding box
Then one defines box_predictors_checkpoints to be checkpoint for these two layers of the detection_model box predictor by using tf.train.Checkpoint (which know that the box prediction head is the prediction layer for bounding boxes which gives you the same variable in the previous exercise when one was trying to restore the checkpoint and inspecting box_prediction head i.e.
I know it is lengthy read, read it again and again on how it is related. Feel free to ask if it is confusing or more doubts.
Regards
DP





