Image recognition and classification system based on deep learning

Through a deep learning-based image recognition and classification system, combined with image segmentation, attention mechanism and post-processing technology, the recognition difficulties caused by pests and background similarity are solved, and high-precision and robust pest recognition are achieved.

CN119888498APending Publication Date: 2025-04-25CHENGDU BIG DATA GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411969340.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

Smart Images

  • Figure CN119888498A_ABST
    Figure CN119888498A_ABST
Patent Text Reader

Abstract

The invention discloses an image recognition and classification system based on deep learning, which comprises an image processing system, a central processing module, a data training model and a database, and realizes efficient and accurate pest recognition through cooperative work. The image processing system comprises a preprocessing module, a segmentation module, a data enhancement module, a feature extraction module, an attention mechanism module and a post-processing module which are respectively responsible for image standardization, pest and background separation, data diversity enhancement, feature extraction, background interference suppression and result optimization. The central processing module coordinates data transmission, the database provides an annotation data set, and the data training model combines an attention mechanism and a loss function to optimize the feature extraction capability. The method has the beneficial effects that image segmentation, an attention mechanism and a post-processing technology are combined, the identification problem caused by similarity between the pests and the background is effectively solved, the precision and robustness of pest identification are remarkably improved, and the method is suitable for real-time pest detection under a complex background.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition systems, and in particular to an image recognition and classification system based on deep learning. Background Art

[0002] Image classification technology mainly relies on computers or embedded systems to process and analyze input images, and manually select features that can reflect the essence of the image, such as color, texture, shape, and spatial relationship, to classify the image into specific categories. In this process, feature selection and extraction and classifier design are key steps. Traditional methods usually rely on the experience of designers, manually extract features for specific classification scenarios, and use classifiers (such as support vector machines, decision trees, Bayesian classifiers, etc.) to classify images. These classifiers map the features of the image to be detected to predefined categories through the classification functions or models obtained through training, thereby achieving image classification.

[0003] However, in recent years, with the rapid development of deep learning technology, the field of computer vision has made significant progress. The advantage of deep learning is that it can automatically learn features from massive data without relying on manually designed feature extraction methods. Thanks to the improvement of computer hardware performance and the rich data resources accumulated in the Internet era, neural networks can give full play to their powerful feature representation capabilities, thereby greatly improving the accuracy of image detection and recognition. Compared with traditional computer vision technology, methods based on deep learning not only reduce human intervention, but also significantly improve the accuracy and generalization ability of classification.

[0004] In the field of deep learning, a significant difficulty faced by pest image recognition is the high similarity between pests and their background, which poses a great challenge to accurate identification and classification. First, pests usually live in complex natural environments, such as farmlands, forests or grasslands, where the colors, textures and shapes are very close to the pests themselves, resulting in extremely low differentiation between pests and backgrounds. For example, the color of some pests may be almost the same as leaves or soil, making it difficult for traditional image processing methods to effectively extract the features of pests. Secondly, changes in lighting conditions further exacerbate this problem. Under different lighting conditions, the appearance of pests may change significantly, especially in shadows or strong light environments, the outlines and details of pests may become blurred, increasing the difficulty of identification. Summary of the invention

[0005] The purpose of the present invention is to solve the problem of high similarity between existing pests and their backgrounds. The present invention provides an image recognition and classification system based on deep learning.

[0006] The present invention is implemented by the following technical scheme: comprising an image processing system, a central processing module, a data training model and a database, wherein the image processing system performs data transmission with the central processing unit for performing data processing on the image processing system, one side of the central processing unit is data-connected with a database, the database is used to prepare a picture data set containing pests and backgrounds, and the central processing unit is data-connected with the data training model;

[0007] The image processing system includes a preprocessing module, a segmentation module, a data enhancement module, a feature extraction module, an attention introduction module, a post-processing module, and a result output module. The data input module is used to receive a picture data set containing pests and backgrounds. The preprocessing module performs basic processing such as scaling and normalization on the image. The segmentation module separates the pests from the background. The data enhancement module performs data enhancement on the separated pest images. The feature extraction module performs feature extraction on the pests. The attention introduction module helps the model focus on the pest area through the attention mechanism and ignores background interference. The post-processing module performs post-processing on the prediction results output by the model.

[0008] Furthermore, the data training model uses the enhanced data set to train the pest recognition model. During the training process, the attention mechanism is combined to optimize the model's ability to extract pest features, and the cross entropy loss function or focal loss is used to deal with the category imbalance problem.

[0009] Furthermore, the database collects a data set of images including pests and backgrounds, annotates the data, and marks the location, type, and number of the pests.

[0010] Furthermore, the preprocessing module performs basic processing such as scaling and normalization on the image so that the image input to the model has a consistent size and range, and separates the pests from the background through color space conversion.

[0011] Furthermore, the segmentation module uses an image segmentation model to separate the pest area from the background area of ​​the image, and the processing of the image by the segmentation module includes the following steps:

[0012] Step S1, collect and annotate pest images and generate pixel-level segmentation masks;

