Multiclass Weeds and Crops Segmentation and Classification using Deep Learning 

Abstract

In recent years, the world's population increased exponentially, increasing the food demand, so it has become necessary to increase food production. For this purpose, it's essential to focus on factors that affect the quality and quantity of food. Some of these are natural factors (like climate, soil, pests, and weeds), and some are cultural factors (like technological and investment issues). Mostly cultural issues are resolved, now focusing on natural factors like weeds and pests.Weeds are unwanted plants in yields that compete with the crops and consume a lot of nutrients that affect the quality and growth of crops. The separation of these toxic weeds is a challenging task because of their colour and quantity. There are many methods used to remove weeds; some of them are mechanical weeding, chemical weeding, and biological weeding. Pakistan is an agricultural country, and almost a big part of its economy depends on agriculture. The growth of this department does not match the population growth; the reason behind is presence of weeds. Barriers in the field of technological aid are the lack of datasets and well-automated systems for crop weed classification and segmentation. Focusing on these issues, in this research, we will generate an efficient large dataset by merging different small datasets on the base to pick only those classes of weed and crops that belong to Pakistan; also an effective system using UNet and CNN based because they seem best performing models in segmentation and classification problems. To ensure the efficiency of the system, different performance measures like Accuracy and dice score will be measured.

Introduction

Food is the main part of human life. The basic need of any society is availability of quality food. As the population of world increases day by day that cause the increase the demand of food. To survive it’s become necessary to increase the production rate. To increase the production, it’s important to prevent all causes that decreases the production. For this purpose, there is need to make development in this field. There are many factors that affect our crops. There are many causes that decreases the productivity in the field of agriculture, one of most important cause is weed that effects the crop very much and takes part of nutrition, water, and space from crop. To remove weeds from crops the most common way is use of herbicides sprayers. The use of herbicide sprayers makes the land chemically polluted and make chemical changes in the food that decrease food's nutrition. This chemical pollution is very dangerous for all living organs and results in various issues in health, environment, and productivity also. These herbicide sprays decrease the natural taste and nutrition of crops. Sometimes the herbicide sprayers wastage then mixed with general water that cause the several serious illnesses to humans and animals also. As these herbicides sprays have some cost and to do spraying some sort of workers also needed so it increases the overall cost. To prevent these facts and make the production more efficient and cost effective it’s important to place better technology. The Advance research is so making a cost-effective system that remove weeds from crops automatically without using herbicide sprayers. As Pakistan is developing country so to make progress high its necessary to focus on its main departments. As Pakistan is an agricultural country and a big part of its economy is taken from this department. There are many cash crops in Pakistan that can affect the Pakistan economy. The main cash crops of Pakistan are carrot, cotton, maize, soybean, sugar beet, sunflower, tomato, wheat, rice, corn, potatoes, sugarcane, sesame, and groundnut. The aim is to classify or separate out the weeds in these crops so their productivity rate will increase. There are several weeds related to these crops that should be removed from these crops. The first step is data gathering and preprocessing. Data is gathered from different datasets because weed crop datasets are very rare and especially data of Pakistan is almost not present. Here data is gathered as weeds to their corresponding crops. The segmentation and classification task are to be performed so that weeds can be specified and removed. The aim is to make a cost-efficient system that automatically segment and classify the weeds and crops. To do segmentation and classification deep neural networks models will be preferable due to their performance accuracy rate on large data. The steps are data gathering and preprocessing, feature extraction, segmentation, classification, and deployment on some sort of cost-efficient system.

Dataset

A number of datasets are merged to build a large dataset as for deep learning techniques large dataset is mandatory. The list of datasets used are given below:


Method

The first step is to gather data because the basic aim is to identify weeds in crash crop of Pakistan, so we took the classes that are present in Pakistan then apply Data preprocessing tasks and pass to the models who perform two tasks which are classification and segmentation.

From the previous study there are some comparison results of some models shows that U-Net performs segmentation very well as it is generically made for Segmentation so for segmentation U-Net  deep learning model is used the preferable, efficient, and most widely used model for segmentation.

The process of classification will performed by adding Attention module with ResNet. The previous results from ResNet are shown in below given table:

In pre-processing, images from different datasets are of different sizes and belong to different countries so here we do a manual selection of classes of crops and corresponding weeds specific to Pakistan.

Segmentation of the weed crop classes will be investigated using U-Net Variant, after the preprocessing step the modified U-Net will do improved segmentation and the results will be used later.

After the improved segmentation, the results will be passed to the classifier which will perform the classification of weed crop classes.

After the Classification, our model will be able to predict the weed type and crop class type. We will evaluate our model on the test set, apart from the generated dataset as discussed above.

Summary

In recent years the population of the world increases widely, which also increases the need for growth in food development. Here the need is to overcome all things that decrease the production rate and the most important factor is Weeds that affect crop production and quality and to decrease the effects of herbicides used in crops also. The main issue is locating the weed in crops which is an ambiguous task because there is a very large number of types of weeds in different crops. The purpose of this Research is to propose a useful framework on DL that separates weeds from the crop from the image dataset. This research focuses on the main cash crops of Pakistan as want to support Pakistan's agricultural development. Here the cash crops of Pakistan and their relevant weeds are taken. The other issue is that datasets of crops and weeds are less publicly available and usually are small. For this firstly, the dataset is generated by gathering from different small datasets and generating the bigger one, the focus in merging different datasets is to make a dataset for the main crops of Pakistan. Here U-Net is used for segmentation and to make the crops and weeds image representation more meaningful and easier to analyze. Then the segmented useful images are classified whether they are weed or crop or also which type of weed and which type of crop by using ResNet. Then the cumulative outcomes are evaluated by performance measures e.g., Accuracy, and dice score.

Contact details:

Name: Seemab Ayub  Email: FA21-RCS-009@cuilahore.edu.pk