A method for intelligent identification of texture defects of baked cakes

By combining multimodal imaging and process time-series data, the problem of low efficiency and high false detection rate of manual visual inspection in the texture detection of baked pastries is solved. It achieves accurate differentiation and efficient identification of natural textures and process defects, and is suitable for online quality inspection of high-speed production lines.

CN122391223APending Publication Date: 2026-07-14CHAOWEI CHAOXIANG (GUANGDONG PROVINCE) FOOD CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHAOWEI CHAOXIANG (GUANGDONG PROVINCE) FOOD CO LTD
Filing Date
2026-06-11
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies for detecting the texture of baked goods rely on manual visual inspection, which is inefficient and highly subjective. Single visual inspection cannot distinguish between natural textures and process defects, resulting in a high false detection rate. Furthermore, these technologies lack the ability to identify batch-specific process defects and cannot meet the requirements of industrial-grade online quality inspection.

Method used

By employing multimodal imaging and batch good product benchmark construction, combined with full-process time-series data, and through multi-dimensional texture feature extraction and batch anomaly clustering analysis, it achieves accurate differentiation and judgment between natural textures and process defects, and integrates process spatiotemporal mapping and joint adjudication.

Benefits of technology

It improves the accuracy and stability of texture detection in baked goods, reduces false detection and false negative rates, is compatible with online quality inspection in high-speed production lines, and enables rapid traceability and high-precision identification of batch-specific process defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391223A_ABST
    Figure CN122391223A_ABST
Patent Text Reader

Abstract

The application discloses a kind of baked cakes texture flaw intelligent identification method, belong to image processing technical field, comprising: image acquisition and pre-processing, construct good product benchmark and measured feature, calculate feature deviation, mark suspected abnormality and extract feature, statistics batch abnormal distribution, distinguish random type and aggregated abnormality, process data generation curve, establish space-time mapping relationship, combined with process state arbitration, determine type and trigger recheck early warning;The application is matched with multimodal imaging optimization, feature fusion extraction, distribution entropy aggregation determination, benchmark dynamic updating and other mechanisms, which can accurately distinguish between cake natural texture and process defects, significantly reduce false detection rate and missed detection rate, adapt to biscuit, bread, cake, moon cake and other types of baked cakes high-speed production line online quality inspection, with stable detection, strong adaptability, good industrial landing characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and more specifically, relates to an intelligent method for recognizing texture defects in baked pastries. Background Technology

[0002] In large-scale industrial production, baked goods are highly susceptible to surface texture defects such as cracks, collapses, disordered textures, and color spots due to multiple processes including baking, proofing, and conveying. These defects directly impact the product's appearance and market perception. Currently, the industry relies heavily on manual visual inspection for texture control in baked goods. This method suffers from low efficiency, significant subjective differences in judgment, and the risk of missed detections due to fatigue during prolonged operation, making it unsuitable for the demands of high-speed production lines. Existing intelligent inspection solutions often employ single visible light images for texture recognition, relying solely on fixed visual thresholds or simple texture features for defect identification. These solutions exhibit weak image discrimination capabilities and lack effective image classification methods. They are not adapted to the complex imaging characteristics of baked goods, such as gloss, reflection, and frost coverage, resulting in poor robustness and difficulty in simultaneously meeting industrial-grade requirements for both false alarm and false negative rates.

[0003] Current technologies for detecting texture defects in pastries generally face core technological bottlenecks: baked pastries possess inherent texture characteristics such as natural crispness, random air pockets, uneven sugar granules, and color variations. Their visual morphology and texture defects caused by process anomalies are highly similar, making traditional single-sample visual recognition methods ineffective in distinguishing between natural individual texture differences and genuine process defects, resulting in a high false detection rate. Furthermore, existing technologies only perform isolated detection on individual pastries, failing to utilize the spatial clustering and frequency characteristics of batch defects for group analysis, and neglecting to incorporate process time-series data such as temperature, humidity, and conveyor speed throughout the baking process for correlation verification. This makes it difficult to provide auxiliary evidence for determining texture anomalies from a process perspective, leading to low accuracy and poor stability in identifying batch-specific process defects, and failing to meet the requirements of high-precision, low-false-detection online quality inspection for industrial applications. Summary of the Invention

[0004] The purpose of this invention is to provide an intelligent method for identifying texture defects in baked pastries, so as to solve the problems mentioned in the background art.

