Grid Sensitive
Grid Sensitive
**Grid Sensitive** is a trick for object detection introduced by [YOLOv4](https://paperswithcode.com/method/yolov4). When we decode the coordinate of the bounding box center $x$ and $y$, in original [YOLOv3](https://paperswithcode.com/method/yolov3), we can get them by

$$
\begin{aligned}
&x=s \cdot\left(g\_{x}+\sigma\left(p\_{x}\right)\right) \\
&y=s \cdot\left(g\_{y}+\sigma\left(p\_{y}\right)\right)
\end{aligned}
$$

where $\sigma$ is the sigmoid function, $g\_{x}$ and $g\_{y}$ are integers and $s$ is a scale factor. Obviously, $x$ and $y$ cannot be exactly equal to $s \cdot g\_{x}$ or $s \cdot\left(g\_{x}+1\right)$. This makes it difficult to predict the centres of bounding boxes that just located on the grid boundary. We can address this problem, by changing the equation to

$$
\begin{aligned}
&x=s \cdot\left(g\_{x}+\alpha \cdot \sigma\left(p\_{x}\right)-(\alpha-1) / 2\right) \\
&y=s \cdot\left(g\_{y}+\alpha \cdot \sigma\left(p\_{y}\right)-(\alpha-1) / 2\right)
\end{aligned}
$$

This makes it easier for the model to predict bounding box center exactly located on the grid boundary. The FLOPs added by Grid Sensitive are really small, and can be totally ignored.
YOLOv4: Optimal Speed and Accuracy of Object Detection
https://paperswithcode.com/paper/yolov4-optimal-speed-and-accuracy-of-object
YOLOv4: Optimal Speed and Accuracy of Object Detection