Estimation of Paddy leaves Chlorophyll Content Using Convolutional Neural Network (CNN)

. In contemporary agriculture, the demand for cutting-edge machine-learning techniques to elevate crop assessment and management is paramount. This study introduces an innovative approach employing a Convolutional Neural Network (CNN) with Inception_v3 as its base model to estimate chlorophyll levels in paddy leaves. The primary aim is to craft a robust, precise model capable of non-destructively predicting chlorophyll content, promising substantial improvements in the efficiency of evaluating paddy crop health and nutritional status. The dataset comprises 566 images of paddy leaves, spanning 122 unique chlorophyll content levels. A meticulous data partitioning strategy allocates 244 images for model training, with 122 and 180 images for validation and testing, respectively. Model performance metrics include a test loss of 1.19 and a test accuracy of 0.81. Leveraging the Inception_v3 architecture empowers the CNN model to extract intricate, distinguishing features from paddy leaf images. This capability enables the model to discern subtle variations in chlorophyll content across different classes, underpinning its promising predictive prowess. Future research directions may explore potential model enhancements and dataset expansion, marking significant progress toward revolutionizing crop health assessment in modern agriculture.


Introduction
Chlorophyll content is a key indicator of plant health and photosynthetic activity, especially in paddy fields.Timely detection of chlorophyll variations can help in the early identification of stress, nutrient deficiencies, or diseases, allowing for timely intervention and improved crop management decisions.Therefore, chlorophyll measurements are important for rice farming management.The traditional methods of determining chlorophyll content, such as destructive chromatographic methods, are laborious and time-consuming.Furthermore, these methods are not adaptable to real-time estimation, making it difficult to monitor changes in chlorophyll content over time.To overcome these limitations, non-destructive methods for the estimation of leaf chlorophyll content have been developed [1].Non-destructive methods allow for the measurement of chlorophyll content without damaging or destroying the leaf, making it possible to assess multiple leaves from different plants within a shorter time frame.
The chlorophyll content of plants can be non-destructively evaluated using the leaf image colour analysis method, as demonstrated [2], which involves the utilization of digital image processing techniques.This emerging field of agriculture enables real-time measurement of chlorophyll content using digital images to capture the intrinsic characteristics of the leaf.These images can be analysed using software algorithms to quantify chlorophyll content based on colour analysis.Hand-held chlorophyll meters can be calibrated to leaf chlorophyll content, providing a non-destructive method for the rapid assessment of leaf chlorophyll content in the field [3].
This study aims to evaluate the effectiveness of deep learning techniques, specifically convolutional neural networks, in accurately estimating paddy leaf chlorophyll content.Deep learning algorithms have shown promising results in various image analysis tasks and can potentially be leveraged for accurate estimation of paddy leaf chlorophyll content [4].The study will use a dataset of paddy leaf images, along with corresponding chlorophyll content measurements obtained through chlorophyll measuring devices with nutritionally controlled rice plants.The dataset will be divided into training and testing sets to train and evaluate the performance of the convolutional neural network model.The train's model is evaluated based on various metrics, such as accuracy, precision, and test loss score to assess its performance in estimating paddy leaf chlorophyll content.

Crop sample preparation
The study was conducted in a greenhouse.Rice seedlings of a variety commonly grown in Indonesia (Inpari-32) were planted shallowly in polybags by sticking the root part of the soil at the meeting of the vertical and horizontal lines of the planting hole.The planting media used was topsoil which was put into 30 cm x 35 cm polybags up to 2/3 of the polybags.Furthermore, the poly bags were placed in a bucket with the same height or higher than the polybags to facilitate irrigation.The buckets were then labelled according to the treatment and randomized according to the experimental plan.Seedlings were planted at two plants per planting hole.Rice plants were maintained by means of replanting, weeding, fertilizing, irrigation, and pest and disease control carried out as needed.Fertilization was carried out in accordance with each treatment by sowing and then covering with a small layer of soil so that the fertilizer did not evaporate.Nitrogen, phosphorus, and potassium fertilization were done three times at 7, 14, and 30-35 days after planting.

