Daily ceramic multi-defect identification and grading method

By combining multimodal image acquisition and deep learning recognition models with feature fusion layers and calibration steps, the problems of insufficient identification of hidden defects and low automation in the inspection of daily-use ceramics have been solved, achieving efficient and accurate multi-defect identification and grading, which is suitable for large-scale production.

CN122175925APending Publication Date: 2026-06-09SHENBEI VISION TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENBEI VISION TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-03-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively identify highly reflective hidden defects, such as pores and glaze bubbles, in the inspection of daily-use ceramics. The accuracy of the identification algorithms is insufficient, and the automation level of the inspection process is low, failing to meet the needs of large-scale production.

Method used

Employing multimodal image acquisition technology, combined with diffuse reflection, direct surface lighting, and low-angle strip lighting schemes, a deep learning recognition model is used to collaboratively identify multiple defects, and to achieve automated flipping and grading. A dual-branch convolutional neural network is used to process images with different optical principles, and a feature fusion layer and calibration steps are introduced to improve detection accuracy and efficiency.

Benefits of technology

It achieves high coverage identification and high-precision classification of various defects, improves the automation and stability of detection, adapts to the cycle time requirements of large-scale production, and reduces labor costs and false judgment rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175925A_ABST
    Figure CN122175925A_ABST
Patent Text Reader

Abstract

The application discloses a kind of daily ceramic multi-defect identification and grading method, belong to daily ceramic automation detection technical field.The method is aimed at the problem of few defect detection types, low accuracy, insufficient automation of prior art, its gist is that: first, multiple detection stations and the special lighting scheme matched with it are used to collect multiple images of tableware surface;Then the multiple images are input into the pre-trained deep learning recognition model for collaborative identification, and the defect type result is output;Finally, according to the recognition result and the preset rule, the quality grade is determined, and automatically sorted into the corresponding output channel.The application is mainly used to realize the comprehensive, accurate and efficient automation detection and grading of multi-class defects of daily ceramic tableware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated inspection technology for daily-use ceramics, and more specifically, to a method for identifying and classifying multiple defects in daily-use ceramics. Background Technology

[0002] As daily necessities, the surface quality of ceramic tableware directly affects safety, aesthetics, and brand reputation. Traditional manual visual inspection has long been dominant, but it has significant limitations. Inspectors are prone to visual fatigue under high-intensity, repetitive labor, leading to low efficiency and poor stability. More importantly, manual judgment standards are difficult to standardize, heavily influenced by individual experience and condition. Qualitative and quantitative judgments of defects are highly subjective, easily resulting in misjudgments and omissions, making it difficult to guarantee consistent product grading, and overall, labor costs remain high.

[0003] To improve efficiency, the industry has begun exploring automated inspection technologies based on machine vision. However, existing solutions still face a series of technical challenges in practical applications. First, at the optical imaging level, the surface of ceramic tableware, especially white glaze, has high reflectivity and brightness. Existing inspection equipment mostly uses fixed-angle, single-type illumination methods (such as ordinary front light or ring light), which are difficult to handle simultaneously with diverse defect features. It may be effective for macroscopic defects such as cracks and deformations, but for latent three-dimensional defects such as pores, glaze bubbles, and pinholes, which have extremely low contrast with the substrate or depend on specific optical angles to appear, the excitation effect is insufficient, resulting in weak image features that are difficult to capture effectively. How to construct an optical imaging system that can specifically highlight various physical defects is the primary technical bottleneck.

[0004] Secondly, at the defect recognition algorithm level, even with multi-angle images, existing methods typically employ traditional image processing algorithms or relatively basic machine learning models. These methods are sensitive to changes in image quality and lighting conditions, have limited feature extraction capabilities, and are particularly difficult to reliably segment and identify subtle defects with inconspicuous features from complex backgrounds and noise. Furthermore, processing all types of defects with a single model can easily lead to feature interference within the model itself, resulting in generally low accuracy in identifying latent defects and failing to meet the requirements for high-precision classification.

[0005] Finally, at the level of system integration and automation, a complete inspection process needs to cover both sides of the tableware. Existing solutions often lack efficient automated flipping mechanisms, relying on manual intervention to achieve flipping, which disrupts the continuity of the inspection line and severely restricts the improvement of overall inspection efficiency, failing to meet the high-speed requirements of modern large-scale production. Therefore, developing an integrated inspection technology capable of covering multiple types of defects, achieving high-precision identification, and completing fully automated flow and grading is a pressing technical challenge for the daily-use ceramics manufacturing industry. Summary of the Invention

[0006] One objective of this invention is to address the systemic challenges in the inspection of daily-use ceramics. Existing technologies have limited defect detection capabilities, particularly struggling to detect highly reflective, hidden defects such as pores and glaze bubbles; the accuracy of identification algorithms is insufficient to meet the demands of high-precision grading; and the inspection process suffers from low automation, relying on manual turning and sorting, resulting in low efficiency and inability to adapt to the pace of large-scale production. This invention proposes an integrated method aimed at achieving comprehensive coverage of multiple defect types, high-accuracy identification, and fully automated, efficient grading.

[0007] To achieve the above objectives, the present invention provides a method for identifying and classifying multiple defects in daily-use ceramics, comprising the following steps: Step S1, Multimodal Image Acquisition: The daily-use ceramic tableware to be inspected is sequentially passed through multiple preset inspection stations; at each inspection station, according to the target defect type of the inspection station, a special lighting scheme matching the target defect type is used to illuminate the surface of the tableware, and a surface image under the lighting conditions is acquired; wherein, the special lighting scheme includes at least diffuse reflection lighting for eliminating reflection to highlight color difference defects, direct surface lighting for highlighting structural defects by utilizing reflection differences, and low-angle strip lighting for highlighting latent three-dimensional defects by utilizing low-angle shadow effects; through multiple inspection stations, multiple surface images of the same tableware under different feature excitation conditions are acquired; Step S2, Multi-defect Collaborative Recognition: The multiple surface images are input into a pre-trained deep learning recognition model; the deep learning recognition model is trained based on a sample set of ceramic tableware images containing multiple defects, and an attention mechanism for focusing on latent defect features is constructed; the deep learning recognition model performs parallel processing and feature fusion on the input multiple images, and outputs the recognition result of the defect types present on the tableware, the defect types including at least pores, glaze bubbles, mud residue, glaze defects, cracks and deformation; Step S3, Automated Comprehensive Grading: Based on the identification results of the defect type and the preset defect level judgment rules, the tableware is judged for quality level; then, according to the judged quality level, the tableware is automatically sorted to the corresponding level output channel.

[0008] Preferably, in step S1 of the present invention, the diffuse reflection lighting is provided at the detection station by an illumination box enclosed by a diffuser plate, and a strip light source is installed on the side wall of the box. The light is scattered by the diffuser plate to form a uniform diffuse light field. The direct surface lighting is provided by a surface light source, and the normal direction of its light-emitting surface is set at an angle of 30° to 60° with the normal direction of the surface of the tableware being tested. The low-angle strip lighting is provided by a strip light source, the length direction of which is parallel to the conveying direction, and the light-emitting surface of which is set at an angle of 0° to 10° with the horizontal plane where the surface of the tableware being tested is located.

[0009] Preferably, step S1 of the present invention involves acquiring images through multiple detection stations, specifically including: allowing the tableware to pass sequentially through a first group of detection stations and a second group of detection stations along a conveying path; at the first group of detection stations, using at least two different specialized lighting schemes to acquire images of the first surface of the tableware; subsequently, between the first and second groups of detection stations, automatically flipping the tableware 180° so that its second surface faces the second group of detection stations; at the second group of detection stations, using specialized lighting schemes of the same type, number, and order as those at the first group of detection stations to acquire images of the second surface of the flipped tableware; wherein, the lighting scheme of each station in the second group of detection stations is the same as the lighting scheme of the stations in the first group of detection stations corresponding to the conveying order.

[0010] To address the problem that existing single models struggle to efficiently process and fuse multi-source image information originating from different physical principles, the deep learning recognition model in step S2 of this invention is preferably a dual-branch convolutional neural network. The first branch processes images from the diffuse lighting and direct surface lighting stations, extracting general defect features related to color difference and macroscopic structural deformation. The second branch specifically processes images from the low-angle strip lighting station, extracting latent defect features related to microscopic three-dimensional deformation through optimized convolutional and pooling layers. The deep learning recognition model uses a feature fusion layer to perform channel attention-weighted fusion of the feature maps extracted by the two branches, assigning a higher fusion weight to the features output by the second branch, so that the model prioritizes latent defect features in its overall decision-making.

[0011] To optimize the internal efficiency and feature extraction specificity of the general feature branch in the dual-branch network, preferably, the first branch of the present invention includes a shared feature extraction backbone network for simultaneously processing the diffuse lighting image and the direct surface lighting image; the shared feature extraction backbone network includes a first convolutional module, a second convolutional module, and a third convolutional module connected in sequence; the first convolutional module is used to extract color difference and speckle features in the diffuse lighting image; the second convolutional module is used to extract reflective deformation and edge contour features in the direct surface lighting image; the third convolutional module receives and fuses feature maps from the first two modules, and outputs the general defect features.

[0012] To address the specific algorithmic challenge of stably extracting weak, scale-variable shadow features from low-angle illumination images, the second branch of this invention preferably includes the following optimized convolutional and pooling layers: at least one dilated convolutional layer, used to increase the receptive field while maintaining feature map resolution to capture continuous, large-span, subtle shadow features generated by low-angle illumination; and an adaptive pooling layer connected after the dilated convolutional layer, whose pooling window size is dynamically adjusted according to the scale of the activated region in the input feature map to focus on local shadow patterns generated by bubbles or bumps of different sizes.

[0013] To address the problem that simple fusion methods cannot assess the differences in importance among different feature sources, the feature fusion layer of this invention preferably performs channel attention-weighted fusion, specifically including: performing global average pooling on the general defect feature map output from the first branch and the latent defect feature map output from the second branch, respectively, to generate their respective channel description vectors; inputting the two channel description vectors into a shared small fully connected neural network, which outputs a fusion weight vector; weighting and enhancing each channel of the feature map output from the second branch according to the fusion weight vector, and then concatenating the channels with the feature map output from the first branch; wherein, the small fully connected neural network is trained to ensure that, in most cases, the average weight assigned to the feature map of the second branch is higher than the average weight assigned to the feature map of the first branch.

[0014] Preferably, the small fully connected neural network of the present invention is constrained during training, specifically by introducing an asymmetric regularization penalty term into the total loss function of the deep learning recognition model; the regularization penalty term is calculated as follows: Among them, w i (s) and w i (g)These represent the weight components of the i-th channel in the fusion weight vector corresponding to the second branch and the first branch, respectively. C is the total number of channels, α is the regularization coefficient, and β is the preset weight difference threshold. The design of the penalty term Lreg ensures that during training, when the average channel weight of the second branch is not significantly higher than that of the first branch (i.e., the difference is lower than the threshold β), an additional loss will be generated, thereby driving the optimization algorithm to adjust the network parameters and ultimately satisfy the constraints.

