Phalaenopsis seedling classification method based on ResNet50 network model

Through the dual-channel input structure and data enhancement technology based on the ResNet50 network model, the accuracy and robustness of Phalaenopsis seedling classification are solved, efficient and intelligent seedling recognition is achieved, and the accuracy of automated classification is improved.

CN120279335APending Publication Date: 2025-07-08QINGDAO AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510451515.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

Traditional artificial classification methods are difficult to accurately identify Phalaenopsis seedlings, especially under complex backgrounds and different lighting conditions, resulting in unstable classification accuracy, and existing machine learning methods are poorly robust under such conditions.

Method used

A dual-channel input structure based on the ResNet50 network model was adopted to extract the features of the front and side viewing angles of Phalaenopsis seedlings respectively, and weighted fusion was carried out before the full connection layer to build a classification recognition model, and combined with data enhancement technology to improve the model's feature learning ability and classification accuracy.

Benefits of technology

It improves the accuracy and robustness of Phalaenopsis seedling classification, can efficiently identify images from different perspectives in complex backgrounds, reduces manual intervention, and improves the degree of automation of plant classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120279335A_ABST
    Figure CN120279335A_ABST
Patent Text Reader

Abstract

The invention discloses a phalaenopsis seedling classification method based on a ResNet50 network model, and relates to the technical field of plant classification and recognition automation, and the method comprises the following steps: collecting images of a plurality of types of phalaenopsis seedlings at front view angles and side view angles, and generating a data set; based on a dual-channel ResNet50 network model, features of front and side view angles are extracted respectively, weighted fusion is carried out in front of a full connection layer, and a classification and recognition model is constructed and used for classifying and recognizing butterfly orchid seedlings. According to the method, the multi-angle image features are fused, the image information expression ability is enhanced, and the classification performance of the model is improved, so that the processing effect on similar phalaenopsis species is improved, the model can detect plants more efficiently under the complex background, manual intervention is reduced, and the automation degree of plant classification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automated plant classification and identification. Specifically, it relates to a method for classifying Phalaenopsis seedlings based on the ResNet50 network model. Background Art

[0002] Phalaenopsis (scientific name: Phalaenopsis) is an orchid plant belonging to the genus Phalaenopsis and is native to Southeast Asia and the northern regions of Australia. Due to its beautiful flowers and long flowering period, Phalaenopsis is widely used in the ornamental and horticultural industries. The seedling growth stage of Phalaenopsis is a crucial stage in its growth process. Although the growth characteristics of different varieties of Phalaenopsis seedlings are slightly different during the seedling stage, due to the small differences in leaf morphology, color, and other characteristics, it is extremely difficult to classify them manually, and it is difficult for the human eye to distinguish plants at the seedling stage. Traditional manual classification methods rely on experienced experts, are time-consuming, and are easily affected by subjective factors, resulting in unstable classification accuracy. Accurate classification at the seedling stage is crucial for subsequent cultivation and variety management. With the continuous development of machine learning, significant achievements have been made in plant classification research through image processing methods. Traditional machine learning methods mainly rely on extracting color, shape, and texture features of leaves and combining classification algorithms to identify plant categories. However, these methods have poor robustness under complex backgrounds and different lighting conditions and are difficult to adapt to large-scale applications. Therefore, an efficient and intelligent classification method is needed to improve the efficiency and accuracy of classification. Summary of the Invention

[0003] In order to classify Phalaenopsis seedlings in real-time and accurately, the purpose of the present invention is to provide a Phalaenopsis seedling classification technology based on the ResNet50 network model, aiming to provide technical support for the variety management and precise cultivation of Phalaenopsis.

[0004] To achieve the above technical purpose, the present application provides a method for classifying Phalaenopsis seedlings based on the ResNet50 network model, including the following steps: Collect images of the front and side views of several types of Phalaenopsis seedlings to generate a dataset; Based on the dual-channel ResNet50 network model, extract the features of the front and side views respectively, and perform weighted fusion before the fully connected layer to construct a classification and recognition model for classifying and recognizing Phalaenopsis seedlings.

[0005] Preferably, when generating the dataset, the collected images are processed through a custom PhalaenopsisDataset class.

[0006] Preferably, in the process of constructing the classification and recognition model, two input channels are introduced to process images from different perspectives, and each channel uses the standard ResNet50 for feature extraction.

[0007] Preferably, in the process of constructing the classification and recognition model, weighted fusion is performed after feature extraction of the front and side view images to enhance the feature learning ability of the model.