[0005] To address the aforementioned problems and technical deficiencies, this invention employs the following technical solution: a method for intelligent identification of texture defects in baked pastries, comprising: S1. Select qualified pastries from the current batch that have been confirmed to be free of texture defects, acquire multimodal images and perform preprocessing, extract texture features and construct the benchmark feature range for good products in the current batch; simultaneously acquire multimodal images of pastries to be tested and perform the same preprocessing to generate corresponding feature maps and feature vectors to be tested; S2. Calculate the deviation between the feature vector to be tested and the good product benchmark feature interval, generate an abnormal response map, mark the area where the response value exceeds the threshold as a suspected abnormal area, and extract the morphological features and individual spatial distribution features of each suspected abnormal area. S3. Based on the suspected abnormal areas of all test items in the same batch, statistically analyze the frequency and spatial distribution characteristics of batches with the same morphological type and similar spatial location of abnormalities, and classify the suspected abnormalities into scattered random suspected abnormalities or batch clustered suspected abnormalities. S4. Collect the full process sequence data of the current batch and perform noise reduction processing to generate process curves that change with time and workstation; establish the spatiotemporal mapping relationship between image space and production line process, and map the two types of suspected anomalies to the corresponding time period and workstation of the process curve; S5. Combine the real-time status of the process curve to complete the final judgment of defects. Specifically: when the sporadic random anomaly matches the normal fluctuation of the process, it is judged as the difference in the natural texture of the pastry; when the batch clustered anomaly matches the abnormal fluctuation of the process, it is judged as the real texture defect and the defect type is identified; in other cases, the anomaly is marked as an anomaly to be confirmed and the re-inspection and early warning mechanism is triggered.

[0006] Further, in step S1, the multimodal image is a multi-view texture enhancement image acquired synchronously from the same camera position, including a visible light RGB image under a diffuse dome light source, an embossed texture image under a low-angle grazing light source, and a de-highlight image from polarized light imaging; the image preprocessing includes at least one of image denoising, motion blur correction, illumination unevenness correction, and surface noise removal.

[0007] Furthermore, in step S1, the texture features include multi-dimensional fusion features, including contrast and energy features of the gray-level co-occurrence matrix, shallow texture features of local binary patterns, and deep semantic features extracted by a pre-trained convolutional neural network finely tuned with a pastry texture-specific dataset.

[0008] Further, in step S2, the deviation is calculated using Mahalanobis distance or cosine similarity; the morphological features include the area of ​​the abnormal region, aspect ratio, roundness, and mean edge gradient; the individual spatial distribution features are the geometric position coordinates normalized to the pastry body coordinate system and the distance from the abnormal region to the nearest edge of the pastry.

[0009] Furthermore, in step S3, a dual judgment mechanism of batch proportion + distribution entropy is adopted: when the proportion of suspected abnormal individuals with the same morphology and the same normalized spatial location to the total number of batches exceeds the preset proportion, and the batch location distribution entropy is lower than the preset entropy threshold, it is judged as a batch clustered suspected abnormality; otherwise, it is judged as a scattered random suspected abnormality.

[0010] Furthermore, in step S4, the full-process timing data includes at least two of the following: baking temperature curve, proofing temperature and humidity, conveyor belt speed, and cooling section wind speed; the noise reduction process uses moving average filtering or Kalman filtering; based on the conveyor belt running cycle and product station dwell time, precise time axis alignment and spatiotemporal mapping between the image spatial position and the process timing curve are achieved.

[0011] Furthermore, in step S5, normal process fluctuation is determined when the sampled value of the process parameter is within the upper and lower control limits obtained from the statistical analysis of historical normal production data; abnormal process fluctuation is determined when the sampled value of the process parameter exceeds the upper and lower control limits and continues for a preset duration, or when the instantaneous change rate of the process parameter exceeds a preset threshold.

[0012] Furthermore, in step S5, the identifiable defect types include at least cracks, surface bubbles, collapses, and discoloration; among which cracks are identified by matching with a standard crack morphology library, bubbles are identified by identifying near-circular high-response areas, collapses are identified by combining 3D height information, and discoloration is identified by combining multispectral band reflectivity differences.