[0015] To optimize the model's identification path and decision logic for multiple types of defects and address the issues of feature confusion and ambiguous decision boundaries that easily arise when all defects are flattened, preferably, in step S2 of this invention, the deep learning identification model identifies defect types according to a preset classification hierarchy: First, the model performs a first-level classification, determining the identified defects into one of three categories: macroscopic morphological defects, surface texture defects, or microstructural defects; wherein, the macroscopic morphological defect category includes at least deformation and cracks; the surface texture defect category includes at least mud residue and spots; and the microstructural defect category includes at least pores, glaze bubbles, and pinholes; subsequently, within the determined categories, the model performs a second-level classification to further identify the specific defect type.

[0016] To address the challenge of scientifically and consistently mapping complex, multi-dimensional defect identification results to a finite quality level, the present invention preferably uses a pre-defined rule base for quality level determination in step S3. This rule base includes at least: a defect priority mapping table, where defect types affecting structural safety are defined as critical defects, and defect types affecting aesthetics but not significantly impacting usability are defined as secondary defects, with each defect type assigned an initial priority score; multi-defect combination judgment logic, used to determine a final quality level based on the type, quantity, size, and spatial distribution of all defects, using the priority mapping table and weighted calculations or logical judgment rules when more than one type of defect is identified on the same tableware; and configurable level thresholds, defined as multiple level ranges associated with the final quality score or judgment result. The quality level determination step specifically involves: querying the defect priority mapping table to obtain basic information based on the identified defects, then performing calculations or reasoning through the multi-defect combination judgment logic to obtain a judgment result, and finally determining the final quality level of the tableware based on the level threshold range into which the judgment result falls.

[0017] To address the issue of slow performance degradation in detection systems due to long-term operation and environmental changes, such as light source attenuation and mechanical drift, the present invention preferably includes a calibration step performed at a preset cycle or upon startup. This calibration step is executed by a calibration control unit: a composite geometric calibration component is placed on a conveyor belt tray. The surface of the calibration component is divided into a diffuse reflection area, a specular highlight area, and a micro-texture area containing a micro-convex array, used to comprehensively simulate various surface features of tableware; the calibration component is driven to sequentially pass through each detection station, pausing at each station; at the diffuse reflection and direct surface light stations, a camera acquires images of the calibration component, and the calibration control unit calculates the grayscale uniformity variance of the diffuse reflection area and the overexposed pixel ratio of the specular highlight area, respectively. If the variance or ratio exceeds the threshold, the pulse width modulation duty cycle of the light source at that station is automatically adjusted first, and the exposure time and gain of the camera are adjusted in conjunction, and iterative adjustments are made until the index meets the standard. At the low-angle strip light illumination station, the camera acquires images of the micro-texture area of ​​the calibration part, and the calibration control unit calculates the contrast and edge sharpness of the micro-convex shadow. If they are below the threshold, the angle between 0° and 10° of the strip light source is adjusted by the electronically controlled rotary table, and the camera focal length is adjusted simultaneously to optimize the shadow imaging quality. All adjustment parameters and the final calibration image are saved as reference data for comparison in the next calibration cycle.

[0018] To address the issue of missed defects in white ceramics and other materials due to poor imaging quality in highlight and shadow areas, the present invention preferably includes a multi-source image optimization and fusion step executed by an AI processing unit between steps S1 and S2. This step specifically includes the following technical steps: S131, Multi-view image spatial registration: Using the tableware contour feature points and pre-calibrated transformation matrices between cameras at each detection station, affine transformations are performed on multiple surface images of the same tableware to achieve spatial alignment; S132, Pixel-level source image quality assessment: For each pixel position (x, y) in the registered image, two quality indicators are calculated in the i-th source image: Local signal-to-noise ratio (SNR)_i(x, y), obtained by calculating the ratio of signal variance to noise variance in the pixel's neighborhood, where the noise variance is obtained through the image flat area... Domain estimation; local gradient significance Grad_i(x,y), obtained by calculating the gradient magnitude after processing by the Sobel operator at this pixel; S133, region segmentation based on brightness and gradient: Analyze multiple registered images, and segment the tableware surface into three mutually exclusive regions based on the brightness values ​​and gradient distribution of the pixel set: Specular highlight saturation region R_highlight: In any source image, the pixel brightness value is greater than a preset high threshold; Shadow low illumination region R_shadow: In all source images, the pixel brightness value is lower than a preset low threshold; Rich texture detail region R_texture: Regions that do not belong to the above two regions, and whose maximum gradient significance max(Grad_i(x,y)) The image weight exceeds the preset texture threshold; S134, Region Adaptive Fusion Weight Calculation and Image Synthesis: For pixels within the R_highlight region, the fusion weight W_i(x,y) is inversely proportional to the brightness value I_i(x,y) of the source image i at that pixel, meaning the more saturated the image, the lower the weight; for pixels within the R_shadow region, the fusion weight W_i(x,y) is directly proportional to I_i(x,y), meaning the higher the brightness, the higher the weight; for pixels within the R_texture region, the fusion weight W_i(x,y) is directly proportional to Grad_i(x,y), meaning the clearer the texture, the higher the weight; The weights of all pixels are normalized so that for any position (x,y), the sum of all weights is 1; Finally, the weights are calculated using the formula I_fused(x,y) = Σ[ W_i(x,y) × I_i(x,y)]. S135. Calculate and generate an optimized fused image; S135. Output the fused image: Input the optimized fused image, together with the main source image identifier used to generate it, into the deep learning recognition model to participate in defect recognition.

[0019] The beneficial effects of the present invention include at least the following aspects: First, this invention enhances the coverage and capability of defect detection. By employing diffuse reflection, direct surface lighting, and low-angle striped lighting schemes, and symmetrically deploying them in a double-sided inspection process, a multimodal optical excitation system is constructed. This technique allows various defects that were previously difficult to detect under a single light source to be specifically highlighted under a specific light field. Diffuse reflection effectively suppresses high reflectivity interference and highlights color difference defects; low-angle light, through the shadow effect, visualizes minute three-dimensional deformation defects. The direct result is that the system can stably identify more than ten types of defects, including pores and glaze bubbles, significantly expanding the coverage of defect types and providing a foundation for comprehensive classification.

[0020] Secondly, this invention significantly improves the accuracy and intelligence of defect identification. The constructed dedicated deep learning identification model does not simply process images, but rather uses a dual-branch structure to process images based on different optical principles, and employs an attention mechanism to weightedly fuse features, making the model more focused on hard-to-detect hidden defects. Simultaneously, the hierarchical classification strategy reduces the complexity of identification. This, in turn, enhances the algorithm's ability to distinguish complex defect features and its sensitivity to weak signals (such as light-colored defects), thereby improving the overall accuracy of the identification results and reducing false positives and false negatives.

[0021] Furthermore, the efficiency and automation level of the overall inspection process of this invention are substantially improved. By integrating an automatic flipping station, a continuous inspection station, and an automatic grading execution mechanism based on a rule base, a fully automated closed loop from material loading to double-sided inspection, judgment, and sorting is achieved. This series of technical means eliminates the manual flipping and judgment steps on the production line, and its direct effect is to significantly improve the continuity and processing speed of the inspection line, enabling it to adapt to the cycle time requirements of large-scale production, while reducing labor costs and reliance on personnel experience.

[0022] Furthermore, the long-term operational stability and reliability of this invention have been enhanced. The introduced periodic automated calibration step can proactively monitor and correct changes such as light source attenuation and mechanical drift, maintaining optimal imaging conditions at each station. The image optimization and fusion step, from the information preprocessing level, integrates the advantages of multi-source images through an adaptive weighting strategy, reducing the loss of defect information in overexposed or underexposed areas of a single image. These factors collectively ensure that the system maintains stable performance during long-term operation and in complex imaging scenarios, avoiding a decline in detection quality due to fluctuations in equipment status or product characteristics.

[0023] Other advantages, objectives and features of the present invention will become apparent in part from the following description, and in part from those skilled in the art through study and practice of the invention. Attached Figure Description

[0024] Figure 1 This is a flowchart of the method for identifying and classifying multiple defects in daily-use ceramics according to the present invention; Figure 2 This is a flowchart of the branch data flow and feature fusion layer in the deep learning recognition model of the present invention; Figure 3 This is a flowchart of the multi-source image optimization and fusion process of the present invention; Figure 4 This is a schematic diagram of the geometric calibration component of the present invention; Among them, diffuse reflection area 1; specular highlight area 2; microtexture area 3. Detailed Implementation

[0025] The present invention will be further described in detail below with reference to examples, so that those skilled in the art can implement it based on the description.

[0026] It should be understood that terms such as “having,” “comprising,” and “including” as used herein do not exclude the presence or addition of one or more other elements or combinations thereof.

[0027] It should be noted that, unless otherwise specified, the experimental methods described in the following implementation plan are all conventional methods, and the reagents and materials described are all commercially available unless otherwise specified.

[0028] like Figure 1 and 2As shown, the present invention discloses a method for identifying and grading multiple defects in daily-use ceramics based on deep learning, and its specific implementation process is as follows. The overall layout of the inspection line includes a horizontally installed conveyor belt. A feeding device is provided at the beginning of the conveyor belt, and a grading output channel is connected at the end. Twelve inspection stations are arranged sequentially along the forward direction of the conveyor belt, of which the first six stations are used for inspecting the back of the tableware, and the last six stations are used for inspecting the front. An automatic flipping mechanism is provided between the sixth and seventh stations, and a grading execution mechanism is provided after the twelfth station. An industrial camera is installed above each inspection station. The camera can be a model with a resolution of 25 million pixels and a frame rate of not less than 30 frames per second, and is connected to the back-end AI processing unit via gigabit Ethernet. The lighting scheme is configured according to the function of the station: diffuse reflection lighting is used in the first and seventh stations. This station is equipped with a lighting box surrounded by a milky white diffuser plate. Strip LED light sources are installed on the side wall of the box. The light is scattered by the diffuser plate to form a uniform and soft diffused light field. Direct surface lighting is used at the second and eighth stations. LED flat panel lights can be used as the surface light source, with the center normal of the light-emitting surface installed at a 45° angle to the normal of the surface of the tableware being measured on the conveyor belt. This angle can be adjusted within the range of 30° to 60°. Low-angle strip lighting is used at the fourth, tenth, eleventh, and twelfth stations. High-brightness LED strip lights can be used as the strip light source, with their length parallel to the direction of the conveyor belt. The light-emitting surface is installed at a 5° angle to the horizontal plane of the tableware being measured, and this angle can be finely adjusted within the range of 0° to 10°. All light sources are driven by independent programmable controllers, and the brightness can be adjusted via pulse width modulation.

