# Predictive Distillation Method of Anchor-Free Object Detection Model for Continual Learning
## 3 Methodology
### Prediction Distillation of Teacher Model  
This section describes the method used to distill the prediction of the t-model proposed in this study in detail. The anchor-free model targeting the object detection model consists of a final output layer as a matrix. In other words, if the KD technique commonly used in object detection is applied to the anchor-free model as it is, then it is learned by minimizing the differences between the specific layers of the t-model and the s-model. Similar studies have previously noted that it is difficult to expect a significant effect using this method. Unlike the anchor model, which only operates with the results calculated in the KD process (for example, heatmap channels contain not only object-centered information but also noise information around them), unnecessary information in the KD process must be calculated in an anchor-free model. The method proposed in this study allows the s-model to use the results predicted by the t-model as ground truth (GT). In other words, the top three layers of t-model prediction--which are a heat map, a size map for the width and height of an object, and an offset map for object-centered position correction--are used to make it the same form as GT. The result of the t-model is referred to as 't-pred', and when it is combined with GT, it generates another GT called GT'. In other words, the t-model newly labels images to learn, and the t-model teaches the s-model to view the image from the perspective of the t-model. This method enriches the label information, thereby increasing the knowledge that the s-model needs to learn. Because the heatmap information predicted by the t-model is output through an activation map and has a narrower range of key points than the heatmap information used by GT, the previously extracted object location and information are used to generate the new heatmap with a Gaussian filter. When the width of the input image is W and the height is H, stride R is applied to the output image, such that the width and height are W/R and H/R, respectively. We define C as the number of classes. As shown in Figure 2, the component of GT, which is a measured value, is called GT and consists of five values in total. The heatmap is defined as \(HM^{GT}\ \in\ [0,1]^{W/R\times H/R\times C}\), and \(WH^{GT}\ \in\ \mathbb{R}^{50\times 2}\) refers to the width and height of the objects. \(Obj^{GT}\ \in\ [0,1]^{50}\) determines the presence or absence of an object and determines whether to use a value of other matrices. \(Center^{GT}\ \in\ \mathbb{R}^{50}\) is obtained by changing the value of the 2D key point to 1D. Since the output image is \(1/R\) times, it consists of an \(Offset^{GT}\ \in\ \mathbb{R}^{50\times 2}\) value for correcting the center value. The constant value of 50 is an arbitrary definition of the number of objects, and it can be changed. In CL, class \(C\) is \(C\ =\ C^{{}^{\circ}}\ \cup\ C^{n}\). According to the scenario, \(C^{{}^{\circ}}\) is the existing learned old class, and \(C^{{}^{\circ}}\ =\ \{C_{1}^{{}^{\circ}},\ \dots,\ c_{n}^{{}^{\circ}}\}\); \(C^{n}\) is a new class to be newly learned, and \(C^{n}\ =\ \left\{c_{1}^{n},\dots,c_{m}^{n}\right\}\). That is, the number of detectable classes after the entire scenario is completed is expressed as \(n\ +\ m\). The number of heatmaps \(C^{{}^{\circ}+n}\) for GT in Figure 2 represents both \(C^{{}^{\circ}}\) and \(C^{n}\). To use t-pred for new learning, when the result of the prediction score \(\hat{Y}^{t}_{x;y;c}\) of the t-model's predicted object is \(\hat{Y}^{t}_{x;y;c}\ >\ h\), it is made to be in the same form as GT. Combining this with GT, \(C^{{}^{\circ}}\) and \(C^{n}\) are learned simultaneously in the learning process. The newly created t-model prediction and GT are referred to as the GT'. This is created through the combination of t-pred and GT. \(HM^{GT}\), which is a newly generated heatmap, changes \(HM^{GT}_{c}\) of channel \(c\) corresponding to \(HM^{t}_{c}\ >\ 0\) to \(HM^{t}_{c}\).