[0013] Furthermore, the method also includes a batch iterative optimization and workstation early warning mechanism: when multiple batches of the same workstation exhibit batch clustering anomalies, an early warning message containing the abnormal workstation, abnormal process parameters, and maintenance suggestions is automatically output; the samples of natural texture differences confirmed by manual review are iteratively updated to the good product benchmark feature range according to a preset weight, thereby realizing dynamic adaptive optimization of the benchmark model.

[0014] Furthermore, the method also includes a fallback re-inspection and model iteration mechanism: a high-precision re-inspection method is adopted for confirmed anomalies using hyperspectral imaging analysis or manual visual inspection. Samples confirmed as defective after re-inspection are labeled and included in the defective sample library for continuous iteration and optimization of the recognition model accuracy.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention solves the problems of low efficiency, high subjectivity, and easy omissions in traditional manual inspection of baked goods texture detection, as well as the inability of single visual inspection to distinguish between natural textures and process defects, resulting in a high false detection rate. By constructing a batch-by-batch good product benchmark, it adapts to the natural texture fluctuations of baked goods; relying on batch anomaly clustering, it accurately identifies natural random textures and process defects; and by integrating spatiotemporal mapping and joint adjudication of full-process time-series data, it determines anomalies from the production mechanism level, reducing false detections and omissions, while enabling rapid traceability of batch-specific process defects. The detection accuracy and stability are significantly improved, making it suitable for high-speed online quality inspection on production lines and highly practical for industrial applications.

[0016] After adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: The present invention solves the problems of low efficiency, strong subjectivity, and easy omission in traditional baked pastry texture detection relying on manual visual inspection, as well as the inability of single visual inspection to distinguish between natural textures and process defects, resulting in a high false detection rate. By constructing a batch good product benchmark, it adapts to the natural texture fluctuations of pastries; relying on the batch anomaly clustering classification, it accurately identifies natural random textures and process defects; by integrating the spatiotemporal mapping and joint adjudication of the entire process time sequence data, it determines anomalies from the production mechanism level, reducing false detections and omissions, while realizing rapid traceability of batch process defects. The detection accuracy and stability are significantly improved, and it can be adapted to high-speed production line online quality inspection, with strong industrial applicability.

[0017] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0018] In the attached diagram: Figure 1 This is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example 1

[0020] This embodiment provides a method for intelligent identification of texture defects in baked goods, which can be applied to the online quality inspection of baked goods such as cookies, bread, cakes, and mooncakes. The overall process of this embodiment is shown in the attached instruction manual. Figure 1 As shown. The method specifically includes the following steps S1 to S5: S1. Constructing a benchmark model for good products and extracting features from products to be tested. The core of this step is to establish the standard texture feature range for the current batch using qualified pastries, eliminating interference from natural texture differences between different batches and recipes of pastries, and providing a unified reference standard for subsequent anomaly identification. This step is specifically divided into the following 5 sub-steps: S11. Select Modeling Samples. Select qualified pastries from the current batch that have been manually verified piece by piece and confirmed to be free of any texture defects such as cracks, collapses, disordered textures, color spots, and bubbles as modeling samples. The number of modeling samples is determined by those skilled in the art based on the production line operating speed, pastry variety stability, and texture fluctuation range. The core principle is to meet statistical representativeness, usually selecting 20-50 good products to ensure that the constructed baseline feature range can completely cover the normal texture fluctuation range of qualified pastries in this batch, avoiding the baseline range being too narrow or too wide due to insufficient sample size, which would affect the accuracy of subsequent anomaly identification.

[0021] S12. Synchronous Multimodal Image Acquisition. A dedicated multimodal imaging device is used to synchronously acquire images of each modeled sample. This device is installed at the production line's imaging station and includes a visible light RGB camera, a polarized camera, and a 3D laser profilometer fixed in the same position. It is also equipped with three dedicated light sources: a diffused dome light source, a low-angle grazing strip light source, and a polarized light source. These three light sources are controlled by a synchronous trigger controller. As the conveyor belt transports the pastry to the imaging station, three precise exposures are sequentially performed using a time-division stroboscopic method to acquire images of three different modalities. Each modal image corresponds to a different texture detection function. First, under uniform illumination from a diffused dome light source, visible light RGB images are collected, mainly to record basic visual information such as the overall color distribution, macroscopic texture direction, and large-area color spots on the surface of the pastry, avoiding interference from local lighting and shadows. Second, under the side illumination of a low-angle grazing strip light source, relief texture images are acquired. The light and shadow effects produced by the side illumination enhance the visibility of minor undulations and defects such as tiny cracks, tiny bubbles, surface unevenness, and texture collapse on the surface of the pastry, solving the problem that conventional imaging cannot capture subtle texture defects. Third, with the polarized light source turned on and a dedicated analyzer installed in front of the camera lens, a de-highlight image is acquired. Through the principle of polarized light filtering, the strong reflective interference caused by the covering of oil, icing, and egg liquid on the surface of the pastry is completely filtered out, resulting in a pure surface image without highlights and with clear texture, thus improving the accuracy of subsequent feature extraction.

