AI-based pastry quality detection method and system

Through the AI-based pastry quality detection method, image segmentation and lighting analysis technology are used, combined with image structure construction and matching, the detection accuracy problems under complex lighting and high-speed multi-angle shooting are solved, and high-accurate micro defect recognition and quality control are achieved.

CN120182964AActive Publication Date: 2025-06-20SHAANXI ZIQI FOOD GRP CO LTD

Patent Information

Application Number
CN202510663301.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-22
Publication Date
2025-06-20
Estimated Expiration
2045-05-22

AI Technical Summary

Technical Problem

Under multiple angle shooting in complex lighting on industrial sites and high-speed operation of production lines, due to unstable image acquisition quality, uneven light and darkness, overlapping image sequences and missing viewing angles, it is difficult to accurately identify small defects, resulting in limited detection accuracy.

Method used

Using AI-based pastry quality detection method, the pastry area is extracted through the image segmentation model, the light distribution is analyzed and clustered to form a nearby pastry group. Using graph structure construction and matching technology, combining complete coefficients and influencing color difference values, defect detection results are constructed and abnormal detection is performed to judge the production quality of pastry.

Benefits of technology

It improves the accuracy of identification of small defects, ensures that the quality inspection results of each pastry are reliable, enhances the quality control capabilities of the enterprise, meets the needs of high-speed inspection, and improves production efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182964A_ABST
    Figure CN120182964A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an AI-based pastry quality detection method and system, and the method comprises the steps: obtaining a pastry standard image and a pastry production image, calculating the illumination distribution of the collection image of each pastry, dividing a plurality of pastries into adjacent pastry groups, carrying out the image matching of the corresponding collection image and the pastry standard image, and obtaining a pastry quality detection result; obtaining an image matching result of the collected image and a pastry standard image, calculating a color difference value of each pixel point of each pastry in an adjacent pastry group, using multiple collected images of a single pastry, superposing the multiple collected images of the single pastry with the pastry standard image, calculating a complete coefficient of each pastry in the single adjacent pastry group according to a superposing result, and obtaining the complete coefficient of each pastry in the single adjacent pastry group. And completing the production quality detection of each cake according to the integrity coefficient and the color difference value of each cake in multiple acquisition. According to the invention, through extracting the illumination distribution of the pastry image, the pastry area is accurately identified, efficient positioning and comprehensive analysis are realized, and the pastry quality is comprehensively quantified and evaluated.
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 processing, and particularly to an AI-based pastry quality detection method and system. Background Art

[0002] In the production and processing of pastries, quality control is of utmost importance. The quality of pastries not only affects the taste and health of consumers, but also directly relates to the brand image and market competitiveness of enterprises. Each link in the production process, from raw material selection to production process control, may affect the quality of the final product. The traditional manual visual inspection method has problems such as strong subjectivity, inconsistent standards, and high missed inspection rates, and it is difficult to meet the detection requirements of thousands of products per hour in large-scale production.

[0003] To solve these problems, artificial intelligence technology has been introduced into the field of pastry quality detection. Artificial intelligence constructs a neural network model through machine learning and deep learning, analyzes and processes a large amount of data, realizes functions such as image recognition, and promotes the intelligent development of various industries. In the detection of pastry quality, the application of artificial intelligence has become the key to improving detection efficiency and accuracy.

[0004] However, although the existing automated detection technology based on machine vision can achieve surface defect recognition, it still faces multiple technical bottlenecks in practical applications: First, the complex lighting environment in the industrial site leads to unstable image acquisition quality. The mutual occlusion of adjacent pastries under a single light source will produce uneven bright and dark areas, affecting the extraction of defect features. Second, the image sequence generated by multi-angle shooting during the high-speed operation of the production line has partial overlap and missing perspectives, increasing the complexity of image processing, reducing the detection accuracy, making it difficult to accurately identify tiny defects, and affecting the overall detection effect. Summary of the Invention

