Detection and Identification of Rice Pests Using Memory Efficient Convolutional Neural Network Zihad Hossain Nayem, Md. Iqbal Jahan, Abdul Aziz Rakib, Md. Solaiman Mia Department of Computer Science and Engineering, Green University of Bangladesh, Bangladesh Email: zihadhossainnayem@gmail.com, md.iqbaljahan5@gmail.com, aziz.cse191@gmail.com, solaiman@cse.green.edu.bd Abstract—Rice pest detection is a very important part for the development of our agriculture. Numerous farmers are impacted worldwide by rice pests that frequently endanger the sustainabil- ity of rice production. There are many types of machine learning techniques for detecting the rice pests. CNNs (Convolutional Neural Networks) are currently regarded as the state-of-the- art technology for image recognition. Most of the models in existing researches worked with datasets that have small number of images and classes. In this paper, We have performed the training of our proposed model with 10400 images, containing ten different classes including Bacterial Leaf Blight, Bacterial Leaf Streak, Bacterial Panicle Blight, Blast, Brown Spot, Dead Heart, Downy Mildew, Healthy, Hispa and Tungro. A custom CNN has been used in the proposed model for pest detection, which will detect different classes of rice pests. To implement our model, we have used the Keras framework with a TensorFlow backend. In addition, our proposed model gives 88.18% validation accuracy while having only 0.57 million parameters. Keywords—Rice Pests, Pests Detection, Convolutional Neural Network, Machine Learning I. I NTRODUCTION Bangladesh is an agricultural country and the main crop of Bangladesh is rice. In 2021, it produced about 38 million tons of rice [1]. According to some research findings, rice pests have caused a 10-15% average yield loss in Bangladesh. Farmers are suffering from financial losses every year due to this yield loss. The main reason for this problem is that we are not detecting the pests in time. If we can detect the rice pests before any damage occurs, we can take the necessary steps in order to produce more rice. Manual identification and detection of such pests can take a long time and recognition accuracy won’t always reliable. CNNs have been performed well in object recognition and detection in recent years. CNNs are neural networks with one or multiple convolution layers that are primarily used for image processing and classification. In today’s world, people are working alongside smart ma- chines and machine learning is at the core of the rapid advancements in our technology. In the framework of In- dustry 4.0, the manufacturing sectors have been significantly influenced by machine learning. Recognizing, detecting and classifying different objects are significant components of ma- chine learning. Thus, in this paper, we have applied machine learning techniques to detect various rice pests. We observed from the existing studies that specialized pest management and efficient disease prevention for the crop business are constantly top agricultural concerns worldwide, particularly in many developing nations like Bangladesh. A CNN pulls the features from raw images, unlike using hand crafted features for recognition. In order to maintain the quantity and quality of rice production, disease prediction and forecasting of rice leaves are crucial because early disease detection is helpful in ensuring that early intervention can be provided to reverse the disease’s progression and facilitate the healthy growth of the plant for the increasing rice production and supply [2]. The traditional method of diagnosing rice pests or diseases which frequently involves physical labor has shown to be inaccurate, costly and time-consuming. So, it is extremely important to create a method for detecting rice pests that offers quick and reliable way to detect the rice pests. There are many great CNN models, including BGG16, SqueezeNetv1.1, Inception v3, NasNet Mobile, ResNet. They can achieve good accuracy in pest detection, but they have a huge number of parameters. In the proposed model, we have tried to lower the parameters while achieving good accuracy. Besides rice pest detection, the proposed model can also be used for other plant diseases and pest detection. II. LITERATURE REVIEW Different techniques and methods have been conducted by researchers to detect rice pests. Some of the existing works are discussed in this section. Rahman et al. [3] collected 1426 images of rice diseases and pests from Bangladeshi paddy fields. The models were then trained using the Keras framework with a TensorFlow backend. They were able to achieve 93.3% accuracy and reduce the model size. The limitation of this work is the complete dataset needs to be manually separated into symptom classes, which could result in some symptom variants being missed, also it is a time consuming process. They can improve this method by including location, weather and soil data. Applying high- dimensional clustering methods to each class-specific image set will also improve the system. An automated plant disease identification and categorization system was developed in [4]. They utilized a dataset of 3355 samples that had been gathered from various online sources. Two different models were utilized, one is Inception v3 and another is simple CNN. They were able to achieve 90% and 63% accuracy, respectively. Additional rice diseases might be included in this study, along with larger data sets also experimenting with different CNN techniques can improve this research.