Soil Color as a Measurement for Estimation of Fertility using Deep Learning Techniques

—Soil Behavior helps the farmer predict performance for growing crops, nutrient movement, and determine soil limitations. The traditional methods for soil classification in the laboratory require time and human resources and are expensive. This analysis examines the possibility of image recognition by artificial intelligence, with a machine learning technique called deep learning, to develop the cases that use artificial intelligence. This study performed deep learning with a model using a neural network. Neural Networks has used to evaluate relationships between the parameters of the three-dimensional coordinates resulting in soil classification and parameters. So Artificial Neural Networks (ANN) can be an effective tool for soil classification. This paper focused on AI techniques used to predict the soil type, advice the crop to yield, and discuss the transformed learning and benefits.


I. INTRODUCTION
Agriculture stands very quintessential in society. Agriculture is a source of livelihood in most parts of the world. Agricultural produce is of great importance. But in recent years, the farm produce is gradually decreasing. Soil plays a crucial role in agriculture. Soil consists of nutrients that the plants use to grow. There exist various kinds of soils available, and each has different effects. Crop's productivity was mainly based on the type of soil [1]. The possible way to improve productivity is that choose the right crop for the right land type. Soil needs to be investigated primarily before classifying them into distinctive groups. Based on these soil groups and the geographical conditions, one can decide which crop is best suited and is beneficial. The traditional methods are Costly, lengthy process and also time-consuming.
Consequently, there is a necessity for new technologies and methods to enhance the existing system to get faster and better results. Soil texture is due to the percentage of silt, clay, and sand present in it, and change in the fraction may result in different colors due to interaction among soil characteristics. Classification has a significant influence in agriculture for estimating yielding crops, and soil classification will define the relation between soil samples and other natural substances present. Convolutional Neural Network (CNN) is the branch of Deep learning and enables the machine to exhibit self-learning, to show the intelligence to predict by analyzing the input [3]. The essential point here is the privilege of the computer to learn automatically without human interaction.
Soil is the source of the minerals, liquids organisms that produce the foundation for the plant, and classification plays a major role in managing a crop, increasing soil primarily before classifying them into distinctive groups. Based on these soil groups and the geographical conditions, one can decide which crop is best suited and is beneficial [4]. The traditional methods are Costly, lengthy process and also time-consuming.
This research aims to benefit the former in identifying the red soil, and it analyzes the different soil patterns using CNN and recommends particular crops in that soil. And also help the researcher in soil science. The general purpose of this research is to compare the different soils and identify the red soil. The consequence of this may have numerous advantages to agriculture, soil management, and the environment.

II. LITERATURE SURVEY
In this section, we summarized various works related to machine learning, image processing, and classification models from different papers seen in Table I. The least median squares regression techniques produce more reliable results than the classical linear regression technique from the set of characteristics [2]. SVM classifier can work efficiently with high level of accuracy. MATLAB software has proved an efficient tool for design and development of classifier and can be used for further development of independent interface for on-site real time soil classification [5].
Time-honored methods of soil assortments are standard penetration test (SPT), cone penetration test (CPT), pressure meter test (PMT), and vane shear test (VST), time-consuming and needed for accurate results. Soil classification can be automated using artificial neural network techniques [6].
Mrs.Saranaya and Ms.A.Mythili researched to analyze the soil types so that it is helpful to farmers to choose a crop that to be cultivated. They have considered the SVM algorithm and chemical effects of soil like pH, salinity, organic matter, potassium, sulphur, zinc, Boron, calcium, Magnesium, Copper, Iron, and Manganese [7].
Classification of soil and quality prediction using a software-enabled solution using machine learning algorithms including decision tree, by considering soil chemical parameters [8]. Prediction soil type was performed by deep learning model using neural network. Research carried out for three classes of soil, specifically for clay, sand, and gravel, an AI model, was constructed that was keen efficient homogeneity of the images utilized and the research has shown that this AI model can be applied to conceive judgments on soil classification [9].
The SVM classifier was found to outperform over all other techniques. Maximum Likelihood classification, sub-pixel classification, and ANN classification were chosen as image classification techniques from various methods [11].
Soil classification and segmentations are necessitated, along with soil nutrients to recommend crops and fertilizers to use. Non-specialists farmers can understand features easily [10].
Researcher T.Abimala proposed a model to predict the variety of soil applying image processing techniques. Classification of soil is by the processing of soil image color and texture patterns [12].
Soil Characteristics have a notable impact on the response of soil in the field of agricultural uses. Soil aeration depends on the soil texture, is a static property of soil quality. Plants' growth depends on soil quality and temperature [13]. Weathering processes may create porous media at the land surface. The correlation between soil and bio-indication may not be strong enough to bring out such suitable changes. Soluble elements are purged into the lower layers of soils where they accumulate. Insoluble chemical elements remain in the upper layers of the soil [14].
Soil nutrients and pH define through image processing and ANN [15]. The process of soil classification systems based solely on grain diameter is capable of misunderstanding because the physical properties of outstanding soil elements depend on many factors other than grain size [16]. There is also the quantity of water (humidity) which is also a nonnegligible factor. It is the newest and most used because it is the improved form of all others [17].
The least median squares regression can predict soil is identified to generate abler results than the classical linear regression by analyzing soil sample and cropping pattern [18].
Image processing using SVM techniques classify the soil based on color, energy, and HSV [19]. The researcher recommended a suitable crop for a particular soil by analyzing the PH value, moisture level, and nutrients collected using sensors with IoT technology. Here former need to have a piece of knowledge on hardware [20].
Experimental study says yield prediction is possible with AI Techniques. ANN attained more accuracy than RF, MLR, and NB Techniques [21]. Categorization of soil could be done using Data mining techniques like K-Nearest neighbors and naive Bayes as low, medium, and high. It helps to choose suitable land for more profitable crop production [22]. SVM, principal component analysis can be added further.
The CNN-based regression model is developed based on the characteristics of the TIR images, with required generality and performance. This model, in comparison with DNN, gives www.ijacsa.thesai.org promising accuracy. Remote digital imaging using a drone is advantageous than data acquired using satellite [23].
There are non-exhaustive methods utilizing image processing, machine learning, and deep learning in previous research work related to soil classification [24]. And many researchers focused on traditional methods, image processing, computer vision techniques, and computer-based applications. This paper proposed advanced soil classification techniques using machine learning and deep learning. The primary purpose of soil category is to forerun behavior, determine the uses, assess their productivity, and extrapolate analysis to predict nutrients. This paper discusses the architecture of the proposed system, methodology, results, concluding remarks, and future scope.