Image acquisition
The process of collecting data on leaf chlorophyll values, rice plants were cultivated in a greenhouse.Nitrogen deficiency was induced through the process of rice fertilization.The collected data included pictures of leaves in a normal nutrient state to nutrient deficiency.Images were captured using a smartphone camera during the growth of rice plants in natural light condition (Fig 1

Model evaluation
Model evaluation was done by calculating the loss and accuracy values.Loss is used to calculate the prediction error of the model while accuracy is calculated based on the percentage of test data that is correctly predicted by the model.
is the number of test data samples,  is the number of classes,   is the indicator function that indicates whether sample  is the correct class  or not, and   is the model-predicted probability for sample  n class .
Accuracy is the percentage of test data that is correctly predicted by the model.Mathematically, accuracy can be calculated as follows:

CNN configuration and augmentation
An experiment was carried out on the Google Collaboratory platform to gauge the chlorophyll levels in rice plants.Google Colaboratory, which is often referred to as Colab, is a cloud-based service.It is built upon the foundation of the Jupyter Notebook and serves as a platform for executing machine-learning and deep-learning tasks.Notably, Google Colab offers complimentary GPU access during runtime, making it particularly valuable for GPUintensive applications, such as computer vision and related tasks [6].Meanwhile, the implementation of the model involves the utilization of the Keras Python library at an elevated level.This library operates on the TensorFlow deep learning framework, an opensource platform that serves as a backend for the classification of images depicting paddy leaf chlorophyll content.
To improve the performance of the CNN models, a data-augmentation process was performed.Data augmentation is used to artificially increase the diversity of the training dataset, which can improve the ability of the model to generalize to new and unseen data.The augmentation techniques performed in this model included rescaling pixel values, random rotation, horizontal and vertical shifting, shearing, enlargement, horizontal inversion, and filling empty pixels after transformation.
Each pixel in an image generally has a value between 0 and 255 in RGB-formatted images.We normalized the image pixels to be in the range of 0 to 1 by multiplying each pixel value by 1/255.In the rotation range, we assigned a value of 40, which indicates that the images in the training dataset experienced random rotation variations in the range of -40° to +40° during the augmentation process.Using this value, each image can be randomly rotated within this range before being used for model training.This approach has the benefit of teaching the model to recognize objects or features in an image from different viewpoints.This makes the model more resilient to rotational variations in new data that may not look exactly like the training data and can ultimately improve the generalization ability of the model.When testing in augmentation, we set the number of images loaded in each batch during testing to 18 and the target dimension (size) of the image after augmentation to 224 × 224 pixels.A size of 18 was chosen based on the available memory capacity of the GPU, whereas the target dimension value of pixels is a common size used in many convolutional neural network (CNN) models.An image of the augmentation process is shown in Fig. 2.

Building the model
We used 566 images of rice leaves representing 122 classes with different chlorophyll content levels.The data division was designed by allocating 244 images for model training, whereas 122 and 180 images were used for validation and testing, respectively.
After the augmentation process, the next step involved modeling.However, it is necessary to remove the previously created Fully Connected (FC) layer.This removal is performed for fine-tuning the model, changing the pre-trained model to suit different tasks, and preventing potential problems such as overfitting and lack of adaptation.The new model created has at least four convolution layers, namely, the base model layer, Global Average Pooling layer, Fully Connected Layer with 1024 neurons and activation ReLU, and Fully Connected Layer with 122 units corresponding to the number of classes with the softmax activation function for the prediction process.
The Global Average Pooling layer calculated the average of each feature for each image in a batch.This results in a more compact feature vector.The Rectified Linear Unit (ReLU) activation function activates the neuron if its input value is greater than zero and ignores it if its input value is less than or equal to zero.The Softmax activation function is used to generate a probability distribution of possible classes based on the feature scores generated by the previous layer.In the process of model compilation, we used the Adam optimizer.Adam is one of the optimizers that is efficient in adjusting the learning rate for each model parameter.The configuration used for the Loss function is 'categorical_crossentropy,' while for the evaluation process, the accuracy metric is used.This metric provides information regarding the extent to which the model correctly predicts the classes of the test data.The performance comparison of the CNN models was accomplished based on the evaluation of loss and accuracy.The models achieved an accuracy of 0.81 accuracy and 1.19 test loss.This indicated that the model exhibited sufficient performance.The CNN model training and validation accuracy and training and validation loss are graphically shown in Fig. 3 and Fig. 4.

Conclusion
This experimental endeavour successfully harnessed the potential of CNNs for the assessment of rice plant chlorophyll levels, with a specific focus on data augmentation, finetuning, and performance evaluation.This demonstrated the adaptability of the model to tasks in plant science and agriculture.Nonetheless, for real-world applications, further research is encouraged to refine the accuracy, robustness, and adaptability of the model to broader agricultural contexts.The incorporation of additional data sources, rigorous hyperparameter tuning, and domain-specific optimizations could contribute to the enhanced performance and practical utility of the model.

Fig 4 .
Fig 4. Plot of training and validation loss graph.
). chlorophyll value measurements were carried out with Soil Plant Analysis Development (SPAD) tools.