[go: up one dir, main page]

0% found this document useful (0 votes)
33 views4 pages

PyRISA: Python-Based Rice Inspection and Smart Analysis

An innovative science project created by a sixteen-year old student who was just bored during summer.

Uploaded by

Jean Avryn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views4 pages

PyRISA: Python-Based Rice Inspection and Smart Analysis

An innovative science project created by a sixteen-year old student who was just bored during summer.

Uploaded by

Jean Avryn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

PyRISA: Development of a Python-powered Rice Inspection

and Smart Analysis System


Jean Avryn C. Ronquillo1, Ellaine Grace M. Ronquillo2
1
Nueva Ecija Institute of Artificial Intelligence, Department of Chemical Engineering in Computer
Applications
2
University of the Philippines Diliman, Department of Mathematics and Applied Mathematics

1. Introduction

Half of the population of the entire globe consumes rice. It supplies one-fifths of the planet’s supply of
energy, followed by wheat and maize. It is a staple in most Asian and African nations [1]. It contains
important amounts of calories, vitamins, and minerals, as well as other nutritional attributes. It is
known to be a rich source of antioxidant compounds, preventing diabetes and other cardiovascular
ailments [2]. However, agricultural risks have been causing a decrease in rice production, notably
climate change [3, 4]. As a result, numerous countries’ food security is at danger [5].
Farmers who rely on rice production are also at risk, as they don’t have sufficient resources to
identify their crops’ viability to be sustained in unprecedented agricultural situations. Because of this,
research regarding the use of technology in agricultural procedures have been continuously developed
[6]. However, some studies have found out that farmers cannot easily comprehend the use of
technology in farming applications [7, 8]. The researchers aim to develop a system that can be useful
for farmers to maintain their rice and easily inspect and analyze its parameters.
Thus, this study proposes the development of PyRISA – a Python-powered rice inspection and
smart analysis system for rice farmers to enable them adapt to the use of modern technology, as well
as an uncomplicated way to use in agricultural applications.

2. Methodology

2.1. Research Design


The research design of this study is mixed-methods design, utilizing both experimental design and
applied research. The experimental aspect is based on the use of developing and testing disease
detection model using machine learning technique, on a dataset of rice leaf images. Moreover, the
integration of sensors for environmental monitoring further supports experimental approach. On the
other hand, it falls under applied research as it aims to solve a real world problem which is faced by
rice farmers. It is focused on creating a practical tool that farmers can use to assess the health of their
crops and make informed decisions based on real-time disease detection and environmental
monitoring data.

2.2. Materials
The materials that will be used in the development of PyRISA include hardware and software
components. The primary system will be programmed in Python language, as it offers TensorFlow for
implementing Convolution Neural Network (CNN) used for disease detection. It will be employed to
train and deploy the rice disease detection model. The system will also use OpenCV, a computer vision
library in processing and analyzing images of rice leaves for disease detection. For the graphical user
interface (GUI), Tkinter will be used, providing an intuitive platform for farmers to interact with the
system. On the hardware side, a Raspberry Pi 5 will serve as the central processing unit for sensor
integration. The sensors required include a soil moisture sensor, which measures the amount of water
in the soil, a pH sensor to monitor soil acidity, and a DHT22 sensor for recording temperature and
humidity levels. These sensors will provide critical environmental data to complement the disease
detection system. For data acquisition, Kaggle Rice Disease Dataset will be utilized, ensuring a wide
variety of rice leaf images for training the disease detection model.

2.3.1. Rice Disease Dataset Acquisition


Kaggle Rice Disease Dataset will supply image data of various rice diseases. The images will be
preprocessed to ensure uniformity and consistency across the dataset. The preprocessing steps will
include resizing the images to a standardized size of 224x224 pixels, followed by data augmentation
techniques such as rotating, flipping, and adjusting brightness to increase the diversity of the dataset
and prevent overfitting during model training. The dataset will then be split into training, validation,
and testing sets, with a ratio of 70% for training, 20% for validation, and 10% for testing.
Figure 1. Example of a rice disease dataset containing a leaf blight

Figure 2. Example of a rice disease dataset containing a brown spot

Figure 3. Example of a rice disease dataset containing a leaf smut

2.3.2. Disease Detection Model Development


The disease detection model will be developed using a Convolutional Neural Network (CNN), a deep
learning model specifically suited for image classification tasks. The CNN will be trained to detect
various rice diseases by analyzing preprocessed images of rice leaves. Using TensorFlow or Keras, the
model will consist of multiple convolutional layers designed to automatically extract features from the
images, such as texture and shape patterns that are indicative of specific diseases. After feature
extraction, the model will pass the data through pooling layers to reduce dimensionality and improve
computational efficiency. The final output layer will use a softmax activation function to classify the
images into one of several disease categories: healthy, blast, bacterial blight, or others. The model’s
performance will be evaluated using metrics such as accuracy, precision, recall, and F1-score to ensure
it can accurately identify diseases from unseen test data. A confusion matrix will also be used to
visualize misclassifications and assess the model's overall reliability. During training, techniques like
dropout and batch normalization will be employed to prevent overfitting and improve generalization.
Once trained, the model will be integrated into the PyRISA system for real-time disease detection when
users upload images of rice leaves.

