Search

CN-122024227-A - Automatic dirty egg identification model and method based on YOLOv target detection and deep learning

CN122024227ACN 122024227 ACN122024227 ACN 122024227ACN-122024227-A

Abstract

The invention discloses an automatic dirty egg identification model and method based on YOLOv11 target detection and deep learning, and relates to the technical field of image data processing, comprising the steps of image acquisition and preprocessing, acquiring various egg images, labeling position tags of eggs in the images, and generating tag files corresponding to the image files; the method comprises the steps of building a target detection model, detecting and identifying the positions of eggs in an image, further performing image processing, cutting and standardizing egg areas detected by the target detection model, performing data enhancement, building a network model, and building an automatic dirty egg identification model based on YOLOv target detection and deep learning. The method can accurately judge the dirty eggs, eliminates the interference of background content, improves the accuracy and recall rate, has high degree of automation, and reduces the cost of labor and time.

Inventors

  • HUANG JUNXIAN
  • ZHOU SHOUCHANG
  • ZHANG SIMENG
  • WANG LIANZENG
  • GAO JIANFENG
  • XUE XIAOYANG
  • YAN WENLIANG
  • SUN LIHONG

Assignees

  • 南京农业大学
  • 南京星罗智能科技有限公司
  • 华裕农业科技有限公司

Dates

Publication Date
20260512
Application Date
20260128

Claims (10)

  1. 1. An automatic dirty egg recognition model based on YOLOv target detection and deep learning, comprising: adopting a convolutional neural network as a feature extraction network architecture, and extracting image features by stacking convolutional blocks; Introducing a self-attention mechanism (100) and a residual connection (200) in the network architecture; and mapping the extracted image features to categories through a full connection layer, and outputting classification probability.
  2. 2. The automated dirty egg identification model based on YOLOv target detection and deep learning of claim 1, wherein the extracting image features by stacked convolution blocks comprises, The network structure is formed by stacking convolution blocks, and each convolution block comprises a convolution layer, a batch normalization layer and an activation function; The convolution layer is a core part of the convolution neural network, and deep features are extracted from the image; the batch normalization layer is used for normalizing after each convolution operation; the activation function enables the convolutional neural network to learn the feature mapping relation by introducing nonlinear transformation.
  3. 3. The method for automated dirty egg identification based on YOLOv a target detection and deep learning of claim 1 or 2, wherein introducing a residual connection (200) into the network structure comprises, Residual connection (200) is introduced into the convolutional neural network, and jump connection is added into the convolutional block, so that the output and the input of the convolutional block are operated, and deep structure training is performed.
  4. 4. The method for automatic dirty egg identification based on YOLOv a target detection and deep learning of claim 3, wherein the self-attention mechanism (100) comprises, A self-attention mechanism (100) is introduced into the convolutional neural network, the attention degree of different areas of the image is dynamically adjusted, and the influence of each position in the image characteristic diagram is dynamically weighted by outputting the attention weight of each position, so that the convolutional neural network is focused on the obvious area of the dirty marks in the dirty egg image.
  5. 5. The method for automatic dirty egg identification based on YOLOv a target detection and deep learning as claimed in claim 1,2 or 4, wherein the mapping of the extracted image features to categories through the full connection layer, outputting classification probabilities includes, And adding a full-connection layer at the tail end of the convolutional neural network through fusion stacking reinforcement of the convolutional layer, a residual block and a self-attention mechanism (100), mapping the extracted high-dimensional features to two categories of normal eggs and dirty eggs, and outputting the classification probability of each category by using an activation function.
  6. 6. An automatic dirty egg identification method based on YOLOv target detection and deep learning, which is characterized by comprising the following steps: Image acquisition and preprocessing, namely acquiring various egg images, labeling position tags of eggs in the images, and generating tag files corresponding to the image files; Building a target detection model, and detecting and identifying the position of an egg in an image; further image processing, cutting and standardizing the egg area detected by the target detection model, and carrying out data enhancement; Setting up a network model, and setting up the automatic dirty egg identification model based on YOLOv target detection and deep learning according to any one of claims 1-5.
  7. 7. The method for automatic dirty egg identification based on YOLOv a target detection and deep learning of claim 6, wherein the tag file corresponds to an image file comprising, Labeling the position tags of eggs in the image in a manual or automatic labeling mode, enabling the generated tag file to correspond to the image file, and enabling the tag format of the labeling file to be expressed as follows: , Wherein, the In order to be able to carry out a label number, For the central position of the object The coordinates of the two points of the coordinate system, For the central position of the object The coordinates of the two points of the coordinate system, For the width of the target rectangular box, Is the height of the target rectangular frame.
  8. 8. The automatic dirty egg identification method based on YOLOv a target detection and deep learning as claimed in claim 6 or 7, wherein the target detection model construction comprises, The target detection model takes an image as input, generates position information of a target as output, compares the predicted position with the tag position, calculates loss, and updates model parameters through back propagation, so that the predicted position is close to the real tag position.
  9. 9. The method for automatic dirty egg identification based on YOLOv a target detection and deep learning of claim 8, wherein the further image processing comprises, Cutting the egg area detected by the target detection model, setting the size of the cut image to be uniform, and dynamically combining a plurality of enhancement methods to enable the model to adapt to different data changes and noise.
  10. 10. The method for automatically identifying dirty eggs based on YOLOv target detection and deep learning according to claim 6, 7 or 9, further comprising training, evaluating and optimizing a network model, dividing dirty egg image data into a training set, a verification set and a test set, and adjusting super-parameter data of a learning rate and a network structure according to the performance of the verification set through multiple rounds of iterative training.