[0008] Preferably, when training the model, the initial learning rate is set to 0.0001, the number of training rounds is 30, the batch-size is 16, and the image size is 256 pixels × 256 pixels.

[0009] Preferably, when constructing the classification and recognition model, the constructed classification and recognition model is evaluated by cross-entropy loss, accuracy, precision, and recall.

[0010] Preferably, when evaluating the classification and recognition model, the cross-entropy loss is used to measure the gap between the predicted probability distribution of the model and the true labels, which is used for backpropagation to optimize the model parameters; The accuracy is used to measure the overall classification correctness of the model; The precision is used to determine how many of the positive examples predicted by the model are truly positive examples; The recall is used to determine how many of the true positive examples are successfully predicted as positive examples by the model.

[0011] The present invention also discloses a Phalaenopsis seedling classification system based on the ResNet50 network model. This system is used to implement the above-mentioned Phalaenopsis seedling classification method based on the ResNet50 network model. The system includes: A data acquisition module for collecting images of the front and side views of several kinds of Phalaenopsis seedlings to generate a data set; A classification and recognition module for extracting features from the front and side views respectively based on the dual-channel ResNet50 network model, and performing weighted fusion before the fully connected layer to construct a classification and recognition model for classifying and recognizing Phalaenopsis seedlings.

[0012] The present invention discloses the following technical effects: By simultaneously inputting the front and side images, the model of the present invention can learn features from multiple angles and can better cope with the changes in image angles in practical applications.

[0013] By ensuring that the number of front and side images of each category is the same, the present invention avoids the training bias caused by unbalanced image numbers, thus ensuring the balance of training data.

[0014] The present invention uses an improved dual-channel ResNet50 model to classify and identify 7 different species of Phalaenopsis seedlings. By constructing an image dataset that includes the front and side views of the seedlings and combining feature fusion and optimization strategies, the accuracy and generalization ability of the classification are improved.

[0015] By identifying Phalaenopsis images from different angles, the present invention can better capture the specific information of each image, improve the classification performance of the model, thereby improving the processing effect on similar Phalaenopsis species, enabling the model to detect plants more efficiently in complex backgrounds, reducing manual intervention, and improving the automation level of plant classification. Brief Description of the Drawings

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0017] Figure 1 It is a schematic flowchart of the classification and identification described in the present invention. Detailed Embodiments

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some, rather than all, embodiments of the present application. Usually, the components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application provided in the drawings below is not intended to limit the scope of the present application claimed, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0019] As Figure 1 shown, the present invention provides a method for classifying Phalaenopsis seedlings based on the ResNet50 network model, including the following steps: Collect images of the front and side views of several species of Phalaenopsis seedlings to generate a dataset; Based on the dual-channel ResNet50 network model, extract the features of the front and side views respectively, and perform weighted fusion before the fully connected layer to construct a classification and identification model for classifying and identifying Phalaenopsis seedlings.

[0020] Further preferably, for a Phalaenopsis seedling classification method based on the ResNet50 network model provided by the present invention, when generating a data set, the collected images are processed through a custom PhalaenopsisDataset class.

[0021] Further preferably, for a Phalaenopsis seedling classification method based on the ResNet50 network model provided by the present invention, in the process of constructing a classification and recognition model, two input channels are introduced to process images from different perspectives, and standard ResNet50 is used for feature extraction in each channel.

[0022] Further preferably, for a Phalaenopsis seedling classification method based on the ResNet50 network model provided by the present invention, in the process of constructing a classification and recognition model, weighted fusion is performed after feature extraction of the front and side view images to enhance the feature learning ability of the model.

[0023] Further preferably, for a Phalaenopsis seedling classification method based on the ResNet50 network model provided by the present invention, when performing model training, the initial learning rate is set to 0.0001, the number of training epochs is 30, the batch-size is 16, and the image size is 256 pixels × 256 pixels.

[0024] Further preferably, for a Phalaenopsis seedling classification method based on the ResNet50 network model provided by the present invention, when constructing a classification and recognition model, the constructed classification and recognition model is evaluated through cross-entropy loss, accuracy, precision, and recall.

[0025] Further preferably, for a Phalaenopsis seedling classification method based on the ResNet50 network model provided by the present invention, when evaluating the classification and recognition model, the cross-entropy loss is used to measure the gap between the model's predicted probability distribution and the true labels, and is used for backpropagation to optimize the model parameters; The accuracy is used to measure the overall classification correctness of the model; The precision is used to judge how many of the positive examples predicted by the model are true positive examples; The recall is used to judge how many of the true positive examples are successfully predicted as positive examples by the model.

