A method, system and device for identifying a swollen grape based on a residual neural network

CN122929554APending Publication Date: 2026-10-16GUANGDONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510049730.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

但是,现实中一些商家为了追求利润使用膨大剂来增加葡萄产量,这种化学药品会使食用者胃肠道受到伤害,加重食用者肝肾负担,刺激食用者神经网络,甚至使食用者产生过敏现象,从而严重损害人们身体健康,现有技术当中难以识别出使用了膨大剂的葡萄

Benefits of technology

[0012] This invention collects extensive data and applies geometric transformations, color conversions, and noise introduction to simulate grape images under different lighting conditions and growth states, constructing a more diverse and representative training dataset. This process not only increases the amount of data but also improves the model's adaptability to various changes that may be encountered in real-world application scenarios, thereby enhancing the model's robustness and generalization performance. The improved ResNet-50 architecture is used for model construction and training, which helps reduce computational complexity and improve training efficiency. A confusion matrix is ​​used as an evaluation tool to comprehensively measure the model's performance on a set of known true values ​​in test data, providing accurate performance metrics. This allows developers to accurately monitor the model's learning progress and save the optimal model configuration after performance reaches its peak and stabilizes. The fully trained and optimized model can be directly applied to real-world scenarios to achieve fast and accurate identification of grapes treated with growth promoters, improving the user's purchasing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122929554A_ABST
    Figure CN122929554A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image recognition, in particular to a kind of based on residual neural network's bulking agent grape identification method, identification system and equipment, collect data, construct the data set that can carry out model training;Based on the influence of objective environmental factors, perform geometric transformation and color conversion on grape, and introduce noise to simulate different light conditions and growth state of grape, expand data set;Model is trained based on the architecture of residual neural network ResNet-50;The performance of the model on a set of test data with known true values is described by a confusion matrix, and the trained model is saved after the evaluation index reaches the optimal and tends to be stable;Bulking agent grape is identified by the trained model.The present application realizes the efficient and accurate identification of bulking agent treated grape, simplifies the detection process, reduces the cost, and can quickly give the result in the field environment, provides strong support for agricultural product safety supervision and personal consumption decision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method, system, and device for recognizing grapes treated with growth promoters based on residual neural networks. Background Technology

[0002] Grapes contain abundant anthocyanins, protein, and other beneficial components. Regular consumption of grapes can, to some extent, combat aging and soften blood vessels, making them popular. However, in reality, some merchants use growth promoters to increase grape yields in pursuit of profits. These chemicals can harm the gastrointestinal tract, increase the burden on the liver and kidneys, stimulate the nervous system, and even cause allergic reactions, thus seriously damaging people's health. Current technology makes it difficult to identify grapes treated with growth promoters. Summary of the Invention

[0003] This invention aims to at least solve the technical problems existing in the prior art. To this end, this invention proposes a method, system, and device for identifying grapes treated with growth regulators based on residual neural networks. This achieves efficient and accurate identification of grapes treated with growth regulators, simplifies the detection process, reduces costs, and can quickly provide results in the field, providing strong support for agricultural product safety supervision and individual consumption decisions.

[0004] A method for identifying grape growth regulators based on residual neural networks according to some embodiments of the first aspect of the present invention includes the following steps:

[0005] Step S100: Collect data and construct a dataset that can be used for model training;

[0006] Step S200: Based on the influence of objective environmental factors, perform geometric transformation and color conversion on the grapes, and introduce noise to simulate different light conditions and growth states of the grapes, thereby expanding the dataset;

[0007] Step S300: Build and train the model based on the architecture of the residual neural network ResNet-50;

[0008] Step S400: Use a confusion matrix to describe the model's performance on a set of test data with known true values. Once the evaluation metrics reach their optimal level and stabilize, save the trained model.

[0009] Step S500: Identify grapes treated with growth promoters using the trained model.

[0010] A method for identifying grape growth regulators based on residual neural networks according to some embodiments of the present invention has at least the following features:

[0011] Beneficial effects:

[0012] This invention collects extensive data and applies geometric transformations, color conversions, and noise introduction to simulate grape images under different lighting conditions and growth states, constructing a more diverse and representative training dataset. This process not only increases the amount of data but also improves the model's adaptability to various changes that may be encountered in real-world application scenarios, thereby enhancing the model's robustness and generalization performance. The improved ResNet-50 architecture is used for model construction and training, which helps reduce computational complexity and improve training efficiency. A confusion matrix is ​​used as an evaluation tool to comprehensively measure the model's performance on a set of known true values ​​in test data, providing accurate performance metrics. This allows developers to accurately monitor the model's learning progress and save the optimal model configuration after performance reaches its peak and stabilizes. The fully trained and optimized model can be directly applied to real-world scenarios to achieve fast and accurate identification of grapes treated with growth promoters, improving the user's purchasing experience.