[0029] One workflow is as follows: Tableware is placed on a dedicated tray on a conveyor belt and moves at a constant speed, either manually or robotically. When the tableware enters the first to sixth inspection stations, cameras at each station are simultaneously triggered under corresponding lighting conditions, capturing six surface images of the back of the tableware. After back-side inspection, the tableware enters a flipping station. Once detected by a photoelectric sensor, a pneumatic gripper smoothly picks it up and flips it 180° within less than 2 seconds, placing it back on the tray with the front facing up. The tableware then enters the seventh to twelfth inspection stations, where six surface images of the front are captured in the same order and lighting configuration. Throughout the process, each image is accompanied by a station number and timestamp information and is transmitted in real-time to the AI ​​processing unit via a network. The AI ​​processing unit uses an industrial computer equipped with a GPU, running a deep learning recognition model based on a dual-branch structure of a convolutional neural network. This model has been trained using a dataset containing over 100,000 labeled samples, employing cross-validation and data augmentation strategies during training. After receiving twelve images, the model first performs normalization and size alignment preprocessing. Then, two branches extract features under different lighting conditions, and the feature fusion layer makes a comprehensive judgment. Finally, it outputs a list of defect types, which includes the defect name and its location confidence in the image.

[0030] The defect identification results are then sent to the grading decision module. This module has a built-in rule base where a defect priority mapping table defines cracks and glaze defects as critical defects with an initial priority score of 10; and defines pores, glaze bubbles, and mud residue as secondary defects with an initial priority score of 5. The multi-defect combination judgment logic uses a weighted summation algorithm. When multiple defects appear on the same piece of tableware, the system calculates a comprehensive deduction based on the defect type, quantity, size, and distribution location. Configurable grade thresholds correspond to six quality levels; for example, a total deduction of 0-2 points is considered excellent, 3-10 points is considered first-class, and so on. After calculating the final grade, the decision module sends an instruction to the grading execution mechanism. The grading execution mechanism can be a rotary lever-type or pneumatic pusher-type sorter. When the tableware arrives at the sorting port, the corresponding mechanism moves, guiding the tableware into the designated collection box. After sorting, the system records all detection data for the tableware and stores it in the database for subsequent querying and statistical analysis.

[0031] Existing technologies typically employ single-source illumination and simple image processing algorithms, capable of identifying only a few obvious defects, and rely on manual flipping and grading. This implementation method, by configuring a multi-station specialized lighting scheme, specifically excites the optical characteristics of different defects, and combines a deep learning model for multi-image collaborative analysis. This enables the simultaneous detection of multiple defect types, including latent defects, achieving fully automated double-sided detection and grading, thus improving the comprehensiveness, accuracy, and overall efficiency of the detection.

[0032] Furthermore, in another embodiment, in step S1, to achieve diffuse reflection lighting, a square frame made of aluminum alloy profile can be installed at the inspection station. The frame can be covered with a milky white polycarbonate diffuser plate to form an illumination box. An LED strip light source can be installed on each of the four sides inside the box. The wavelength of the light source can be selected as white light around 6000K, and the power of each light source can be selected between 20 watts and 40 watts. The box can be completely covered below the industrial camera lens. The bottom of the box is open, with the opening slightly larger than the outer contour of the tableware to be inspected, so that the surface of the tableware is completely within the diffuse light field inside the box when it passes through. To achieve direct surface lighting, a rectangular LED panel can be used as the surface light source, and its size can be selected according to the size of the tableware, for example, 300 mm × 300 mm. The panel can be mounted on one side of the inspection station using an adjustable bracket with an angle scale. The angle between the center normal of its light-emitting surface and the normal of the surface of the tableware being measured on the conveyor belt can be manually adjusted and locked within the range of 30° to 60°. In this embodiment, it is preferred to adjust and fix it at 45°. The vertical distance from the light source to the tableware surface can be selected between 300 mm and 500 mm. To achieve low-angle strip lighting, a high-density LED strip light source with a length of approximately 500 mm can be used. This light source is mounted on a bracket with a precision rotating table, ensuring that its length is strictly parallel to the direction of the conveyor belt. The angle between its light-emitting surface and the plane of the conveyor belt (i.e., the horizontal plane where the tableware surface is located) can be finely adjusted within the range of 0° to 10° using the rotating table. In this embodiment, it is preferred to set it to 5°. The strip light source can be installed very close to the side of the conveyor belt, and the height of the center line of its light-emitting surface from the tableware surface can be selected between 10 mm and 30 mm to create a grazing illumination effect.

[0033] During operation, as the tableware enters the diffused lighting station via conveyor belt, multiple strip light sources inside the cabinet are simultaneously illuminated. The light is scattered multiple times by the diffuser plate, forming a soft, uniform, and non-directional light field. The original high reflectivity of the tableware surface is suppressed, presenting a matte texture. At this point, the industrial camera is triggered to capture images. In the captured images, defects with slight color differences from the substrate, such as dirt or light-colored spots, can show higher contrast due to the differences in surface reflectivity. In the direct-lighting station, high-brightness LED panel light directly illuminates the tableware surface at a specific angle, forming a distinct highlight band on the smooth glaze. When there is surface deformation or missing glaze or cracks at the edges, the shape and continuity of the highlight band will be distorted or interrupted. These features are clearly captured by the synchronously triggered camera. In the low-angle strip lighting station, light rays almost parallel to the surface sweep across the tableware. Any tiny glaze bubbles, bumps, or pinholes will cast long, thin shadows on the downstream side due to their height variations, while the flat areas have uniform brightness. The images captured by the camera can significantly highlight these shadow features.

[0034] Using a single, fixed-angle, indiscriminate illumination method is insufficient to simultaneously meet the detection requirements for chromatic aberration, reflective distortion, and microscopic three-dimensional defects. This implementation method constructs three differentiated illumination environments—diffuse reflection, directional surface lighting, and grazing stripe lighting—and specifies the light source type, mounting structure, and key angle parameters, providing the camera with highly targeted imaging conditions. This allows defects based on different physical principles to be elicited by their most sensitive optical methods, thereby improving the effectiveness and specificity of image information at the source.

[0035] Furthermore, in another embodiment, the conveyor belt in the equipment can be a synchronous belt conveyor line, whose operating speed can be adjusted within the range of 2 to 5 meters per minute according to the production cycle. Twelve independent inspection stations can be arranged sequentially along the conveyor belt's running direction. These stations can be functionally divided into a first group of inspection stations (stations 1 to 6) and a second group of inspection stations (stations 7 to 12). An automatic flipping station can be installed between the first and second groups of inspection stations. This flipping station can include a robotic arm driven by a servo motor, with a clamp equipped with a vacuum suction cup or flexible gripper at the end of the arm. A pair of through-beam photoelectric sensors can be installed at the position on the conveyor belt corresponding to the flipping station to detect whether the tableware tray is in place. The actions of the industrial cameras, light sources, and flipping mechanisms at all stations are coordinated and controlled by a central programmable logic controller (PLC) and a host industrial control computer to ensure timing synchronization.

[0036] During the process, the tableware to be inspected first enters the first set of inspection stations via a conveyor belt. When the tableware tray triggers the photoelectric sensor at the first station, the PLC controls the light source at that station to illuminate according to a preset program, and the corresponding camera captures the first image of the back of the tableware. The tableware continues to move forward, passing through stations 2 to 6 of the first group in sequence. The trigger-lighting-capture process is repeated at each station, thus completing the image acquisition under all six specific lighting conditions for the back of the tableware. When the tableware leaves the sixth station and reaches the flipping station, the photoelectric sensor detects a signal, and the PLC immediately controls the conveyor belt to pause (or slow down), while simultaneously instructing the gripper of the robotic arm to clamp the edge of the tableware. Subsequently, the robotic arm performs a preset 180-degree flip, and the entire flipping process can be controlled within 2 seconds. After flipping, the robotic arm accurately places the tableware back onto the original tray, the conveyor belt resumes operation, and the tableware enters the second set of inspection stations with its front facing up. In the second set of inspection stations, the types, number, and order of lighting schemes are exactly the same as in the first group. For example, the seventh station uses diffuse lighting, just like the first station; the eighth station uses direct surface lighting, just like the second station; and so on. The tableware passes through each station in the second group in the same manner, completing the acquisition of all front-facing images. This process ensures that both sides of the tableware are inspected sequentially under completely consistent, paired detection conditions.

[0037] If the tableware is flipped manually, it must be returned to the same workstation for a second inspection after one side is inspected, which is inefficient and makes it difficult to ensure consistency of inspection conditions between the two inspections. This implementation method designs two sets of inspection workstations that are strictly symmetrical in terms of lighting scheme, and integrates an automatic flipping mechanism between them, thus constructing a continuous, manual-free double-sided inspection production line. This method not only automates the flipping action, but more importantly, it ensures that the inspection stimulus (lighting conditions) and imaging angle experienced by both sides of the tableware are consistent, thereby eliminating the misjudgment variables introduced by different inspection conditions.

[0038] Furthermore, in another implementation, such as Figure 2 As shown, in step S2, the deep learning recognition model deployed within the AI ​​processing unit can be built based on the PyTorch or TensorFlow framework, with a core of a two-branch convolutional neural network. The input layer of the first branch can receive images from diffuse lighting and direct surface lighting stations. These two types of images are scaled to a uniform size before input, for example, 1600 pixels × 1600 pixels. This branch can contain a shared feature extraction backbone network, such as a lightweight convolutional neural network architecture containing five convolutional layers and three max-pooling layers, used to extract general defect features related to color difference, spots, and macroscopic structural deformation from the two types of images. The input layer of the second branch specifically receives images from low-angle striped lighting stations, using the same preprocessing size. The network structure of this branch can be specially optimized, with its front end containing a dilated convolutional layer with a dilation rate of 2, followed by an adaptive average pooling layer, specifically used to extract latent defect features related to microscopic three-dimensional deformations such as glaze bubbles and pores from shadow images generated by low-angle lighting. The feature maps output from the two branches are integrated through a feature fusion layer that implements a channel attention weighted fusion mechanism. It contains a fully connected layer to generate a fusion weight vector and is designed to assign higher fusion weight coefficients to feature maps from the second branch, for example, by initializing biases or introducing constraints.