[0013] Step S2, using U-Net or Mask R-CNN image segmentation model;

[0014] Step S3, the input is the original image, the output is the segmentation mask, and the model is optimized using cross entropy loss or Dice loss;

[0015] Step S4, using the trained model to predict the pest area, generating a segmentation mask, extracting the pest area according to the mask, and removing the background.

[0016] Furthermore, the data enhancement module performs data enhancement on the separated pest images, including random rotation, scaling, flipping, and color jittering; the data enhancement module places the enhanced pest images in different backgrounds to generate new training samples to enhance the model's ability to recognize pest features, and simulates different variants, growth stages, postures, and angles of pests through 3D modeling or image deformation technology, thereby increasing the diversity of training data.

[0017] Furthermore, the feature extraction module uses a deep learning model to extract features from the segmented pest area.

[0018] Furthermore, the post-processing module performs post-processing on the prediction results output by the model, and uses a conditional random field (CRF) to optimize the boundary accuracy and optimize the boundary of the pests to make it smoother and more accurate.

[0019] Compared with the prior art, the present invention has the following advantages and beneficial effects: the data input module is used to receive a picture data set containing pests and backgrounds, the preprocessing module performs basic processing such as scaling and normalization on the image, the segmentation module separates the pests from the background, the data enhancement module performs data enhancement on the separated pest images, the feature extraction module extracts features of the pests, the attention module is introduced to help the model focus on the pest area through the attention mechanism (such as CBAM, SENet), and ignore background interference, and the post-processing module performs post-processing on the prediction results output by the model.

[0020] This technical solution effectively solves the recognition problem caused by the similarity between pests and backgrounds by combining image segmentation, attention mechanism and post-processing technology, and significantly improves the accuracy and robustness of pest recognition. Data enhancement and attention mechanism enhance the adaptability of the model in different scenarios, while CRF and morphological operations further optimize boundary accuracy and visual effects. The system can be deployed on embedded devices to achieve real-time pest recognition and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0022] Figure 1 Flowchart of image recognition and classification system based on deep learning DETAILED DESCRIPTION

[0023] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0024] In this embodiment: it includes an image processing system, a central processing module, a data training model and a database. The image processing system and the central processing unit perform data transmission, which is used to process data on the image processing system. One side of the central processing unit is connected to the database. The database is used to prepare a picture data set containing pests and backgrounds, and supports multiple image formats (such as JPEG, PNG). As the entrance of the system, it is responsible for loading and transmitting data, ensuring efficient data input and high availability of the system. The central processing unit is connected to the data training model for data;

[0025] The image processing system includes a preprocessing module, a segmentation module, a data enhancement module, a feature extraction module, an attention introduction module, a post-processing module, and a result output module. The data input module is used to receive a picture data set containing pests and backgrounds. The preprocessing module performs basic processing such as scaling and normalization on the image. The segmentation module separates the pests from the background. The data enhancement module performs data enhancement on the separated pest images. The feature extraction module extracts features from the pests. The attention introduction module helps the model focus on the pest area through the attention mechanism (such as CBAM, SENet) and ignores background interference. The post-processing module performs post-processing on the prediction results output by the model.

[0026] The data training model uses the enhanced dataset to train the pest recognition model. During the training process, the attention mechanism is combined to optimize the model's ability to extract pest features, and the cross entropy loss function or focal loss is used to deal with the category imbalance problem.

[0027] The database collects image data sets including pests and backgrounds, annotates the data, and marks the location, category, and number of the pests.

[0028] The preprocessing module performs basic processing such as scaling and normalization on the image. The normalization formula is: I is the input image, μ is the mean, and σ is the standard deviation, so that the image input to the model has a consistent size and range. Normalization scales the image pixel values ​​to a fixed range (such as [0,1]) to facilitate model processing. The pests and the background are separated by color space conversion. The color space conversion (such as RGB to HSV) uses the brightness (V) and saturation (S) channels to enhance the contrast between the pests and the background, improve the convergence speed and robustness of the model, and enhance the distinction between the pests and the background.

[0029] The segmentation module uses the image segmentation model to separate the pest area from the background area of ​​the image. The segmentation module processes the image in the following steps:

[0030] Step S1, collect and annotate pest images and generate pixel-level segmentation masks;

[0031] Step S2, using U-Net or MaskR-CNN image segmentation model;

[0032] Step S3, the input is the original image, the output is the segmentation mask, and the model is optimized using cross entropy loss or Dice loss;

[0033] Step S4, using the trained model to predict the pest area, generating a segmentation mask, extracting the pest area according to the mask, and removing the background.

[0034] Using segmentation models such as U-Net or Mask R-CNN, features are extracted and segmentation masks are generated through an encoder-decoder structure. Cross entropy loss and Dice loss are used to optimize the model to more accurately predict pest areas, accurately separate pests from the background, generate high-quality segmentation masks, and improve the model's ability to recognize pest areas.

