# People Detection Using Artificial Intelligence with Panchromatic Satellite Images
## 2 Materials and Methods
### Methodology  
Upon review, Faster R-CNN and YOLO were selected for data processing using implementation in ArcGIS Pro version 3.3.1. The selection of these most promising models was confirmed by the \"AutoDL\" function in ArcGIS. The Python programming language and ArcGIS Python API library were used to automate various subtasks (available at [[https://github.com/PavelKVSB/people_detection_AI_Satellite_Images](https://github.com/PavelKVSB/people_detection_AI_Satellite_Images)]([https://github.com/PavelKVSB/people_detection_AI_Satellite_Images](https://github.com/PavelKVSB/people_detection_AI_Satellite_Images)), accessed on 2 September 2024), and the hardware parameters include Intel Core i7-8700 CPU 3.20 GHz; NVIDIA GEFORCE GTX 1070; and 16 GB RAM. To begin, an image that contained three RGB bands was created from a panchromatic image because neural network algorithms perform better with this image type [33; 34]. Next, it was necessary to create training data from the ground truth data for the Faster R-CNN model. To generate the training data, the following parameters were set: tile size (size of the image chips) at 128, stride size (distance to move in X and Y when creating the next image chip) at 64, and the metadata format of training data in PASCAL Visual Object Classes in.xml format. This part of the processing was carried out in ArcGIS Pro. After the training data were prepared, the model was trained using Jupyter Notebooks (version 7.2.2) with the GPU enabled in ArcGIS Pro SW. The training data were prepared, and the sizes of the validation portion (20%) as well as the batch size were set. Typical mini-batch sizes were 16, 32, 64, 128, 256, and 512 [35], depending on CPU/GPU availability. The Faster R-CNN algorithm was imported and the backbone model was configured. In addition, the \"learning rate find\" function was utilized to select the most suitable learning rate for model training. After these settings were fixed (Table 2), the given model was trained. The 13 th and 14 th methods achieved the highest values of the average precision score (AP) (almost 42%, Table 2). The AP is the precision average across all recall values between 0 and 1 [36]. The average precision is high when both precision and recall are high, and low when either of them is low across a range of confidence threshold values [37]. It can also be seen from Table 2 that when the batch size is smaller, the average precision score is lower. However, even a large increase in the batch size does not necessarily lead to better results; it is necessary to find the best batch size value, which in our case was 16. After testing various backbones available for Faster R-CNN, Resnet152 was found to provide the best results. Variants 13 and 14 have a higher AP value than all other variants. This is because, in these cases, training data were used with a buffer of 15 cm (13 th) and 30 cm (14 th). All testing was processed in the ArcGIS SW environment. By utilizing the buffer parameter, the models received a significant boost in their APs, as indicated in Table 2. Furthermore, this clearly demonstrates that the most optimal outcomes were obtained when the backbone was configured as Resnet152, the batch size was set to 16, and the number of epochs was set to 150. Therefore, these settings were used for further optimization with data augmentation. The following data augmentation functions were used:  
* Horizontal flip--The model learns to recognize objects regardless of whether they are oriented to the left or right. This is especially beneficial in tasks where the orientation of objects is not fixed, such as object detection. By enhancing the diversity of the input data, this technique reduces the risk of overfitting and improves the model's ability to generalize to new, unseen data. * Vertical flip--This transformation can introduce variability that helps the model generalize better to different orientations. * Rotation--Random rotation of the image by a maximum of 45\({}^{\circ}\) in either direction (clockwise or counterclockwise).