[0039] The deep learning recognition model's operation begins with data loading. When multiple images of tableware are fed into the model, the system first automatically routes them to the corresponding branch based on the workstation number information attached to each image. The backbone network of the first branch performs convolution, activation, and pooling operations on the input diffuse and surface-lit images, progressively extracting and fusing their texture and shape features, ultimately outputting a general defect feature map containing 256 channels. Simultaneously, the second branch processes the low-angle-lit image; its dilated convolutional layers expand the receptive field without reducing resolution, effectively capturing continuous patterns of subtle shadows. Subsequently, adaptive pooling layers focus on these activation regions, outputting a latent defect feature map containing 128 channels. These two feature maps are then fed into the feature fusion layer. This layer first performs global average pooling on the two feature maps to obtain two one-dimensional channel description vectors. Then, these two vectors are concatenated and a weight distribution vector is calculated through a small fully connected network with 16 neurons. Finally, based on this vector, the gain of each channel of the feature map of the second branch is amplified, and then concatenated with the feature map of the first branch in the channel dimension to form the final fused feature representation, which is used by the subsequent fully connected classification layer to determine the defect type.

[0040] Using a single convolutional network to process all images, or simply superimposing images from different light sources, fails to distinguish the differences in defect characteristics revealed by different imaging principles. This implementation constructs a dual-branch network structure with clearly defined functions and designs a weighted feature fusion layer. This allows the model to address macroscopic and microscopic defect features using different internal processing strategies, and to systematically prioritize more difficult-to-detect latent defects during decision-making. This structured model design enables the information extracted from multi-source images to be used more effectively and purposefully, thereby improving the model's overall ability to identify and distinguish defects with different characteristics. This is the key algorithm design for achieving high-precision multi-defect collaborative identification.

[0041] Furthermore, in another implementation, the shared feature extraction backbone network in the first branch can be constructed using a modular design. This backbone network can consist of three sequentially connected convolutional modules. The first convolutional module can be designed to extract chromatic aberration and speckle features from diffusely lit images. Its structure can include two convolutional layers with a kernel size of 3×3 and channels of 64 or 128. Each convolutional layer can be followed by a ReLU activation function and a batch normalization layer, and finally by a max-pooling layer with a stride of 2. The second convolutional module can be designed to extract reflective deformation and edge contour features from directly lit images. Its structure can be similar to the first module, but the kernel size can be adjusted to 5×5 to obtain a larger receptive field, and the number of channels can be set to 128 or 256. The third convolutional module serves as a feature fusion and re-extraction module, receiving feature maps output from the first two modules as input. In implementation, the feature maps output from the first two modules can be concatenated along the channel dimension and then input into the third convolutional module. The third module can contain a 1×1 convolutional layer for dimensionality reduction and feature fusion, followed by two 3×3 convolutional layers for deep feature extraction, ultimately outputting a general defect feature map with 512 channels. These modules can all be implemented using standard layers from existing deep learning frameworks.

[0042] In the deep learning recognition model, when diffuse reflection images and direct-light images are input into the first branch, the system copies them into two data streams. The first data stream enters the first convolutional module, undergoing continuous convolution and nonlinear transformations. Its output feature map primarily retains information related to subtle changes in color and texture, which is crucial for identifying defects such as mud and blemishes. The second data stream simultaneously enters the second convolutional module, whose larger convolutional kernel helps capture the contours and continuity of bright and dark areas formed by reflections in the image. The output feature map of this module is more sensitive to structural anomalies such as edge cracks and deformations. Subsequently, these two feature maps from different sources and with different focuses are simultaneously fed into the third convolutional module. This module first compresses and performs preliminary interaction on the concatenated high-dimensional features through 1×1 convolutions, and then learns the correlation between the two types of features through deeper convolutional layers, extracting more discriminative fused features. Finally, the feature map output from the third module is a general defect feature representation that integrates color difference information and macroscopic deformation information.

[0043] Existing solutions often use the same set of convolutional kernels for indiscriminate feature extraction when processing images from different light sources, or only perform channel overlay processing, failing to fully consider the physical differences in defects revealed by different light sources. This implementation clearly delineates two front-end sub-modules within a shared backbone network. These sub-modules perform preliminary but focused extraction of chromatic aberration features from diffuse reflection images and deformation features from area-lit images, respectively. A back-end fusion module then performs advanced feature integration. This division-of-labor, collaborative network structure enables the network to learn the features most relevant to specific imaging conditions more efficiently, avoiding feature confusion and thus improving the efficiency and representational ability of extracting general defect features from mixed image sources.

[0044] Furthermore, in another implementation, in the second branch, the optimized convolutional and pooling layers can be configured with specific structures and parameters. The dilated convolutional layer can have a dilation rate of 2 or 3, a kernel size of 3×3, and 128 output channels. This layer can be implemented using the standard dilated convolution function in deep learning frameworks, and its padding method can be set to the same padding to maintain the feature map spatial size. The adaptive pooling layer is connected after the dilated convolutional layer and can be either adaptive average pooling or adaptive max pooling. Its output size can be set to a small fixed value, such as 7×7 pixels, which ensures that the output remains consistent regardless of the size of the input feature map, thereby focusing on the local shadow patterns produced by bubbles or bumps of different sizes. These network layers can be stacked sequentially, with ReLU activation functions and batch normalization layers inserted between them to improve training stability. All these components can be readily available modules from current mainstream deep learning libraries.

[0045] In the deep learning recognition model, when the image from the low-angle striped lighting station is input into the second branch, it first undergoes preliminary feature extraction through several basic convolutional layers. Subsequently, the data flows into the dilated convolutional layer. Due to its dilated structure, this layer expands the receptive field without increasing the number of parameters, effectively capturing the subtle and continuous shadow stripe features that may span tens of pixels produced by low-angle lighting on the surface of tableware. This is particularly important for identifying fine cracks or glaze flow patterns. Next, the feature map is fed into an adaptive pooling layer. This layer dynamically downsamples the feature map to a target size based on the scale of the activated regions (i.e., areas that may contain defects) in the current feature map. For example, for a large glaze bubble shadow area, the pooling window automatically adjusts to preserve its overall shape; for multiple scattered small pore shadows, the pooling operation focuses on their respective key local information. After this processing, the output feature map retains the key shadow spatial information and has a fixed size that facilitates subsequent fully connected layer processing.

[0046] Existing solutions typically use conventional convolutional layers and fixed-size pooling layers when processing images with such special lighting conditions. Conventional convolutional layers have limited receptive fields for small and weak shadow features, while fixed-size pooling layers may cause compression loss of defect information of varying sizes. This implementation enhances the ability to capture long-range, weak shadow patterns by specifically employing dilated convolutional layers and dynamically adapting to different defect size variations using adaptive pooling layers. This allows the second branch network to extract defect features related to microscopic three-dimensional deformations from low-angle lighting images more robustly and precisely. This network layer optimization design tailored to specific image characteristics (the continuity and scale diversity of shadows) is an effective technical means to improve the ability to identify latent defects.

[0047] Furthermore, in another implementation, the specific implementation of channel attention-weighted fusion in the feature fusion layer can be constructed by combining existing deep learning layers. Global average pooling layers can be applied to the general defect feature map output from the first branch and the latent defect feature map output from the second branch, respectively. For example, if the general feature map size is [H, W, C_g] and the latent feature map size is [H, W, C_s], after pooling, two one-dimensional channel description vectors of length C_g and C_s can be obtained. These two vectors can then be concatenated into a joint vector of length (C_g + C_s) and input into a small fully connected neural network. This fully connected network can contain only one hidden layer, and the number of neurons in the hidden layer can be set to (C_g + C_s) / 8. For example, when C_g = 512 and C_s = 128, the number of neurons in the hidden layer can be set to 80, and the activation function can be ReLU. The number of neurons in the network output layer is equal to the number of channels C_s in the latent feature map. Its output is mapped to the (0,1) interval using a sigmoid activation function, forming the fused weight vector. During training, to ensure the average weight of the second branch is higher than that of the first branch, an asymmetric regularization term can be added to the loss function. This term penalizes the network when the average weight of the second branch minus the average weight of the first branch is lower than a threshold (e.g., threshold β can be set to 0.1). The network weights can be initialized using the Xavier method and trained using the Adam optimizer.

[0048] During model inference, when the feature maps from both branches are passed to the feature fusion layer, a global average pooling operation is first performed in parallel, compressing each feature map into a channel description vector in the spatial dimension. This vector represents the global activation intensity of each feature channel. Subsequently, the two description vectors are concatenated and fed into a small fully connected network. Based on the current input, this network calculates weight coefficients for each feature channel of the second branch. These coefficients represent the importance of the latent defect features contained in that channel to the final decision. Next, this weight vector is used to perform channel-wise multiplicative weighting on the latent defect feature map of the second branch, thereby enhancing the signal strength of important feature channels. Finally, the weighted latent feature map is concatenated with the unweighted general feature map in the channel dimension to form a fused feature tensor. This tensor contains both importance-calibrated latent features and all general features, and is then fed into the subsequent classifier for final defect determination.

[0049] Existing feature fusion methods often employ simple concatenation, addition, or maximum-value operations, failing to differentiate the importance of features from different sources. This implementation introduces a learnable channel attention mechanism (i.e., a small fully connected network) and intentionally guides it to assign higher weights to latent defect features during training. This allows the model to selectively focus on less noticeable but crucial defect cues when fusing information. This adaptive, asymmetric feature fusion strategy enables the model to more effectively integrate information from different branches, thereby improving the sensitivity of latent defect identification in the overall decision-making process.

[0050] Furthermore, in another implementation, during model training, the asymmetric regularization penalty term... The implementation requires specific settings for the parameters in its mathematical expression. The weight components w in the formula... i (s) and w i (g)These correspond to the portions of the fused weight vector output by the small fully connected network that are associated with the feature channels of the second and first branches, respectively. Their dimension C can be equal to the number of channels in the second branch's output feature map, for example, 128. The regularization coefficient α can be used as a hyperparameter and set before training. Its value can be selected from 0.01 to 0.1, and in this embodiment, it is preferably set to 0.05. The weight difference threshold β defines the expected degree of dominance of the second branch weights relative to the first branch weights. Its value can be selected from 0.05 to 0.2, and in this embodiment, it is preferably set to 0.1. These parameters can be hard-coded in the loss function calculation part of the training script. The hardware platform used for training can be a workstation equipped with a GPU, and the software framework can be PyTorch 2.9.0 or later, whose automatic differentiation function can be used to calculate the gradient of the regularization term with respect to the network parameters.

