Skip to content

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

Notifications You must be signed in to change notification settings

r1wtn/rice_yield_CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages