# Cloud Detection and Tracking Based on Object Detection with Convolutional Neural Networks
## 2 Methodology
A pretrained model is a saved network that has been previously trained on a large dataset. If a model is trained on a sufficiently large and general dataset, such as the COCO dataset, the model will effectively serve as a generic model of the visual world. Then, these learned feature maps can be used without having to start from scratch, i.e., training a large model on a large dataset. This technique to transfer the configuration learned to customize the pretrained model for a given task and reduce the cost of training is known as transfer learning. In this work, transfer learning was used, taking the EfficientDet-D2 model pretrained on the COCO 2017 dataset as the starting point. Then, the model was retrained with the CESA dataset. The model was retrained using a supervised learning technique which consists of learning a function that maps an input to an output based on an example of input-output pairs [27]. In this case, the model learns to detect objects within an image by training the model with images and associated object location information as inputs, known as a training dataset. As usual in supervised learning, the labels, i.e, the object location information, were added manually in advance. Images together with object location information (hand-labeling was previously commonly used for training purposes) is known as a training dataset. The training dataset used in this work consists of more than 1000 images that were captured from the CESA system. Each image contains several objects of interest, such as the Sun, clouds, and surrounding heliostats, that affect the amount of solar energy that can be harvested. The images were taken  
Figure 4: EfficientDet basic architecture [25]. at different times of the day and under different weather conditions to cover a wide range of scenarios and challenges for the object detection task. The labeling work was easily performed thanks to the Hel-IoT web server (see Figure 5), which is a tool for managing the dataset (see Figure 5) and for the creation and labeling of datasets (see Figure 5) developed at PSA. One-hundred (100) images were not used during the training, but rather were reserved for use in validating the training process. In order to improve the dataset quality, a random scale-crop data augmentation [25] technique was employed. This technique increases the heterogeneity of the dataset by rescaling and cropping random images from the original dataset to feed the training process. The rest of the configuration training parameters and hyperparameters of the models are available in [28]. The same hyperparameter configuration that the developers of the model optimized was considered, due to it having been optimized by NAS; although a little readjustment of these values due to the fact that the model was used on a different dataset was able to improve the performances of the model for this application. However, the objective of this work was to test the use of the object detection technique, regardless of the model optimization, for cloud detection and time remaining prediction. Figure 5: Hel-IoT web server. The retrained EfficientDet-D2 model in this work can predict four different object classes: the Sun, heliostat, white Lambertian target, and cloud. Although the most relevant objects for this work are clouds and the Sun, the other objects can be used for solar tracking or obtaining valuable information about shadows or blockages. In addition, the model can be retrained to learn to detect other objects of interest, such us another receiver.