Real-time safety monitoring system for fruits and vegetables

A real-time monitoring system using a spectral sensor and machine learning classifiers addresses the challenge of unreliable organic verification in fruits and vegetables, achieving 99.5% accuracy for instant classification.

DE202025102127U1Active Publication Date: 2025-06-05ALADWANI ABDULAZID +4
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE202025102127
Authority / Receiving Office
DE · DE
Patent Type
Utility models
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-06-05
Estimated Expiration
2035-04-30

AI Technical Summary

Technical Problem

Conventional methods for verifying the organic status of fruits and vegetables are complex, unreliable, and lack real-time detection capabilities.

Method used

A real-time monitoring system utilizing a spectral sensor, microcontroller, and machine learning classifiers (SVM, ANN, RF) to classify fruits and vegetables as organic or non-organic based on spectral data.

Benefits of technology

Achieves instant, accurate classification with 99.5% accuracy within 2.3 seconds, enhancing consumer confidence and food quality standards.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

A real-time fruit and vegetable system, characterized in that the system comprises: a spectral sensor to capture specific spectral values ​​that are unique to each food sample; a microcontroller connected to a variety of modules including: an input module for receiving 18 wavelength channels from the spectral sensor after scanning a food sample; a signal processing module for processing the signal to obtain spectral values; a signal transmission module for transmitting the spectral value data to a machine learning-based training module; the training module for training the retrieved data using three different machine learning classifiers to train the dataset; and a classification module to classify the food sample as biological or non-biological based on spectral data.
Need to check novelty before this filing date? Find Prior Art

Description

Background:

[0001] Consumer demand for organic food is increasing as awareness of its health and environmental benefits grows. However, verifying whether a product is organic or not remains a complex and sometimes unreliable task, as conventional labeling methods can be misleading or inadequate. However, verifying whether a product is organic or not remains a complex and sometimes unreliable task, as conventional labeling methods can be misleading or inadequate.

[0002] Many conventional methods have been researched to ensure food safety and quality. One example is a low-cost, open-source miniature spectrophotometer for various applications. Several studies use machine learning to assess food quality. For example, one example describes a CNN algorithm for detecting diseases in fruits and vegetables. Another example is a method for detecting pesticide residues using color identification. Another example is an IoT-based model for detecting formaldehyde in food.

[0003] Other conventional techniques have been researched for various sensing techniques for assessing food quality. For example, an aerometric acetylcholinesterase biosensor for pesticide detection has been used. Several studies have used imaging techniques for assessing food quality. Another prior art example discloses a mini-colorimeter for detecting pesticide residues. An Arduino-based system was developed to monitor milk quality using gas sensors. Another conventional prior art discloses X-ray imaging to identify fungus-infected wheat grains, and another utilized thermal imaging to detect fungal infections in wheat. Another conventional prior art discloses near-infrared spectroscopy (NIRS) to assess mango quality.An advanced method combining gas measurement, pH measurement, and triad spectroscopy has been introduced for the detection of pesticides in organic produce. Hyperspectral imaging exists for the detection of bruises in potatoes. However, none of the conventional techniques allows for instant, real-time detection of fruits and vegetables. This problem is solved by the features listed in claim 1. Purpose of the invention:

[0004] The invention relates to a real-time monitoring system for fruits and vegetables. The system comprises various components that instantly detect whether fruits and vegetables are organic or non-organic. The system offers consumers a more reliable, efficient, and easier way to verify the authenticity of organic products, thus contributing to better food quality standards and increased consumer confidence.

[0005] The purpose of the invention is achieved by the real-time monitoring system for fruits and vegetables according to claim 1. Detailed description:

[0006] A real-time fruit and vegetable system featuring a spectral sensor for capturing specific spectral values ​​unique to each food sample, as well as a microcontroller connected to multiple modules. An input module receives 18 wavelength channels from the spectral sensor after scanning a food sample. A signal processing module processes the signal to obtain spectral values. A signal transmission module transmits the spectral value data to a machine learning-based training module. The training module trains the retrieved data through three different machine learning classifiers on the dataset. A classification module classifies the food sample as organic or non-organic based on spectral data. The food sample contains fruits and vegetables.Machine learning classifiers include Support Vector Machine (SVM), Artificial Neural Network (ANN), and Random Forest (RF).

[0007] A system for real-time monitoring of fruits and vegetables is presented. The system includes receiving 18 wavelength channels from the spectral sensor after scanning a food sample; signal processing to obtain spectral values; transmitting the spectral value data to a machine learning-based training module; training the retrieved data using three different machine learning classifiers to train the dataset; and classifying the food sample as organic or non-organic based on the spectral data.

