Agriculture Robot for Weed Detection, Classification and Spray using Deep Neural Network

Mankind efforts are more challenging in Precision Crop Management (PCM) where one need to protect the fields along with removal of weeds by using cheap resources by maintaining low economical ratio and with higher plant growth. The main challenges may lay in environmental effects, hidden weeds and p

2025-06-28 16:30:09 - Adil Khan

Project Title

Agriculture Robot for Weed Detection, Classification and Spray using Deep Neural Network

Project Area of Specialization Artificial IntelligenceProject Summary

Mankind efforts are more challenging in Precision Crop Management (PCM) where one need to protect the fields along with removal of weeds by using cheap resources by maintaining low economical ratio and with higher plant growth. The main challenges may lay in environmental effects, hidden weeds and precision crop management and growth rate. Our project is based on detection, classification and elimination of weeds by avoiding the rest of field from poisonous spray. In this way, plant growth rate increases, less herbicidal spray is used and accuracy increase. Our autonomous robot uses a central processing unit such as Raspberry pi interlinked with a camera to get pictures of a field in segments, a Raspberry pi GPU (external Geforce Invidia 750M above to get accuracy) that classifies the weeds from plants using deep neural network algorithm and uses the detected locations of weeds for targeted spraying. The movement of robot is also controlled by CPU and further the level of sprayer tank will be shown to user via IoT (in alternate approach an alarm can be set to give an alert about the end of spray in tank). In this way, not only man power will be replaced but plant growth will be increased. Movement of robot and sprayer system is two different tasks. As our robot is being controlled by Raspberry PI as main controller which holds processing data for weed too along with movement of 4-wheel chassis, once processing is done then we map picture into coordinates.  After mapping Raspberry Pi send coordinates to Arduino UNO, next task is controlling the mechanical sprayer system through Arduino UNO for fast processing. Chassis movement is being controlled with Raspberry PI. As Arduino UNO gives clearance of its command then Raspberry PI moves the Robot to next step. Our main focus is on line control movement of robot for single row.

We are using CNC 2-D movement technique to move our mechanical sprayer system onto provided location. The whole system is being controlled through an Arduino UNO. Stepper motor 1 and 2 moves at the same time and respectively both vertical rods start rolling which turns the horizontal rod to move forward and backward (in y-axis direction), stepper motor 3 turns the middle red rod which turns the servo motor fixed with sprayer nozzle to move in left-right direction (in x-axis direction), hence a 2-D field area is covered with provided xy coordinates. For this purpose, we are using stepper motor with Rotary Encoder and A4988 micro-stepping driver. Stepper motors are mainly used in open loop position control system. We designed the closed loop position control to overcome no feedback (loss of stepper steps) issue of open loop system. For this purpose, we are using Rotary Encoder. Incremental rotary encoders provide a pair of digital signals that allow Arduino UNO to determine the speed and direction of a Stepper Motor rotation.

Project Objectives

In agriculture, ground detection and elimination of weeds is a challenging phase for human beings. The main challenge is the accurate detection and classification of weeds. Moreover, usually an herbicidal sprayer sprays the whole field along with the weed that not only makes the field poisonous but is also harmful for human health. To overcome all these issues, we have developed an autonomous robot that takes picture of whole field area and detects green segments out of it, classifies the weed part and finally removes the weed using spray with high accuracy.

Project Implementation Method

This Project has Two Main Parts.

1: Software Part 

       Software have further five parts

      Software parts for FYP-I

Data Set Acquisition:

Table 1  Information of Dataset taken from internet

Leaf Name

No of Pictures

Total Pic. Generated

Quercus

72

5000

Salix alba (Sericea)

72

5000

Table 2 Results of trained and tested CNN

No of Layers

Of CNN

No of Filters in Conv. Layers

UnRotated Data

Rotated Data

Validation

Acc.

Of trained CNN

Accuracy Results for UnRotated Pics

Acc. Result for

Rotated

Pics

CL1, CL2, CL3

Class1

Class2

Class1

Class2

Class1

Class2

Class1

Class2

15

16,32,64

5000

5000

0

0

100%

100%

99.9%

8%

91.9%

15

16,32,64

3000

3000

2000

2000

99.9%

99%

100%

98%

96%

15

16,64,64

3000

3000

2000

2000

99.8%

100%

100%

99%

97%

15

Leaf Name

Quercus

Salix alba (Sericea)

No of Layers

Of CNN

15

15

15

15

Benefits of the Project

as this project is unique, innovative and contemporary and has many benefits in agricultural field of Pakistan. 

main benefit of this project is, it is human friendly as it removes all those ingradients which are dangerous to human health, being autonomous in nature it detects weed from the field and after seperating from crop it simply removes it using precise spray positioner.

it is fulfilling the missing labour in agricultural field as labour is rushing towards industries.

it is consuming a very limited spray quantuty which is economical and avoids crop from being hazardous.

it is mechinal machine and autonomous so it needs no supervision other than only one person to turn on or off.

it is replacing the manual spray system where one gets more chances of health issues.

it has varying datasets according to required field so it can cover a variety of crops.

Technical Details of Final Deliverable

Our project is controlling the autonomous robot using a Raspberry pi interfaced with a digital camera, stepper motor system to control sprayer, herbicidal tank level indicator and a 4 wheel chassis in real time.

Our project has two main phases:

1 : software work

2 : hardware work

Components detailed specifications are as follows,

Final Deliverable of the Project Hardware SystemType of Industry Agriculture Technologies Artificial Intelligence(AI), RoboticsSustainable Development Goals Good Health and Well-Being for People, Decent Work and Economic Growth, Industry, Innovation and Infrastructure, Life on LandRequired Resources

No of Layers

Of CNN

No of Filters in Conv. Layers

UnRotated Data

Rotated Data

Validation

Acc.

Of trained CNN

Accuracy Results for UnRotated Pics

Acc. Result for

Rotated

Pics

CL1, CL2, CL3

Class1

Class2

Class1

Class2

Class1

Class2

Class1

Class2

15

16,32,64

5000

5000

0

0

100%

100%

99.9%

8%

91.9%

15

16,32,64

3000

3000

2000

2000

99.9%

99%

100%

98%

96%

15

16,64,64

3000

3000

2000

2000

99.8%

100%

100%

99%

97%

15

More Posts