[0005] The object of the present invention is: To solve the problem that it is difficult to accurately identify tiny defects due to unstable image acquisition quality, uneven brightness and darkness, image sequence overlap and missing perspectives under the complex lighting in the industrial site and multi-angle shooting during the high-speed operation of the production line, resulting in limited detection accuracy. To achieve the above object, the present invention provides an AI-based pastry quality detection method and system.

[0006] In a first aspect, an AI-based pastry quality detection method includes: obtaining a set of production images and standard images during the pastry production process; using an image segmentation model to process the set of production images, extracting pastry regions, analyzing the light distribution and the central horizontal and vertical coordinates of each pastry region, and performing clustering to form several adjacent pastry groups, and numbering the pastry regions within the adjacent pastry groups; performing image matching between each pastry region in the adjacent pastry groups and the standard image, and calculating the influence color difference value of the corresponding pixel points of each pastry based on the matching result and the light distribution; constructing a graph structure for the adjacent pastry groups, analyzing the adjacent relationships of all adjacent pastry groups and the numbers of each pastry for individual pastry region recognition, obtaining multiple production images of each pastry region in the adjacent pastry groups superimposed with the standard image, and calculating the integrity coefficient of each pastry region in a single adjacent pastry group; constructing a defect detection result for each pastry region in the standard image according to the integrity coefficient and the influence color difference value, and performing anomaly detection according to the defect detection result to judge the production quality of each pastry.

[0007] By solving complex lighting and image quality problems, it improves the accuracy of micro-defect recognition, ensures the reliability of the quality detection results of each pastry, and enhances the enterprise's quality control ability; introducing the concept of comprehensive light distribution, quantifying the influence of light on color difference calculation, improves the accuracy of color difference values, and ensures the reliability of defect recognition; combining the integrity coefficient and the influence color difference value to construct a defect detection result, comprehensively evaluating the quality of each pastry, effectively solving the detection accuracy problem caused by missing perspectives and image overlaps; through the anomaly detection algorithm, quickly judging the production quality of pastries, meeting the high-speed detection requirements of the pastry production line, and improving production efficiency and product quality.

[0008] Preferably, the light distribution includes: Converting the pastry region from the RGB color space to the HSV color space, obtaining the color distribution of the pastry region in the HSV space and the brightness values of each pixel point, and forming a brightness channel image; Performing a filtering operation on the brightness channel image to obtain a significant brightness channel image, using the Otsu threshold method to perform light and dark segmentation on the significant brightness channel image, dividing the pixel points in the image into a bright region and a dark region, and obtaining a light and dark segmentation result; Performing connected component analysis on the light and dark segmentation result, obtaining the horizontal and vertical coordinates of the centers of the bright region and the dark region, calculating the vector from the center of the bright region to the center of the dark region, and obtaining the light distribution of each pastry region.

[0009] By improving the accuracy of light distribution calculation, enhancing the effect of subsequent image processing and analysis, providing detailed light distribution information, contributing to more accurate image matching and color difference calculation, and improving the accuracy of pastry production quality detection.

[0010] Preferably, the numbering of the pastry regions within the adjacent pastry groups includes: Among them, one clustering cluster corresponds to one adjacent pastry group, and each adjacent pastry group contains multiple pastry regions; Taking the leftmost position number in the adjacent pastry group as 1, calculate the Euclidean distance values of the remaining pastries to the pastry corresponding to number 1, sort the Euclidean distance values from small to large, obtain the numbers of the pastry regions in the adjacent pastry group, and in response to the existence of pastries with the same Euclidean distance value, the numbers of the corresponding pastries are the same.

[0011] Preferably, the influence color difference value satisfies the following relational expression: ; In the formula, represents the influence color difference value of the th pixel point of the th pastry region in the standard image, represents the illumination coefficient of the th pixel point of the th pastry region in the standard image, represents the color difference value of the th pixel point of the th pastry region in the standard image.

