# Weed Detection in Rice Fields Using Remote Sensing Technique: A Review
## 5 Weed Detection Using Remote Sensing Technique
### An Overview of Machine Learning in Agriculture
The rectified linear activation function (ReLU) applies the much-needed nonlinearity to the model. Non-linearity is necessary to produce a non-linear  
Figure 4: An illustration of the CNN framework for image classification. decision boundary, so the output cannot be written as a linear combination of the inputs. If there is no non-linear activation function, the deep CNN architecture will evolve into a single equivalent convolutional layer, and its performance will hardly be so. The ReLU activation function is used explicitly as a non-linear activation function, in contrast to other non-linear functions such as Sigmoid, because it has been observed from experience that the CNN using ReLU trains faster than the corresponding CNN [79]. Furthermore, the ReLU activation function is a one-to-one mathematical operation, as shown in Equation (6). \[ReLU(x)\ =max(0,x) \tag{6}\]  
It converts the whole values of the input to positive numbers. Thus, lower computational load is the main benefit of \(ReLU\) over the others. Subsequently, each feature map in the sub-sampling layers is down-sampled, decreasing network parameters, speeding up the learning process, and overcoming the problem related to the overfitting issue. This can be carried out in the pooling layers. The pooling operation (maximum or average) requires selecting a kernel size p \(\times\) p (p = kernel size) and another two hyperparameters, padding and striding, during architecture design. For example, if max-pooling is used, the operation slides the kernel with the specified stride over the input, while only selecting the most significant value at each kernel slice from the input to yield a value for the output [80]. Padding is an important parameter when the kernel extends beyond the activation map. Padding can save data at the boundary of the activation maps, thereby improving performance, and it can help preserve the size of the input space, allowing architects to build simpler higher-performance networks, while stride indicates how many pixels the kernel should be shifted over at a time. The impact that stride has on a CNN is similar to kernel size. As stride is decreased, more features are learned because more data are extracted [36]. Finally, the fully connected (FC) layers receive the medium and low-level features and generate the high-level generalization, representing the last-stage layers similar to the typical neural network's technique. In other words, it converts a three-dimensional layer into a one-dimensional vector to fit the input of a fully connected layer for classification. Usually, this layer is fitted with a differentiable score function, such as softmax, to provide classification scores. The fundamental purpose of this function is to make sure the CNN outputs the sum to one. Thus, softmax operations are helpful to scale the model output into probabilities [80]. The key benefit of the DL technique is the ability to collect data or generate a data output using prior information. However, the downside of this strategy is that, when the training set lacks samples in a class, the decision boundary may be overstrained. Furthermore, given that it also involves a learning algorithm, DL consumes many data. Nevertheless, DL requires enormous data to build a well-behaved performance model, and as the data grow, the well-behaved performance model can be achieved [36].