/Wheat-Head-Detection-YOLO

Primary LanguageJupyter NotebookMIT LicenseMIT

Global-Wheat-Detection

Problem Statement

To detect wheat heads from outdoor images of wheat plants, including wheat datasets from around the globe. Using worldwide data, we will focus on a generalized solution to estimate the number and size of wheat heads. To better gauge the performance for unseen genotypes, environments, and observational conditions, the training dataset covers multiple regions. We will use more than 3,000 images from Europe (France, UK, Switzerland) and North America (Canada).

Method

We will use YOLO (You Only Look Once) algorithm to solve this problem, though we can't use this model in kaggle competition. Still, its good to learn and check.

Steps to Setup YOLO

YOLO needs dataset to be formated in a perticular format: The directory structure should look something like below image.

Directory Structure

image

Architecture

yolo

  • This architecture takes an image as input and resizes it to 448*448 by keeping the aspect ratio same and performing padding.
  • This image is then passed in the CNN network. This model has 24 convolution layers, 4 max-pooling layers followed by 2 fully connected layers. For the reduction of the number of layers (Channels), we use 11 convolution that is followed by 33 convolution. Notice that the last layer of YOLO predicts a cuboidal output. This is done by generating (1, 1470) from final fully connected layer and reshaping it to size (7, 7, 30).
  • This architecture uses Leaky ReLU as its activation function in whole architecture except the last layer where it uses linear activation function. Batch normalization also helps to regularize the model. Dropout technique is also used to prevent overfitting.

Results

image

d3ed0578-b1c3-4ecc-ace1-2151b379dea2