[0008] The first step is to create and design a hardware-based circuit with an MCU and attached spectrum sensor to generate a set of spectral values / bands for each individual fruit or vegetable. This approach is considered the primary approach for creating a dataset of manually labeled instances for use in further machine learning and real-time testing processes.

[0009] In the second step, multiple machine learning models are trained on the created dataset, and a suitable model is derived that can classify the sensor readings for a given fruit / vegetable into the two main classes (1 - organic, 0 - not organic). The result of this approach is the trained model, which is deployed on dedicated hardware for real-time testing and classification scenarios.

[0010] The third step is to use the Train ML model to establish some kind of serial communication between the Arduino AS7256X circuit and the RPI device to start classifying new instances for new fruits / vegetables scanned by the sensor.

[0011] To create a suitable dataset for our ML design, we need to collect a series of measurements from different fruits and vegetables. These measurements are generated using the AS7256X sensor, which provides 18 spectral bands of measurements for each element. The sensor provides light measurements in three different categories, which are explained in more detail below: • UV to violet light range: 410nm, 435nm, 460nm, 485nm, 510nm, 535nm. • Visible light range: 560 nm, 585 nm, 610 nm, 645 nm, 680 nm, 705 nm. • Near infrared range: 730 nm, 760 nm, 810 nm, 860 nm, 900 nm, 940 nm.

[0012] These measurements represent 18 wavelength channels and each channel represents a different spectral band, so the sensor measures the light intensity at those specific points.

[0013] A food sample is placed in the sensor's test area. The Arduino Mega instructs the sensor to perform a periodic scan to interact with the food sample and retrieve the 18 wavelength channels. The sensor's light illuminates the sample, and the reflected or transmitted light is measured. These 18 readings are sent via a serial channel to a PC or RPI device, saved in a dedicated CSV file, and manually labeled by the reading generator. Multiple instances are created and sent until a data set of acceptable size is created at the RPI end.

[0014] To make the dataset more comprehensive and more suitable for consistent ML model training, we checked for missing measurements and replaced them with the mean of all feature columns. Additionally, a Z-score normalization model was applied to each feature to normalize the data according to a Gaussian distribution. This model is based on two main statistical variables (mean and standard deviation): Each individual instance in the dataset is preprocessed, filtered, and labeled (1 - biological and 0 - non-biological). The dataset is now fully developed and ready for use by the ML models to be trained.

[0015] After completing all preprocessing and feature engineering steps, a final dataset of size (2000 x 19) is obtained, containing the LABEL column (0 / 1). The dataset is divided into (80%) a training dataset and (20%) a test and evaluation dataset. Three different machine learning classifiers are trained on the dataset as follows: • Support Vector Machine (SVM) • Artificial neural network (ANN) • Random Forest (RF)

[0016] In order to evaluate and compare the performance of each model, it is necessary to define a set of criteria that can be applied to all models and gives us a very detailed idea of ​​the evaluation and performance of each model.

[0017] The results demonstrate the feasibility and reliability of machine learning models, particularly XGBoost and SVM, for organic food classification. Their high performance in distinguishing between organic and non-organic categories provides a solid foundation for real-time deployment and provides consumers and food retailers with accurate and efficient tools for organic certification.

[0018] The models effectively captured the complex relationships within the spectral data and achieved near-perfect AUC values. The system delivers precise results within 2.3 seconds (99.5% accuracy).

[0019] Thanks to its superior hit rate, XGBoost is particularly suitable for use in systems where the absence of an organic product is less acceptable than a minor false positive. While the dataset offers a high accuracy of 99.5%, increasing its diversity and size by including samples from different sources and under different growth conditions could further improve the model's generalizability. Diploma:

[0020] This invention provides a machine learning-based system for instant (in-second) classification of fruits and vegetables as organic or non-organic. It uses spectral data acquired by a low-cost sensor. The system has demonstrated its ability to acquire spectral values, preprocess the data, train and evaluate various models, and ultimately deploy the best-performing model for real-time product classification.

Claims

[1] A real-time fruit and vegetable system, characterized by that the system includes: a spectral sensor to capture specific spectral values ​​that are unique to each food sample; a microcontroller connected to a variety of modules including: an input module for receiving 18 wavelength channels from the spectral sensor after scanning a food sample; a signal processing module for processing the signal to obtain spectral values; a signal transmission module for transmitting the spectral value data to a machine learning-based training module; the training module for training the retrieved data using three different machine learning classifiers to train the dataset; and a classification module to classify the food sample as biological or non-biological based on spectral data. [2] The system of claim 1, wherein the food sample is fruit, vegetables. [3] The system of claim 1, wherein the machine learning classifiers comprise Support Vector Machine (SVM), Artificial Neural Network (ANN), and Random Forest (RF).