[0012] Preferably, the integrity coefficient includes: Obtain the bright regions in the multiple matching results of each pastry region and the standard image, set all pixel point values in the standard image to 1, and also set the values of the pixel points belonging to the bright regions in each production image to 1. Subtract the values corresponding to the pixel points in the corresponding bright regions in the matching from the values of the pastry standard image to complete the superposition; In response to the value of the pixel point after superposition being 0, it indicates normal coverage; in response to the value of the pixel point after superposition being 1, it indicates the existence of a region with poor illumination effect or an unphotographed region; in response to the value being negative, it indicates the existence of multiple superpositions at the same position, but multiple superpositions also belong to normal coverage, and take the superposition value of the pixel point as the integrity coefficient of a single pixel point.

[0013] By comparing the bright regions of the production image and the standard image, accurately identify the regions with insufficient illumination or missed shooting, so as to improve the illumination conditions or shooting angles; use the change of the pixel values after superposition to quantify the integrity coefficient of each pixel point, providing reliable illumination and coverage information for subsequent quality inspection; consider the normal coverage situation of multiple superpositions, avoid misjudgment, and ensure that the detection results truly reflect the production quality of the pastries.

[0014] Preferably, the defect detection result satisfies the following relational expression: ; In the formula, represents the Defect detection of the th pixel point in the standard image of a pastry area, indicating in the adjacent pastry group at the th acquisition, the th pastry in the standard image, the influence color difference value of the low light influence corresponding to the th pixel point, indicating the minimum value function, indicating the exponential function with natural number as the base, indicating the activation function, indicating the th pastry area in the standard image, the integrity coefficient of the th pixel point, indicating the hyperparameter.

[0015] Preferably, the anomaly detection is performed according to the defect detection result to judge the production quality of each pastry, including: Using the LOF anomaly detection algorithm for the defect detection results of each pixel point in each pastry area in the standard image to obtain the anomaly detection score. When the anomaly detection score is greater than the preset anomaly threshold, the pixel point corresponding to the pastry area in the pastry standard image is a defective pixel point. On the contrary, when it is less than or equal to the preset anomaly threshold, there is no production defect in the pastry area in the pastry standard image.

[0016] In a second aspect, an AI-based pastry quality detection system includes: a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned AI-based pastry quality detection method is implemented.

[0017] Compared with the prior art, the AI-based pastry quality detection method and system according to the embodiments of the present invention have the following beneficial effects: When extracting the light distribution of the pastry image, technologies such as filtering, light and dark segmentation, and connected component analysis are used to accurately calculate the light distribution, providing a stable and reliable basis for subsequent image matching and color difference calculation; Using the instance segmentation model to accurately identify the area of each pastry, and forming adjacent pastry groups through clustering, effectively solving the problems of image overlap and perspective loss, thereby improving the detection accuracy; Using the graph structure construction and matching technology, each pastry can be efficiently identified and located. By matching the graph structure data of the adjacent pastry groups, the same group of pastries in different acquisition images can be quickly determined, greatly improving the detection efficiency and meeting the real-time detection requirements under the high-speed operation of the pastry production line; It can also comprehensively evaluate the quality status of pastries through the comprehensive analysis of the integrity coefficient and the color difference value. By introducing the integrity coefficient, the system can quantify the coverage integrity and light effect of each pixel point, providing more abundant information for quality evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flowchart of the methods of steps S1 - S4 in the AI - based pastry quality detection method according to the embodiments of the present invention.

[0019] Figure 2 It is a structural block diagram of the AI - based pastry quality detection system according to the embodiments of the present invention. Detailed implementation manners

[0020] The following combines the accompanying drawings and embodiments to further describe in detail the specific implementation manners of the present invention. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.

[0021] As Figure 1 shown, the AI - based pastry quality detection method of the preferred embodiments of the present invention includes steps S1 - S4, which are specifically as follows: S1: Obtain the set of production images and standard images during the pastry production process. Use an image segmentation model to process the set of production images, extract the pastry regions, analyze the light distribution and the central horizontal and vertical coordinates of each pastry region, and perform clustering to form several adjacent pastry groups, and number the pastry regions within the adjacent pastry groups.

