/Differentiating-Weeds-from-Crop-Seedlings

The aim of the project is to correctly identify the weed type from a variety of weed and crop RGB images with CNN , Scikit-Learn and Keras

Primary LanguageJupyter Notebook

Differentiating-Weed-from-Crop-Seedlings-with-CNN

The aim of the project is to correctly identify the weed type from a variety of weed and crop RGB images with Convolutional Neural Networks. Built a Neural Network utilising a big dataset (> 1GB). Performed data exploration to understand what the dataset is about and pre-processed data to be able to use it in a convolutional neural network.

Used the V2 Plant Seedlings Dataset available on Kaggle.com. See below for more details.

===================================================================================================

Why is this important?

As taken from Kaggle website:

"Successful cultivation of maize depends largely on the efficacy of weed control. Weed control during the first six to eight weeks after planting is crucial, because weeds compete vigorously with the crop for nutrients and water during this period. Annual yield losses occur as a result of weed infestations in cultivated crops. Crop yield losses that are attributable to weeds vary with type of weed, type of crop, and the environmental conditions involved. Generally, depending on the level of weed control practiced yield losses can vary from 10 to 100 %. Thereore, effective weed control is imperative. In order to do effective control the first critical requirement is correct weed identification."

Objective of the machine learning model

I aimed to maximise the accuracy, that is, the correct classification of the different weed varieties.

How to download the dataset

To download the crop seedlings dataset go to this website: https://www.kaggle.com/vbookshelf/v2-plant-seedlings-dataset

Click on the link 'train.csv', and then click the 'download (2GB)' button towards the right of the screen, to download the dataset. Unzip the folder and rename it to 'plant_train' and save it to a directory of your choice. If you save it to the same directory from where you run this notebook, then you will be able to run the code as I do in the notebook.

Note the following:

  • You need to be logged in to Kaggle in order to download the datasets.
  • You may need to accept terms and conditions of the competition to download the dataset
  • If you save the file to the same directory where you saved this jupyter notebook, then you can run the code as it is written here.

For the folder Shepherd's Purse, remove the ' so that it reads Shepherds Purse

====================================================================================================