[0022] S13. Multimodal Image Preprocessing and Registration. The three acquired modal images undergo standardized preprocessing. The preprocessing workflow includes four core operations to comprehensively eliminate image interference caused by the industrial production line environment and equipment: The first step is image noise reduction processing, which uses Gaussian filtering or median filtering algorithms to remove image noise caused by inherent noise of the camera sensor, flour dust and oil fume particles in the workshop air, and to ensure clear image quality. The second item is motion blur correction. Based on the real-time running speed of the conveyor belt, inverse filtering or Wiener filtering algorithms are used to correct the image trailing and blurring caused by the pastry moving with the high-speed conveyor belt, while preserving the detailed features of fine textures such as cracks and bubbles. The third item is uneven illumination correction, which uses an adaptive histogram equalization algorithm to compensate for the problem of local over-brightness or under-brightness of the image caused by the deviation of the light source illuminance and the difference in brightness of the shooting position, so as to ensure uniform illumination of the whole image. The fourth item is surface impurity removal, which filters out non-defect temporary impurities such as pastry crumbs and flour particles with a diameter lower than the preset threshold, to prevent such impurities from being misjudged as texture abnormalities.

[0023] After preprocessing, the visible light RGB image is used as the reference image. The SIFT feature matching and registration algorithm is used to accurately align the embossed texture image and the de-highlight image to the same spatial coordinate system, ensuring that the same physical position of the pastry in the three modal images can be accurately corresponded, laying the foundation for subsequent multimodal feature fusion.

[0024] S14. Multi-dimensional texture feature extraction and construction of benchmark feature intervals for high-quality products. For the three registered modal images, three complementary texture features are extracted pixel-by-pixel to form a multi-dimensional fused feature vector, comprehensively characterizing the surface texture properties of the pastry. The first category is statistical texture features based on gray-level co-occurrence matrix (GLCM). Four features, namely contrast, energy, homogeneity and correlation, are extracted in four directions: 0°, 45°, 90° and 135°. The mean of the four directions is calculated as the final GLCM feature, which is used to describe the macroscopic statistical characteristics of pastry texture, such as the coarseness, uniformity and regularity. The second category is shallow texture structure features based on local binary pattern (LBP). By calculating the gray-level difference of local pixels in the image to generate binary codes, it describes the distribution pattern of local micro-textures on the surface of pastries and accurately captures fine structural features such as crisp texture, air hole arrangement, and surface particles. The third category is deep semantic features of convolutional neural networks. A lightweight convolutional neural network model, pre-trained on a large dataset of pastry surface images and then fine-tuned using pastry texture samples in this field, is used to extract high-level abstract semantic features of pastry textures, thus making up for the shortcomings of traditional handmade features in representing complex textures.

[0025] The three types of features mentioned above are concatenated along the channel dimension to form a multi-dimensional fused feature vector at each pixel location. After extracting the fused features pixel by pixel for all modeling samples, the numerical distribution range of each feature dimension is statistically analyzed. The minimum and maximum values ​​are used as the benchmark feature interval for that feature dimension. The benchmark intervals of all feature dimensions together constitute the benchmark feature interval for the current batch. This interval can adapt to the natural texture fluctuations of this batch of pastries, avoiding false detections caused by fixed templates.

[0026] S15. Feature extraction of the test product. Repeat all operations from S12 to S14 for the pastry to be tested, namely, simultaneously acquiring three modal images, completing four preprocessing steps, multimodal image registration, and extracting and fusing three types of texture features. Finally, generate the test feature map and test feature vector corresponding to the pastry to be tested, providing a data foundation for subsequent anomaly identification.