[0051] During operation, whenever a batch of training data completes forward propagation and the basic loss for the classification task (such as cross-entropy loss) is calculated, the system synchronously calculates the regularization penalty term. First, the fusion weight vector output by the small fully connected network is recorded during the current forward propagation process, and according to its design structure, it is split into the weight part w(s) corresponding to the second branch and the weight part w(g) corresponding to the first branch. Then, the average value w of these two parts is calculated respectively. - (s) and w - (g). Next, substitute these values ​​into the formula Lreg=α·max(0,β-(w - (s)-w - (g))) Perform the calculation. If the average weight of the second branch is not significantly higher than that of the first branch, i.e., the difference (w) - (s)-w - (g) If the value is below the threshold β, the max function will output a positive value, which is then multiplied by a coefficient α to produce an additional penalty loss Lreg. This penalty loss is added to the base loss to form the total training loss. When updating all weight parameters of the network through backpropagation, the optimizer (such as Adam) will simultaneously consider minimizing the classification error and satisfying this weight constraint, thereby gradually adjusting the parameters of the small fully connected network and even the entire model, ultimately driving the model to learn a fusion strategy that can stably assign higher importance to latent defect features.

[0052] Existing methods for training multi-branch fusion models typically rely on the data itself or employ general weight decay and sparsity regularization. These methods impose symmetric or undirected constraints on the two branches. This implementation introduces an asymmetric regularization penalty term with a clear mathematical form and sets specific threshold parameters. It explicitly and quantitatively expresses the prior domain knowledge that latent defect features should be given more importance in the training objective. This proactive guidance at the optimization objective level enables the model to more reliably learn feature fusion methods that conform to the expected importance, rather than simply relying on potentially imbalanced latent information in the training data. This is an effective training technique to ensure that the model's decision logic meets specific detection requirements.

[0053] Furthermore, in another implementation, the multidimensional decision rule base can be stored in the hard drive or memory of the AI ​​processing unit as a structured data file, for example, using JSON or XML format. The defect priority mapping table is implemented in a dictionary structure, where "cracks" and "glaze defects" are defined as critical defects, with an initial priority score of 10; "pores," "glaze bubbles," "mud residue," and "spots" are defined as minor defects, with an initial priority score of 5; and "deformation" can be further subdivided according to its degree into minor deformation (minor defect, 5 points) and severe deformation (critical defect, 10 points). The multi-defect combination judgment logic can be implemented using a weighted deduction algorithm. The calculation process can be designed as follows: First, for each identified defect, obtain its base score S from the mapping table; then, adjust its influence based on the percentage K of the defect's pixel area relative to the total area of ​​the tableware image, for example, by introducing a size factor F_size = 1 + K; simultaneously, if multiple defects of the same type exist, the quantity factor F_count can be set to the number of defects N (e.g., N=2 for 2 pieces of mud); finally, the deduction contribution value of this defect is S×F_size×F_count. For spatial distribution, a rule can be set: if two or more critical defects appear in the same stress-sensitive area (such as the edge of the plate), the total deduction is multiplied by an additional clustering factor, such as 1.5. The configurable grading thresholds define six grading ranges, for example: 0-2 points for excellent (Grade A), 3-10 points for first-class (Grade B), 11-25 points for qualified (Grade C), 26-40 points for substandard (Grade D), 41-60 points for products requiring repair (Grade E), and above 60 points for scrap (Grade F). These thresholds can be modified through a configuration file.

[0054] During operation, once the AI ​​model outputs a list of defect identification results for tableware (including defect type, location, and bounding box size), the quality grade determination module is invoked. The module first loads the rule base and then iterates through the defect list. For each item in the list, it queries the defect priority mapping table to obtain its base score S, and calculates its pixel area ratio K and quantity factor N to determine the deduction for that defect. After iteration, the system checks the location information of all defects to determine if there is a clustering of critical defects. If so, a clustering factor is applied to adjust the total deduction. Subsequently, the calculated total deduction is compared with the grade threshold range to determine the final quality grade of the tableware. For example, if the total deduction of 18 points falls within the "11-25 points" range, it is classified as Grade C (qualified). Finally, the grade code (e.g., "C") is sent to the controller of the grading execution mechanism.

[0055] Existing technologies for quality grading often rely solely on the most severe defect or a simple summation of defect counts, failing to comprehensively consider the interplay of defect type, size, quantity, and spatial distribution. This results in inaccurate grading results, potentially misclassifying products with only a single, obvious minor defect as being at the same level as those with multiple minor defects. This implementation establishes a multi-dimensional decision rule base encompassing quantified priority, size factors, quantity factors, and spatial distribution rules, and executes a specific weighted calculation process. This allows for a more detailed and comprehensive reflection of the product's overall defect status in terms of quality grading.

[0056] Furthermore, in another implementation, the calibration control unit can be a stand-alone industrial computer or a programmable logic controller (PLC). For example... Figure 4 As shown, the geometric calibration component can be a circular aluminum alloy substrate with a diameter of approximately 200 mm. Its surface is divided into three areas through different processes: the central area is sprayed with white matte paint to form a diffuse reflection area 1; one side is polished to a mirror finish and chrome-plated to form a high-gloss mirror area 2; the other side is micro-textured by etching a randomly distributed array of micro-bumps with a depth of 0.1 mm and a diameter between 0.2 mm and 0.5 mm, forming a micro-texture area 3. This calibration component can be mounted on a bracket with the same structure as a cutlery tray. The electrically controlled rotary table for fine-tuning the angle can be a single-axis rotary table driven by a stepper motor and equipped with encoder feedback, achieving a rotational accuracy of 0.01 degrees. The pulse width modulation (PWM) frequency for adjusting the light source brightness can be set between 1 kHz and 10 kHz, with a duty cycle adjustment accuracy of 0.1%. The camera exposure time and gain can be adjusted using API functions provided by the Industrial Camera Software Development Kit (SDK).

[0057] During the calibration process, the operator first places the composite geometric calibration piece on the tray at the beginning of the conveyor belt and starts the calibration program through the host computer software interface. The conveyor belt transports the calibration piece sequentially to each testing station and stops at each station. At the diffuse reflection lighting station, after the camera acquires an image, the calibration control unit selects the diffuse reflection area from the image and calculates the variance of the grayscale of all pixels within that area. The threshold can be set to 150 (based on an 8-bit image with a range of 0-255). Simultaneously, in the highlight specular area, the proportion of overexposed pixels with a brightness value greater than 250 is calculated, and the threshold can be set to 5%. If any indicator exceeds the standard, the system automatically reduces the light source PWM duty cycle in 5% increments and simultaneously reduces the camera exposure time. After each adjustment, the image is reacquired and recalculated until the indicator meets the standard. At the direct surface lighting station, a similar process is performed, but the adjustment goal is to optimize the imaging of the highlight area, which may involve adjusting the light source angle (within the range of 30°-60°) and the camera gain. At the low-angle strip lighting station, after the camera acquires images of the micro-texture area, the calibration control unit calculates the contrast between the micro-convex shadow and the background (threshold can be set to 0.3) and the edge sharpness calculated using the Sobel operator (threshold can be set to 50). If the indicators are too low, the system controls the electronically controlled rotary table to fine-tune the angle of the strip light source in 0.1-degree steps (within the range of 0°-10°), and may fine-tune the camera focal length to obtain the clearest shadow image. After all stations are calibrated, the final adjustment parameters (such as PWM value, angle value, camera parameters) and the standard calibration images of each station are encrypted and saved to a specific directory on the hard drive as the basis for the next calibration comparison.

[0058] Existing equipment calibration typically relies on simple monochrome plates or focuses solely on uniformity, with adjustments heavily dependent on manual observation and operation. This is inefficient and makes it difficult to ensure calibration consistency across different workstations and lighting modes. This implementation design utilizes a composite calibration component integrating multiple surface features and defines specific quantitative evaluation indicators and automatic closed-loop adjustment processes for imaging targets (uniformity, highlight control, shadow quality) at different workstations. This achieves comprehensive, automated, and quantitative calibration of the entire multi-workstation, multi-mode optical inspection system. This method ensures that each workstation remains in optimal imaging condition over the long term, maintaining the stability and reliability of the inspection system from the source and reducing performance degradation caused by equipment drift.

[0059] Furthermore, in another implementation, such as Figure 3As shown, the multi-source image optimization and fusion step is executed by an image processing software module deployed in the AI ​​processing unit. This image processing software module can be developed based on the OpenCV and NumPy libraries. In step S131, the multi-view image spatial registration can first utilize the Canny edge detection operator to extract the outline of the tableware from each image, and then use the SIFT or ORB feature point detection algorithm to find stable feature points within the outline. The transformation matrix between the cameras at each detection station can be pre-calibrated using a checkerboard calibration board, which describes the coordinate mapping relationship under different camera views. In actual registration, for multiple images of the same tableware, one can be selected as the reference image (e.g., the image from the first station), and then, using the pre-calibrated transformation matrix, the remaining images are mapped pixel by pixel to the coordinate system of the reference image through a bilinear interpolation affine transformation method, thereby achieving alignment. The aligned images have the same size, for example, all are 1024 pixels × 1024 pixels.

[0060] In step S132, the pixel-level source image quality assessment can be calculated as follows: For each pixel position (x, y) in the registered image, a 5×5 neighborhood window is taken around it. The local signal variance can be obtained by calculating the gray-level variance of the pixels within this window. The noise variance can be estimated by manually selecting or automatically identifying a featureless flat region (such as the uniform area in the center of a piece of tableware) in each source image, and calculating the gray-level variance of this region as the global noise estimate σ. 2 _noise. The local signal-to-noise ratio SNR_i(x,y) is then calculated as (signal variance + ε) / (σ). 2 _noise +ε), where ε is a local minimum (e.g., 1e-6) to prevent division by zero. The local gradient saliency Grad_i(x,y) can be calculated by convolving the image with a 3×3 Sobel operator (horizontal and vertical directions) and calculating the gradient magnitude sqrt(G_x + ε). 2 + G_y 2 These calculations can be performed in parallel using vectorized operations to improve efficiency.

[0061] Step S133's region segmentation is based on all registered source images. The threshold for determining the specular highlight saturation region R_highlight can be set to 250 (for 8-bit grayscale images). The threshold for determining the shadow low-light region R_shadow can be set to 30. For each pixel location, all N source images are traversed. If the brightness I_i(x,y) of any one image is greater than 250, then the pixel belongs to R_highlight; if the brightness I_i(x,y) of all images is less than 30, then the pixel belongs to R_shadow. For pixels that do not belong to either of the above two regions, their maximum gradient significance M(x,y) = max(Grad_i(x,y)) in all source images is calculated. If M(x,y) is greater than a preset texture threshold (for example, it can be set to 20), then the pixel belongs to the texture-rich region R_texture. Step S134's fusion weight calculation uses different strategies for different regions. For pixels in the R_highlight region, the weight W_i(x,y) = (1 / (I_i(x,y) +δ)) / sum(1 / (I_j(x,y) +δ)), where δ is a small positive constant (e.g., 1) to avoid a zero denominator. The summation iterates through all source images j, ensuring that images with higher brightness have lower weights. For the R_shadow region, the weight W_i(x,y) = I_i(x,y) / sum(I_j(x,y)), which gives higher weights to images contributing more brightness. For the R_texture region, the weight W_i(x,y) = Grad_i(x,y) / sum(Grad_j(x,y)). After the weights are calculated, the final optimized fused image is synthesized pixel-by-pixel using the formula I_fused(x,y) = sum_{i=1}^{N} [W_i(x,y)×I_i(x,y) ]. In step S135, the generated fused image, along with metadata (such as a binary mask or a list of workstation source images) that identifies which workstation source images contributed to it, is packaged and input into the deep learning recognition model.