[0022] By installing RGB cameras at multiple positions and angles on the pastry production line and collecting the production images of the pastries, and sending the production images to the data processing center for pastry quality detection. At the same time, through the method of manual collection, obtain multi - angle images that meet the pastry production quality requirements as standard images.

[0023] Use an instance segmentation model to identify the pastry regions in multiple production - process pastry regions, obtain multiple pastry - region images that only contain pastries, and obtain the horizontal and vertical coordinates of each pastry - region image in its corresponding pastry region.

[0024] The instance segmentation model is a DNN network model, which consists of an encoder and a decoder. When training the model, form a data set with the pastry regions collected from multiple angles, and mark the pixel points belonging to the pastry regions in each image as 1 and the pixel points not belonging to the pastry regions as 0. After completing the annotation, use this data set for training. The model can adopt existing network models such as fast - rcnn and resnet. The specific training process of the model is a well - known technical means and will not be elaborated in the present invention.

[0025] The light distribution includes: Convert the pastry region from the RGB color space to the HSV color space, obtain the color distribution of the pastry region in the HSV space and the brightness value of each pixel point, and form a brightness channel image; Perform a filtering operation on the luminance channel image to obtain a significant luminance channel image. Use Otsu's threshold method to perform light and dark segmentation on the significant luminance channel image, divide the pixel points in the image into a bright region and a dark region, and obtain the light and dark segmentation result. Perform connected component analysis on the light and dark segmentation result, obtain the horizontal and vertical coordinates of the centers of the bright region and the dark region, calculate the vector from the center of the bright region to the center of the dark region, and obtain the light distribution of each pastry region.

[0026] According to the light distribution and the corresponding horizontal and vertical coordinates of the pastry center in the same pastry region, classify the pastries with consistent light distribution and approximate coordinates into one category as a neighboring pastry group. Among them, the classification algorithm can adopt an adaptive classification method, such as the SOM algorithm, the iosdata algorithm, etc.; it should be noted that one pastry category is used as a neighboring pastry group, and multiple pastries in each neighboring pastry group indicate pastries belonging to the same local area in the pastry production quality.

[0027] Since the pastries are separated from the molds during the pastry production quality inspection, resulting in a chaotic distribution of pastries, the pastries are tracked and numbered based on the distribution relationship between adjacent pastries to avoid detection chaos.

[0028] Construct a graph structure for the neighboring pastry group. Use a single pastry as a node and the Euclidean distance value between two nodes corresponding to pastries as the edge weight. After obtaining the graph structure of the neighboring pastry group, match the graph structure data of each neighboring pastry group in different pastry regions. In response to the number of nodes and the edge values between any two nodes being the same, it is the same group of neighboring pastry groups. And since it is the same group of neighboring pastry groups in different captured images, it represents the positions of different pastries on different production lines.

[0029] Number the pastries in the same group of neighboring pastry groups. Among them, the numbering method is: take the top-leftmost position of the pastry coordinates as number 1, calculate the Euclidean distance values from the remaining pastries in the same group of neighboring pastry groups to the pastry corresponding to number 1, and number them in ascending order according to the Euclidean distance values. In response to pastries with the same Euclidean distance value, the numbers of the two pastries are the same, and the vectors from the two pastries to the node numbered 1 can be used for differentiation.

[0030] S2: Perform image matching between each pastry region in the neighboring pastry group and a standard image. Based on the matching result and the light distribution, calculate the color difference of the corresponding pixel points of each pastry.

[0031] Since the positions of pastries between adjacent pastry groups are adjacent and the light distributions are similar, the matching results between each pastry area and the standard image are obtained. The matching method is as follows: Calculate the sift feature points corresponding to each pastry area and the standard image respectively, use the brute-force matching method to pair the feature points, and use the paired feature points to perform an affine space transformation on the pastry area to transform the space of the pastry area to be consistent with the space of the pastry standard image, thus completing the matching between each pastry area and the standard image.

