Shiny Project: Taking it with a Grain of Rice

Bryan Briones
10 March 2022

Introduction

A total of 75 thousand pieces of rice grain were obtained, including 15 thousand pieces of each variety of rice (Arborio, Basmati, Ipsala, Jasmine, Karacadag). Preprocessing operations were applied to the images and made available for feature extraction. A total of 106 features were inferred from the images; 12 morphological features and 4 shape features obtained using morphological features and 90 color features obtained from five different color spaces (RGB, HSV, Lab*, YCbCr, XYZ). - From the data set originator, Murat Koklu, Selcuk University, Konya, Turkey.

For this project, two features (variables) out of this data set were chosen to fit a model to predict the rice grain's area from a measured perimeter. The model to be evaluated is written out as:

fit <- lm(AREA ~ PERIMETER, data = rice)

Supporting documentation, i.e. source data and ui.R and server.R codes can be obtained at https://github.com/brionesb1116/shiny-project. Server and user interface codes at https://github.com/brionesb1116/shiny-project/tree/main/FunWithShiny. IMPORTANT: Right-click on the hyperlink first to open the page in a separate browser tab.

Static Preview of the Plot

plot of chunk unnamed-chunk-1

App Description and Interactivity

plot of chunk unnamed-chunk-2

As illustrated in the screen capture above, the user is given a slider to input values for the perimeter. Not only will the predicted outcome, the area, be plotted on the regression line, the predicted outcome's value will also be presented under the plot.

References

Read up some more on this study.

Koklu, M., Cinar, I., & Taspinar, Y. S. (2021). Classification of rice varieties with deep learning methods. Computers and Electronics in Agriculture, 187, 106285. https://doi.org/10.1016/j.compag.2021.106285

Cinar, I., & Koklu, M. (2021). Determination of Effective and Specific Physical Features of Rice Varieties by Computer Vision In Exterior Quality Inspection. Selcuk Journal of Agriculture and Food Sciences, 35(3), 229-243. https://doi.org/10.15316/SJAFS.2021.252

Cinar, I., & Koklu, M. (2022). Identification of Rice Varieties Using Machine Learning Algorithms. Journal of Agricultural Sciences https://doi.org/10.15832/ankutbd.862482

Cinar, I., & Koklu, M. (2019). Classification of Rice Varieties Using Artificial Intelligence Methods. International Journal of Intelligent Systems and Applications in Engineering, 7(3), 188-194. https://doi.org/10.18201/ijisae.2019355381