[0013] According to some embodiments of the first aspect of the present invention, a method for identifying grape growth promoters based on residual neural networks is provided, wherein the dataset includes a training set, a test set, and a validation set, and the data in the training set accounts for 40%-60% of the total data.

[0014] According to some embodiments of the first aspect of the present invention, a method for identifying grape growth promoters based on residual neural networks is provided, wherein the geometric transformation includes one or more of rotation, flipping, scaling, translation, and cropping.

[0015] According to some embodiments of the first aspect of the present invention, a method for identifying grape growth promoters based on a residual neural network, wherein the color conversion includes one or more of contrast change, brightness change, saturation change, and color jitter.

[0016] According to some embodiments of the first aspect of the present invention, a method for identifying grape growth regulators based on residual neural networks, wherein step S300 specifically includes:

[0017] Step S310: Preprocess the raw data;

[0018] Step S320: The preprocessed data is further processed into a normalized dataset through feature scaling and standardization operations;

[0019] Step S330: The normalized dataset is divided into three parts: the training set is used to train the model, the validation set is used to adjust the model parameters and evaluate the model performance, and the test set is used to finally evaluate the model's performance on unseen data.

[0020] Step S340: Use a training set to train a feature extraction model, which extracts useful features from the data; use a test set to test the feature extraction model and evaluate its performance.

[0021] Step S350: Based on the results of the feature extraction model, construct a detection model and input real data into the detection model for detection;

[0022] Step S360: Output the detection results.

[0023] According to some embodiments of the first aspect of the present invention, a method for identifying grapes with growth promoters based on residual neural networks is provided, wherein the confusion matrix includes true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN), and the evaluation metrics include the accuracy of the model, the precision of the model, and the recall of the model.

[0024] The accuracy of the model is defined as follows:

[0025] The precision of the model is defined as follows:

[0026] The recall rate of the model is defined as:

[0027] Further calculate the difference between F1 and the score:

[0028] According to some embodiments of the first aspect of the present invention, a method for identifying grape growth promoters based on a residual neural network, wherein step S300 includes: improving the architecture of a residual neural network ResNet-50, wherein the improved residual neural network ResNet-50 includes at least one improved residual block, and the second 3×3 convolutional layer in the improved residual block is replaced with a 2×2 convolutional layer.

[0029] According to some embodiments of the first aspect of the present invention, a method for identifying grape growth promoters based on a residual neural network, step 300 further includes: constructing a ResNet50 architecture using the nn module class in the PyTorch framework, adjusting the learning rate of the hyperparameters, optimizing the model using a stochastic gradient descent optimizer, and setting the initial learning rate range to 1e-3 to 1e-1.

[0030] According to some embodiments of a second aspect of the present invention, an identification system for detecting grape growth regulator treatment includes:

[0031] The image acquisition module is used to acquire images captured by the smartphone;

[0032] The image recognition module identifies the image using the grape growth regulator recognition method described in some embodiments of the first aspect;

[0033] The output module outputs the recognition results to the user.

[0034] The beneficial effects of the identification system for detecting grape growth regulator treatment according to the second aspect embodiment of the present invention have been described in the first aspect embodiment and will not be repeated here.

[0035] According to some embodiments of a third aspect of the present invention, a grape growth regulator identification device includes:

[0036] Memory, used to store a set of instructions;

[0037] A processor, coupled to the memory, which, when the instructions are executed, causes the processor to perform the grape growth promoter identification method as described in any one of claims 1 to 8.

[0038] According to some embodiments of the third aspect of the present invention, the beneficial effects of a grape growth regulator identification device have been described in the first aspect embodiments and will not be repeated here.

[0039] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0040] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0041] Figure 1 This is a flowchart of an embodiment of the present invention.

[0042] Figure 2 This is a flowchart of step S300 in an embodiment of the present invention. Detailed Implementation

[0043] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0044] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, left, right, front, and back, are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the module or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0045] In the description of this invention, the use of "first" and "second" is for the purpose of distinguishing technical features only, and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0046] In the description of this invention, unless otherwise explicitly defined, terms such as "setting," "installing," and "connecting" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0047] like Figures 1-2 As shown, a first aspect embodiment of the present invention provides a grape growth regulator identification device.

[0048] A method for identifying grape growth promoters based on residual neural networks includes the following steps:

[0049] Step S100: Collect data and construct a dataset that can be used for model training;