[0026] The present invention also discloses a Phalaenopsis seedling classification system based on the ResNet50 network model. This system is used to implement the above-mentioned Phalaenopsis seedling classification method based on the ResNet50 network model. The system includes: A data acquisition module, which is used to collect images of the front and side views of several kinds of Phalaenopsis seedlings to generate a data set; The classification and recognition module is used to extract features from the front and side views respectively based on the dual-channel ResNet50 network model, perform weighted fusion before the fully connected layer, and construct a classification and recognition model for classifying and recognizing Phalaenopsis seedlings.

[0027] Example: The present invention provides a Phalaenopsis seedling classification technology based on the ResNet50 network model. This network model extracts features from the front and side views through a dual-channel input structure, and performs weighted fusion before the fully connected layer to improve the classification accuracy. Traditional computer vision methods are difficult to capture these subtle features, and single-view images are difficult to provide comprehensive information. Therefore, the present invention introduces a dual-channel input method into the model, that is, extracts the features of the front and side view images respectively, and performs weighted fusion in the classification stage to improve the classification accuracy. In addition, due to the small scale of the dataset, the present invention adopts data augmentation techniques such as random rotation, horizontal flipping, and color adjustment to improve the generalization ability of the model. Finally, this model can achieve high-accuracy classification and recognition in a complex Phalaenopsis seedling dataset, providing technical support for the variety management and precise cultivation of Phalaenopsis.

[0028] The Phalaenopsis seedling classification technology based on the ResNet50 network model provided by the present invention specifically includes the following contents: 1. Data collection: Collect image data of 7 types of Phalaenopsis seedlings, including front and side views.

[0029] 2. Data preprocessing: Preprocess the collected Phalaenopsis images, including image scaling, cropping, enhancement, etc.

[0030] 3. Model training: Use the ResNet50 model to train the Phalaenopsis images.

[0031] 4. Model evaluation: Evaluate the trained ResNet50 model, and calculate indicators such as the accuracy, recall rate, and F1 value of the model.

[0032] 1. Collection of the dataset: The present invention captures a dataset containing 284 Phalaenopsis seedlings, and the dataset contains front and side angle photos of 7 types of Phalaenopsis seedlings. To ensure the accuracy of the dataset, the dataset is all subjected to background removal or background blurring processing.

[0033] 2. Data preprocessing: The dataset processing is mainly carried out through the custom PhalaenopsisDataset class. This class will load the front and side images in the training set and the validation set, ensure that the number of front images and side images of each category is the same, and match them by category. Each image pair consists of a front image and a side image. When loading the images, the code will apply data augmentation operations (such as random horizontal flipping, rotation, color jitter, etc.) and resize the images to 256x256 pixels. The dataset is divided into a training set and a validation set in a ratio of 7:3.

[0034] 3. Model Structure Adjustment: Considering the requirements of the Phalaenopsis species classification task, especially the balance between accuracy and efficiency, the ResNet50 model becomes a wise choice. This model can ensure a relatively high classification accuracy while adapting to the relatively small data volume of the training set and the validation set. To improve the classification accuracy of the model, based on the idea of residual learning, the present invention adopts ResNet50 as the feature extractor and performs weighted fusion after the feature extraction of the front and side view images to enhance the feature learning ability of the model.

[0035] The dual-channel ResNet50 is an improved network structure that processes images from different perspectives by introducing two input channels. Each channel uses the standard ResNet50 for feature extraction. Subsequently, the network fuses the features of the two channels to combine information from different perspectives in the classification task, thereby improving the model's recognition ability and robustness for the target. This structure can enhance the classification accuracy based on multi-perspective learning and is particularly suitable for the classification task of plants like Phalaenopsis, where different perspectives provide different important features. By effectively fusing this perspective information, the dual-channel ResNet50 not only improves the accuracy but also enhances the adaptability to changes in different perspectives.

[0036] The present invention is built on the Windows 10 system, with a processor of 13th Gen Intel Core i5-14600KF + main graphics card NVIDIA GeForce RTX 4060Ti. The editor uses Pycharm, and the Python language is used, with a version of 3.8.20. The network is built using the Pytorch library, with a version of 1.31.1.

[0037] The initial learning rate is set to 0.0001, the number of training epochs is 30, the batch-size is 16, and the image size is 256 pixels × 256 pixels.