[0062] Existing solutions, when processing multi-source images, typically involve simply averaging all images or selecting the best one for analysis, failing to fully utilize the advantages of different lighting conditions in different regions. This implementation inserts a refined, pixel-level, region-adaptive multi-source image fusion step before performing defect identification. This step first ensures spatial alignment of information through registration, and then dynamically selects or combines the most reliable information sources based on the brightness (overexposure or underexposure) and texture sharpness of each location in different images. This method is equivalent to proactively generating an enhanced image that leverages strengths and mitigates weaknesses for the subsequent AI model, particularly helping to improve the imaging quality of white ceramics in highlight and shadow areas, thereby enhancing the robustness and accuracy of overall defect detection. This is a dedicated preprocessing method for multimodal image data.

[0063] Example 1 This embodiment provides an implementation method for identifying and grading multiple defects in daily-use ceramics. This method is applied to an automated inspection line for online quality inspection and grading of white ceramic tableware such as bowls and plates.

[0064] Specific implementation steps: The inspection line consists of a 400mm wide synchronous belt conveyor, with a running speed of 0.4m / s. Twelve inspection stations (P1-P12) are sequentially set along the conveyor belt. The first six stations (P1-P6) are used to inspect the back of the tableware, and the last six stations (P7-P12) are used to inspect the front. A servo motor-driven 180-degree automatic flipping mechanism is installed between P6 and P7. A 25-megapixel industrial area scan camera with a frame rate of 30fps is installed above each station. The specific lighting configuration is as follows: Stations P1 and P7 use diffused lighting with a box-type light source with a milky white diffuser plate; stations P2 and P8 use direct surface lighting with an LED panel light source, the normal of its light-emitting surface forming a 45° angle with the normal of the tableware surface; stations P4 and P10-P12 use low-angle strip lighting with a strip light source, the light-emitting surface forming a 5° angle with the plane of the conveyor belt.

[0065] (1) The tableware to be inspected is placed on the conveyor belt tray. When passing through stations P1-P6, images are acquired under six different lighting conditions on the back side. Then, the flipping mechanism automatically flips it over and continues to acquire images of the front side through stations P7-P12. A total of 12 images are acquired.

[0066] (2) Construction of AI Recognition Model: The deep learning model adopts a two-branch convolutional neural network. The first branch processes diffuse reflection and surface lighting images, and its backbone network contains three convolutional modules to extract color difference features and deformation features, respectively. The second branch is specifically for processing low-angle lighting images, using a dilated convolutional layer with an inflation rate of 2 and an adaptive pooling layer to extract microscopic shadow features. The model uses a constrained channel attention fusion layer to weight and fuse the features of the two branches. During training, a regularization term (α=0.05, β=0.1) is introduced to make the model focus more on latent defect features. The model adopts a two-level classification strategy, first determining whether the defect belongs to the major categories of "macromorphology", "surface texture" or "microstructure", and then identifying the specific defect type within the major category.

[0067] The training process of the model is implemented as follows: Over 100,000 surface images of daily-use ceramic tableware (mainly bowls and plates) of different sizes and glazes were collected. The image acquisition environment was the aforementioned inspection stations, ensuring that the training data was consistent with the production environment. Three quality inspectors with more than five years of experience independently labeled the images using professional image annotation software, and cross-validated the labels to form a final consensus. The annotation information included: (a) the category label of the defect (e.g., pores, glaze bubbles, cracks, etc.); (b) the precise bounding box location of the defect. The dataset covers at least the following defect categories: deformation, cracks, slag, spots, pores, glaze bubbles, glaze defects, and pinholes, ensuring that the number of valid labeled samples for each category is no less than 12,000. When constructing the dataset, the number of samples for each type of defect was consciously balanced by actively sampling difficult samples (e.g., blurry, low-contrast images) and adjusting the acquisition strategy to alleviate the class imbalance problem that may occur during model training.

[0068] Before model training, all labeled images undergo uniform preprocessing. First, based on the outline of the tableware in the image, a minimum bounding rectangle crop is performed to remove redundant background. Then, all cropped images are scaled to a uniform size required by the network input; in this embodiment, 1600 pixels × 1600 pixels is used. During the training phase, online real-time data augmentation strategies are employed to improve the model's generalization ability and robustness. These augmentation operations include: random horizontal or vertical flipping with a probability of 0.5; random rotation within ±10 degrees; applying small perturbations to image brightness and contrast (scaling factors randomly selected between 0.9 and 1.1); and adding a small amount of Gaussian noise (standard deviation not exceeding 0.01). All augmentation operations are performed in memory in real time; no intermediate augmented image files are stored.

[0069] Model training is implemented using the PyTorch 2.9.0 deep learning framework. The base loss function L_base employs cross-entropy loss with class weights, which are calculated based on the inverse frequency of the number of defect samples for each class in the training set, to give more attention to defect classes with fewer samples. According to claim 8, the total loss function is constructed as L_total = L_base + α × L_reg. The asymmetric regularization penalty term L_reg is calculated according to the formula of this invention. In this embodiment, the regularization coefficient α is set to 0.05, and the expected weight difference threshold β is set to 0.1. The optimizer used is Adam, with an initial learning rate of 1e-4 and a piecewise constant decay strategy, meaning the learning rate is multiplied by 0.5 every 30 complete iterations of the training set. The training batch size is set to 16. The entire training process is performed on two NVIDIA GeForce RTX5090 graphics cards in data parallel mode, for a total of approximately 300 iterations, until the loss function value on the validation set no longer decreases significantly and tends to stabilize.

[0070] The constructed dataset, while maintaining a consistent proportion of each defect type, is randomly divided into mutually exclusive training, validation, and test sets in a 7:2:1 ratio. The training set is used to perform the aforementioned parameter updates; the validation set does not participate in parameter updates but is only used to monitor model performance (such as calculating loss and accuracy) after each training epoch, and to save a snapshot of the optimal model parameters based on the validation set performance; the test set is completely isolated throughout the training process and is used only for an independent, one-time performance evaluation of the finally selected optimal model. The resulting metrics (such as overall recognition accuracy, recall rate of each defect type, etc.) serve as the basis for reporting model performance.

[0071] (3) Graded Decision-Making and Execution: The system has a built-in rule base, defining "cracks" and "glaze defects" as critical defects (10 points), and "pores" and "glaze bubbles" as secondary defects (5 points). After the model recognition results are input into the grading module, the module calculates the total deduction based on the defect type, size (area ratio), and quantity, and determines the final grade based on preset thresholds (e.g., 0-2 points for grade A, 3-10 points for grade B, etc.). The grading signal controls the pneumatic push rod at the end to sort the tableware into the corresponding six collection boxes.

[0072] Effect Experiment: To quantitatively verify the effectiveness, three comparative examples (CE1-CE3) were set up. All experiments were conducted in a constant temperature and humidity laboratory at 25±2℃ and 50%±10% using the same hardware platform (to avoid interference from hardware differences). The test sample library contained 3600 independent white porcelain plates, provided by the cooperating manufacturer and jointly calibrated by three senior quality inspectors to establish a defect truth value label library. The sample composition was as follows: 1200 defect-free samples; 1200 samples containing only various explicit defects (slag, mud residue, spots, obvious cracks, pinholes, deformation); 600 samples containing only various implicit defects (pores, glaze bubbles, micro-pinholes); and 600 mixed samples containing both explicit and implicit defects.

[0073] Comparative Example 1 (CE1): Simulates the closest existing technical solution. In terms of hardware, only station P1 (diffuse lighting) from Example 1 is enabled, while other stations and the automatic flipping mechanism are disabled. In terms of software, an end-to-end flattened defect identification and classification is performed using a YOLOv8m model (single branch) pre-trained on a general dataset and fine-tuned using transfer learning from 80% of the 3600 samples. The grading logic is as follows: if any "crack" or "glaze defect" is identified, it is judged as a defective product; if other defects are identified, it is judged as a second-class product; otherwise, it is a first-class product.

[0074] Comparative Example 2 (CE2): Simulates a scheme with multiple light sources but insufficient automation. In terms of hardware, the first six stations (P1-P6, back inspection) from Example 1 are enabled, but the automatic flipping mechanism is disabled. Instead, after inspecting the back side, the operator manually flips the device and sends it back to the same group of six stations for front inspection (equivalent to reusing a single group of stations). The software model and hierarchical logic are the same as in CE1.

[0075] Comparative Example 3 (CE3): A scheme with a complete hardware workflow but without specifically optimized algorithms. The hardware workflow is exactly the same as Example SE1 (12 stations, automatic flipping). On the software side, a ResNet-34 model is used to stitch the 12 images together along the channel dimension (to obtain a 12-channel input), directly performing end-to-end flattening defect identification and classification. The grading logic is the same as in Example 1.

[0076] Experimental Methods and Evaluation Metrics: To ensure fair comparison, an independent test set containing 3600 samples was constructed. All systems participating in the comparison (SE1, CE1, CE2, CE3) were trained or fine-tuned based on the data partitioning of this test set, and their performance was evaluated on the test set of this set. Specifically, the 3600 samples were randomly divided into a training set (2880 samples) and a test set (720 samples) to ensure a consistent distribution of the proportions of various defects. SE1 and CE3 models were trained using the training set; CE1 and CE2 models were trained using images from the corresponding workstations in the training set. Each sample sequentially passed through the complete detection process of its respective experimental group, and all intermediate results and the final grading results were recorded.

