## 4 Results  
### Prototype Evaluation  
We examined two scenarios to demonstrate the benefits of using SAgric-IoT. For the first scenario, we validate the performance of the sensor node and the data gathered from the different sensors by performing tests in a controlled environment (laboratory). Data measurements for the environmental parameters such as temperature and humidity were recorded every minute for three days using a set of sensor nodes separated by 10 m from the base station and connected directly in a star topology. The idea was to determine the node's energy consumption and data transmission reliability in a situation of maximum sense frequency.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**\#Number** & **Category** & **Number of Images** \\ \hline
1 & Pepper\_bell\_Bacterial\_spot & 997 \\
2 & Pepper\_bell\_healthy & 1478 \\
3 & Potato\_Early\_blight & 1000 \\
4 & Potato\_late\_blight & 1000 \\
5 & Potato\_healthy & 152 \\
6 & Tomato\_Bacterial\_spot & 2127 \\
7 & Tomato\_Early\_blight & 1000 \\
8 & Tomato\_late\_blight & 1909 \\
9 & Tomato\_Leaf\_Mold & 952 \\
10 & Tomato\_Septoria\_leaf\_spot & 1771 \\
11 & Tomato\_Spider\_mites\_Two\_spotted\_spider\_mite & 1676 \\
12 & Tomato\_Target\_Spot & 1404 \\
13 & Tomato\_Tomato\_YellowLeaf\_Curl\_Virus & 3209 \\
14 & Tomato\_Tomato\_mosaic\_virus & 373 \\
15 & Tomato\_healthy & 1591 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Categories of the PlantVillage dataset.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Batch size & 32 \\ Number of epochs & 200 \\ Steps per epoch & 16,012 \\ Validation steps & 3202 \\ Activation function & ReLU \\ Optimization algorithm & Adam \\ Loss function & Categorical cross-entropy \\ \hline \hline \end{tabular}
\end{table}
Table 5: Parameters for the training of the model.  
For the second scenario, sensor nodes were deployed throughout the field to evaluate the dissemination protocol's data-transmission performance. The environmental parameter data measurements were collected every 5 min for three days. The set of sensor nodes separated approximately 50 m from each other, covering an area of 200 \(\times\) 200 m, as shown in Figure 9. We defined levels to enable the multi-hop transmission model.  
We evaluated SAgric-IoT performance by analyzing the nodes' energy consumption and reliability. Moreover, we examined the performance of the SAgric-IoT protocol in comparison with an average transmission model without a sleep function into the node.  
For both scenarios, nine sensor nodes designed at the INNOVA THING(r) company (Colima, Mexico) and a gateway node were employed to interconnect a small-scale network. Two sensors per node gathered data from four physical variables (air temperature and humidity and soil humidity and temperature). For the cloud server, both Apache and MySQL were running on a computer with Ubuntu 14.04. The gateway node uses a Raspberry Pi 3 Model B with a 1.2 GHz 64-bit quad-core ARMv8 CPU, an integrated 802.11n wireless LAN and Bluetooth 4.1, Bluetooth Low Energy (BLE), 4 USB ports, a display interface (DSI), and a micro-SD card slot. Each sensor node was set to sense each variable every five minutes. In the test, we gathered around five thousand values from the sensors and stored them in the cloud server database.