This is a program made as part of the Drone Image Analysis project for the International Rice Research Institute. It processes drone images for input to a deep learning neural network regression model that predicts rice phenotype.
The programs require the following libraries and modules to be installed:
Python 2.7
PIL
orpillow
scikit-learn
Numpy
Pandas
orGeopandas
gdal
orogr
OpenCV 2.x
Keras
+Tensorflow 1.3.0
sklearn
These dependencies can be installed along with the environment of OpenCV using this command conda install -n opencv -c conda-forge <module>
(assuming that you already have anaconda2).
To run the programs, open a terminal and follow these steps:
- Make sure that the drone image is in the same directory as detect.py. Go to the directory by typing
cd image-processing
- Run this command
- This should generate a tif file which is the detected rice field inside the same directory.
- Run this command on your terminal
python extract.py
- This should generate a csv file that contains the extracted data from the drone image in a directory named model.
- Go to that directory by typing
cd ../model
- Run this command
python dnn.py
to build and train the deep learning regression model.- This should generate logs containing the loss and mean absolute error of each epoch during training. The values are displayed automatically in the terminal.
- For a better visualization, run this command:
tensorboard --logdif=logs/
and enter this URLhttp:localhost:6006
using any browser.
Note: Each script has its own documentation. To improve the development of the programs, you can always refer to online documentations.
The program is written by Loria Roie Grace Malingan, a BS Computer Science student at the University of the Philippines Los Baños. The other part of the project which is a web app is made by Jasper Arquilita, a co-intern.