2.3.3. Sensor Integration


Sensor integration will involve the connection of environmental sensors to a Raspberry Pi 5, which will
serve as the interface between the physical world and the PyRISA system. The soil moisture sensor will
measure the moisture level in the soil, providing essential information about irrigation needs, while the
pH sensor will monitor the acidity or alkalinity of the soil, which is crucial for determining nutrient
availability. The DHT22 sensor will record the temperature and humidity levels in the environment,
offering insights into the weather conditions that affect rice growth. These sensors will be interfaced
with Python using the PySerial library, enabling the Raspberry Pi to collect real-time data. The collected
data will be processed and displayed on the GUI, allowing farmers to monitor the conditions of their
rice crops. This integration of sensors with disease detection technology will provide a comprehensive
system for managing rice health, allowing farmers to make informed decisions based on both disease
presence and environmental factors.

2.3.4 System Design and Interface Development


The system will feature a simple and intuitive Graphical User Interface (GUI) developed using Tkinter.
The goal is to design an interface that is accessible and easy to use, even for farmers with limited
technical knowledge. The GUI will have several key features: it will allow users to upload images of rice
leaves for disease detection, display real-time data from environmental sensors, and provide
recommendations based on the disease diagnosis and sensor readings. The system will display sensor
data such as soil moisture, pH levels, and temperature and humidity in real-time, enabling farmers to
monitor the environmental conditions affecting their crops. Additionally, the system will generate
actionable recommendations based on the disease diagnosis and sensor data, offering advice on
irrigation, fertilization, or disease management. The GUI will be designed to be bilingual, supporting
both English and Filipino, ensuring accessibility for Filipino farmers. The interface will also include
feedback mechanisms, allowing farmers to report issues and suggest improvements, ensuring the
system can be refined based on user experience.

Image Rice Image


Acquisitio Disease Acquisitio
n Detection n

Sensor
Data

Figure 4. PyRISA flowchart

2.4. Testing and Evaluation


Testing and evaluation of the PyRISA system will involve both technical performance assessments and
user feedback to ensure the system’s effectiveness in real-world agricultural settings. The disease
detection model will undergo rigorous evaluation using a test set of unseen rice leaf images.
Performance metrics such as accuracy, precision, recall, and F1-score will be calculated to assess the
model's ability to correctly identify rice diseases. A confusion matrix will be used to visualize how well
the model classifies each disease category. For the sensor integration, the reliability and accuracy of
the environmental readings will be tested by comparing sensor outputs with known benchmarks and
real-world conditions. The overall system performance will also be assessed based on how seamlessly
the disease detection model and sensor readings are integrated into the GUI, and whether the system
provides accurate, real-time recommendations. Additionally, user feedback will be collected from a
small group of farmers or agricultural students who will test the system. The feedback will focus on the
system’s ease of use, the usefulness of the information provided, and the clarity of the interface. This
testing phase will help identify any potential improvements and ensure that the final product is
practical and user-friendly.

References

[1] Bin Rahman, A. R., & Zhang, J. (2023). Trends in rice research: 2030 and beyond. Food and Energy
Security, 12(2), e390.
[2] Mohidem, N. A., Hashim, N., Shamsudin, R., & Che Man, H. (2022). Rice for food security: Revisiting
its production, diversity, rice milling process and nutrient content. Agriculture, 12(6), 741.
[3] Ojo, T. O., & Baiyegunhi, L. J. S. (2020). Determinants of climate change adaptation strategies and
its impact on the net farm income of rice farmers in south-west Nigeria. Land Use Policy, 95, 103946.
[4] Mandal, A. C., & Singh, O. P. (2020). Climate Change and Practices of Farmers' to maintain rice
yield: A case study. International Journal of Biological Innovations, 2(1), 42-51.
[5] Bairagi, S., Mishra, A. K., & Durand-Morat, A. (2020). Climate risk management strategies and food
security: Evidence from Cambodian rice farmers. Food Policy, 95, 101935.
[6] Li, D., Nanseki, T., Chomei, Y., & Kuang, J. (2023). A review of smart agriculture and production
practices in Japanese large‐scale rice farming. Journal of the Science of Food and Agriculture, 103(4),
1609-1620.
[7] Gabrillo, C. A., & Palis, F. G. (2023). Access and use of ICT-mediated rice technologies among
farmers and agricultural extension workers in Caraga, Philippines. Journal of Agriculture and
Technology Management, 25(2), 306-313.
[8] Caliguiran, V. B., & Guingab, R. S. (2024). Expanding the Technology Acceptance Model to Predict
ICT Utilization in Agricultural Extension in Isabela, Philippines.

You might also like