[0077] The evaluation indicators are as follows: 1. Average Defect Type Coverage: For each defect type appearing in the test set, calculate the proportion of correctly detected samples to the total number of samples for that defect, and then average this proportion for all defect types. 2. Overall Identification Accuracy: A correct identification is considered complete if and only if all true defects (location and type) are correctly identified without false positives. The number of correct samples is divided by the total number of test samples. 3. Detection Efficiency: After continuous operation for one hour, count the number of qualified samples passing through the grading station (samples / hour), and take the average of three tests. 4. Grading Consistency Rate: Compare the system's grading results with the common results obtained by two quality inspectors performing back-to-back blind inspections of the test set samples according to the national standard (GB / T 3532), and calculate the proportion of consistent samples. The experimental results are as follows: Table 1 Comparison of test results for SE1, CE1, CE2, and CE3 Comparative Example 1 (CE1) exhibited the lowest defect coverage and accuracy, particularly for latent defects (such as glaze bubbles), with a coverage rate below 40%. Its detection efficiency was primarily limited by single-station serial processing and a more conservative, time-consuming image processing strategy employed to compensate for insufficient recognition capabilities. This demonstrates that a single light source and a general model cannot handle the complexity of multi-defect detection in ceramics, especially for defects with weak optical features. Efficiency was also low due to single-station serial detection. Comparative Example 2 (CE2) improved coverage through multi-station processing, but manual flipping significantly reduced efficiency, and inconsistencies in conditions between the two detections due to placement errors affected accuracy and grading consistency. Comparative Example 3 (CE3) had the same hardware process as Example 1 (SE1), resulting in comparable detection efficiency. However, its recognition accuracy and grading consistency were significantly lower than SE1. This is because ResNet-34, when processing the stitched 12-channel images, failed to differentiate and emphasize the feature value of images from different light sources, unlike the dual-branch weighted fusion model of SE1, and was particularly insensitive to the feature learning of latent defects. This demonstrates that deep learning model architectures (two-branch, attention fusion, hierarchical classification) are crucial for achieving high-precision recognition from multimodal images.

[0078] Example 2 This embodiment, based on embodiment 1, further introduces an automated periodic calibration step to maintain the stability of the system's long-term operation.

[0079] The implementation steps are as follows: Calibration equipment: A composite calibration piece with a diameter of 200 mm was fabricated. Its center is a white matte diffuse reflection area, one side is a high-gloss chrome-plated mirror area, and the other side is a micro-textured area etched with an array of micro-bumps. An electrically controlled rotary stage was provided for fine-tuning the angle of the low-angle light source.

[0080] Calibration process: Calibration is performed before each shift's production. The calibration pieces are placed on the conveyor belt, and the calibration program is started. During calibration, the conveyor belt transports the calibration pieces sequentially to each workstation and pauses.

[0081] At the diffuse / surface lighting station: The system acquires images and calculates the grayscale uniformity variance of the diffuse area (threshold <150) and the proportion of overexposed pixels in the highlight area (threshold <5%). If these exceed the limits, the system automatically adjusts the light source PWM duty cycle in 5% increments and adjusts the camera exposure and gain accordingly, iterating until the limits are met.

[0082] At the low-angle light station: acquire images of the micro-texture area, and calculate shadow contrast (threshold > 0.3) and edge sharpness (threshold > 50). If insufficient, control the electronically controlled rotary table to fine-tune the light source angle in 0.1° steps (within the range of 0°-10°), and simultaneously fine-tune the camera focal length.

[0083] All adjusted final parameters and standard images of each workstation are saved as benchmarks for future calibration comparisons and status monitoring during the production process.

[0084] Effect verification experiment: The system (SE2) of this embodiment was deployed on an actual production line to process the same batch of incoming tableware. The experiment lasted for 5 working days (120 hours), with two shifts per day. SE2 underwent a complete calibration before each shift (twice daily). At the end of each morning and evening shift, the equipment was tested using a fixed set of 25 monitoring samples containing various minor defects, and its overall recognition accuracy was recorded. This monitoring sample set was independent of the daily production samples.

[0085] The results show that during daily monitoring tests, the accuracy of SE2 remained within the range of 96.0%-96.8% throughout the experimental period, exhibiting small waveforms and good stability. The automated periodic calibration step introduced in this embodiment can effectively compensate for changes such as light source attenuation and mechanical drift during long-term operation, maintaining stable system performance.

[0086] Example 3 Based on Example 1, this embodiment adds a multi-source image optimization and fusion step between image acquisition and AI recognition to optimize the defect detection effect of white porcelain in extreme lighting areas.

[0087] The implementation steps are as follows: 1. Image registration The pre-calibration of the camera transformation matrix was performed using a high-precision checkerboard calibration board measuring 300mm × 300mm with a grid size of 25mm. During calibration, the calibration board was fixed to a conveyor belt tray and driven sequentially through all 12 inspection stations, ensuring that at each station, the calibration board was captured by each camera in a different but complete orientation with at least 15 images. Subsequently, the intrinsic parameter matrix and distortion coefficients of each camera were calculated using the `calibrateCamera` function from the OpenCV library, as well as functions such as `findChessboardCorners` and `cornerSubPix`. Finally, the rotation matrix R and translation vector T between each pair of cameras (with P1 as the reference) were calculated using the `stereoCalibrate` function, thus obtaining the transformation matrix from the coordinate systems of other cameras to the P1 camera coordinate system. During actual production registration, for the same piece of tableware, 12 original images were first read, and their respective distortion coefficients were applied for correction. Then, for each image from P2 to P12, a projection transformation is performed using its corresponding transformation matrix via the `warpAffine` function (when viewed as a planar object) or the `warpPerspective` function, while specifying the interpolation method as `INTER_LINEAR` (bilinear interpolation), mapping its pixels to the coordinate system of the P1 image. After registration, the registration accuracy is evaluated by calculating the distance error of several sets of known, physically corresponding feature points (such as specific extreme points of the tableware outline) in the fused image, with the goal of controlling the average reprojection error to the sub-pixel level (less than 0.5 pixels).

[0088] 2. Quality assessment and regional segmentation Quality assessment was performed on 12 registered images (denoted as I_i, i=1…12), all of which had been converted to grayscale.

[0089] (1) The calculation of local signal-to-noise ratio (SNR_i(x,y)) includes the following steps: For each pixel location (x,y), a 7×7 neighborhood window is taken. When calculating the signal variance, the variance Var_signal of the pixel gray values ​​within this window is directly calculated. When estimating the noise variance, it is not dynamically calculated at each location, but rather during the system initialization phase, for each camera, a global noise variance σ is calculated by acquiring multiple dark-field images with the lens cap closed. 2 _noise_i. To improve the robustness of the estimation, a flat, featureless background region (such as the tray region found using image segmentation) can be automatically detected in each source image, and the gray-level variance of this region can be calculated as σ. 2 _noise_i. Where SNR_i(x,y) = (Var_signal +ε) / (σ 2_noise_i + ε), where ε = 1e-6.

[0090] (2) The calculation of local gradient saliency (Grad_i(x,y)) includes the following steps: Use the Sobel function in OpenCV to calculate the gradients of the image I_i in the x and y directions respectively (using a kernel size of 3). The gradient magnitude is calculated as: Grad_i(x,y) = sqrt((dx) 2 + (dy) 2 ). To improve the calculation efficiency, the gradient calculations for all 12 images can be performed in parallel using multiple threads.

[0091] (3) Pixel-level region segmentation includes the following steps: First, create three boolean mask matrices of the same size as the image, with initial values of False, corresponding to M_highlight, M_shadow, and M_texture respectively. Then perform the determination of the highlight saturation area: Traverse each pixel position (x,y). If in any of the source images I_i, its gray value I_i(x,y) > Th_high (the threshold Th_high is set to 250), then M_highlight(x,y) = True. Then perform the determination of the shadow low illumination area: If in all source images, I_i(x,y) < Th_low (the threshold Th_low is set to 30), then M_shadow(x,y) = True. Note that this area is mutually exclusive with the highlight area, and it is necessary to check whether M_highlight(x,y) is False first when making the determination. Then perform the determination of the texture-rich area: For pixels that are not marked as highlights or shadows, calculate their maximum gradient saliency G_max(x,y) = max_{i=1..12} (Grad_i(x,y)). If G_max(x,y) > Th_grad (the texture threshold Th_grad is set to 20), then M_texture(x,y) = True. All thresholds (250, 30, 20) are stored as configurable parameters in the configuration file, allowing fine-tuning according to the actual reflective characteristics of the ceramic glaze surface.

[0092] 3. Adaptive Fusion The calculation of the fusion weight and image synthesis is a pixel-by-pixel parallelization process.

[0093] (1) First, the weight calculation rules are as follows: For a pixel that satisfies M_highlight(x,y) = True, the fusion weight of its i-th image is: W_i(x,y) = (1.0 / (I_i(x,y) +δ)) / Σ_j [1.0 / (I_j(x,y) +δ)], where δ = 1 is used to prevent division by zero, and the summation j ranges from 1 to 12. For a pixel that satisfies M_shadow(x,y) = True, the weight is: W_i(x,y) = I_i(x,y) / Σ_j [I_j(x,y)]. For a pixel that satisfies M_texture(x,y) = True, the weight is: W_i(x,y) = Grad_i(x,y) / Σ_j [Grad_j(x,y)]. For the very few pixels that do not belong to any of the above regions (smooth midtone regions), an average weighting is applied: W_i(x,y) = 1.0 / 12.

[0094] (2) Image Synthesis: Initialize a floating-point array I_fused of the same size as the registered image, with all elements set to zero. For each pixel (x,y) and each source image i, perform accumulation: I_fused(x,y) = W_i(x,y)×I_i(x,y). Since the weights have been normalized, I_fused is the final fused image. Its pixel values ​​are then linearly scaled and converted to 8-bit unsigned integers (range 0-255) for compatibility with the input format of subsequent deep learning models. Primary Source Image Identifier Generation: For each pixel in the fused image, record the IDs (workstation numbers) of the two source images that contribute the most to its final value. This can be achieved by comparing the magnitudes of W_i(x,y). This identification information can be stored as a two-channel indexed image and output along with the fused image.

[0095] 4. Model Input The data loader of the deep learning recognition model (i.e., the dual-branch network in Example 1) is modified to accept fused images and their identifiers. The specific input format is a tensor containing multi-channel image data. The first three channels can be RGB channels copied from the fused image (or single-channel grayscale fused images), and subsequent optional channels can embed the main source image identifier information, or the identifier information can be input as metadata alongside the image data. The model is trained using this format of fused data, enabling it to learn to make decisions using both the fused visual features and prior information contributed by the source images. The entire fusion algorithm software module is written in C++ and encapsulated as a dynamic link library, called by the main control program after all workstation images have been acquired, ensuring that the fusion calculation is completed before the next piece of tableware arrives at the recognition workstation, meeting the assembly line cycle time requirements.

[0096] Effect Experiment 150 challenging white ceramic discs were specially selected from a large sample library as a test set. The true values ​​of the defects in these samples were confirmed to be all or partly located in areas where imaging is difficult: 50 samples had defects mainly located in the specular highlight area (such as fine cracks in bright spots), 50 samples had defects mainly located in the deep shadow area (such as pores in dark areas formed by low-angle light), and 50 samples had defects in mixed areas.

[0097] The test set was tested using both the system employing the fusion steps of this embodiment (SE3) and the basic system (CE5) that directly input only 12 images into the model of Embodiment 1. Except for the image preprocessing stage, both systems used the same hardware, AI recognition model, and grading rules. The regional defect detection rate (i.e., the number of samples correctly detecting defects located in highlight or shadow areas / the total number of defect samples in that area) and the overall comprehensive recognition accuracy were calculated.