[0050] Step S200: Based on the influence of objective environmental factors, perform geometric transformation and color conversion on the grapes, and introduce noise to simulate different light conditions and growth states of the grapes, thereby expanding the dataset;

[0051] Step S300: Build and train the model based on the architecture of the residual neural network ResNet-50;

[0052] Step S400: Use a confusion matrix to describe the model's performance on a set of test data with known true values. Once the evaluation metrics reach their optimal level and stabilize, save the trained model.

[0053] Step S500: Identify grapes treated with growth promoters using the trained model.

[0054] This invention collects extensive data and applies geometric transformations, color conversions, and noise introduction to simulate grape images under different lighting conditions and growth states, constructing a more diverse and representative training dataset. This process not only increases the amount of data but also improves the model's adaptability to various changes that may be encountered in real-world application scenarios, thereby enhancing the model's robustness and generalization performance. The improved ResNet-50 architecture is used for model construction and training, which helps reduce computational complexity and improve training efficiency. A confusion matrix is ​​used as an evaluation tool to comprehensively measure the model's performance on a set of known true values ​​in test data, providing accurate performance metrics. This allows developers to accurately monitor the model's learning progress and save the optimal model configuration after performance reaches its peak and stabilizes. The fully trained and optimized model can be directly applied to real-world scenarios to achieve fast and accurate identification of grapes treated with growth promoters, improving the user's purchasing experience.

[0055] This embodiment describes a method for identifying grape growth promoters based on residual neural networks. The dataset includes a training set, a test set, and a validation set, with the training set comprising 40%-60% of the total data. Specifically, the reasonable allocation of the training, test, and validation sets allows the model to fully learn features during training while ensuring sufficient sample size for accurate model performance evaluation during validation and testing phases, thus avoiding overfitting.

[0056] This embodiment describes a method for identifying grapes treated with growth promoters based on residual neural networks. The geometric transformations include one or more of rotation, flipping, scaling, translation, and cropping. Specifically, introducing geometric transformations such as rotation, flipping, scaling, translation, and cropping increases the diversity of the dataset, enabling the model to maintain good recognition capabilities under different viewpoints and positional changes, and enhancing the model's adaptability to complex environmental changes in real-world application scenarios.

[0057] This embodiment describes a method for identifying grapes treated with growth promoters based on residual neural networks. The color conversion techniques include one or more of contrast changes, brightness changes, saturation changes, and color jitter. Specifically, by applying color conversion techniques such as contrast changes, brightness changes, saturation changes, and color jitter, different lighting conditions and growth states are simulated, further enriching the dataset content and improving the model's tolerance to image color differences, thereby enhancing the model's generalization ability and robustness.

[0058] The grape growth regulator identification method based on residual neural network described in this embodiment includes step S300, which specifically includes:

[0059] Step S310: Preprocess the raw data;

[0060] Step S320: The preprocessed data is further processed into a normalized dataset through feature scaling and standardization operations;

[0061] Step S330: The normalized dataset is divided into three parts: the training set is used to train the model, the validation set is used to adjust the model parameters and evaluate the model performance, and the test set is used to finally evaluate the model's performance on unseen data.

[0062] Step S340: Use a training set to train a feature extraction model, which extracts useful features from the data; use a test set to test the feature extraction model and evaluate its performance.

[0063] Step S350: Based on the results of the feature extraction model, construct a detection model and input real data into the detection model for detection;

[0064] Step S360: Output the detection results.

[0065] Specifically, the model training process is broken down into various steps, including preprocessing, normalization, dataset segmentation, and the construction of feature extraction and detection models. These measures help improve model training efficiency, ensure that each step is fully optimized, and ultimately achieve more accurate recognition results.

[0066] The grape growth regulator identification method based on residual neural network described in this embodiment includes a confusion matrix comprising true positive (TP), true negative (TN), false positive (FP), and false negative (FN), and the evaluation metrics include model accuracy, model precision, and model recall.

[0067] The accuracy of the model is defined as follows:

[0068] The precision of the model is defined as follows:

[0069] The recall rate of the model is defined as:

[0070] Further calculate the difference between F1 and the score:

[0071] Specifically, by using the confusion matrix and its derived metrics (such as accuracy, precision, recall, and F1 score) as evaluation criteria, a scientific and rigorous method for evaluating model performance is provided. This allows developers to intuitively understand the strengths and weaknesses of the model and make improvements accordingly to achieve optimal performance configuration.