[0027] S2. Initial screening of individual anomalies and calculation of feature deviation. This step targets a single piece of pastry to be tested. By comparing it with the characteristic range of good products, it quickly locates suspected texture abnormalities and extracts the quantitative features of the abnormalities to prepare for subsequent batch statistical analysis. It consists of three sub-steps: S21. Feature Deviation Calculation. This calculates the deviation between the feature vector to be tested and the good product baseline feature range. The deviation is used to measure the degree of difference between the texture to be tested and the qualified texture. This embodiment provides two optional calculation methods, which technicians can flexibly choose according to production line requirements: The first method is Mahalanobis distance. This algorithm can consider the correlation between feature dimensions and eliminate the influence of differences in feature dimensions. It is suitable for calculating the deviation of multi-dimensional fused features and has higher recognition accuracy. The second method is cosine similarity, which has higher computational efficiency and is suitable for real-time detection scenarios on high-speed production lines.

[0028] The higher the deviation value, the more significant the deviation of the texture features at that location from the good product benchmark, and the greater the possibility of texture defects.

[0029] S22. Anomaly Response Map Generation and Suspected Anomaly Region Marking. The deviation values ​​of each pixel in the entire image to be tested are normalized and mapped to generate an anomaly response map of the exact same size as the image to be tested. Pixel brightness in the response map is proportional to the deviation. An adaptive threshold segmentation algorithm is used to process the anomaly response map. The threshold is determined based on the statistical distribution of deviation of the good product modeling samples, typically selecting the 95th one-sided quantile of the good product deviation distribution. Continuous pixel regions with response values ​​exceeding the threshold are marked as suspected anomaly regions, completing the initial anomaly screening for individual pastries.

[0030] S23. Anomaly Region Feature Extraction. For each marked suspected anomaly region, two sets of quantitative features are precisely extracted: morphological features and individual spatial distribution features. The morphological features include at least four items: area, aspect ratio, roundness, and mean edge gradient of the abnormal region. The area represents the size of the abnormal region, the aspect ratio and roundness represent the geometric shape of the abnormality, and the mean edge gradient represents the clarity of the boundary between the abnormal region and the normal texture. It is used to distinguish the morphological differences of different defects such as cracks, bubbles, collapses, and spots. The individual spatial distribution characteristics are first normalized in the pastry body coordinate system to eliminate positional deviations caused by differences in pastry size and placement, and normalized coordinates are obtained. At the same time, the normalized distance from the center of the abnormal area to the nearest edge of the pastry is calculated to clarify the specific location of the abnormality on the surface of the pastry, providing data for subsequent batch spatial clustering analysis.

[0031] S3. Pattern Summarization and Marking of Batch-Level Suspected Anomalies This step utilizes the inherent pattern of "random distribution of natural textures in pastries and batch clustering of processing defects" to distinguish between natural texture interference and genuine processing defects through batch statistical analysis. It is specifically divided into three sub-steps: S31. Cross-individual anomaly clustering. Cross-individual clustering analysis is performed on suspected abnormal regions extracted from all pastries in the same batch. Density clustering (DBSCAN) or hierarchical clustering algorithms are used. The similarity of abnormal morphological features and the proximity of the normalized spatial location of the anomaly are used as joint metrics to group suspected anomalies with similar morphology and close positions on the surface of the pastries into the same anomaly pattern, thereby achieving the classification and summarization of batch anomalies.

[0032] S32. Calculation of batch anomaly frequency and spatial distribution characteristics. For each summarized anomaly pattern, two core indicators are statistically analyzed: the first is the number of individuals exhibiting this anomaly pattern in this batch and its frequency of occurrence, where the frequency is the proportion of the number of individuals exhibiting the anomaly to the total number of pastries tested in this batch; the second is the spatial distribution characteristics of this anomaly pattern, which is quantified using a distribution entropy algorithm: the surface of the pastry is pre-divided into a uniform grid, and the frequency of the center of each anomaly area falling into each grid is counted. The distribution entropy value of the grid frequency is calculated. The more uniform the distribution, the higher the entropy value. When obvious clustering occurs, the entropy value decreases significantly. The entropy value can accurately characterize the spatial aggregation degree of anomalies.

