Climate Resilient Agriculture with Artificial intelligence

Nishanth gowda
Indo Data Week
Published in
8 min readNov 22, 2020

The prototype is put together by team Nigoda as part of Indo data week's “Hackathon for Good India”.

Nigoda consists of the following members- Nishanth Gowda(team head), Akshay B Rao, Soumya Hegde, Harshitha KC, and Priyanka C.

Background check :

Agriculture is the main backbone of India and it is composed of many crops with the foremost food staples being rice and wheat.
We have mainly three cropping seasons i.e, rabi, kharif, zaid. Rabi crops are sown in winter and harvested in summer and crops like wheat, barley, peas, mustard are majorly grown in North India.
Kharif crops are grown with the onset of monsoon in different parts of the country and harvested in sept-oct and crops like paddy, maize, jowar, cotton, etc are grown.

Zaid crops are nothing but crops that are grown in between the rabi and Kharif season. Crops like watermelon, muskmelon, vegetables are grown.

In Telangana farmers mainly depend on rain-fed water sources for irrigation and rice is the major food crop and other crops like cotton, sugarcane, tobacco, etc.
GDP:US$150 billion
GDP by sector : Agriculture(16%);Industry(20%);Services(65%).

TO NOTE: for practical purposes the state of Telangana only is taken for consideration.

The Problems/Challenges:

While there is a lot of potential for growth in agriculture, there are constraints hampering the same. The major constraints are as follows.
Low and erratic rainfall leaves many areas under unprecedented drought, while some areas are subjected to floods.
Semi-arid climate restricts the growth of natural vegetation, due to which, the scope of organic matter development in Rogen, the chief nutrient for plant growth 63% of the agriculture is rainfed, which is exposed to the hostilities of climate.
Among the farming community, about 85% of farmers are either marginal or small with poor socioeconomic condition High labor cost and low mechanization levels have increased the cost of cultivation.

In the past few years, farmers are failing to receive the proper yield in agriculture, and its mainly because of all-natural disasters.
Even considering all these problems, they are making agriculture and at the end harvesting, the traders buy the crops immediately at a very low price and they store it.
After sometimes, when the demand comes to that crop, the traders will sell the crops by keeping it a maximum profit, and dealers will sell that for consumers again keeping a profit.
In this way where the farmers are facing loss and in the past two years we can also see the many death cases of farmers.

Thus the challenge taken up by our team would be to build such a tech piece using machine learning that could analyze and predict outcomes using various datasets such as temperature, location, rainfall and give the best suitable plans for the planter with multi-info. scope for addition as well to solve other issues to truly fulfill climate-resilient agriculture.

The solution:

To build an application with the help of AI which consists of the following features/sections.

Crop yield prediction: This shows the user the best suitable crops to be grown for his location.

Market price: This displays the market selling price of all crops in descending order of top gains and top losses in terms of money hike with future predictions.

Buy/Sell: This is an added feature that can ease agro work and truly help to get best results. once the user clicks on the crop he decides to cultivate based on either of the two indicators we’ve written above about , he can click buy and procure the particular crop seeds ,in which the best among rest seed types are displayed. “sell” involves selecting the grown crop by the user with yield quantity.

It is important to note there's a “GuideBot” that gives a run through with necessary steps and instructions right from sowing to reaping and all in between. The user can upload a picture of his crop and the application shall analyse and answer him what must be done in order to grow it better such as fertilizers and insecticide.

Indepth process/design/working :

Crop yield prediction shows the best suitable crops to be grown in the user's area.it gives the future crop yield deviation using historical data from past years. This is done using the “random forest classification model”

Random forest is a supervised learning algorithm that is used for both classifications as well as regression. But however, it is mainly used for classification problems. As we know that a forest is made up of trees and more trees means a more robust forest. Similarly, the random forest algorithm creates decision trees on data samples and then gets the prediction from each of them and finally selects the best solution by means of voting. It is an ensemble method that is better than a single decision tree because it reduces the over-fitting by averaging the result.

We can understand the working of the Random Forest algorithm with the help of the following

  • starts with the selection of random samples from a given dataset. Next, this algorithm will construct a decision tree for every sample. Then it will get the prediction result from every decision tree. voting will be performed for every predicted result. At last, selects the most voted prediction result as the final prediction result.

The following diagram will illustrate its working −

The datasets used for this purpose are:

Crops Area, Production and Yield

This dataset provides information about Area (Lakh Hectares), Production (Lakh Tonnes), and Yield (Kg/hectare) of Crops through which it shows the maximum yield possible in that growing season compared to historical.

The market price section shows the current market price for a particular crop which changes on a daily basis. It also consists of a prediction model of future hike or drops in rates based on historical datasets of the past years in the same way as explained for the crop yield prediction.

Govt agricultural market

Primary Market Yards Geo Locations

These two datasets provides info about Commodity, Variety, Market Name, Arrivals, Max min price Purchased for, locations of Primary Market in the state, Name of the District with Latitude and Longitude which are merged and displayed as consumable data.

Coming to the buy/sell feature, when the user selects the crop he's interested to cultivate and clicks buy, it opens a window showing him the best quality seeds of that crop for his condition that is

selling feature involves the input of crop type and quantity up for sale and thus ease selling for the user. additionals such as transportation are available too. the code locates the nearest storage facility to the user and then if needed can hire a vehicle to transport his produce for a certain price.

GUIDE BOT :

This is an integral and USP of this prototype. Here we will explain all the salient features as well the internal working of the bot.

As you can assume by the name, general guidance shall be provided on how to grow the particular crop, the duration for harvesting, the water cycle, and the feasibility of growing such a crop in the area.

There is also a special feature embedded in it, the image recognition of seed. once the user procures the seeds through this medium or self, he must click and upload pictures of his crop/seeds at a certain said interval. it further analyses this picture and scans it, to detect all spheres pertaining to the crop, the growth of it and suggests necessary addons such as fertilizers or insecticides in case of detection of leaf rot or any ailment in it

Firstly it classifies the type of crop it is through image analysis using the VGG model.

VGG is a convolutional neural network model proposed by K. Simonyan and A. Zisserman from the University of Oxford in the paper “Very Deep Convolutional Networks for Large-Scale Image Recognition”. The model achieves 92.7% top-5 test accuracy in ImageNet, which is a dataset of over 14 million images belonging to 1000 classes.

MACROARCHITECTURE OF VGG16

Then, it is feature extraction of the image upload of the particular crop.

We will use the data to help classify the yield

We have 569 observations with 33 variables

Ten real-valued features are computed for each cell nucleus:

-radius (mean of distances from the center to points on the perimeter)

-texture (standard deviation of gray-scale values)

-perimeter

-area

-smoothness (local variation in radius lengths)

-compactness (perimeter² / area)

-concavity (severity of concave portions of the contour)

-concave points (number of concave portions of the contour)

-symmetry

  • fractal dimension (“coastline approximation”)
  • -SVM technique has been used to model the data
Dependency

A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for the two-group classification problem, the guide shall recognize the type of crop, and will also give a sort accurate yield result through calculations using above said parameters and probable fine diseases that may be pertaining to the crop and will suggest necessary means and steps.

Illustration of the working of the guide bot(SVM)

UPLOADED PICTURE VS ANALYSED AND DETECTED PIN POINTS ON PICTURE

Thus, this prototype using ML and AI will ease all dimensions of agriculture and truly enable climate-resilient agriculture which is more result-oriented and market-oriented.

--

--