# Region-Based Convolutional Neural Network for Wind Turbine Wake Characterization in Complex Terrain
## 2 Materials and Methods
### About Mask R-CNN: CNN Model, Backbone, and Training Configurations  
Mask R-CNN detects and segments (per-pixel object identification) instances of objects within images (network architecture is discussed in [36]). An extension of Faster R-CNN, Mask R-CNN takes inputs of images and their annotations and outputs predictions for object classifications, bounding boxes, confidence in predictions and segmentation masks (thus, segmentation masks represent the entire shape of the object, pixel-by-pixel, as predicted by the CNN) [41, 42]. Mask R-CNN operates broadly as follows: the network's region proposal network (RPN) identifies regions of interest and proposes bounding boxes for identifiable objects within the image. Following this, bounding boxes are refined and the network predicts the object class probabilistically while producing binary pixel masks for regions of interest. Through this process, the image is input through multiple unique layers that process and understand the input, such as convolutional layers (applying a filter to input arrays to create feature maps) and pooling layers (reducing the dimensionality  
Figure 4: Cumulative density functions for scan parameters: (**a**) azimuth and (**b**) elevation angles, (**c**) range gate and (**d**) maximum range per LOS for all scans included in each subset of the selected scans (training, testing, validation). of input data). The final CNN output contains bounding boxes and binary masks of the original input dimensions in pixels for each object detected. Improvements to the RPN used here include implementation of a feature pyramid network (FPN) as the network backbone [43] (thus, the FPN is integrated into the CNN prediction process). The FPN extracts feature maps from images through a series of convolutional layers and inputs those feature maps to the CNN's RPN. With a FPN backbone, features are extracted from images with better accuracy and efficiency, with particular robustness in identifying features of varying sizes. Utilization of a FPN backbone results in higher object detection and instance segmentation accuracy than when a backbone is not employed; thus, this work explores the implementation of the ResNet-101 FPN backbone utilized in tandem with Mask R-CNN when detecting and segmenting wakes in scans. We chose the ResNet-101 FPN because of its high accuracy and efficiency in instance segmentation when compared to other backbones [43]. Model weights were initialized with weights from the same Mask R-CNN model with a ResNet-101 FPN backbone trained on the COCO dataset [44] through transfer learning (initializing a model's weights with weights produced from pre-training the model on a different dataset). Transfer learning has been shown to improve model accuracy and reduce training time [45; 46]. Prior to application of the CNN, all 354 scan images (each with multiple instances of wakes/wake fragments; approximately 1000 wakes in total are included in the dataset) were manually annotated for wakes and wake fragments, and the resulting annotations were utilized in each step of the CNN implementation process: training input, validation input (to reduce over or underfitting) and model accuracy evaluation for the testing subset. Figures 5 and 6 give examples of training annotations, with wakes and wake fragments  
Figure 5: (**a**) Area covered by the scan depicted in (**b**,**c**), showing the target (magenta) and captured (white) turbines and the lidar location (cyan diamond); (**b**) scan flow field values normalized by the calculated bulk wind velocity per scan; (**c**) example of annotations for wakes and wake fragments (green) and wind turbines (red) in a training scan. Scan parameters: arc scan, captured on 3 July 2018, 01:10 UTC, elevation angle \(\varnothing=1.5^{\circ}\), azimuth angle \(\mathbf{\theta}\in[\mathbf{290}^{\circ},\mathbf{345}^{\circ}]\), azimuthal resolution \(1^{\circ}\), range gate 50 m, 55 s accumulation time. annotated in green, and visible flow disturbances resulting from the presence of turbines annotated in red.