# Knowledge-Driven Network for Object Detection
## 3 Proposed Approach
### Keypoint Relation Module  
In our analysis, the existing anchor-free algorithms relied on independent detection between instances instead of trying to exploit the relationship between them while learning. However, we assume that if the model can learn the relationship between different objects, it will be very helpful for object detection. Information about other objects around it is likely to help with the classification and positioning of an object. In summary, we have proposed a new module, named KRM, which is embedded in the corner maps, and the input and output of the module are unchanged. This KRM aims to model the corner feature and geometry feature of the relationship between corners, which is relevant to the object detection, enhancing the corner features on corner maps to produce a more accurate heatmap. As shown in Figure 3, firstly, for each channel of the heatmap (each channel represents a category), we selected the top-K corners as samples to construct the region. Then, according to the coordinate information of the top-K corners, the \(r\times r\) area around each corner of the corner maps was intercepted. Therefore, not only can the region of interest around the corner be obtained, but also the object area. Local features can also make full use of the depth features in corner maps. Each extraction region of corners (RoC) is fully connected to the \(dc\) dimension, which is sent to the relation module for modeling the corner relationship and the geometric position relationship, which then outputs the \(dc\) dimension vector. To be able to embed back to the original corner maps, the dc dimension vector is restored to the original dimension through a full connection, thus updating the corner maps. The entire KRM uses corner features and geometric features to model the angular relationship between the categories. The independent corner features are weighted with coordinate information, and the resulting corners fuse the corner features of all categories. Based on this relationship, the generated heatmap has semantic information between the channels, making the detection process independent. **Geometry features. ** The geometric features come from the top-K corners selected by each channel of the heatmap. The corner maps are extracted by the corner pooling, and the corner information of the object has been enhanced so that each corner can provide corresponding geometric coordinate information. Note that the four-dimensional features representing \(f_{G}=\{x,\ y,\ c,\ r\}\) contain three parts. Specifically, \((x,\ y)\) is the center position of the corner; \(c\) is the category information of each channel; and \(r\) is a hyperparameter, which is the size of the intercepted RoC, as shown in the following:  
\[\left(\log(\frac{|x_{m}-x_{n}|}{r_{m}}),\log(\frac{|y_{m}-y_{n}|}{r_{m}}),\log \left(\frac{c_{n}}{c_{m}}\right),\log\left(\frac{r_{n}}{r_{m}}\right)\right)^ {T},\]  
where \(x_{m},\ x_{n},\ y_{m},\ y_{n},\ r_{m}\), and \(r_{n}\) are mentioned in the heatmaps of the keypoint relation module (KRM) in Figure 3. \(n\) and \(m\) represent the \(n\)-th corner point and \(m\)-th corner  
Figure 3: The architecture of the keypoint relation module (KRM). point, respectively, because each corner point needs to calculate the relationship with other corner points. This 4D feature is embedded in a high-dimensional representation, which computes the cosine and sine functions of different wavelengths. The feature dimension after embedding is \(dg\) (\(dg=64\) in this paper). **Corner features. ** The corner features use the above-mentioned extracted corner position, centering on the corner point and intercepting the area of size \(r\times r\) on the corner maps to obtain the depth feature in the corner maps. The advantage of doing this is that the corner maps have more semantic information and can obtain global knowledge.