Farm-Eye

Ashhadul Islam

Ashhadul Islam

Kolkata, West Bengal

2 0
  • 0 Collaborators

Weeds are unwanted trespassers in the agricultural business. Let’s leverage computer vision and deep learning to detect the presence of weeds in crops. This will enable targeted remediation techniques to remove them from fields with minimal environmental impact. ...learn more

Project status: Published/In Market

Artificial Intelligence

Intel Technologies
oneAPI, DevCloud

Docs/PDFs [1]Code Samples [1]Links [1]

Overview / Usage

Intel® oneAPI Hackathon for Open Innovation is a recent competition hosted by intel where we need to detect the regions in pictures of croplands where weeds are present. The product developed will be helpful for the targeted application of pesticides to get rid of weeds. Weeds are unwanted trespassers in the agricultural business. They deny the nutrients, water, land, and other critical resources to grow healthy crops. Weed can lead to lower yields and inefficient deployment of resources by farmers. Although pesticides are used to remove weeds, indiscriminate usage of pesticides creates health risks for humans. Let’s leverage computer vision and deep learning to detect the presence of weeds. This will enable targeted remediation techniques to remove them from fields with minimal environmental impact.

Methodology / Approach

As we will be using intelOneApi devcloud, you need to have a free account in intel OneApi. Here is the link.

Sign in/up to use the powerful intel devcloud.

We can ssh into the devcloud or open it as a jupyter notebook in the browser.

We download and organize the data to make sure that it conforms to the standards required by yolovX.

Below commands are executed to activate the pytorch environment in the devcloud and install libraries required to train the model.

qsub -i
source /opt/intel/inteloneapi/setvars.sh > /dev/null 2>&1
source activate pytorch
cd project
git clone https://github.com/ultralytics/yolov5
pip install --user -r yolov5/requirements.txt

The following commands are executed to train the model.

source /opt/intel/inteloneapi/setvars.sh > /dev/null 2>&1

source activate pytorch

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/glob/development-tools/versions/oneapi/2023.0/oneapi/intelpython/latest/envs/pytorch/lib/

python yolov5/train.py --data dataDiff.yaml --cfg yolov5n.yaml --batch-size 32 --epochs 5 --name TrainModel

Jobs are submitted with the following command

_qsub -l nodes=1:gpu:ppn=2 -d . train_yolov5.sh _

The status of jobs in execution canbe checked with the following command

watch -n 1 qstat -n -1

I get around 85% accuracy in identifying crops and weed from images

Technologies Used

I have used the Pytorch module in intel analytics cloud.

Documents and Presentations

Repository

https://github.com/ashhadulislam/medium_weedVcrop-main

Comments (0)