[0032] Calculate the color difference values of each pixel point in the pastry area and the standard image with consistent spaces. The larger the color difference value, the more obvious the production defect exists here. However, since the light used for collecting each pastry area is different during the collection process, it will lead to a color difference deviation when directly calculating the color difference, which affects the pastry defect detection result.

[0033] Specifically, the influencing color difference values satisfy the following relational expression: ; In the formula, represents the influencing color difference value of the th pixel point in the th pastry area in the standard image, represents the light coefficient of the th pixel point in the th pastry area in the standard image, represents the influencing color difference value of the th pixel point in the th pastry area in the standard image.

[0034] Since the light distributions of adjacent pastry groups are similar, the light distributions between adjacent pastry groups are obtained. The process of obtaining the comprehensive light distribution of adjacent pastry groups is as follows: Use the vector mean of the light distribution corresponding vectors of each pastry in the adjacent pastry group as the light distribution of the adjacent pastry group.

[0035] Obtain the vectors between the th pixel point in the th pastry area in the standard image and the two mapping coordinates where the two corresponding light distribution centers should be in the pastry standard image respectively. Add the two vectors through vector four arithmetic operations to obtain a comprehensive vector, and calculate the cosine similarity between the comprehensive vector and the comprehensive light distribution on the vector as the light coefficient ; Since the value of the cosine similarity ranges from -1 to 1, perform normalization, and then the smaller it is, the greater the difference from the original light distribution, and the smaller the influence of light is indicated.

[0036] Color difference value The larger it is, the more likely the pixel point in the current pastry is a defective pastry production result. On the contrary, the smaller the color difference value is, the more likely the pixel point in the current pastry is a normal pastry production result. The calculation of the color difference value is as follows: Take the Euclidean distance value of the RGB three components of the th pixel point in the standard image of the th pastry area and the corresponding pixel point on the th pastry area as the color difference value.

[0037] The influence of low light on the color difference value The smaller it is, the less affected by light and the greater the probability of belonging to a normal pastry.

[0038] S3: Construct a graph structure for adjacent pastry groups, analyze the adjacency relationships of all adjacent pastry groups and identify individual pastry areas by pastry numbers. Obtain multiple production images of each pastry area in the adjacent pastry group and overlay them with the standard image, and calculate the integrity coefficient of each pastry area in a single adjacent pastry group.

[0039] Since the light distribution is affected differently at different image acquisition positions, in order to obtain the pastry defect detection results under multiple acquisition positions, all acquisition images from the first acquisition to the last acquisition are obtained.

[0040] Use the image structure data of adjacent pastry groups to match the image structure data of adjacent pastry groups, identify adjacent pastry groups, and complete the positioning of individual pastries by the numbers of each pastry in the adjacent pastry group. Among them, when matching the image structure data, it is required that the number of nodes is the same and the edge weights between nodes are the same.

[0041] Obtain the matching results of the pastry with the pastry standard image in multiple images of the individual pastry. Since the light distribution is different at different acquisition positions of the individual pastry, the bright area in the single matching result of the pastry is obtained as the acquisition area with good lighting effect.

[0042] Obtain the bright areas in the multiple matching results of each pastry area with the standard image. Set the values of all pixel points in the standard image to 1, and also set the values of the pixel points belonging to the bright area in each production image to 1. Subtract the values of the corresponding pixel points in the corresponding bright area in the matching from the values of the pastry standard image to complete the overlay; In response to the value of the pixel point after overlay being 0, it indicates normal coverage; in response to the value of the pixel point after overlay being 1, it indicates the existence of an area with poor lighting effect or an area not captured; in response to the value being negative, it indicates multiple overlays at the same position, but multiple overlays also belong to normal coverage. Take the overlay value of the pixel point as the integrity coefficient of the single pixel point.

[0043] S4: Based on the integrity coefficient and the influencing color difference value, construct the defect detection results for each pastry area in the standard image, and perform anomaly detection according to the defect detection results to judge the production quality of each pastry.