[0033] S33. Dual Judgment and Classification of Anomalies. A dual judgment mechanism of "occurrence frequency + spatial distribution entropy" is adopted to classify all anomaly patterns into two categories, fundamentally distinguishing between natural textures and manufacturing defects: If the frequency of an abnormal pattern exceeds a preset frequency threshold and the spatial distribution entropy value is lower than a preset entropy threshold, it indicates that the abnormality occurs in large numbers in a batch and is located in a fixed position. It is judged as a batch-clustered suspected abnormality. Such abnormalities are likely caused by abnormal process parameters. If the abnormal pattern does not meet the above two conditions, and only appears sporadically in individual pastries with no regularity, it is judged as a sporadic random suspected abnormality. Such abnormalities are likely to be normal differences caused by the pastry ingredients and natural texture.

[0034] The preset frequency threshold and entropy threshold are set by technicians based on the product process stability and quality requirements, and are not specifically limited in this invention.

[0035] S4. Process Data Acquisition and Spatiotemporal Mapping This step links visual anomalies to the production process, providing a process mechanism basis for the final decision and solving the problem that pure visual inspection cannot trace the source. It is specifically divided into 3 sub-steps: S41. Process Sequence Data Acquisition and Noise Reduction. Through the production line PLC control system or SCADA data acquisition system, acquire the process sequence data of the entire production process of the current batch of pastries. This data should include at least two or more of the following: baking temperature curve, proofing temperature and humidity, conveyor belt speed, and cooling section airflow speed, comprehensively covering the core process steps affecting the texture formation of the pastries. The raw process data is then subjected to noise reduction processing using moving average filtering or Kalman filtering algorithms to eliminate noise data caused by instantaneous sensor fluctuations and electromagnetic interference, ensuring that the process curve accurately reflects the production status.

[0036] S42. Process Curve Generation. With production time as the horizontal axis and the values ​​of each process parameter as the vertical axis, a process curve is generated that varies with time and production station. The start and end intervals of different stations such as proofing, baking, cooling, and conveying are clearly marked on the horizontal axis, so that the changing trend of each process parameter in the time dimension accurately corresponds to the production station, and the overall process operation status is intuitively displayed.

[0037] S43. Establishment of Spatiotemporal Mapping and Anomaly Mapping. Based on the real-time operating rhythm of the conveyor belt and the dwell time of the pastries at each production station, a spatiotemporal mapping relationship is established between the spatial location of the pastry image and the process time period on the production line. The abnormal location in each pastry image is then reverse-calculated to the specific time of passage through each process step at that location. Through this mapping relationship, the batch-clustered suspected anomalies and scattered random suspected anomalies identified in step S3 are accurately mapped to the corresponding production time period and station on the process curve, achieving a one-to-one binding of visual anomalies with process parameters.

[0038] S5. Final determination and defect classification of the fusion process status This step combines the type of visual anomaly with the process operation status to make the final qualitative judgment, accurately distinguishing between natural texture differences and real texture defects. It is specifically divided into two sub-steps: S51. Process Parameter Operating Status Determination. Based on historical stable production batch process data, statistically determine the upper and lower control limits of each process parameter under normal conditions, and determine the process sampling data during abnormal mapping periods: If the sampled values ​​of the process parameters are all within the upper and lower control limits and there is no obvious fluctuation, the process fluctuation during this period is judged to be normal. If the sampled values ​​of process parameters continuously exceed the upper and lower control limits, or the instantaneous change exceeds the normal range, the process is judged to be in abnormal fluctuation during that period.

[0039] The control limits and abnormal fluctuation criteria are set by technicians based on historical production line data and process control precision.

[0040] S52. Comprehensive Adjudication and Defect Classification. Combining the anomaly pattern type and the corresponding process status during the time period, three adjudication rules are executed, covering all inspection scenarios: Scenario A: If the suspected anomaly is sporadic and random, and the process parameters for the corresponding time period are fluctuating normally, the anomaly is determined to be a natural texture difference caused by the natural components and texture of the pastry raw materials, and is not a process defect. The "normal product" identification result is output, and the product enters the qualified product conveying channel. Typical examples include bran spots on the surface of whole wheat bread, nut fragments on the surface of nut biscuits, and the natural crisp texture of shortbread.

