# Cloud Detection and Tracking Based on Object Detection with Convolutional Neural Networks
## 2 Methodology
The TensorFlow object detection API is an open-source framework built on top of TensorFlow that makes it easy to construct, train, and deploy object detection models. Object detection models employed for detection in images using ML algorithms involve a CNN that is trained to recognize a series of limited objects. In this work, the EfficientDet-D2 model [25], pretrained on the COCO 2017 dataset [26], was retrained with a PSA dataset in a computer cluster located at the Centro Extreme de Tecnologias Avanzadas (CETA-Ciemat). CETA manages an advanced data processing center, which is one of the most powerful resources for scientific computing in Spain. The model has an image as input and the detected objects and their positions in the image as output. Various advances have been made in recent years towards more accurate object detection. But, as we move towards a more accurate object detection network, the network will become more expensive in terms of resource consumption (the number of parameters and floating point operations per second (FLOPS)). The EfficientDet-D2 model was selected for the present work among the many available general models for its good balance between accuracy and resource consumption, see Figure 3. EfficientDet is a new family of object detection models based on a CNN on which the author developed a baseline network that they called as EfficientNet, see Figure 4, which was developed by NAS (Neural Architecture Search) [25]. Before EfficientNet, model architectures were designed by various human experts but that does not mean we completely explored the space of network architectures. For this, a model architecture was developed by NAS which used reinforcement learning under the hood and a EfficientNET was developed with some level of accuracy with the COCO dataset (COCO AP) and FLOPS as the optimization goal. Then, EfficientNet was scaled up under different resource constraints to obtain the family of models EfficientDet (D1, D2, D3...) [25]. Figure 3: EfficientDet accuracy (COCO AP) vs. resource consumption (FLOPs model) of state-of-the-art object detection models [25]. The EfficientNet-B2 backbone is a convolutional neural network that was pretrained on ImageNet and serves as the feature extractor for the object detection task. It has a width coefficient of 1.1, a depth coefficient of 1.2, and a resolution of 260 \(\times\) 260 pixels. It has a hierarchical structure composed of multiple attention and convolution blocks in cascade, see Figure 4. This modular and scalable structure allows EfficientDet-D2 to strike an optimal balance between computational efficiency and accuracy in object detection. The backbone outputs a set of feature maps at different levels, which are then fed into the BiFPN. The BiFPN is a novel feature fusion module that allows easy and fast multiscale feature integration. It uses weighted residual connections to combine features from different levels in both top-down and bottom-up directions. The weights are learned by a fast normalized fusion operation that avoids the need for extra normalization layers. The BiFPN has a depth of 5 and a width of 112 channels. The bounding and classification box head is a simple yet effective module that predicts the bounding boxes and class labels for each object in the image. It consists of three convolutional layers with 3 \(\times\) 3 kernels, followed by two separate output layers for box regression and classification. The box head has a width of 112 channels and uses sigmoid activation for both outputs. Any other model available in the API can be used with just a retraining process to teach the model to detect new objects, unlike most of the previous studies that developed specific models for this task. The advantage of choosing among different models available in the API is that these models are in continuous development by a large community of developers, so models evolve and their performance improves very quickly, unlike with specific models. As commented before, the pretrained EfficientDet-D2 model was retrained in this work.