# LRP-DS: Lightweight RepPoints with Decoupled Sampling Point Set
## 3 Rethinking RepPoints  
Usually, a four-dimensional vector \(\{x,y,w,h\}\) is applied to represent the bounding box of the object. The \((x,y)\) are the coordinates of the center point of the bounding box, and \((w,h)\) are the width and height of the bounding box respectively. The core idea of RepPoints is to represent the category and location of the object through a more refined point set. Therefore, the RepPoints method describes the object in the form of a point set \(P=\{(x_{i},y_{i})\mid i=1,\ldots,K\}\). These point sets not only describe the geometric information of the object, but also can be used to guide the feature sampling. Through the loss of localization and classification in the training process, RepPoints can spontaneously find suitable key points for classification and localization. In order to realize this idea, RepPoints employed deformable convolution to sample feature points in point set. Compared with standard regular convolution, the sampling position of deformable convolution can be changed according to the input. Here, the convolution operation can be regarded as the sampling process. Figure 1a is regular sampling grid of standard convolution with a kernel size of 3 \(\times\) 3. In the sampling process of convolution, the positions of nine sampling points present a regular distribution. Figure 1b is a deformable convolution sampling process in which the positions of nine sampling points can be changed dynamically according to the input. In this paper, the sampling center of regular convolution is assumed to be \(P\), and the sampling position is assumed to be \(R\). The \(R\) defines the receptive field size and expansion rate of convolution. For example, \(R=\{(-1,\,-1),\,(-1,0),\,\ldots,\,(0,1),(1,1)\}\), can represent a sampling position of convolution with kernel size of 3 \(\times\) 3 and expansion rate of 1. Then, the sampling set of the regular convolution with the center point at \(P\) can be described as \(L_{r}=\{P+R_{i}\mid\ R_{i}\in R\}\). The deformable convolution employs the offset \(O\) to further enhance the sampling position, and its sampling set can be described as \(L_{d}=\{P+R_{i}+O_{i}\mid\ R_{i}\in R,O_{i}\in O\}\). The offset feature map of deformable convolutions can only be learned freely by the network without adding a supervision signal directly. In RepPoints, regression loss is used to directly monitor the generation of the offset feature map, which can make the network learn the desired sampling location explicitly. As shown in Figure 2, the RepPoints can be roughly divided into two steps. In the first step, the object is initially located with the offset  
Figure 1: Illustration of the sampling locations in 3 \(\times\) 3 standard and deformable convolutions. (**a**) Regular sampling grid (green points) of standard convolution. (**b**) Deformed sampling locations (dark blue points) with augmented offsets (light green arrows) in deformable convolution. map based on the output feature map of the backbone. The offset map is supervised by regression loss in the training process. Therefore, the offset map represents the point set of predicted objects at each position. The second step is to classify and further fine tune the results of the previous stage, which can use the localization results of the previous stage, the offset map, to guide the sampling of deformable convolution. Most of the current common object detection datasets use regular rectangles to label objects. Therefore, the point set in RepPoints needs to be transformed by pseudo box function \(F_{b}\), as shown in Equation (1). \[box^{\prime}=(x_{min},y_{min},x_{max},y_{max})=F_{b}(P), \tag{1}\]  
where, \(box^{\prime}\) is a pseudo box; \(F_{b}(. )\) is a pseudo box conversion function, which has three implementation forms: min-max, partial min-max, and moment-based. In this way, the supervision signal can be directly applied to the pseudo box. In the reference, the conversion function \(F_{b}(. )\) is also used to transform the point set \(P\) to the pseudo box to get the final detection result.