[0098] The results showed that the defect detection rate in the highlight area was 94.0% (47 / 50) for SE3 and 82.0% (41 / 50) for CE5. The defect detection rate in the shadow area was 92.0% (46 / 50) for SE3 and 80.0% (40 / 50) for CE5. The overall accuracy was 95.3% (143 / 150) for SE3 and 89.3% (134 / 150) for CE5 on this dedicated test set.

[0099] As can be seen, CE5 suffers from a fundamental problem of information loss due to overexposure in the area of ​​the image under ambient light, which cannot be fully compensated for by subsequent processing, leading to missed detections or low confidence levels. SE3, on the other hand, fundamentally suppresses the contribution of overexposed images before the input image is formed through a front-end fusion algorithm, and fuses effective details from other lighting conditions, thereby stably and reliably synthesizing identifiable features. Example 3, through pixel-level quality assessment and region adaptive weighting, optimizes information at the imaging source. Compared to CE5's approach of attempting to repair information loss in subsequent processing, it more effectively and fundamentally improves defect detection capabilities under extreme lighting conditions (highlights / shadows).

[0100] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. It can be applied to various fields suitable for the present invention. Further modifications can be readily implemented by those skilled in the art.

Claims

1. A method for identifying and classifying multiple defects in daily-use ceramics, characterized in that, Includes the following steps: Step S1: The daily-use ceramic tableware to be inspected is sequentially passed through multiple preset inspection stations. At each inspection station, a special lighting scheme matching the target defect type is used to illuminate the surface of the tableware according to the target defect type of the inspection station, and a surface image is acquired under the lighting conditions. The special lighting scheme includes at least diffuse reflection lighting to eliminate reflection and highlight color difference defects, direct surface lighting to highlight structural defects by utilizing reflection differences, and low-angle strip lighting to highlight hidden three-dimensional defects by utilizing low-angle shadow effects. Multiple surface images of the same tableware under different feature excitation conditions are acquired through multiple inspection stations. Step S2: Input the multiple surface images into a pre-trained deep learning recognition model; the deep learning recognition model is trained based on a sample set of ceramic tableware images containing various defects, and has an attention mechanism for focusing on latent defect features; the deep learning recognition model performs parallel processing and feature fusion on the input multiple images, and outputs the recognition result of the defect types present on the tableware, the defect types including at least pores, glaze bubbles, mud residue, glaze defects, cracks and deformation; Step S3: Based on the identification results of the defect type and the preset defect level determination rules, the tableware is judged for quality level; then, based on the determined quality level, the tableware is automatically sorted to the corresponding level output channel.

2. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 1, characterized in that, The deep learning recognition model in step S2 is a dual-branch convolutional neural network, where: The first branch is used to process images from the diffuse lighting and direct surface lighting stations to extract general defect features related to color difference and macroscopic structural deformation. The second branch is dedicated to processing images from the low-angle strip lighting station, and extracts latent defect features related to microscopic three-dimensional deformation through optimized convolutional and pooling layers. The deep learning recognition model uses a feature fusion layer to perform channel attention weighted fusion of the feature maps extracted from the two branches. The features output by the second branch are given a higher fusion weight so that the model focuses more on the features of hidden defects in the overall decision.

3. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 2, characterized in that, The first branch includes a shared feature extraction backbone network for simultaneously processing the diffuse lighting image and the direct surface lighting image; the shared feature extraction backbone network includes a first convolutional module, a second convolutional module, and a third convolutional module connected in sequence; the first convolutional module is used to extract color difference and speckle features in the diffuse lighting image; the second convolutional module is used to extract reflective deformation and edge contour features in the direct surface lighting image; the third convolutional module receives and fuses feature maps from the first two modules to output general defect features.

4. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 3, characterized in that, In the second branch, the optimized convolutional layer and pooling layer are specifically as follows: At least one dilated convolutional layer is used to increase the receptive field while maintaining the feature map resolution in order to capture the continuous features of fine shadows with a large span generated by low-angle illumination. The adaptive pooling layer connected after the hollow convolutional layer has a pooling window size that is dynamically adjusted according to the scale of the activation region in the input feature map in order to focus on the local shadow patterns produced by glaze bubbles or bumps of different sizes.

5. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 4, characterized in that, The feature fusion layer performs channel attention-weighted fusion, specifically including: Global average pooling is performed on the general defect feature map output from the first branch and the latent defect feature map output from the second branch to generate their respective channel description vectors. The two channel description vectors are input into a shared small fully connected neural network, which outputs a fusion weight vector. Based on the fusion weight vector, each channel of the feature map output from the second branch is weighted and enhanced, and then concatenated with the feature map output from the first branch. The small fully connected neural network is trained to ensure that, in most cases, the average weights assigned to the feature map of the second branch are higher than the average weights assigned to the feature map of the first branch.

6. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 5, characterized in that, The small fully connected neural network is constrained during training, specifically by introducing an asymmetric regularization penalty term into the total loss function of the deep learning recognition model. The regularization penalty term is calculated as follows: Among them, w i (s) and w i (g) These represent the weight components of the i-th channel in the fusion weight vector corresponding to the second branch and the first branch, respectively. C is the total number of channels, α is the regularization coefficient, and β is the preset weight difference threshold. The design of the penalty term Lreg ensures that during training, when the average channel weight of the second branch is not higher than that of the first branch, an additional loss will be generated, thereby driving the optimization algorithm to adjust the network parameters and ultimately satisfy the constraints.

7. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 6, characterized in that, In step S2, the deep learning recognition model identifies defect types according to a preset classification hierarchy: First, the model performs a first-level classification, determining the identified defects into one of three categories: macroscopic morphological defects, surface texture defects, or microscopic structural defects. The macroscopic morphological defect category includes at least deformation and cracks; the surface texture defect category includes at least mud residue and spots; and the microscopic structural defect category includes at least pores, glaze bubbles, and pinholes. Subsequently, within the determined categories, the model performs a second-level classification to further identify the specific defect type.

8. The method for identifying and classifying multiple defects in daily-use ceramics according to any one of claims 1 to 7, characterized in that, The quality level determination in step S3 is based on a preset rule base, which includes at least: Defect Priority Mapping Table: Defect types that affect structural safety are defined as critical defects, and defect types that affect aesthetics but have little impact on usability are defined as minor defects. Each defect type is assigned an initial priority score. Multi-defect combination judgment logic: When more than one type of defect is identified on the same tableware, a final quality level is determined based on the type, quantity, size and spatial distribution of all defects, according to the priority mapping table, through weighted calculation or logical judgment rules. Configurable level thresholds: Associated with the final quality score or judgment result, defining multiple level ranges; The quality grade determination step is as follows: based on the identified defects, the basic information is obtained by querying the defect priority mapping table, and then the determination result is obtained by calculation or reasoning through the multi-defect combination determination logic. Finally, the final quality grade of the tableware is determined according to the grade threshold range into which the determination result falls.

9. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 1, characterized in that, It also includes calibration steps performed at a preset period or upon startup, which are executed by a calibration control unit: A composite geometric calibration piece is placed on a conveyor belt tray. The surface of the calibration piece is divided into a diffuse reflection area, a high-gloss mirror area, and a micro-texture area containing a micro-convex array, which is used to comprehensively simulate various surface features of tableware. The driving calibration component passes through each testing station in sequence, pausing at each station; In the diffuse reflection and direct surface light stations, the camera acquires images of the calibration parts. The calibration control unit calculates the variance of grayscale uniformity in the diffuse reflection area and the proportion of overexposed pixels in the specular area. If the variance or proportion exceeds the threshold, the pulse width modulation duty cycle of the light source in that station is automatically adjusted first, and the exposure time and gain of the camera are adjusted in conjunction, and iterative adjustments are made until the indicators meet the standards. At the low-angle strip light illumination station, the camera acquires images of the micro-texture area of ​​the calibration part, and the calibration control unit calculates the contrast and edge sharpness of the micro-convex shadow. If it is below the threshold, the angle of the strip light source from 0° to 10° is adjusted, and the camera focal length is adjusted simultaneously to optimize the shadow imaging quality. All adjustment parameters and the final calibration image are saved as reference data for comparison in the next calibration cycle.

10. The method for identifying and classifying multiple defects in daily-use ceramics according to claim 1, characterized in that, Between steps S1 and S2, there is also a multi-source image optimization and fusion step performed by the AI ​​processing unit, which specifically includes the following steps: S131. Multi-view image spatial registration: Using the contour feature points of the tableware and the pre-calibrated transformation matrix between cameras at each detection station, affine transformation is performed on multiple surface images of the same tableware to achieve spatial alignment. S132, Pixel-level source image quality assessment: For each pixel position (x, y) in the registered image, calculate its two quality indices in the i-th source image: The local signal-to-noise ratio (SNR)_i(x,y) is obtained by calculating the ratio of the signal variance to the noise variance in the neighborhood of the pixel, where the noise variance is estimated through flat regions of the image. The local gradient significance Grad_i(x,y) is obtained by calculating the gradient magnitude after processing by the Sobel operator at that pixel. S133. Region segmentation based on brightness and gradient: Pixel-level analysis is performed on multiple registered images. Based on the brightness values ​​and gradient distribution of the pixel set, the surface of the tableware is segmented into three mutually exclusive regions: Specular highlight saturation region R_highlight: In any source image, the region where the pixel brightness value is greater than a preset high threshold; Low-light shadow region R_shadow: The region in all source images where the pixel brightness value is lower than a preset low threshold; Rich texture detail region R_texture: The region that does not belong to the above two regions, and whose maximum gradient significance max(Grad_i(x,y)) is higher than the preset texture threshold; S134, Region-Adaptive Fusion Weight Calculation and Image Synthesis: For pixels within the R_highlight region, their fusion weight W_i(x,y) is inversely proportional to the brightness value I_i(x,y) of the source image i at that pixel, meaning the more saturated the image, the lower the weight. For pixels within the R_shadow region, their fusion weight W_i(x,y) is proportional to I_i(x,y), meaning that the higher the brightness of the image, the higher the weight. For pixels within the R_texture region, their fusion weight W_i(x,y) is proportional to Grad_i(x,y), meaning that the clearer the texture of the image, the higher the weight. The weights of all pixels are normalized so that for any position (x, y), the sum of all weights is 1; Finally, the optimized fused image is generated by calculating the formula I_fused(x,y) =Σ[ W_i(x,y) × I_i(x,y) ]; S135, Fusion Image Output: The optimized fusion image, along with the main source image identifiers used to generate it, is input into the deep learning recognition model to participate in defect identification.