Coder Social home page Coder Social logo

rabiahdlearner / rice_yield_cnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r1wtn/rice_yield_cnn

0.0 0.0 0.0 1.58 MB

Rice Yield CNN is a model to estimate the rice yield based on RGB image of rice canopy at harvest. The model is developed based on more than 22,000 images and yield database collected across 7 countries.

License: Apache License 2.0

Python 100.00%

rice_yield_cnn's Introduction

Rice Yield CNN

Rice Yield CNN is a model to estimate the rice yield based on RGB image of rice canopy at harvest. The model is developed based on more than 22,000 images and yield database collected across 7 countries.
This project is the implementation of the paper "Deep learning-based estimation of rice yield using RGB image".

Performance

The model explained approximately 70% of variation in observed rice yield using the test dataset, and 50% of variation using the independent prediction dataset. The model is also able to forecast the rice yield approximately 10-20 days before harvest and is practically robust to the brightness, contrast or angle of the RGB image .

Conditions on estimation

RGB images that were captured vertically downwards over the rice canopy from a distance of 0.8 to 0.9 m using a digital camera should be input.

example

Environment on experiments

OS

  • Ubuntu 18.04.5 LTS

CPU

  • Intel(R) Xeon(R) W-2295 CPU @ 3.00GHz 18 cores

GPU

  • NVIDIA GeForce RTX 3090 x2

CUDA

  • Cuda compilation tools, release 11.3, V11.3.109

Python

  • Python 3.8.8

Installation

  1. Install depentencies.
pip install -r requirements.txt
  1. Install Pytorch

Please install pytorch version compatible with your cuda version.

For example, If you use cuda version 11.3,

pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
  1. Download pre-trained model from google drive.
mkdir checkpoints
wget "https://drive.google.com/u/0/uc?export=download&id=1XgTUGK8130gnY9AF3gYv9zhJSJaxhHVp" -O rice_yield_CNN.pth

Estimation

Run

python estimate.py --checkpoint_path checkpoints/rice_yield_CNN.pth --image_dir example --csv

You can find estimated yield on your console.

Below are meanings of options.

  • checkpoint_path : Path to the checkpoint file you saved.

  • image_dir : path to the directory where images are saved.

  • csv: If you set this, csv of results will be generated.

rice_yield_cnn's People

Contributors

fltwtn avatar r1wtn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.