## 2 Proposed Method
### Experimental Testbed  
To evaluate to what extent it was possible to diagnose the CLR development stage in the Colombian Caturra variety through the integration of RS, WSN, and DL, it was necessary to obtain empirical evidence employing an experiment. Therefore, an experimental testbed prototype was built, which included a scale coffee crop. This testbed was capable of simulating different agronomic conditions and allowed capturing data for diagnosing the disease. The experimental testbed consisted of a data collection system prototype that integrated remote sensing and wireless sensor networks. In this testbed, the coffee plants were grouped, combined with the soil, and then divided into four lots. Furthermore, they were separated to inoculate CLR in half of them, and after that, the four lots were assembled again. For their agronomic management, fertilizer and fungicide were distributed and incorporated. Then, each lot was isolated from the others to make the four lots independent, and the whole scale crop was combined with a rain emulation system and a wind system. Both rainfall and wind speed for the whole crop were perceived. Furthermore, using sensors in each lot, pH, illuminance, temperature, humidity, and electrical conductivity were perceived, which will be further called \"sensor data\", and RGB and multispectral images were captured. RGB pictures were acquired through a regular RGB camera with a resolution of 720 p. These cameras were positioned on the bottom of the plants since CLR was commonly visible at the underside of the leaf [10]. Regarding the multispectral cameras, which allowed capturing the reflected radiation of wavelengths that were not perceptible to the human eye, two cameras from MAPIR(r), called Survey3, were used. Based on the information cited in the state-of-the-art [21; 23; 25], the Red + Green + NIR (RGN) and Red Edge (RE) camera filters were chosen as being suitable to identify crop diseases, including CLR. Thus, one camera centered in the wavelengths 660 nm-550 nm-850 nm and another one centered in the 735 nm wavelength were selected to capture images from the top of the plants. The Survey3 incorporated a Sony(r) Exmor R IMX117 12 MP sensor and a sharp non-fish eye lens for perceiving light in specific wavelengths. The created experimental testbed is shown in Figure 7.  
Figure 6: Data collection distribution. Afterwards, the state of each lot was integrated with the expert's visual inspection information to diagnose the CLR development stage, and then, this information was clustered with the collected data. To finish the data collection process, data were stored locally and sent to a remote server over the Internet. On the other hand, the data that were received on the remote server were preprocessed for cleaning purposes and stored in a remote database. An example of the _LOT 3_ directory's content on the remote server after one data collection routine was concluded is presented in Figure 8.  
To clarify how a data collection routine worked, Figure 9 details the whole pipeline from the sensor readings and image captures until the remote storage. The data from sensors were gathered and smoothed by a microcontroller. RGB and multispectral images were captured by the cameras. The totality of the data was collected by a Single Board Computer (SBC), which continually notified the progress to the Internet of Things (IoT) platform (see Figure 10 inside Appendix C for the IoT platform dashboard) while it created a single data package. The package containing the documents with the lots and general data, as well as the images was stored locally. Furthermore, the documents were inserted into the remote MongoDB(r), which resided in the data center, and the entire data package was uploaded via Secure File Transfer Protocol (SFTP) to the data center's file system. At that point, the data collection routine finished. Finally, it is also relevant to mention how the collected data can be reviewed so that the process can be verified.