[0041] Scenario B: If the suspected anomaly is batch-aggregated and the process parameters during the mapped period show abnormal fluctuations, the anomaly is determined to be a genuine texture defect caused by abnormal process parameters. Further identification of the specific defect type is based on the anomaly's morphological characteristics: cracks are identified by matching with a standard crack morphology template; bubbles are identified by detecting the roundness of near-circular areas; collapses are identified by combining 3D height information and comparing the height difference between the abnormal and normal areas; and color spots are identified by combining differences in multispectral reflectance. Products determined to be defective are automatically sorted to the defective product channel by the production line rejection device.

[0042] Scenario C: All other uncertainties that cannot be directly adjudicated, including scattered random anomalies matching abnormal process fluctuations and batch clustered anomalies matching normal process fluctuations, are marked as anomalies to be confirmed, triggering a re-inspection and early warning mechanism: on the one hand, higher precision methods such as hyperspectral imaging analysis and manual visual inspection are used to re-verify and confirm; on the other hand, an early warning is issued to production line managers, indicating that there are potential production anomalies that have not been captured by routine process parameters.

[0043] S6, Additional Optimization Mechanism To further enhance the long-term stability, adaptability, and industrial applicability of the method, this embodiment also includes three optional additional optimization mechanisms, which technicians can choose to enable based on the actual needs of the production line: The first item is the cross-batch workstation early warning mechanism. When multiple batches are judged to be batch clustering anomalies at the same production workstation, the system automatically generates visual early warning information, clearly marking the abnormal workstation, the type of associated process parameters, and equipment inspection suggestions to help maintenance personnel quickly locate production faults. The second item is the dynamic update mechanism for the good product benchmark. Samples that have been manually reviewed and confirmed as having natural texture differences are incrementally updated to the good product benchmark feature range according to the preset weight and historical benchmark feature decay rules. This allows the benchmark model to adapt and evolve with changes in raw material batches, seasons, and formula fine-tuning, continuously reducing the false alarm rate in long-term operation. The third item is the defect sample library iteration mechanism. Samples that are confirmed as defects after re-inspection are supplemented with defect type, location and shape annotations and then added to the defect sample library. When the sample library reaches a certain size, the incremental training of the recognition model is automatically triggered to continuously improve the model's ability to recognize minor defects and new types of defects. Example 2

[0044] This embodiment further illustrates the technical effects of the present invention using a specific application scenario.

[0045] A production line producing soda crackers discovered frequent linear dark marks on the edges of one batch of crackers. After processing steps S1 to S3, the system identified that the proportion of individuals exhibiting this abnormal pattern in the same batch exceeded a preset frequency threshold, and the location distribution entropy indicated significant spatial clustering, classifying it as a suspected batch-clustered anomaly.

[0046] Step S4 retrieved the corresponding process data for this batch and found that the top-heat temperature curve of the baking zone showed a sustained high fluctuation in the middle of the batch, exceeding the normal operating range. Spatiotemporal mapping confirmed that the time period during which the products exhibiting aggregation anomalies passed through the baking zone coincided with the period of high temperature.

[0047] Step S5, after comprehensive analysis, identifies the anomaly as a genuine texture defect. Morphological recognition confirms it as an edge crack. The system automatically rejects the defect and issues a workstation warning, prompting operators to check the operating status of the heating element in the baking zone and suggesting appropriate temperature adjustments for that zone. After adjustment, the defect rate of the same type of crack significantly decreased in the next batch.

[0048] In another scenario, when switching production lines to produce whole wheat biscuits, scattered dark spots frequently appeared on the surface. After system detection, these were determined to be sporadic and random, and the process curve remained stable throughout. This was identified as a natural variation in the texture of wheat bran, and the product was released normally without generating any false alarms.

[0049] As can be seen from the above embodiments, the present invention, by integrating multimodal image detection and process parameter data for comprehensive judgment, can effectively distinguish between the natural texture differences on the surface of baked pastries and real process defects, and significantly reduce the false alarm rate while ensuring high detection of batch defects.