[0072] This embodiment describes a method for identifying grapes treated with growth promoters based on a residual neural network. Step S300 includes: improving the architecture of the ResNet-50 residual neural network. The improved ResNet-50 includes at least one improved residual block, and the second 3×3 convolutional layer in the improved residual block is replaced with a 2×2 convolutional layer. Specifically, by replacing specific convolutional layers in ResNet-50 with smaller convolutional kernels and setting appropriate stride and padding values, relevant feature information can be effectively extracted from the model, while minimizing computational complexity and accelerating training speed. Simultaneously, the model's recognition accuracy is maintained or even improved, solving the degradation problem that traditional deep networks may encounter and providing a new approach for high-performance model design.

[0073] This embodiment describes a method for identifying grape growth promoters based on residual neural networks. Step 300 further includes: constructing a ResNet50 architecture using the `nn` module class in the PyTorch framework, adjusting the learning rate of the hyperparameters, and optimizing the model using a stochastic gradient descent optimizer, setting the initial learning rate range to 1e-3 to 1e-1. Specifically, using the PyTorch framework in conjunction with a stochastic gradient descent optimizer for model training, and adjusting the learning rate range, achieves rapid convergence and stable training, ensuring that the model can reach its optimal performance state within a limited time, while also facilitating subsequent tuning.

[0074] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for identifying grape growth regulators based on residual neural networks, characterized in that, Includes the following steps: Step S100: Collect data and construct a dataset that can be used for model training; Step S200: Based on the influence of objective environmental factors, perform geometric transformation and color conversion on the grapes, and introduce noise to simulate different light conditions and growth states of the grapes, thereby expanding the dataset; Step S300: Build and train the model based on the architecture of the residual neural network ResNet-50; Step S400: Use a confusion matrix to describe the model's performance on a set of test data with known true values. Once the evaluation metrics reach their optimal level and stabilize, save the trained model. Step S500: Identify grapes treated with growth promoters using the trained model.

2. The method for identifying grape growth regulators based on residual neural networks according to claim 1, characterized in that, The dataset includes a training set, a test set, and a validation set, with the training set comprising 40%-60% of the total data.

3. The method for identifying grape growth regulators based on residual neural networks according to claim 1, characterized in that, The geometric transformations include one or more of rotation, flipping, scaling, translation, and clipping.

4. The method for identifying grape growth regulators based on residual neural networks according to claim 1, characterized in that, The color conversion includes one or more of the following: contrast change, brightness change, saturation change, and color dithering.

5. The method for identifying grape growth regulators based on residual neural networks according to claim 1, characterized in that, Step S300 specifically includes: Step S310: Preprocess the raw data; Step S320: The preprocessed data is further processed into a normalized dataset through feature scaling and standardization operations; Step S330: The normalized dataset is divided into three parts: the training set is used to train the model, the validation set is used to adjust the model parameters and evaluate the model performance, and the test set is used to finally evaluate the model's performance on unseen data. Step S340: Use a training set to train a feature extraction model, which extracts useful features from the data; use a test set to test the feature extraction model and evaluate its performance. Step S350: Based on the results of the feature extraction model, construct a detection model and input real data into the detection model for detection; Step S360: Output the detection results.

6. The method for identifying grape growth regulators based on residual neural networks according to claim 1, characterized in that, The confusion matrix includes true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN), and the evaluation metrics include the model's accuracy, model precision, and model recall. The accuracy of the model is defined as follows: The precision of the model is defined as follows: The recall rate of the model is defined as: Further calculate the difference between F1 and the score:

7. The method for identifying grape growth regulators based on residual neural networks according to claim 1, characterized in that, Step S300 includes: improving the architecture of the residual co-neural network ResNet-50, wherein the improved residual co-neural network ResNet-50 contains at least one improved residual block, and the second 3×3 convolutional layer in the improved residual block is replaced with a 2×2 convolutional layer.

8. The method for identifying grape growth regulators based on residual neural networks according to claim 7, characterized in that, Step S300 further includes: constructing a ResNet50 architecture using the nn module class in the PyTorch framework, adjusting the learning rate of the hyperparameters, optimizing the model using a stochastic gradient descent optimizer, and setting the initial learning rate range to 1e-3 to 1e-1.

9. A recognition system for detecting grape growth regulator treatment, characterized in that, include: The image acquisition module is used to acquire images captured by the smartphone; The image recognition module identifies the image using the grape growth regulator recognition method as described in any one of claims 1-8; The output module outputs the recognition results to the user.

10. A grape growth regulator identification device, characterized in that, include: Memory, used to store a set of instructions; A processor, coupled to the memory, which, when the instructions are executed, causes the processor to perform the grape growth promoter identification method as described in any one of claims 1 to 8.