Skip to content

dssangan/corn_connection_detection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corn Connection Detection

Demonstration Video

Pre-processing

Using tensorflow Object detection API to detect the corn connections off from a video files. We extracted the images off from video capturing frames once every second using following example as reference: https://www.geeksforgeeks.org/extract-images-from-video-in-python/.

After extracting the images, we tried labelling images for few of the videos. And after that used the Object Detection model provided by tensorflow to start the training. In the meantime we came across a very useful similar project, so referenced few things off from there. Here is the link of the project we used a reference: https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

Training

We trained using the same deep learning architecture used in the refernce project, the faster resnet network. It takes a long time to train the network, it took us quite long amount of time to train however much we have trained. And as a result we have a model that is good at detecting overall corn regions in the crop.

Our training dataset can be found here: https://drive.google.com/drive/folders/1uAFqXdBKQmtmWChE4hY-2O0fCR2A4dS9

Testing

When we started testing, we realized that it didn't do good on the images for whose camera angles were weird. So if there are images which looks like it is taken by camera that is held completely vertical, then only it will be able to detect the corn connections otherwise it is not able to do so. So we need to re-train the model with more labelled images whose images are taken from weird camera angles. For example, if you look at video from GOPR0165 you can see that the video is taken from different angle than in videos from GOPR0388-GOPR0491.

Running the model

Just clone this repository locally and add the images or video into the cloned repo destination for which you would want to test our model.

For running this model, run the following scripts with minor modifications:

To execute the code go into the directory where you cloned the repo. And from command-promt/console/shell execute following commands:

  • python Object_detection_image.py
  • pyton Object_detection_video.py

About

A project using TensorFlow's detection API to detect corn connections in an image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.6%
  • Jupyter Notebook 4.2%
  • Other 0.2%