Description

Automatic dirty egg identification model and method based on YOLOv target detection and deep learning Technical Field The invention relates to the technical field of image data processing, in particular to an automatic dirty egg identification model and method based on YOLOv target detection and deep learning. Background Eggs are taken as food indispensable for daily diet of people in the global scope, have the advantages of rich nutrition, low price and the like, and are deeply favored by masses of people. The hygienic condition of eggs directly affects food safety and consumer health, wherein dirty eggs, i.e. eggs with the surfaces of the eggshells contaminated by faeces, yolk, albumen, etc., can lead to bacterial growth and reduced quality, thereby causing potential risks and economic losses in the marketing and consumption links. Therefore, the method not only can ensure the quality of products in daily production and provide efficient sorting basis for the identification of dirty eggs, but also has important significance for agriculture and food industry and promotes standardized management and supply chain optimization. At present, a clear automatic method for identifying dirty eggs is not widely applied to the agricultural field, the traditional detection relies on manual visual or simple threshold method, the operation is complex, the precision is unstable, most of dirty egg identification still adopts manual detection, and the dirty egg identification is easily influenced by human errors due to the dependence on subjective judgment and has lower efficiency. Not only is a great deal of manpower and material resources wasted, but also the requirements of modern industry on high-speed and accurate sorting are difficult to meet. With the rise of intelligent agriculture, innovative technologies are needed to fill the gap, promote sustainable development of egg industry through automation and intelligence means, and improve sorting efficiency and accuracy. The method for automatically processing the computer image mainly comprises the following steps: The method is based on threshold segmentation, and the pixels in the image are divided into two or more different categories according to gray values or color values by setting one or more thresholds, so that the problems of low recall rate, poor noise resistance, high requirement on image quality and the like exist. The method is based on target detection, and the method generally learns the characteristics of the target and the category of the associated target by extracting the characteristics and the category information of the related target object from the input image, so as to accurately identify and position the test image. The method has the advantages of high accuracy, background interference resistance and the like, but has the problems of large data demand, high calculation cost and the like. The method is an image segmentation method based on similar properties, and gradually combining similar pixels to form a connected region by taking seed pixels as starting points until no pixels can be combined, so that segmentation of the image region is realized. This method requires a manual giving of a seed point for each region to be extracted in advance and is relatively sensitive to noise data. The method can automatically extract the characteristics in the image through large-scale data training after constructing a network model, thereby realizing more accurate image processing and being applicable to tasks such as image classification, object detection, segmentation and the like. It requires a lot of data and computational resources and the model is black box nature, difficult to interpret. The method directly applied to the dirty egg identification is less, the existing method is low in automation degree, poor in expandability and low in classification accuracy and efficiency. Disclosure of Invention The present invention has been made in view of the above-described problems. Therefore, the invention solves the technical problems of low automation degree, poor expandability, low classification accuracy and how to improve the recognition efficiency of the traditional dirty egg recognition method. The technical scheme includes that a YOLOv target detection and deep learning-based automatic dirty egg identification model is adopted as a characteristic extraction network architecture, image characteristics are extracted through stacking convolution blocks, a residual connection and self-attention mechanism is introduced into the network architecture, the extracted image characteristics are mapped to categories through a full connection layer, and classification probability is output. The automatic dirty egg identification model based on YOLOv11 target detection and deep learning is used as a preferable scheme, wherein the image feature extraction through stacking convolution blocks comprises a network structure formed by stacking the convolution bloc