III. METHODOLIGY
In Telangana, 48% of the land covered red soil and types of red soil and color and causes listed in Table II. Some of these soils look reddish due to the wide diffusion of iron in crystalline and metamorphic rocks, and some are yellow due to diffusion occurring in a hydrated form. Soil is the foothold for plants' roots and holds the necessary nutrients for plants to grow. It filters rainwater and regulates the discharge of excess rainwater, preventing flooding, and it is capable of storing large amounts of organic carbon. All these depend on the characteristics of the soil. The primary skill to succeeding in farming here understands soil type and giving the most fitting plants for that soil [14].
Soil classification could be made as per engineering properties, and it could be free from trouble-free from field survey and the usually, engineers classify soils as per soil characteristics. Classification would commence from the soil image. Convolution Neural Network is an incredible image recognition invention and is a sub-class of deep learning neural networks. CNN generally used to analyze images and image classification.  A. Convolution Layer  Convolutional layers: these layers apply a convolution operation to the input image and pass the information on to the next layer.
 Pooling Layer: The next layer is the pooling layer, where outputs combined as cluster of neurons into a single layer. And the next layers are fully connected layers, in which all neurons connect to each neuron in the next layer.

B. Relu
Proposed CNN Model and trained it on a Soil image dataset. The results observed that performance was minimal. Training a model with millions of images takes days to achieve high performance in real-world applications. An alternative is to use a pre-trained model, and it would retain on our dataset as transform learning.
In this Model, an image was directly given to the algorithm, which will classify the given image as either red soil or not, as shown in Fig. 1 and the detailed flow explained in Fig. 2.

C. Pre-Processing
A smoothing (low pass) filter has been used to eliminate high-frequency noise and artifacts from the picture. Smoothing filters employ a moving window operator that adjusts the value of one pixel of an image at a time based on a function of a local area of pixels. As the operator advances over the picture, all of the pixels are affected. As a consequence, the smoothing filter progressively enhances the image over time by eliminating imperfections.

D. Feature Extraction
The feature extraction stage is the essential phase in the process. It encompasses all of the characteristics that are needed to classify the soil type, such as texture, color, and intensity was extracted. As a result, a metric known as color moments was employed to distinguish photographs based on their color characteristics.  Vol. 13, No. 5, 2022 308 | P a g e www.ijacsa.thesai.org

E. CNN Classification Model
CNN or ConvNet are deep neural networks used for image recognition, object detection, and classification. Image classification is the process of deciding which class (or combination of categories) best describes an input image. In CNN, we take a picture as an input, assign weight to the image's various aspects/features, and differentiate one from the other. CNN requires much less pre-processing than other classification techniques.

F. Softmax
Softmax is an intriguing activation function since it maps our output to the [0, 1] range and maps each output so that the entire sum equals one. Softmax's output is a probability distribution as a result as shown in Fig. 3. In-Training the Model, all the images are converted into arrays and stored in Data Variable. Each image is given labels for the detection and stored in Variable Labels.
After preprocessing the steps to be done to build the model Average pooling is applied to down sample the input dimension, Height, and width by taking average value over a window of size 4x4 for each input channel. Strides shift the window along each dimension.
Flatten transforms the pooled feature pictures into a single column, then sent to the fully linked layer. Dense added the fully connected layer to the convolution neural network, and dropout is a strategy for preventing over fitting in a model. Once the model has fitted with the Layers, the trainable parameters have been set. Fig. 4 shows how many total parameters are there and how many are available for the training. Every step picks images from the training set at random. Then, each step finds its bottlenecks from the collection. And ultimately, each step puts the images into the final layer to get predictions. Then, the forecasts are equated alongside the actual labels to inform the final layer's weights using the backpropagation procedure.
Each step shows the level of training accuracy and validation accuracy Fig. 5. Training accuracy was the prediction of training images that were classified correctly. Quality of the model measured by validation accuracy and to what extent it guess depending on data it has not seen before. Suppose 86% percentage on the training set and 85% on the validation set. You can expect your model to perform with 85% accuracy on new data. From Fig. 6 Prediction Accuracy into a percentile, the accuracy of the prediction soil image classifier is 91%.
This model could test using User Interface (UI). Once the model was ready, we developed a web application using the Flask framework. Here users can upload images to predict soil type.     7 demonstrates the web application with one button to upload an image of soil. After uploading an image predicted labeled button will appear on the screen, as shown in Fig. 8. User needs to click on predict button and then display the result as RED Soil as shown in Fig. 9. The exact process is repeated with a different image and displays the result as NOT a RED SOIL, as shown in Fig. 10.

V. CONCLUSION
The proposed model categorizes soil using CNN successfully identified the Red soil and tested in the field got 91 percent accurate results. And can estimate the soil's fertility by predicting significant nutrients for specific soil. Introducing cutting-edge technologies in Agriculture can improve the yield by applying adequate application fertilizers, and with an improved dataset, also get 99 percent accurate predictions.