[0044] Obtain the defect detection result of the t-th pixel point of the i-th pastry area in the standard image in the adjacent pastry group : ; In the formula, represents the defect detection of the -th pixel point of the -th pastry area in the standard image, represents the influencing color difference value of the low-light influence corresponding to the -th acquisition of the -th pastry on the standard image at the -th pixel point, represents the minimum value function, represents the exponential function with the natural number as the base, represents the activation function, represents the integrity coefficient of the -th pixel point of the -th pastry area in the standard image, represents the hyperparameter.

[0045] Obtain the minimum value of the color difference values affected by low light in the multiple acquisition results. The larger the minimum value, the greater the probability of pastry production defects. Because after the superposition of multiple acquisition positions, the light distribution is basically the least affected. Therefore, if the color difference itself is larger, the value of is larger when calculated.

[0046] When the integrity coefficient value is 1, it indicates that there is a missing acquisition and the result is not credible, indicating the risk problem of uncertainty in the detection result. If the integrity coefficient value is smaller, it indicates the defect detection result after multiple acquisitions, indicating that the detection result does not have the risk problem of uncertainty. However, in order not to affect the calculation of the color difference value, so is mapped to get: , where The function means that when is less than or equal to 0, the value is 0, and when is 1 . It belongs to a piecewise function, where is used for exponential mapping so that when is 0, the value is 1, where is the hyperparameter, and in this scheme, = 3, which can be adjusted by the implementer according to the specific implementation scenario.

[0047] It can be written as a piecewise function. When it is less than or equal to 0, , When it is less than or equal to 1, .

[0048] Obtain the defect detection results of each pixel point in the standard image of the th pastry area. Use the LOF anomaly detection algorithm to obtain the anomaly detection scores of each pixel point. Set a preset anomaly threshold. When the anomaly detection score is greater than the preset anomaly threshold, the corresponding pixel point in the pastry area in the pastry standard image is a defective pixel point. Conversely, when it is less than or equal to the preset anomaly threshold, there is no production defect in the pastry area in the pastry standard image. The preset anomaly threshold is 6, which can be adjusted by the implementer according to the specific implementation scenario.

[0049] Through the above steps, the AI-based pastry quality detection method is completed.

[0050] The present invention also provides an AI-based pastry quality detection system. As Figure 2 shown, the system includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, the AI-based pastry quality detection method according to the first aspect of the present invention is implemented. The system also includes other components well known to those skilled in the art such as a communication bus and a communication interface. Their settings and functions are known in the art, so they will not be described in detail here.

[0051] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the counting principle of the present invention, several improvements and replacements can be made, and these improvements and replacements should also be regarded as the protection scope of the present invention.

Claims

1. An AI-based pastry quality detection method, characterized in that, The method includes the following steps: Obtain a set of production images and standard images during the pastry production process, process the set of production images using an image segmentation model, extract the pastry regions, analyze the light distribution and the central horizontal and vertical coordinates of each pastry region, and perform clustering to form several adjacent pastry groups, and number the pastry regions within the adjacent pastry groups; Perform image matching between each pastry region in the adjacent pastry groups and the standard image, and calculate the influence color difference value of the corresponding pixel points of each pastry based on the matching result and the light distribution; Construct a graph structure for the adjacent pastry groups, analyze the adjacent relationships of all adjacent pastry groups and the numbers of each pastry for individual pastry region recognition, obtain multiple production images of each pastry region in the adjacent pastry groups and overlay them with the standard image, and calculate the integrity coefficient of each pastry region in a single adjacent pastry group; Based on the integrity coefficient and the influence color difference value, construct the defect detection results of each pastry region in the standard image, and perform anomaly detection according to the defect detection results to judge the production quality of each pastry.