[0035] The data enhancement module performs data enhancement on the separated pest images, including random rotation, scaling, flipping, and color jittering; the data enhancement module places the enhanced pest images in different backgrounds to generate new training samples to enhance the model's ability to recognize pest features. Through 3D modeling or image deformation technology, different variants, growth stages, postures, and angles of pests are simulated to increase the diversity of training data. Data diversity is increased through geometric transformation (rotation, scaling, flipping) and color transformation (brightness, contrast adjustment), pest images are placed in different backgrounds to simulate real scenes, improve the generalization ability of the model, reduce overfitting, and enhance the model's adaptability to different backgrounds and lighting conditions.

[0036] The feature extraction module uses a deep learning model to extract features from the segmented pest areas.

[0037] The post-processing module performs post-processing on the prediction results output by the model, uses conditional random fields (CRF) to optimize boundary accuracy, uses morphological operations (such as erosion and dilation) to remove noise or fill holes, optimizes the boundaries of pests to make them smoother and more accurate, and supports visualization and saving of results.

[0038] Working principle: Collect and annotate image datasets containing pests and backgrounds, and the annotations include the location, category, and number of pests. The image processing system first receives the dataset through the data input module, and the preprocessing module scales, normalizes, and converts the image to color space to enhance the contrast between pests and background. The segmentation module uses the U-Net or Mask R-CNN model to separate pests from the background, generate pixel-level segmentation masks, and optimize the model through cross entropy loss or Dice loss. The data enhancement module performs random rotation, scaling, flipping, and color jittering on the separated pest images, and places the enhanced images in different backgrounds to generate diverse training samples. The feature extraction module uses a deep learning model to extract the morphological and texture features of pests, and introduces an attention mechanism (such as CBAM, SENet) to help the model focus on the pest area and ignore background interference. The post-processing module uses conditional random fields (CRF) and morphological operations to optimize the boundary accuracy of the segmentation results, remove noise, and fill holes. The data training model combines the attention mechanism and focal loss to train the pest recognition model to optimize the feature extraction capability. Finally, the result output module provides highly accurate pest identification results, supporting real-time applications and further analysis.

[0039] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. Image recognition and classification system based on deep learning, characterized by: It includes an image processing system, a central processing module, a data training model and a database. The image processing system transmits data with the central processing unit and is used to process data on the image processing system. One side of the central processing unit is connected to the database, and the database is used to prepare a picture data set containing pests and backgrounds. The central processing unit is connected to the data training model. The image processing system includes a preprocessing module, a segmentation module, a data enhancement module, a feature extraction module, an attention introduction module, a post-processing module, and a result output module. The data input module is used to receive a picture data set containing pests and backgrounds. The preprocessing module performs basic processing such as scaling and normalization on the image. The segmentation module separates the pests from the background. The data enhancement module performs data enhancement on the separated pest images. The feature extraction module performs feature extraction on the pests. The attention introduction module helps the model focus on the pest area through the attention mechanism and ignores background interference. The post-processing module performs post-processing on the prediction results output by the model.

2. The deep learning-based image recognition and classification system according to claim 1, characterized in that: The data training model uses the enhanced data set to train the pest recognition model. During the training process, the attention mechanism is combined to optimize the model's ability to extract pest features, and the cross entropy loss function or focal loss is used to deal with the problem of category imbalance.

3. The deep learning-based image recognition and classification system according to claim 1, characterized in that: The database collects a data set of images including pests and backgrounds, annotates the data, and marks the location, type, and quantity of the pests.

4. The deep learning-based image recognition and classification system according to claim 1, characterized in that: The preprocessing module performs basic processing such as scaling and normalization on the image, so that the image input to the model has a consistent size and range, and separates the pests from the background through color space conversion.

5. The deep learning-based image recognition and classification system according to claim 1, characterized in that: The segmentation module uses an image segmentation model to separate the pest area from the background area of ​​the image. The processing of the image by the segmentation module includes the following steps: Step S1, collect and annotate pest images and generate pixel-level segmentation masks; Step S2, using U-Net or Mask R-CNN image segmentation model; Step S3, the input is the original image, the output is the segmentation mask, and the model is optimized using cross entropy loss or Dice loss; Step S4, using the trained model to predict the pest area, generating a segmentation mask, extracting the pest area according to the mask, and removing the background.

6. The deep learning-based image recognition and classification system according to claim 1, characterized in that: The data enhancement module performs data enhancement on the separated pest images, including random rotation, scaling, flipping, and color jittering; the data enhancement module places the enhanced pest images in different backgrounds to generate new training samples to enhance the model's ability to recognize pest features, and simulates different variants, growth stages, postures, and angles of pests through 3D modeling or image deformation technology, thereby increasing the diversity of training data.

7. The deep learning-based image recognition and classification system according to claim 1, characterized in that: The feature extraction module extracts features from the segmented pest area using a deep learning model.

8. The deep learning-based image recognition and classification system according to claim 1, characterized in that: The post-processing module performs post-processing on the prediction results output by the model, optimizes the boundary accuracy using a conditional random field (CRF), and optimizes the boundary of the pests to make it smoother and more accurate.