[0050] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for intelligent identification of texture defects in baked pastries, characterized in that, include: S1. Select qualified pastries from the current batch that have been confirmed to be free of texture defects, collect multimodal images and perform preprocessing, extract texture features and construct the benchmark feature range for good products in the current batch. Simultaneously acquire multimodal images of the pastries to be detected and perform the same preprocessing to generate corresponding feature maps and feature vectors to be tested; S2. Calculate the deviation between the feature vector to be tested and the good product benchmark feature interval, generate an abnormal response map, mark the area where the response value exceeds the threshold as a suspected abnormal area, and extract the morphological features and individual spatial distribution features of each suspected abnormal area. S3. Based on the suspected abnormal areas of all test items in the same batch, statistically analyze the frequency and spatial distribution characteristics of batches with the same morphological type and similar spatial location of abnormalities, and classify the suspected abnormalities into scattered random suspected abnormalities or batch clustered suspected abnormalities. S4. Collect the full process sequence data of the current batch and perform noise reduction processing to generate process curves that change with time and workstation; establish the spatiotemporal mapping relationship between image space and production line process, and map the two types of suspected anomalies to the corresponding time period and workstation of the process curve; S5. Combine the real-time status of the process curve to make the final judgment on defects. Specifically, when sporadic random abnormalities match the normal fluctuations of the process, they are judged as differences in the natural texture of the pastry. When batch clustering anomalies match abnormal fluctuations in the process, they are identified as real texture defects and the defect type is determined. Other abnormal situations are marked as pending confirmation, triggering a re-inspection and early warning mechanism.

2. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, In step S1, the multimodal image is a multi-view texture enhancement image acquired synchronously from the same camera position, including a visible light RGB image under a diffuse dome light source, an embossed texture image under a low-angle grazing light source, and a de-highlight image from polarized light imaging; the image preprocessing includes at least one of image denoising, motion blur correction, illumination unevenness correction, and surface noise removal.

3. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, In step S1, the texture features include multi-dimensional fusion features, including contrast and energy features of the gray-level co-occurrence matrix, shallow texture features of local binary patterns, and deep semantic features extracted by a pre-trained convolutional neural network finely tuned with a pastry texture-specific dataset.

4. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, In step S2, the deviation is calculated using Mahalanobis distance or cosine similarity; the morphological features include the area of ​​the abnormal region, aspect ratio, roundness, and mean edge gradient; the individual spatial distribution features are the geometric position coordinates after normalization to the pastry body coordinate system and the distance from the abnormal region to the nearest edge of the pastry.

5. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, In step S3, a dual judgment mechanism of batch proportion + distribution entropy is adopted: when the proportion of suspected abnormal individuals with the same shape and the same normalized spatial location to the total number of batches exceeds the preset proportion, and the batch location distribution entropy is lower than the preset entropy threshold, it is judged as a batch clustered suspected abnormality; otherwise, it is judged as a scattered random suspected abnormality.

6. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, In step S4, the full-process timing data includes at least two of the following: baking temperature curve, proofing temperature and humidity, conveyor belt speed, and cooling section wind speed; the noise reduction process uses moving average filtering or Kalman filtering; based on the conveyor belt running cycle and product station dwell time, accurate time axis alignment and spatiotemporal mapping between the image spatial position and the process timing curve are achieved.

7. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, In step S5, normal process fluctuation is determined when the sampled value of the process parameter is within the upper and lower control limits obtained from the statistics of historical normal production data; abnormal process fluctuation is determined when the sampled value of the process parameter exceeds the upper and lower control limits and continues for a preset duration, or when the instantaneous change rate of the process parameter exceeds a preset threshold.

8. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, In step S5, the identifiable defect types include at least cracks, surface bubbles, collapses, and discoloration; among them, cracks are identified by matching with a standard crack morphology library, bubbles are identified by identifying near-circular high-response areas, collapses are identified by combining 3D height information, and discoloration is identified by combining multispectral band reflectivity differences.

9. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, The method also includes batch iterative optimization and workstation early warning mechanism: when multiple batches show batch clustering anomalies at the same workstation, an early warning message containing the abnormal workstation, abnormal process parameters, and maintenance suggestions is automatically output; the samples of natural texture differences confirmed by manual review are iteratively updated to the good product benchmark feature range according to preset weights to achieve dynamic adaptive optimization of the benchmark model.

10. The intelligent identification method for texture defects in baked pastries according to claim 1, characterized in that, The method also includes a re-inspection fallback and model iteration mechanism: for confirmed anomalies, a high-precision re-inspection method is adopted, such as hyperspectral imaging analysis or manual visual inspection. After the samples confirmed as defective by the re-inspection are labeled, they are included in the defective sample library for continuous iteration and optimization of the recognition model accuracy.