2. The AI-based pastry quality detection method according to claim 1, characterized in that, The light distribution includes: Convert the pastry region from the RGB color space to the HSV color space, obtain the color distribution of the pastry region in the HSV space and the brightness values of each pixel point, and form a brightness channel image; Perform a filtering operation on the brightness channel image to obtain a significant brightness channel image, use the Otsu threshold method to perform light and dark segmentation on the significant brightness channel image, divide the pixel points in the image into a bright region and a dark region, and obtain the light and dark segmentation result; Perform connected component analysis on the light and dark segmentation result, obtain the horizontal and vertical coordinates of the center of the bright region and the center of the dark region, calculate the vector from the center of the bright region to the center of the dark region, and obtain the light distribution of each pastry region.

3. The AI-based pastry quality detection method according to claim 1, characterized in that, The numbering of the pastry regions within the adjacent pastry groups includes: Among them, one clustering cluster corresponds to one adjacent pastry group, and each adjacent pastry group contains multiple pastry regions; Number the leftmost position in the adjacent pastry group as 1, calculate the Euclidean distance values of the remaining pastries to the pastry corresponding to number 1, sort the Euclidean distance values from smallest to largest, obtain the numbers of the pastry regions in the adjacent pastry group, and in response to the existence of pastries with the same Euclidean distance value, the numbers of the corresponding pastries are the same.

4. The AI-based pastry quality detection method according to claim 1, characterized in that, The influence color difference value satisfies the following relational expression: ; In the formula, represents the influence color difference value of the th pastry area at the th pixel point in the standard image, represents the illumination coefficient of the th pastry area at the th pixel point in the standard image, represents the color difference value of the th pastry area at the th pixel point in the standard image.

5. The AI-based pastry quality detection method according to claim 1, characterized in that, The integrity coefficient includes: Obtain the bright regions in the multiple matching results of each pastry region and the standard image, set the values of all pixel points in the standard image to 1, and also set the values of the pixel points belonging to the bright region in each production image to 1, subtract the values of the corresponding pixel points in the corresponding bright region in the matching from the values of the pastry standard image, and complete the overlay; In response to the value of the pixel point after overlay being 0, it indicates normal coverage; in response to the value of the pixel point after overlay being 1, it indicates the existence of an area with poor lighting effect or an area not captured; in response to the value being negative, it indicates the existence of multiple overlays at the same position, but multiple overlays also belong to normal coverage, and use the overlay value of the pixel point as the integrity coefficient of a single pixel point.

6. The AI-based pastry quality detection method according to claim 1, characterized in that, The defect detection result satisfies the following relational expression: ; Wherein, represents the defect detection of the th pixel point of the th pastry area in the standard image, represents the influence color difference value of the low light influence corresponding to the th acquisition of the th pastry on the standard image at the th pixel point, represents the minimum value function, represents the exponential function with natural number as the base, represents the activation function, represents the integrity coefficient of the th pixel point of the th pastry area in the standard image, represents the hyperparameter.

7. The AI-based pastry quality detection method according to claim 1, characterized in that, The anomaly detection according to the defect detection results to judge the production quality of each pastry includes: The defect detection results of each pixel point in each pastry area in the standard image are used with the LOF anomaly detection algorithm to obtain the anomaly detection score. When the anomaly detection score is greater than the preset anomaly threshold, the corresponding pixel point in the pastry area in the pastry standard image is a defective pixel point. Conversely, when it is less than or equal to the preset anomaly threshold, there is no production defect in the pastry area in the pastry standard image.

8. An AI-based pastry quality detection system, characterized in that, It includes: A processor and a memory, where the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the AI-based pastry quality detection method according to any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Food quality detection method and device, electronic equipment and storage medium

    CN114187248A

  • Paper box printing color difference defect detection method based on artificial intelligence system

    CN114757954A

  • Food detection system based on machine learning

    CN115953776A

  • Hardware part production quality detection method and system based on artificial intelligence

    CN116205919A

  • PCB quality detection method based on computer vision

    CN117994258A

Cited By

  • Finished pastry appearance analysis method and device based on AI image analysis and recognition

    CN120747953A