[0038] 4. Model Evaluation: Cross - entropy loss: Measures the gap between the predicted probability distribution of the model and the true labels, and is used for backpropagation to optimize the model parameters. Cross - entropy loss formula:

[0039] where, is the one - hot encoding of the true label, is the class probability predicted by the model.

[0040] Accuracy: Measures the overall classification accuracy of the model. Accuracy formula: ; Precision: Precision indicates how many of the positive examples predicted by the model are truly positive. The calculation method is the number of true positives (TP) divided by the sum of true positives and false positives (FP). ; Recall: Recall indicates how many of the true positive examples are successfully predicted as positive by the model. The calculation method is the number of true positives divided by the sum of true positives and false negatives (FN).

[0041] .

[0042] The dual - input model design proposed by the present invention: This model classifies through two inputs (front - facing image and side - facing image). Each image input is respectively passed through a pre - trained ResNet50 network for feature extraction, and then these two feature vectors are fused to enhance the model's learning ability for images at different angles.

[0043] The weighted feature fusion proposed by the present invention: This model combines the features of the front and side using weighted fusion, and the weight coefficients are 0.5 and 0.5 respectively. This method can adjust the weights according to requirements, allowing the model to obtain more information from two perspectives.

[0044] The dataset processing proposed by the present invention: When loading data, this method matches the image paths of the front and side with the labels, and ensures that the number of front - facing and side - facing images for each category is the same, thereby improving the balance of the data.

[0045] The early stopping mechanism proposed by the present invention: To prevent overfitting, an early stopping mechanism is introduced. When the accuracy on the validation set has not been significantly improved after several rounds, the training is terminated in advance.

[0046] The present invention can detect plants more efficiently in complex backgrounds, reduce manual intervention, and improve the automation level of plant classification.

[0047] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in one block or multiple blocks.

[0048] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, "a plurality of" means two or more unless otherwise specifically defined.

[0049] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.

Claims

1. A method for classifying Phalaenopsis seedlings based on the ResNet50 network model, characterized in that, It includes the following steps: Collect images of the front and side views of several Phalaenopsis seedlings to generate a dataset; Based on the dual-channel ResNet50 network model, extract the features of the front and side views respectively, and perform weighted fusion before the fully connected layer to construct a classification and recognition model for classifying and recognizing Phalaenopsis seedlings.

2. The method for classifying Phalaenopsis seedlings based on the ResNet50 network model according to claim 1, wherein: When generating the dataset, process the collected images through the custom PhalaenopsisDataset class.

3. The method for classifying Phalaenopsis seedlings based on the ResNet50 network model according to claim 2, wherein: In the process of constructing the classification and recognition model, introduce two input channels to process images of different views, and use the standard ResNet50 for feature extraction in each channel.

4. The method for classifying Phalaenopsis seedlings based on the ResNet50 network model according to claim 3, wherein: In the process of constructing the classification and recognition model, perform weighted fusion after the feature extraction of the front and side view images to enhance the feature learning ability of the model.

5. The method for classifying Phalaenopsis seedlings based on the ResNet50 network model according to claim 4, wherein: When training the model, set the initial learning rate to 0.0001, the number of training epochs to 30, the batch-size to 16, and the image size to 256 pixels × 256 pixels.

6. The method for classifying Phalaenopsis seedlings based on the ResNet50 network model according to claim 5, wherein: When constructing the classification and recognition model, evaluate the constructed classification and recognition model through cross-entropy loss, accuracy, precision, and recall.

7. The method for classifying Phalaenopsis seedlings based on the ResNet50 network model according to claim 6, wherein: When evaluating the classification and recognition model, use cross-entropy loss to measure the gap between the model's predicted probability distribution and the true label, and use it for backpropagation to optimize the model parameters; Use accuracy to measure the overall classification correctness of the model; Use precision to judge how many of the positive examples predicted by the model are truly positive examples; Use recall to judge how many of the true positive examples are successfully predicted as positive examples by the model.

8. The method for classifying Phalaenopsis seedlings based on the ResNet50 network model according to any one of claims 1-7, wherein: A Phalaenopsis seedling classification system based on the ResNet50 network model for implementing the Phalaenopsis seedling classification method, comprising: A data acquisition module for collecting images of the front and side views of several Phalaenopsis seedlings to generate a dataset; A classification and recognition module for, based on the dual-channel ResNet50 network model, extracting the features of the front and side views respectively, and performing weighted fusion before the fully connected layer to construct a classification and recognition model for classifying and recognizing Phalaenopsis seedlings.