## 3 Impulse Detection Methodology Using Deep Learning Flexible Boundary Regression
### Impulse Detection with the Deep Learning Flexible Boundary Regression Detector  
In contrast to general CNNs, the proposed method employs a one-dimensional time-domain signal as the input data instead of two-dimensional pixels. The one-dimensional AE signal is fed into the first convolution layer. To detect an object, the detector takes the feature for that object and assesses it at various locations and scales in the sample signal. DLFBR observes the entire signal during the training and testing process to implicitly encode contextual information about the type of object as well as its position. The component object detector is only unified into an end-to-end single neural network, which utilizes features from the entire signal to estimate the position for each boundary box. To reason globally about the full sample signal and all of the objects inside the signal, DLFBR divides the input signal into a grid with a grid size \(G\). If the center of an object drops into a cell in the grid, that cell responds to detecting that object. From the generated grid, each grid cell regresses the \(B\) encircled box and the confidence score for each box. These confidence scores represent how confident the network is that the box contains an object, as well as how accurate the network thinks the predicted box is. The confidence is specified as  
\[conf(cell)=\Pr[\text{Impulse}]\times\text{IOU}_{pred}^{truth}. \tag{2}\]  
The confidence score should be zero if there is no object existing in that cell. Otherwise, the confidence score should receive a value equal to the intersection over union (IOU) proportion between the regressed boundary box and the ground truth boundary box. This metric is normally used to evaluate how well an object detection output is related to some ground truth box. Every boundary box is composed of three prediction values: \((x,w,c)\). The \(x\) coordinate locates the center of the predicted box relative to the margin of the cell; the width \(w\) is presented relative to the whole length of sample signal; and the confidence \(c\) is the confidence score of whether or not there is an object inside the box, which represents the IOU proportion between the ground truth box and the predicted box. This score encodes both the probability of that impulse appearing in the box and how well the regressed box fits the impulse. If direct location prediction is utilized, the model encounters instability issues during the training phase when predicting the estimate \(x\) for the box. To remedy this issue, researchers have used the concept of an anchor, which predicts box coordinates relevant to the position of the grid cell. The logistic regression activation \(\sigma(\cdot)\) is used to map and constrain the network's predictions output such that the values fall between 0 and 1. Thus, DLFBR predicts a vector of three elements \((\tau_{x},\tau_{w},\tau_{c})\) for each boundary box. When the grid cell is offset from the beginning of the sample signal by \(c_{x}\) and the anchor is previously set with the width \(q_{\text{w}}\), then the predictions correspond to  
\[ \begin{split} b_{x}=\sigma(\tau_{x})+c_{x},\\ b_{w}=q_{w}e^{\tau_{w}},\\ \Pr[\text{Impulse}]\times\text{IOU}_{pred}^{truth}=\tau_{c}. \end{split}  \tag{3}\]  
The predefined anchors are chosen to be as representative as possible of the ground truth boxes, and the K-means clustering algorithm is used to define them. This prediction constraint helps make parameter optimization easier to learn and makes DLFBR more stable. To adapt to a different length, DLFBR generates predictions across three different scales so that the boundary regression layer is used for detection in the feature map and makes confident masks of three different grid sizes: 10, 40, and 80 cells. The structure of DLFBR includes three steps, as shown in Figure 4. First, the block convolution layers of the model extract the features from the AE signal to yield the feature map and confidence mask with respect to the grid.