# Hardware Acceleration of Satellite Remote Sensing Image Object Detection Based on Channel Pruning
## 3 Methodology  
### GridMask-Mosaic Data Augmentation  
Data enhancement is a common method in the field of image processing to improve the robustness of network models. The common methods are to crop, rotate, adjust brightness, flip, and mask the image. Compared with YOLOv3, YOLOv4 uses the Mosaic algorithm in data enhancement, which can better help the model to better learn targets from different angles and locations, thereby improving the generalization ability and robustness of the network model [47]. Mosaic data enhancement is an improved version of CutMix, and the two have certain similarities in theory. CutMix data augmentation involves splicing two images together, where a random region is selected from one image and cut out, then pasted onto another image to create a new training sample. This helps the model learn to handle boundaries and contextual information between different objects. Mosaic data augmentation, on the other hand, randomly arranges and reorganizes four input images by applying random zooming, random cropping, random flipping, and color gamut changes to generate a new composite image. This provides diverse and varied training samples, aiding the model in learning to adapt to various complex scenes and object combinations. Mosaic data enhances the image processing effect, as shown in Figure 3.  
In practical applications, due to the complex shooting background environment, it is inevitable that some remote sensing images will be occluded. The existing datasets do not contain a sufficient number of occlusion scenes, and the data augmentation techniques incorporated in the YOLOv4 network model do not support augmentation for occlusion. In order to solve this problem, we use the GridMask algorithm to perform a target random erasure operation on the training set part of the DIOR dataset, so as to achieve the purpose of improving the robustness of the network model. GridMask belongs to the data enhancement algorithm of the information deletion category, which pays special attention to the degree of grasp of image information deletion. Too much deletion of image information will cause the remaining image information to fail to correctly express the target information, thus becoming noisy data, while too little deletion of image information will cause the target to be unaffected and cannot improve the robustness of the model [48]. The GridMask algorithm is based on the original information deletion algorithm, and uses evenly distributed square areas to delete image information, so that large areas of continuous images will not be deleted. The data enhancement effect of GridMask combined with Mosaic is shown in Figure 4.  
For the GridMask data enhancement algorithm, set the output image to \(f(x)=x\times M\), in which \(x\in R^{H\times C\times W}\) represents the input image and \(M\in(0,1)^{H\times W}\) represents the binary mask. If it is 1, the original image information is retained, otherwise the original image information is deleted, which \(f(x)\) represents the output image after the image has been processed by the GM algorithm. Use parameters \((r,d,\delta_{x},\delta_{y})\)to represent \(M\) and \(M\) is unique, where \(r\) means the ratio of retaining the input image information, d determines the size of the deleted area, and \(\delta_{x}\) and \(\delta_{y}\) are the distance from the first complete unit to the image boundary. Figure 3: Mosaic data enhancement effect. Where \(r\) represents the proportion of information in the input image, and for the parameter \(r\), define the hold ratio \(t\) given to \(M\) as shown in Equation (1):  
\[t=\frac{sum(M)}{W\times H} \tag{1}\]  
where \(W\) and \(H\) refer to the width and height of the input image, respectively; if \(t\) is too small, the image will lose too much information, and the remaining area will become noisy data, which cannot achieve the effect of improving the robustness of the model. The relationship between \(r\) and \(t\) is shown in Equation (2).