# An Aircraft Object Detection Algorithm Based on Small Samples in Optical Remote Sensing Image
## 2 Theoretical Analysis and Methods
### Weak and Small Object Detection Algorithm  
Our dataset has 419 images, with a size of \(305\times 296\). It contains a total of 2175 aircraft. In order to better verify the effect of the proposed method, the aircraft dataset of RSOD-Dataset [33] and UCAS_AOD [34] are added to our dataset. RSOD-Dataset included 4993 aircraft in 446 images, with a size of 1044\(\times\)915. UCAS_AOD dataset includes 7482 aircraft in 1000 images. Images in RSOD-Dataset and UCAS_AOD dataset both have three channels, therefore, they need to be converted to grayscale. Among the dataset, 2841 aircraft are weak and small objects. They are either smaller than 10\(\times\)10, or the grayscale value of them is almost equal to that of the ground background. The aircraft in each image is manually marked in the form of \((x,y,r)\), where \((x,y)\) is the center of the circle with the characteristics of four peaks and four valleys, and \(r\) is the radius. The dataset is divided into a training set and a test set, of which the training set accounts for about 10% and the test set 90%. Training set contains 1326 aircraft. In order to compare the test results with Faster R CNN, our dataset is annotated according to the label form of the PASCAL VOC2007 [10] dataset. The circle frequency filter detection algorithm is used to detect the saliency object, and the detection accuracy is high. The amplitude value of each point on the circumference is calculated and normalized to between 0 and 255. According to multiple experiments, the detection effect is better when the threshold is set to 80. Therefore, the gray value greater than 80 is set to 255, and the other gray values are set to 0. As shown in Figure 3b, circles are drawn on the original image centering on pixel points with a gray value of 255 in the filter result image, and the circumference is just at the center of the airplane. As shown in Figure 4a,b there are a total of six aircraft in the picture. Only two aircraft can be correctly detected. As shown in Figure 4c,d the circle frequency filter cannot detect aircraft. Therefore, the circle frequency filter is not suitable for weak and small aircraft object detection. Based on this problem, the circle frequency filter detection algorithm is improved to specifically detect weak and small aircraft objects. The circle frequency filter detection algorithm has the following two reasons for the inaccurate detection of weak aircraft objects. Firstly, the difference between the gray value of the aircraft object and the background is too small, resulting in a mixture of the background and the object, which is difficult to distinguish. Secondly, the edge of the aircraft is blurred, and the gray value on the circumference does not show the characteristics of four peaks and four valleys. So, it can; determine whether it is an aircraft object. Usually, most of the grayscale values on the aircraft object are not much different, and the background grayscale values are not much different too. We can use this feature to solve the above two problems, that is, to square each point on the image matrix. It is assumed that the grayscale value of a point \(x\) on the aircraft target is 9, and the grayscale value of the background point y adjacent to \(x\) is 4, and the difference in grayscale value is 5. Only the circle frequency filter detection algorithm cannot distinguish between the object and the background, so that such a weak object cannot be detected. Figure 4: The result graph of weak and small objects; (**a**,**b**) small object; (**c**,**d**) weak objects. Figure 3: The result graph after circle frequency filtering; (**a**) Threshold segmentation map; (**b**) Circles with radii of the circumference centered on the points in (**a**) is marked on the original image. Therefore, we can square the two grayscale values, and the grayscale values of the \(x\) and \(y\) points are 81 and 16, respectively. Then the gray values sampled on the circumference normalize to make the difference between the data more obvious.