Method and system for visual inspection and residue identification of segment mold cleaning quality
By using deep learning semantic segmentation networks and adaptive enhancement preprocessing technology, the problems of accuracy and quantification in the identification of residues inside the pipe segment mold were solved, improving cleaning efficiency and the level of automation in detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CCCC FIRST HIGHWAY ENG BUREAU GANGFA (JIANGSU) CONSTR TECH CO LTD
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-12
Smart Images

Figure CN122199457A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision and image processing technology, and in particular to a method and system for visual inspection of the cleaning quality of pipe segment molds and identification of residues. Background Technology
[0002] Tunnel segments are core precast components in underground engineering projects such as subway and highway tunnels, and their appearance quality directly affects the safety and durability of the tunnel structure. During segment production, the cleanliness of the mold is one of the key factors determining the quality of the formed segments. After demolding, the inner surface of the mold often retains various types of residues, including concrete lumps, release agent oil stains, and rust spots caused by environmental factors. If these residues are not thoroughly removed before the next concrete pour, it will lead to appearance defects such as porosity, pitting, and mold sticking on the surface of the newly poured segments, and in severe cases, even affect the mechanical properties and structural integrity of the segments. Statistics show that appearance defects caused by inadequate mold cleaning account for approximately 30% to 40% of all defects, making it one of the major quality control challenges in precast segment production.
[0003] Currently, the cleaning quality inspection of segment molds mainly relies on manual visual inspection. Workers need to observe the mold cavity one by one after each demolding, judging the type and severity of residues based on experience, and deciding whether secondary cleaning is necessary. This method has many drawbacks. Firstly, manual inspection is inefficient, especially in high-volume continuous production scenarios. Manual inspection of a single mold typically takes 3 to 5 minutes, which is insufficient to meet the production line's requirement of producing one segment every 8 to 12 minutes, easily becoming a bottleneck in the production process. Secondly, manual judgment is highly subjective; different workers have different understandings of cleaning standards, leading to poor consistency in inspection results and high rates of omission and misjudgment, especially after prolonged repetitive work causing visual fatigue. Furthermore, manual inspection struggles to quantitatively assess the area and thickness of residues, failing to provide accurate guidance for subsequent cleaning, and making it difficult to guarantee cleaning efficiency and effectiveness.
[0004] Chinese patent CN111986198A discloses a method and device for detecting mold residues. This technical solution uses an industrial camera to capture images of the interior of an injection molding machine mold cavity. After preprocessing with light compensation and position correction, a generative adversarial neural network model is used to analyze the preprocessed images, thereby determining whether the mold cavity contains residues. However, this technical solution has the following shortcomings: First, the method can only perform a binary judgment of the presence or absence of residues, and cannot distinguish the specific categories of residues. For example, concrete lumps, oil stains, and rust spots have significant differences in cleaning methods and degree of harm, and binary detection cannot provide targeted cleaning guidance. Second, the method does not involve quantitative analysis of residue area and thickness, and cannot quantitatively compare the detection results with specific cleaning quality standards, making it difficult to achieve refined quality control. Third, the method lacks the function of accurately mapping defect locations and automatically generating cleaning guidance reports, and workers still need to find the location of residues themselves and decide on the cleaning plan based on experience. Fourth, the method is designed for injection molding machine mold scenarios, and the pre-processing methods only involve light compensation and position correction. It is not suitable for scenarios with larger dimensions and more complex surface morphologies, such as the inner cavity of pipe segment molds, especially lacking the ability to handle specular reflection and local shadows on metal surfaces. In addition, the method does not establish a closed-loop feedback mechanism between the detection results and subsequent operations, and cannot automatically trigger re-inspection or parameter adjustment based on the judgment results, resulting in limited overall automation. Therefore, there is an urgent need for a technical solution that can accurately, efficiently, and automatically detect the cleaning quality of segment molds. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method and system for visual inspection of the cleaning quality and identification of residues in tunnel segment molds. This system enables accurate identification and quantitative analysis of different types of residues, and automatically determines the cleanliness of the tunnel segments based on the analysis results, generating cleaning guidance information to ensure the appearance quality of the tunnel segments from the source.
[0006] This invention provides a method for visual inspection of the cleaning quality and identification of residues in segment molds, the method comprising:
[0007] Step S1, Image Acquisition and Adaptive Enhancement Preprocessing of the Inner Surface of the Segment Mold: After the segment is demolded and before new concrete is poured, a high-definition image of the inner cavity of the segment mold is acquired using an industrial camera installed at the end of a robotic arm or a fixed workstation to obtain raw image data; the raw image data is then subjected to illumination equalization processing, geometric distortion correction, and multi-scale contrast adaptive enhancement processing in sequence to obtain preprocessed standardized image data; wherein, the multi-scale contrast adaptive enhancement processing includes calculating local contrast features at different spatial scales and dynamically adjusting enhancement parameters according to the contrast statistics at each scale, so that the images acquired under different lighting conditions have uniform grayscale distribution characteristics.
[0008] Step S2, accurate identification of multi-category residues based on deep learning semantic segmentation network: The standardized image data is input into a pre-trained multi-category semantic segmentation network model, and the category of each pixel on the inner surface of the pipe segment mold is predicted to obtain pixel-level semantic segmentation results; the categories of the multi-category semantic segmentation network model include background, concrete block residue, oil stain residue, and rust residue; the multi-category semantic segmentation network model adopts an encoder-decoder architecture, and an attention bridging module is set between the encoder and decoder to enhance the feature response of the residue edge region.
[0009] Step S3, quantitative analysis of residue coverage area and thickness: Based on the pixel-level semantic segmentation results, extract the corresponding segmentation mask area for each type of residue, and calculate the coverage area of each type of residue according to the preset pixel-physical size mapping relationship; at the same time, based on the gray-level difference features between each residue area and the background area in the standardized image data, and combined with the pre-established gray-level-thickness mapping model, estimate the average thickness of each residue area.
[0010] Step S4, Dynamic Comparison and Qualification Judgment of Cleaning Quality Standards: The coverage area and average thickness of each type of residue are compared with the preset quality standard threshold, and a cleaning quality qualification judgment signal is generated based on the comparison results; the quality standard threshold is dynamically updated through statistical analysis based on historical test data to adapt to the cleaning requirements of different types of segment molds.
[0011] Step S5, Defect Location Mapping and Cleaning Guidance Report Generation: For segment molds determined to be unqualified, the location information of each residual area in the pixel-level semantic segmentation result is mapped to the physical coordinate system of the segment mold to generate a defect location distribution map; based on the residual type, coverage area and average thickness of each defect area, a cleaning guidance report containing cleaning priority ranking and targeted cleaning method suggestions is generated; at the same time, the cleaning quality qualified judgment signal is fed back to step S1 to trigger a local re-inspection of the unqualified area.
[0012] This invention also provides a visual inspection and residue identification system for the cleaning quality of segment molds. The system includes: an image acquisition and preprocessing module for acquiring images of the inner cavity of the segment mold and performing adaptive enhancement preprocessing to obtain standardized image data; a residue semantic segmentation and recognition module connected to the image acquisition and preprocessing module for performing pixel-level multi-category semantic segmentation on the standardized image data to obtain segmentation results; a residue quantification and analysis module connected to the residue semantic segmentation and recognition module for calculating the coverage area and average thickness of each type of residue; a cleaning quality judgment module connected to the residue quantification and analysis module for comparing the quantification results with quality standard thresholds and generating a pass / fail judgment signal; and a defect mapping and report generation module connected to the cleaning quality judgment module and the image acquisition and preprocessing module for generating a defect location distribution map and a cleaning guidance report, and feeding back the judgment signal to the image acquisition and preprocessing module to trigger local re-inspection.
[0013] The beneficial effects of this invention are as follows: First, by using deep learning-based semantic segmentation to identify multiple categories of residues, pixel-level accurate identification of three types of residues—concrete lumps, oil stains, and rust spots—is achieved. This overcomes the limitations of existing technologies that can only perform binary discrimination based on presence or absence, providing clear category information and targeted cleaning method suggestions for subsequent cleaning. Second, through quantitative analysis of coverage area and thickness and automatic comparison with quality standards, refined quantitative evaluation of cleaning quality is achieved, avoiding the problems of strong subjectivity and poor consistency in manual judgment. Third, through defect location mapping and automatic generation of cleaning guidance reports, workers are provided with specific guidance including cleaning priorities and methods, significantly improving the efficiency and effectiveness of secondary cleaning. Fourth, through closed-loop feedback of the pass / fail judgment signal to image acquisition, automatic local re-inspection of non-conforming areas is achieved without restarting the entire inspection process, thus improving the overall automation level and inspection accuracy of segment mold cleaning quality inspection. Attached Figure Description
[0014] Figure 1 This is a flowchart of the method for visual inspection of the cleaning quality and identification of residues in the segment mold provided in this embodiment of the invention.
[0015] Figure 2 This is an architecture diagram of the segment mold cleaning quality visual inspection and residue identification system provided in this embodiment of the invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0017] Reference Figure 1 This invention provides a method for visual inspection and residue identification of tunnel segment mold cleaning quality. This method is applied to the mold cleaning quality inspection stage in a shield tunnel segment production line after segment demolding and before the next round of concrete pouring. In actual production scenarios, segment molds are typically steel structures, and their internal cavity dimensions vary depending on the segment specifications, with typical dimensions being 1.5m × 1.2m × 0.35m. After one concrete pouring and demolding cycle, the inner surface of the mold cavity may be covered with various types of residues, such as concrete clumps, oil stains formed by release agent residue, and rust spots caused by steel oxidation. If these residues are not removed in time, they will seriously affect the forming quality of the next segment. The method of this invention includes the following steps:
[0018] Step S1: Image acquisition and adaptive enhancement preprocessing of the inner surface of the tube segment mold. In one embodiment of the invention, the image acquisition system consists of an industrial camera, a ring LED light source, a robotic arm, and a control unit. Preferably, the industrial camera uses a CMOS sensor with a resolution of 4096×3072 pixels, a pixel size of 3.45μm, a lens focal length of 12mm, and a working distance set between 600mm and 800mm. To ensure that the acquired image can completely cover the entire area of the mold cavity, in one embodiment, the robotic arm drives the industrial camera to take multiple shots above the mold according to a preset scanning path. Each shot covers an area of approximately 400mm×300mm, and adjacent shooting areas maintain an overlap rate of no less than 15% for subsequent image stitching. In another embodiment, for a fixed-station installation scheme, multiple industrial camera arrays can be used to shoot simultaneously, and the fields of view of each camera can be seamlessly stitched after pre-calibration. The ring-shaped LED light source is installed around the industrial camera lens. The light source has a color temperature of 5500K to 6500K and an illuminance uniformity of better than 90%, so as to reduce the image quality differences caused by uneven illumination.
[0019] After acquiring the raw image data, it undergoes three stages of preprocessing. The first stage is illumination equalization. In actual production environments, even with a ring light source, the brightness of the acquired image will still vary significantly in different areas due to the irregular geometry of the mold cavity and the specular reflection effect of the metal surface. This invention employs an illumination normalization method based on a reference image set: N reference images of the inner cavity of the tube segment mold are acquired beforehand under standard illumination conditions, preferably N being an integer between 10 and 20, and the average pixel grayscale value of the N reference images is calculated. and grayscale standard deviation For the original image to be processed, first calculate its average pixel grayscale value. and grayscale standard deviation Then, the illumination is transformed using the illumination equalization formula: ,in: The pixel grayscale value after illumination equalization processing is dimensionless; For the original image in coordinates The pixel grayscale value at that location is dimensionless and ranges from 0 to 255. The average pixel grayscale value of N reference images is dimensionless and typically ranges from 120 to 140. is the standard deviation of pixel gray levels of N reference images, dimensionless, with a typical value range of 30 to 50; The mean pixel grayscale value of the current original image, dimensionless; Let be the standard deviation of pixel grayscale values in the original image, which is dimensionless. The technical effect of this formula is to normalize images acquired under different lighting conditions into a unified grayscale distribution space, eliminating the impact of ambient lighting changes on the accuracy of subsequent semantic segmentation. Experimental verification shows that it can reduce the grayscale distribution difference between different batches of images from a standard deviation of 15.6 to 2.3, effectively ensuring the input consistency and stability of segmentation accuracy in subsequent semantic segmentation processing.
[0020] The second stage is geometric distortion correction. Industrial camera lenses exhibit radial and tangential distortion, especially noticeable at close working distances, necessitating image distortion correction to ensure spatial accuracy for subsequent pixel-level analysis. This invention employs the Zhang Zhengyou calibration method for calibrating the camera's intrinsic and extrinsic parameters. The calibration board uses a 9×7 checkerboard pattern, with each square having a side length of 25mm. After calibration, the obtained distortion coefficients are used... Perform anti-distortion mapping on the image. Preferably, The typical range of values is to , The typical range of values is to , and The absolute values of all of them do not exceed , The absolute value does not exceed After distortion correction, the pixel position error of the image can be controlled within 0.5 pixels.
[0021] The third stage is multi-scale contrast adaptive enhancement processing. The core objective of this process is to enhance the visual contrast between the residue area and the background mold surface, enabling the subsequent semantic segmentation network to more accurately identify the residue boundary. The multi-scale contrast enhancement method proposed in this invention differs from traditional global histogram equalization; it calculates local contrast features at three different spatial scales. Specifically, it uses a scale of [missing information - likely a specific size or scale]. Pixels Pixels and A sliding window of pixels scans the image, calculating a local contrast index within each window. : ,in: In the first Coordinates at each scale Local contrast index at the location, , dimensionless, with a value range from 0 to 1; In the first The maximum pixel grayscale value within a sliding window of scale, dimensionless; In the first The minimum pixel grayscale value within a sliding window of scale, dimensionless; To prevent extremely small positive numbers with a denominator of zero, the value is taken as... Subsequently, the local contrast indices at the three scales were weighted and fused to obtain a comprehensive contrast map. The weight , , Finally, adaptive enhancement is performed on the image based on the overall contrast map: when the overall contrast is below a threshold... A strong enhancement coefficient is applicable to certain regions. With a higher overall contrast ratio The region is suitable for a weaker enhancement coefficient. This allows for selective enhancement of low-contrast areas, avoiding image saturation caused by excessive enhancement of high-contrast areas. The standardized image data obtained after the above three-stage preprocessing is used as input for step S2. It is worth noting that the execution order of the above three-stage preprocessing is carefully designed: illumination equalization is performed first to eliminate global brightness deviation, geometric distortion correction is performed secondarily to ensure spatial accuracy, and multi-scale contrast enhancement is performed last to further enhance the distinguishability of residues from the background based on spatial correction. In another embodiment of the invention, the total execution time of the three-stage preprocessing does not exceed 2 seconds (based on an Intel Core i7-12700 processor), with illumination equalization taking approximately 500ms, geometric distortion correction approximately 800ms, and multi-scale contrast enhancement approximately 700ms, meeting the real-time requirements of online inspection on the production line.
[0022] Furthermore, in a preferred embodiment of the present invention, when an industrial camera is mounted on the end effector of a robotic arm, the scanning path of the robotic arm is planned according to a serpentine scanning strategy. Specifically, the robotic arm first translates along the length direction (X-axis direction) of the mold with a step size of 350mm, then offsets along the width direction (Y-axis direction) by 250mm after reaching the edge of the mold, and then translates in the opposite direction along the X-axis. Taking a standard C-shaped tube mold of 1500mm×1200mm as an example, it is necessary to collect data at approximately 20 shooting positions to complete full mold coverage, with a total acquisition time of approximately 8 seconds. At each shooting position, the robotic arm remains stationary for 200ms to eliminate motion blur before triggering the camera shutter. After acquisition, image stitching based on feature point matching is performed using the overlapping area between adjacent images to generate a panoramic image covering the entire area of the mold cavity. During the image stitching process, SURF feature descriptors are used for feature extraction and matching. After matching, RANSAC algorithm is used to remove mismatched point pairs, and finally, a weighted fusion method is used to eliminate stitching gaps.
[0023] Step S2: Accurate identification of multi-class residues based on a deep learning semantic segmentation network. In one embodiment of the invention, the multi-class semantic segmentation network model adopts an improved DeepLab v3+ architecture. This architecture consists of three parts: an encoder, an attention bridging module, and a decoder. The encoder uses ResNet-50 as the backbone network, pre-trained on the ImageNet dataset, and then fine-tuned on a pipe segment mold residue dataset. The encoder extracts four-level feature maps from the input standardized image, denoted as follows: , , and The spatial resolutions of the feature maps at each level are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the input image size, respectively, corresponding to 256, 512, 1024, and 2048 feature channels. Preferably, in Then, the dilated spatial pyramid pooling module is connected, and five parallel branches are used, including dilated convolutions with dilation rates of 6, 12 and 18, as well as 1×1 convolutions and global average pooling, to capture multi-scale contextual information without reducing the feature map resolution.
[0024] In one embodiment of the invention, an attention bridging module is positioned between the encoder and decoder to enhance the feature response of the residue edge region. This module employs a cascaded structure of channel attention and spatial attention. The channel attention module first performs global average pooling on the feature map output by the encoder, compressing the spatial dimension to 1×1 to obtain the channel description vector. ,in This represents the number of feature channels. Channel weight vectors are then generated using a two-layer fully connected network. : ,in: This is the channel weight vector, with each element taking values ranging from 0 to 1; This is the weight matrix of the first fully connected layer. For compression ratio, preferably The value is 16; This is the weight matrix for the second fully connected layer; It is a linear rectification activation function; It uses a sigmoid activation function. Channel weight vector. The input feature map is multiplied element-wise, and each channel is adaptively weighted. The technical effect of this channel attention mechanism is that it enables the network to automatically learn the importance of different feature channels for the residue recognition task, suppress the responses of irrelevant feature channels, and enhance the responses of channels containing residue texture and color features.
[0025] The spatial attention module performs average pooling and max pooling along the channel dimension on the feature map after channel attention processing, respectively, to obtain two single-channel spatial description maps. and ,in and These represent the height and width of the feature map, respectively. The two spatial description maps are then concatenated along the channel dimension, and then processed through a... Convolutional layers and a sigmoid activation function are used to generate a spatial weight map. The spatial weight map is multiplied pixel by pixel by the input feature map, adaptively weighting each spatial location. The technical effect of the spatial attention mechanism is to guide the network to focus on the spatial region where the residue is located, especially enhancing the feature response of pixels at the edge of the residue, thereby improving the accuracy of the segmentation boundary.
[0026] The decoder employs a strategy of progressive upsampling and feature fusion. Specifically, it first processes the features after they have passed through the attention bridging module... The feature map is upsampled by a factor of 4 using bilinear interpolation, and... The feature maps are concatenated along the channel dimension. Preferably, the feature maps are processed before concatenation. The feature maps are subjected to 1×1 convolutions to reduce their channel count to 48, balancing the contributions of high-level semantic features and low-level detail features. The concatenated feature maps are then processed through two 3×3 convolutional layers (each followed by a batch normalization layer and a ReLU activation function) to extract fused features. Finally, a 1×1 convolutional layer maps the channel count to the number of classes. (Including background, concrete block residue, oil stain residue, and rust residue), and upsampled to the resolution of the original input image through bilinear interpolation to obtain pixel-level semantic segmentation results.
[0027] In one embodiment of the present invention, the network training is configured as follows: the training dataset contains 2000 images of the inner cavity of a pipe segment mold with pixel-level annotations, of which 1600 images are used for training and 400 images are used for validation. Annotation is performed pixel-by-pixel using a polygon annotation tool to annotate the residue regions in each image. The loss function used during training is a weighted combination of cross-entropy loss and Dice loss. ,in: The total loss function value is dimensionless. Cross-entropy loss is used to optimize pixel-by-pixel classification accuracy. The Dice loss is used to optimize region overlap to address the class imbalance problem. The weighting coefficient for the cross-entropy loss is preferably set to 0.7; Here, represents the weighting coefficient for the Dice loss, preferably set to 0.3. The cross-entropy loss is defined as follows: , The total number of pixels in the image. The total number of categories, For the first Each pixel belongs to the category The actual label (value 0 or 1). For network prediction of the first Each pixel belongs to the category The probability value. Dice loss is defined as... , The smoothing coefficient is used. Training employs the Adam optimizer with an initial learning rate of... A cosine annealing learning rate scheduling strategy was adopted, with 200 epochs of training and a batch size of 8. Data augmentation strategies included random horizontal flipping and random rotation (angle range of...). to ), random scaling (scaling factor ranging from 0.8 to 1.2), and random color jitter.
[0028] Preferably, an edge-aware auxiliary loss is also introduced during the training process. To further improve the segmentation accuracy of the residue boundary region, the edge-aware auxiliary loss is calculated as follows: firstly, the Canny operator is used to extract the edge pixel set from the real labeled mask. Then, the cross-entropy loss is calculated only within the set of edge pixels, which is defined as ,in The total number of edge pixels. The edge-aware auxiliary loss is weighted... Add it to the total loss function, i.e. The effect of this edge-aware auxiliary loss technique is that it forces the network to pay more attention to the edge regions of the residue during training, thereby improving the segmentation accuracy of the edge regions from 83.2% before the edge loss was introduced to 89.2% after the edge loss was introduced, an improvement of 6 percentage points.
[0029] In another embodiment of the present invention, to further address the problem of uneven quantity of different types of residue samples in the cavity image of the segment mold, the loss weights for each category are differentiated during the training process. Specifically, the category weights are calculated based on the occurrence frequency of pixels of each category in the training set. ,in The total number of pixels in the training set. For the first The total number of pixels by category. In a typical segment mold residue dataset, background pixels account for approximately 85% to 90% of the total pixels, concrete block residue accounts for approximately 5% to 8%, oil stain residue accounts for approximately 3% to 5%, and rust residue accounts for approximately 1% to 3%. Therefore, category-weighted cross-entropy loss can effectively alleviate the problem of decreased minority class detection accuracy caused by class imbalance.
[0030] Furthermore, a test-time augmentation strategy is employed during the inference phase to improve the robustness of the segmentation results. Specifically, the input image undergoes three transformations: original, horizontally flipped, and vertically flipped. These transformed images are then fed into the network for inference. The three outputs are then inversely transformed, and the probability average is calculated. Finally, the final category prediction is obtained through an argmax operation. The additional computational cost of the test-time augmentation strategy is approximately twice that of a single inference iteration, but it can improve the average mIoU by about 1.5 percentage points.
[0031] Step S3: Quantitative analysis of residue coverage area and thickness. Based on the pixel-level semantic segmentation results obtained in Step S2, this step performs quantitative analysis on each type of residue. First, the coverage area is calculated. For each type of residue... ( Concrete lumps, oil stains, rust spots Extract the binary mask corresponding to the category from the semantic segmentation results. In the mask, pixels with a value of 1 represent residual areas belonging to that category, while pixels with a value of 0 represent areas not belonging to that category. Statistical mask. Total number of pixels with a median value of 1 And convert the pixel area into physical area according to the preset pixel-physical size mapping relationship: ,in: For the first The area covered by the residue, in units of ; For the first The total number of pixels containing residue-like particles in the mask, dimensionless; The physical size corresponding to each pixel in the horizontal direction, in units of ; The physical size corresponding to each pixel in the vertical direction, in units of Pixel-to-physical size mapping parameters and Calibration is achieved by placing a calibration plate on the inner surface of the segment mold. Preferably, the calibration plate uses a 10×8 checkerboard pattern, with each square having a side length of 20mm, and the mapping accuracy after calibration is not less than 0.1mm / pixel. In a typical embodiment, when the working distance is 700mm and the lens focal length is 12mm, .
[0032] Next, the average thickness of the residue is estimated. This invention proposes a thickness estimation method based on grayscale difference characteristics. The physical principle of this method is based on the following observation: under the same illumination conditions, residues adhering to the surface of a metal mold will change the light reflection characteristics of that area. The thicker the residue, the greater the difference in reflected light intensity between the residue and the background metal surface, which is reflected in a more significant difference in grayscale values. Based on this physical law, this invention pre-establishes a grayscale-thickness mapping model.
[0033] The grayscale-thickness mapping model is established as follows: Several sets of grayscale images of different types of residue samples with known thicknesses are acquired under standard illumination conditions. Preferably, for each type of residue, standard samples with thicknesses ranging from 0.1 mm to 5 mm and a step size of 0.1 mm are prepared and photographed under the same illumination conditions as the actual detection. The grayscale difference between each residue sample area and the adjacent background area is extracted. Using the grayscale difference as input and the known thickness as output, a quadratic polynomial regression model is used for fitting: ,in: For the first Estimated thickness of residue, in mm; The grayscale difference between the residue area and the background area is dimensionless and is calculated as follows: , For the first The average gray value of pixels within the residue-like region. This represents the average grayscale value of the background pixels within the neighborhood of the residue area. , , For the first The regression coefficients corresponding to the types of residues were obtained by least squares fitting. In one embodiment, for concrete block residues, (Unit: mm) (Unit: mm) (Unit: mm); For oil stains and residues, (Unit: mm) (Unit: mm) (Unit: mm); For rust residue, (Unit: mm) (Unit: mm) (Unit: mm). It should be noted that the regression coefficients need to be recalibrated based on the actual lighting conditions and camera parameters used; the values mentioned above are merely illustrative. The technical advantage of this thickness estimation method is that it can obtain approximate thickness information of residues from two-dimensional images without the need for additional three-dimensional measurement equipment, providing another key quantitative dimension besides area for subsequent quality assessment.
[0034] Furthermore, before calculating the area and thickness, this invention also performs connected component analysis on the semantic segmentation results. Specifically, for each type of residue, a binary mask is applied. An 8-neighbor connected component labeling algorithm is applied to aggregate spatially adjacent pixels in the mask into independent residual regions, each of which is assigned a unique identifier. In one embodiment of the invention, the connected component analysis further includes an area filtering step: if the number of pixels is less than [a certain threshold], the area filtering method is applied. Connected components are treated as noise and removed to avoid sporadic misclassified pixels in the semantic segmentation results affecting the accuracy of subsequent quantitative analysis. With a pixel-to-physical size mapping accuracy of 0.1 mm / pixel, the physical area corresponding to 50 pixels is approximately 0.5 mm², far smaller than the actual meaningful size of the residue. Therefore, this filtering will not lead to missed detection of real residues.
[0035] In another embodiment of the invention, for larger residue areas (e.g., concrete block residues covering an area exceeding 500 mm²), the shape characteristic parameters of the area are further calculated, including the length of the major axis. minor axis length equivalent diameter and compactness ,in This refers to the perimeter of the residue area, in mm. While these shape characteristics do not directly contribute to pass / fail determination, they are included in the final inspection report, providing workers with more comprehensive information on the residue's morphology and helping them select the most suitable cleaning tools and methods. For example, compactness... The residue area close to 1 is nearly circular in shape, making it suitable for cleaning with a rotary polishing tool; while the compactness... Lower, elongated areas of residue are better cleaned using straight scraping tools.
[0036] Step S4: Dynamic comparison and acceptance judgment of cleaning quality standards. This step compares the coverage area and average thickness of various residues calculated in step S3 with preset quality standard thresholds to determine whether the cleanliness of the mold meets the requirements for the next concrete pour. In one embodiment of the present invention, the quality standard thresholds include area thresholds and thickness thresholds for various residues. Preferably, the initial area threshold is set as follows: the maximum allowable area of a single concrete block residue. The maximum permissible area for oil stain residue on a single piece The maximum permissible area of a single piece with rust residue. The initial thickness threshold is set as follows: the maximum allowable thickness of residual concrete blocks. Maximum allowable thickness of oil stain residue Maximum allowable thickness of rust residue At the same time, a threshold for the total area ratio of various residues is set. That is, the total coverage area of a single type of residue shall not exceed 2% of the total area of the mold cavity.
[0037] The following rules determine whether a segment mold is clean: The cleanliness of the segment mold is considered acceptable only if all three of the following conditions are met: Condition 1: The area of each individual residue region of all categories does not exceed the area threshold for the corresponding category; Condition 2: The average thickness of each individual residue region of all categories does not exceed the thickness threshold for the corresponding category; Condition 3: The proportion of the total coverage area of each type of residue to the total area of the mold cavity does not exceed the total area percentage threshold. If any condition is not met, the product is deemed unqualified, and the specific residue area information that caused the unqualification is recorded.
[0038] In one embodiment of the present invention, the quality standard threshold is dynamically updated based on historical detection data using a Bayesian estimation method. Specifically, the most recent data is collected... The pass / fail results and corresponding residue quantitative data of the test, among which It is an integer greater than or equal to 50, preferably Let's set it to 100. Taking the area threshold update as an example, let... This represents the area threshold parameter to be updated, whose prior distribution is set to a normal distribution. ,in The current threshold, This is the prior standard deviation. Based on the most recent observed... Pass rate of the test Afterwards, if consistently above the target pass rate If so, the threshold should be tightened appropriately; if Below If so, check if the threshold is too strict and relax it appropriately. The updated formula is: ,in: The updated area threshold, unit and Consistency ); The area threshold before the update; The learning rate parameter is preferably... ; The target pass rate is set at 0.95. For the most recent The actual pass rate of the test. The technical effect of this dynamic update mechanism is that it enables quality standards to be adaptively adjusted according to actual production data, avoiding the problems of being too strict or too lenient that may be caused by a fixed threshold, while ensuring the smoothness and stability of the threshold adjustment. Preferably, to prevent unreasonable large fluctuations in the threshold, an upper limit on the threshold change range is also set. This means that the threshold change after a single update does not exceed 20% of the original threshold. Furthermore, the system records the historical trajectory of each threshold update, including the update time, the threshold values before and after the update, and the pass rate data that triggered the update. This allows production managers to trace the changes in quality standards and intervene manually when necessary. In actual deployment, the threshold update frequency is set to once every 50 molds inspected, ensuring sufficient data for statistical analysis while also responding promptly to changes in production conditions.
[0039] Step S5: Defect Location Mapping and Cleaning Guidance Report Generation. For the segment molds determined to be unqualified in Step S4, this step performs defect location mapping and cleaning guidance report generation. First, pixel coordinates are mapped to physical coordinates. Using the intrinsic and extrinsic parameter matrices obtained from camera calibration in Step S1 and the 3D model data of the mold, the pixel coordinates of each residual area in the semantic segmentation results are mapped. Convert to three-dimensional coordinates in the physical coordinate system of the mold Since the inner surface of the segment mold is approximately planar (with minimal local curvature variation), a homography matrix is preferably used. Perform two-dimensional plane mapping: ,in: The coordinates of the residue area in the physical coordinate system of the mold are in mm. The coordinates of the residue area in the image pixel coordinate system, in pixels; The homography transformation matrix from pixel coordinates to physical coordinates is obtained by calculating at least four sets of corresponding points. In actual implementation, the homography matrix is calculated using preset calibration points on the mold surface (preferably one calibration point at each of the four corners and the center of the mold cavity, for a total of five calibration points). After mapping, a defect location distribution map is generated. This map uses the mold cavity plan view as the base map and marks the type, area, and thickness information of each residue at its location.
[0040] A cleaning guidance report is then generated. In one embodiment of the invention, the report includes the following information: mold number and inspection timestamp, overall judgment result (qualified or unqualified), statistical summary of various residues (including quantity, total area, maximum area, and average thickness), defect location distribution map, and cleaning recommendations for each unqualified residue area. The cleaning priority is determined based on the weighted product of the hazard weight of the residue category, the coverage area, and the average thickness of each defect area. ,in: For the first The priority score for cleaning up each defective area is dimensionless. A higher value indicates a higher cleanup priority; For the first The category of residue belonging to each defect area The hazard weight, dimensionless, preferably for concrete lumps. Oil stains Rust spots ; For the first The coverage area of each defective region, in units of ; This represents the area threshold for the corresponding category, in units of... ; For the first The average thickness of each defect area, in mm; The thickness threshold is for the corresponding category, in mm. The hazard weights are set based on the following: concrete clumping residue has the most serious impact on the surface quality of the tunnel segments, easily leading to obvious protrusions and porosity defects in newly cast tunnel segments; oil stains can affect the demolding performance of concrete and the mold surface, leading to sticking; rust stains have a relatively small impact, mainly affecting the aesthetics of the tunnel segment surface.
[0041] In addition, the report includes recommendations for cleaning methods for different types of residues. Preferably, for concrete clump residues, it is recommended to use a high-pressure water gun (pressure set to 10MPa to 15MPa) or a mechanical scraper for cleaning; for oil stains, it is recommended to use a special release agent cleaning solution for wiping and cleaning; for rust residues, it is recommended to spray with a rust remover and then wipe it, and apply a rust inhibitor after cleaning.
[0042] In one embodiment of the present invention, step S5 further includes a local re-inspection function. When the segment mold is determined to be unqualified, the system feeds back the qualification judgment signal to the image acquisition system in step S1. Specifically, based on the location information of the unqualified residue area, the robotic arm is controlled to move the industrial camera directly above the unqualified area, shortening the working distance to between 400mm and 500mm, and using a higher resolution than the initial acquisition to locally magnify and acquire the unqualified area. Preferably, the field of view of the locally magnified acquisition covers a rectangular area extending 20mm to 30mm beyond the unqualified residue area. Steps S2 to S4 are repeated on the locally magnified acquired image to verify the accuracy of the initial inspection result or to evaluate the effect after secondary cleaning. The technical effect of this closed-loop feedback mechanism is that, on the one hand, it can verify the false detections that may occur due to insufficient resolution in the initial inspection, improving the reliability of the inspection results; on the other hand, it can automatically perform re-inspection after the worker completes the secondary cleaning, without restarting the entire inspection process, significantly improving production efficiency.
[0043] Reference Figure 2 The present invention also provides a visual inspection and residue identification system for the cleaning quality of segment molds. This system corresponds one-to-one with each step in the above method embodiments and includes the following modules:
[0044] The image acquisition and preprocessing module corresponds to step S1 in the above method embodiment. This module includes an industrial camera subunit, a light source control subunit, a robotic arm control subunit, and an image preprocessing subunit. The industrial camera subunit is used to acquire high-definition images of the inner cavity of the tube mold and obtain raw image data. Preferably, it uses a CMOS area array sensor with a resolution of not less than 4096×3072 pixels. The light source control subunit is used to control the activation and brightness adjustment of the ring LED light source to ensure that the lighting conditions during the acquisition process meet the requirements. The robotic arm control subunit is used to control the robotic arm to drive the industrial camera to perform multi-position shooting according to a preset scanning path. The image preprocessing subunit is used to sequentially perform illumination equalization processing, geometric distortion correction, and multi-scale contrast adaptive enhancement processing on the raw image data to obtain standardized image data and transmit it to the residue semantic segmentation and recognition module. The specific implementation of this module has been described in detail in step S1 of the method embodiment and will not be repeated here.
[0045] The residue semantic segmentation and recognition module, connected to the image acquisition and preprocessing module, corresponds to step S2 in the above method embodiment. This module deploys a pre-trained multi-class semantic segmentation network model, used to receive standardized image data and perform pixel-level multi-class semantic segmentation processing, outputting pixel-level semantic segmentation results including background, concrete block residue, oil stain residue, and rust residue. Preferably, this module runs on a GPU-accelerated computing platform, with an inference time of no more than 200ms per image to meet the real-time requirements of the production line. In one embodiment of the invention, this module is also configured with a model version management subunit, used to store multiple versions of the semantic segmentation network model weight files, supporting hot model updates without downtime. When new labeled data accumulates or the model is retrained, operators can push new model weights to this module through the management interface. The module automatically loads the new model before the next detection, thereby achieving continuous improvement in detection capabilities. The specific implementation methods of the module's network architecture, training methods, and loss functions have been described in detail in step S2 of the method embodiment.
[0046] The residue quantification analysis module, connected to the residue semantic segmentation and recognition module, corresponds to step S3 in the above method embodiment. This module is used to calculate the coverage area and average thickness of each type of residue based on pixel-level semantic segmentation results. Area calculation uses a combination of pixel counting and pixel-physical size mapping, while thickness estimation uses a regression model based on grayscale difference features. This module also includes a connected component analysis subunit, used to aggregate adjacent pixels of the same category into independent residue regions and calculate the area and thickness for each independent region. In one embodiment of the invention, this module further includes a calibration management subunit, used to store and manage pixel-physical size mapping parameters and regression coefficients of the grayscale-thickness mapping model. When the industrial camera is replaced or the working distance is adjusted, the operator can re-execute the calibration process and update the mapping parameters through the calibration management subunit, ensuring that the accuracy of the quantification analysis is not affected by changes in hardware configuration. The specific calculation formulas and parameters of this module have been described in detail in step S3 of the method embodiment.
[0047] The cleaning quality assessment module, connected to the residue quantification analysis module, corresponds to step S4 in the above method embodiment. This module compares the coverage area and average thickness of each type of residue with the quality standard threshold, and generates a cleaning quality qualification signal according to a preset three-condition qualification judgment rule. This module also includes a threshold management subunit, used to store and manage the quality standard thresholds for various types of residues, and dynamically update the thresholds based on historical detection data using a Bayesian estimation method. The specific method for threshold updating has been described in detail in step S4 of the method embodiment.
[0048] The defect mapping and report generation module, connected to the cleaning quality judgment module and the image acquisition and preprocessing module, corresponds to step S5 in the above method embodiment. This module is used to generate a defect location distribution map and a cleaning guidance report for the segment molds judged to be unqualified. This module includes a coordinate mapping subunit, a report generation subunit, and a feedback control subunit. The coordinate mapping subunit uses a homography transformation matrix to convert the pixel coordinates of the residue into the physical coordinates of the mold. The report generation subunit automatically generates a report document containing cleaning priority ranking and cleaning method suggestions based on the type, area, thickness, and location information of the residue. The feedback control subunit is responsible for feeding back the pass / fail judgment signal to the image acquisition and preprocessing module, triggering the robotic arm to perform local re-inspection of the unqualified area. In one embodiment of the present invention, the report generation subunit supports report output in PDF and Excel formats. The PDF format report contains a visualized defect location distribution map, and the Excel format report contains structured data that facilitates data analysis and quality traceability. The specific implementation of this module has been described in detail in step S5 of the method embodiment.
[0049] The modules described above interact with each other via industrial Ethernet or high-speed serial communication interfaces. A complete inspection cycle for the entire system does not exceed 30 seconds (including image acquisition, preprocessing, semantic segmentation, quantitative analysis, quality assessment, and report generation), meeting the production cycle requirement of approximately 8 to 12 minutes per segment in a tube production line. In a preferred embodiment of this invention, the system employs an edge computing architecture, deploying the semantic segmentation network model on edge computing nodes (equipped with NVIDIA RTX 3060 GPUs) close to the industrial camera to reduce image data transmission latency in the network. The image acquisition and preprocessing module, the residue quantitative analysis module, and the cleanliness quality assessment module are deployed on an industrial control computer, while the defect mapping and report generation module is deployed on a host management server. The modules communicate asynchronously via the MQTT message protocol, and the data exchange format uses JSON serialization.
[0050] In another embodiment of the invention, the system is also equipped with a human-machine interface module for displaying inspection results to production line operators in real time. This human-machine interface uses a touchscreen industrial control all-in-one computer as its platform. The main view displays a panoramic image of the mold cavity and overlaid semantic segmentation results (different types of residues are marked with different colors). The sidebar displays statistical data and pass / fail judgment results for various types of residues, and the bottom toolbar provides access to functions such as historical record query, report export, and parameter configuration. Operators can select specific residue areas by touch to view their detailed information, including precise physical coordinates, area values, thickness values, and recommended cleaning methods. Furthermore, the interface supports centralized monitoring of multiple mold inspection devices, allowing production managers to simultaneously view the mold cleaning quality inspection status of multiple production lines on the same interface, promptly identifying and coordinating the handling of anomalies.
[0051] To verify the effectiveness of the method and system described in this invention, a practical application test was conducted at a precast tunnel segment factory. The tunnel segment mold used in the test was a standard C-type mold with an internal cavity size of 1500mm × 1200mm × 350mm. The test dataset contained 500 images of the tunnel segment mold's internal cavity, including varying degrees of concrete block residue, oil stains, and rust residue. Experienced quality inspectors manually annotated the test dataset as the gold standard for evaluation. The test environment was a dedicated inspection station next to the production line, equipped with a 6-axis industrial robotic arm (repeatability ±0.05mm) and two CMOS industrial cameras (resolution 4096×3072 pixels). The computing platform was an industrial computer equipped with an NVIDIA RTX 3060 GPU.
[0052] Regarding detection accuracy, the method of this invention achieves a segmentation accuracy (mIoU) of 92.3% for concrete block residues, 88.7% for oil stain residues, 86.5% for rust residues, and 98.8% for background, with an average mIoU of 89.2% across the four categories. In terms of pixel-level precision, the accuracy is 94.1% and recall is 90.8% for concrete block residues, 91.3% and 87.2% for oil stain residues, and 89.6% and 84.7% for rust residues. The relative error in area measurement does not exceed 5% (based on manually marked area), and the absolute error in thickness estimation does not exceed 0.1 mm (based on actual thickness measured with a micrometer). Compared with the GAN-based binary detection method in CN111986198A, this invention not only achieves accurate identification of multiple types of residues (CN111986198A can only determine the presence or absence of residues), but also provides quantitative analysis results of area and thickness, significantly improving the information dimension and practical value.
[0053] In terms of inspection efficiency, the system of this invention takes an average of about 25 seconds to complete a comprehensive inspection of a single segment mold. This includes approximately 8 seconds for image acquisition (including robotic arm movement), 4 seconds for image stitching and preprocessing, 3 seconds for semantic segmentation and reasoning, 1 second for connected component analysis and quantization calculation, and 1 second for quality judgment and report generation. The remaining time is for data transmission. Compared to the traditional manual inspection method, which takes an average of 3 to 5 minutes per mold, the inspection efficiency is improved by approximately 7 to 12 times. The local re-inspection function takes an additional 10 seconds and can be automatically triggered when needed without manual intervention. After two months of continuous operation testing (inspecting a total of 3600 molds), the system's false positive rate was 2.1% and the false negative rate was 1.8%, both better than the average level of manual inspection (false positive rate of approximately 8% to 15%, false negative rate of approximately 5% to 10%).
[0054] Regarding the closed-loop feedback mechanism, the introduction of the partial re-inspection function enables the system to reconfirm areas with low confidence levels in the initial inspection. Statistical analysis shows that approximately 12% of the initial non-conformance judgments were corrected to conformity after partial re-inspection (i.e., false alarms in the initial inspection). This effectively reduces unnecessary repetitive cleaning work and saves labor costs. Simultaneously, the dynamic update mechanism of the quality standard threshold allows the system to adapt to changes in the cleaning status of different batches of molds. After more than 50 data accumulations, the threshold tends to stabilize, and the pass rate fluctuation range narrows to within ±2%.
[0055] In summary, the visual inspection method and system for cleaning quality of segment molds provided by this invention achieves accurate identification and classification of residues through multi-category semantic segmentation, achieves refined judgment of cleaning quality through quantitative analysis of area and thickness and dynamic comparison with quality standards, achieves targeted cleaning guidance through defect location mapping and cleaning guidance reports, and further improves the reliability and automation level of detection through a closed-loop feedback local re-inspection mechanism.
[0056] The embodiments of the present invention are not limited to the specific embodiments described above. Those skilled in the art can make various equivalent changes or substitutions based on the technical solutions of the present invention, and all such changes or substitutions should be included within the protection scope of the present invention.
Claims
1. A method for visual inspection and residue identification of segment mold cleaning quality, characterized in that, The method includes: Step S1, Image Acquisition and Adaptive Enhancement Preprocessing of the Inner Surface of the Segment Mold: After the segment is demolded and before the new concrete is poured, a high-definition image of the inner cavity of the segment mold is acquired using an industrial camera to obtain the original image data; the original image data is then subjected to illumination equalization processing, geometric distortion correction, and multi-scale contrast adaptive enhancement processing in sequence to obtain standardized image data; wherein, the multi-scale contrast adaptive enhancement processing includes calculating local contrast features at different spatial scales and dynamically adjusting the enhancement parameters; Step S2, multi-category residue identification based on deep learning semantic segmentation network: The standardized image data is input into a pre-trained multi-category semantic segmentation network model to obtain pixel-level semantic segmentation results; the categories include background, concrete block residue, oil stain residue and rust residue; the network model adopts an encoder-decoder architecture and sets an attention bridging module between the encoder and the decoder. Step S3, quantitative analysis of residue coverage area and thickness: Based on the pixel-level semantic segmentation results, extract the segmentation mask regions of various residues, calculate the coverage area according to the pixel-physical size mapping relationship; estimate the average thickness based on the gray-level difference characteristics between each residue region and the background region combined with the gray-level-thickness mapping model. Step S4, Dynamic Comparison and Qualification Judgment of Cleaning Quality Standards: The coverage area and average thickness of various residues are compared with the quality standard thresholds to generate a qualification judgment signal; the quality standard thresholds are dynamically updated based on historical test data. Step S5, Defect Location Mapping and Cleaning Guidance Report Generation: For unqualified segment molds, the location information of each residual area is mapped to the physical coordinate system to generate a defect location distribution map; a cleaning guidance report is generated based on the residual type, coverage area, and average thickness; the pass / fail judgment signal is fed back to step S1 to trigger local re-inspection.
2. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S1, the illumination equalization process includes: acquiring N reference images of the inner cavity of the tube mold under standard illumination conditions in advance, calculating the mean gray level and standard deviation of the gray level of the N reference images; and performing normalization and alignment processing on the mean gray level and standard deviation of the gray level of the original image data, where N is an integer greater than or equal to 10.
3. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S2, the encoder of the multi-class semantic segmentation network model uses ResNet-50 as the backbone network. The encoder extracts four levels of feature maps, and the spatial resolution of each level of feature map is reduced to 1 / 4, 1 / 8, 1 / 16 and 1 / 32 of the input image, respectively.
4. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S3, the pixel-physical size mapping relationship is obtained by calibrating a calibration plate placed on the inner surface of the tube mold. The calibration plate contains a checkerboard pattern with known physical dimensions, and the calibrated pixel-physical size mapping accuracy is not less than 0.1 mm / pixel.
5. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S2, the attention bridging module adopts a cascaded structure of channel attention and spatial attention. The channel attention module performs global average pooling on the features of each channel and then generates a channel weight vector through a two-layer fully connected network. The spatial attention module performs average pooling and max pooling on the channel dimension and then generates a spatial weight map through a convolutional layer.
6. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S3, the process of establishing the gray-scale-thickness mapping model includes: acquiring gray-scale images of several groups of residue samples of different categories with known thicknesses under standard lighting conditions, extracting the gray-scale difference between each residue sample area and the background area, using the gray-scale difference as input and the known thickness as output to train a regression model, and obtaining the gray-scale-thickness mapping model.
7. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S4, the dynamic update process of the quality standard threshold includes: collecting the pass / fail judgment results of the most recent M tests and the corresponding residue quantification data, and using the Bayesian estimation method to perform posterior update of the area threshold and thickness threshold of each type of residue, where M is an integer greater than or equal to 50.
8. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S5, the cleaning priority ranking is determined based on the weighted product of the hazard weight of the residue category, the coverage area, and the average thickness of each defect area. The hazard weight of concrete block residue is greater than that of oil stain residue, and the hazard weight of oil stain residue is greater than that of rust residue.
9. The method for visual inspection and residue identification of segment mold cleaning quality according to claim 1, characterized in that, In step S5, the local re-imaging and re-inspection includes: controlling the robotic arm to move the industrial camera directly above the non-conforming area based on the location information of the non-conforming area, using a higher resolution than the initial acquisition to locally magnify and acquire the non-conforming area, and repeating the processing of steps S2 to S4 on the locally magnified acquired image.
10. A visual inspection and residue identification system for the cleaning quality of segment molds, used to implement the visual inspection and residue identification method for the cleaning quality of segment molds as described in any one of claims 1-9, characterized in that, The system includes: The image acquisition and preprocessing module is used to acquire high-definition images of the inner cavity of the segment mold by an industrial camera installed at the end of the robotic arm or a fixed station after the segment is demolded and before the new concrete is poured, and to obtain raw image data. The raw image data is then subjected to illumination equalization processing, geometric distortion correction and multi-scale contrast adaptive enhancement processing to obtain standardized image data. The residue semantic segmentation and recognition module is connected to the image acquisition and preprocessing module. It is used to input the standardized image data into a pre-trained multi-class semantic segmentation network model for pixel-level category prediction and obtain pixel-level semantic segmentation results including background, concrete block residue, oil stain residue and rust residue. The residue quantification analysis module is connected to the residue semantic segmentation and recognition module, and is used to calculate the coverage area and average thickness of each type of residue based on the pixel-level semantic segmentation results. The cleaning quality judgment module, connected to the residue quantification analysis module, is used to compare the coverage area and average thickness of each type of residue with the quality standard threshold and generate a cleaning quality qualified judgment signal. The defect mapping and report generation module is connected to the cleaning quality judgment module and the image acquisition and preprocessing module. It is used to generate a defect location distribution map and cleaning guidance report for unqualified molds, and to feed back the qualified judgment signal to the image acquisition and preprocessing module to trigger local re-inspection.