Artificial intelligence-based tube cutting machine surface defect adaptive learning method and system
Patent Information
- Application Number
- CN202611451286.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-10-30
AI Technical Summary
管材表面缺陷(如划痕、凹陷、裂纹、氧化皮残留等)会导致切割过程中应力集中,进而引发断口不平整、尺寸偏差过大等问题,严重时甚至会造成管材报废
利用预设视觉模型实现冷却管表面缺陷的实时精准识别,并基于历史缺陷特征库的相似度匹配机制动态优化切割决策参数,有效解决了传统切管加工中因缺陷导致的断口质量不稳定问题;同时,通过关联存储全流程加工数据并对模型进行增量训练,使系统具备持续的自适应学习能力,显著提升了对复杂缺陷类型及多变加工环境的适应度与识别精度,实现了切管质量控制的智能化与高效化。
Smart Images

Figure CN123016122A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pipe cutting quality control technology, and in particular to an adaptive learning method and system for surface defects of pipe cutting machines based on artificial intelligence. Background Technology
[0002] In the processing of pipes such as cooling pipes, the cutting quality of the pipe cutting machine directly affects the subsequent performance and safety of the pipes. Surface defects of the pipes (such as scratches, dents, cracks, oxide scale residue, etc.) will cause stress concentration during the cutting process, which will lead to problems such as uneven cut edges and excessive dimensional deviations, and in severe cases, may even cause the pipes to be scrapped.
[0003] Current technologies suffer from two main problems: First, defect identification and parameter adjustment are disconnected. Traditional pipe cutting machines often use fixed cutting parameters. Even if surface defects are detected manually or through simple visual inspection, it is difficult to quickly match the optimal cutting parameters based on the defect type. This leads to problems such as uneven cut edges and dimensional deviations due to insufficient parameter adaptation during the cutting process, which seriously affects the product qualification rate. Second, there is a lack of adaptive learning capabilities. Existing visual inspection models are mostly statically trained and used in a fixed manner. They cannot continuously optimize model performance using experience information such as defect data and parameter adjustment effects during actual processing. When faced with new materials, new defect types, or changing processing environments, the recognition accuracy drops significantly, and the generalization ability is limited, making it difficult to meet the needs of large-scale and diversified processing. Summary of the Invention
[0004] To help improve the quality and adaptability of pipe cutting, this application provides an artificial intelligence-based adaptive learning method and system for surface defects in pipe cutting machines.
[0005] Firstly, this application provides an artificial intelligence-based adaptive learning method for surface defects in pipe cutting machines, employing the following technical solution: An AI-based adaptive learning method for surface defects in pipe cutting machines includes: Obtain the real-time surface image sequence corresponding to the cooling pipe to be detected and the current cutting decision parameters; Based on a preset initial visual detection model, the real-time surface image sequence is used to identify defects, and the initial defect identification results and corresponding image feature vectors are obtained. If the initial defect identification result is a detected defect, then the defect type label corresponding to the defect is extracted; Based on the image feature vector and the defect type label, generate defect feature samples; The defect feature samples are input into the historical defect feature database for similarity matching to obtain similar historical defect samples and corresponding historical processing records; Based on the matching degree of the similar historical defect samples and the historical processing records, the current cutting decision parameters are adjusted; The cooling pipe cutting operation is performed based on the adjusted cutting decision parameters, and the fracture image data of the corresponding pipe segment after cutting is collected simultaneously. The real-time surface image sequence, initial defect identification results, defect feature samples, adjusted cutting decision parameters, and post-cutting fracture image data are associated and stored, and then updated to the historical defect feature library. Based on the updated historical defect feature library, the preset initial visual detection model is incrementally trained, and the trained model is used as the visual detection model for the next surface defect identification.
[0006] Optionally, generating defect feature samples based on the image feature vector and the defect type label includes: Extract the edge contour information of the defect region from the initial defect identification result; Based on the edge contour information, calculate the area of the defect region and the aspect ratio of the minimum bounding rectangle; Extract the deep feature components related to texture and brightness from the image feature vector; The defect type label, the area and aspect ratio of the defect region, and the deep feature components are fused in a multimodal manner. Based on the fused feature set, a structured feature vector containing spatial attributes and visual semantic attributes is constructed; The structured feature vector is bound to the defect type label to form a defect feature sample.
[0007] Optionally, extracting the deep feature components related to texture and brightness from the image feature vector includes: The image feature vector is input into a preset feature parsing network; The feature parsing network includes at least one channel attention module for filtering and enhancing key channels related to texture variation and brightness distribution from multiple feature channels of the image feature vector; The spatial attention module in the feature parsing network is used to locate the feature response region in the key channel that corresponds to the spatial location of the defect region. By fusing the enhanced features of the key channels with the focused features of the feature response regions, the deep feature components used to describe the texture and brightness properties of the defective surface are obtained.
[0008] Optionally, the step of inputting the defect feature sample into a historical defect feature database for similarity matching to obtain similar historical defect samples and corresponding historical processing records includes: Based on the structured feature vector in the defect feature sample, calculate its similarity with the feature vectors of all historical samples in the historical defect feature database. Based on the defect type labels, the historical defect feature database is filtered to form a candidate sample set of defects of the same type; All historical samples with similarity exceeding a preset similarity threshold are selected from the candidate sample set as initial similar samples; Obtain the historical processing record corresponding to each of the initial similar samples. The historical processing record includes at least the historical cutting decision parameters and the fracture quality evaluation obtained after cutting with the parameters. Based on the fracture quality evaluation, the initial similar samples are sorted, and the historical samples with the highest evaluation are selected first. If the number of historical samples with the highest rating is insufficient, historical samples of other rating levels will be selected based on the similarity. The final selected historical samples and their corresponding complete historical processing records are used as the output similar historical defect samples and historical processing records.
[0009] Optionally, adjusting the current cutting decision parameters based on the matching degree of the similar historical defect samples and historical processing records includes: Extract historical cutting decision parameters and post-processing fracture quality evaluation from the historical processing records corresponding to the similar historical defect samples; Based on the degree of similarity, each similar historical defect sample is assigned a corresponding reference weight; Based on the reference weights, the historical cutting decision parameters are fused to generate initial reference decision parameters; Based on the initial reference decision parameters and the current cutting decision parameters, calculate the parameter adjustment tendency vector; Obtain the specific historical processing record corresponding to the sample with the best fracture quality evaluation among the similar historical defect samples; An environmental correction factor is generated based on the difference between the cutting conditions contained in the specific historical processing records and the current cutting conditions; The environmental correction factor is used to correct the parameter adjustment tendency vector; Adjust the current cutting decision parameters based on the corrected parameter adjustment tendency vector.
[0010] Optionally, calculating the parameter adjustment tendency vector based on the initial reference decision parameters and the current cutting decision parameters includes: Identify at least one key parameter item included in the current cutting decision parameters, wherein the key parameter item includes at least cutting speed, feed rate and cutting pressure; For each of the key parameter items, calculate the first difference between the corresponding parameter value in the initial reference decision parameters and the corresponding parameter value in the current cutting decision parameters; Based on each of the first differences and the corresponding parameter values in the current cutting decision parameters, the relative rate of change is obtained; The trend of fracture quality evaluation changes after the adoption of historical cutting decision parameters is obtained in the similar historical defect samples. Based on the stated trend, the relative rate of change is scaled to generate an adjustment coefficient. The adjustment coefficients corresponding to all key parameter items are serialized to generate the parameter adjustment tendency vector.
[0011] Optionally, the step of scaling the relative rate of change according to the trend to generate an adjustment coefficient includes: From the historical processing records corresponding to the similar historical defect samples, extract multiple sets of historical correspondences between parameter value adjustment and fracture quality evaluation changes; Determine whether there are any material batch changes or tool wear conditions exceeding preset thresholds in the current decision-making scenario; If they exist, then a subset of historical records in which the same type of scenario changes occur is selected from the historical correspondences; Based on the aforementioned historical data subset, a nonlinear mapping relationship is established between the parameter value adjustment amount and the change amount of fracture quality evaluation. Based on the nonlinear mapping relationship, determine the trend guiding factor corresponding to the parameter value adjustment amount when the change in the fracture quality evaluation is at its maximum positive value; The trend guiding factor is multiplied by the relative rate of change, and then subjected to amplitude limiting based on nonlinear saturation characteristics to finally generate an adjustment coefficient suitable for the current decision-making scenario.
[0012] Optionally, generating an environmental correction factor based on the difference between the cutting conditions contained in the specific historical processing record and the current cutting conditions includes: Extract environmental feature parameters of the current cutting conditions; Extract the corresponding historical environment feature parameters from the specific historical processing records; Calculate the second difference between the current environmental characteristic parameters and the historical environmental characteristic parameters; The second difference is weighted based on a preset environmental impact weight matrix. The weighted second difference is input into the preset nonlinear correction function; Based on the output of the nonlinear correction function, an environmental correction factor is generated to correct the parameter adjustment tendency vector.
[0013] Optionally, the step of incrementally training the preset initial visual detection model based on the updated historical defect feature library, and using the trained model as the visual detection model for the next surface defect identification, includes: Extract newly added defect feature samples and corresponding defect type labels from the updated historical defect feature library; The newly added defect feature samples are divided into an incremental training set and an incremental verification set according to a preset ratio; The parameters of the underlying feature extraction network of the preset initial visual detection model are frozen, and only the parameters of the top-level classifier network of the model are unfrozen; The thawed top-level classifier network was fine-tuned using the incremental training set, and the loss value between the predicted defect type and the true defect type label was calculated using the cross-entropy loss function. The model is validated in real time during the fine-tuning training process based on the incremental validation set, and the defect identification accuracy and recall of the model are calculated. Training stops when both accuracy and recall meet preset performance thresholds, or when the number of training iterations reaches a preset upper limit. The trained model parameters are saved and used as the visual detection model for the next surface defect identification.
[0014] Secondly, this application also discloses an artificial intelligence-based adaptive learning system for surface defects in pipe cutting machines, employing the following technical solution: An AI-based adaptive learning system for surface defects in a pipe cutting machine, comprising: The first acquisition module is used to acquire the real-time surface image sequence corresponding to the cooling pipe to be detected and the current cutting decision parameters; The second acquisition module is used to perform defect identification on the real-time surface image sequence based on a preset initial visual detection model, and obtain the initial defect identification result and the corresponding image feature vector. The tag extraction module is used to extract the defect type tag corresponding to the defect if the initial defect identification result is a detected defect. The sample generation module is used to generate defect feature samples based on the image feature vector and the defect type label; The third acquisition module is used to input the defect feature sample into the historical defect feature database for similarity matching, and to obtain similar historical defect samples and corresponding historical processing records. The parameter adjustment module is used to adjust the current cutting decision parameters based on the matching degree of the similar historical defect samples and the historical processing records. The data collection module is used to perform cooling pipe cutting operations based on the adjusted cutting decision parameters, and simultaneously collect the fracture image data of the corresponding pipe segment after cutting; The data update module is used to associate and store the real-time surface image sequence, initial defect identification results, defect feature samples, adjusted cutting decision parameters, and post-cutting fracture image data, and update them to the historical defect feature library. The incremental training module is used to incrementally train the preset initial visual detection model based on the updated historical defect feature library, and use the trained model as the visual detection model for the next surface defect identification.
[0015] In summary, this application includes the following beneficial technical effects: By utilizing a pre-set visual model, the system achieves real-time and accurate identification of surface defects in cooling pipes. Based on a similarity matching mechanism using a historical defect feature library, the system dynamically optimizes cutting decision parameters, effectively solving the problem of unstable fracture quality caused by defects in traditional pipe cutting. At the same time, by associating and storing the entire process data and incrementally training the model, the system possesses continuous adaptive learning capabilities, significantly improving its adaptability and identification accuracy to complex defect types and changing processing environments, thus realizing intelligent and efficient pipe cutting quality control. Attached Figure Description
[0016] Figure 1 This is a main flowchart of an artificial intelligence-based adaptive learning method for surface defects in pipe cutting machines according to an embodiment of this application; Figure 2 This is a flowchart of steps S201 to S206; Figure 3 This is a flowchart of steps S301 to S304; Figure 4 This is a flowchart of steps S401 to S407; Figure 5 This is a flowchart of steps S501 to S508; Figure 6 This is a flowchart of steps S601 to S606; Figure 7 This is a flowchart of steps S701 to S706; Figure 8 This is a flowchart of steps S801 to S806.
[0017] Explanation of reference numerals in the attached figures: 1. First Acquisition Module; 2. Second Acquisition Module; 3. Label Extraction Module; 4. Sample Generation Module; 5. Third Acquisition Module; 6. Parameter Adjustment Module; 7. Data Collection Module; 8. Data Update Module; 9. Incremental Training Module. Detailed Implementation
[0018] In the first aspect, this application discloses an adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence.
[0019] Reference Figure 1 An adaptive learning method for surface defects in a pipe cutting machine based on artificial intelligence, comprising steps S101 to S106: Step S101: Obtain the real-time surface image sequence corresponding to the cooling pipe to be detected and the current cutting decision parameters.
[0020] Specifically, the cooling pipe to be inspected is the cooling pipe to be cut and processed. The real-time surface image sequence refers to the set of pipe surface images continuously acquired by an industrial camera (such as a CCD camera), which can completely reflect the morphological information of the pipe surface. The current cutting decision parameters refer to the core processing parameters currently set by the pipe cutting machine, including cutting speed (the linear speed at which the pipe cutting machine tool cuts the pipe), feed rate (the distance the tool moves relative to the pipe per revolution), cutting pressure (the cutting force of the tool on the pipe), etc. These parameters directly determine the stability and cutting quality of the cutting process. In this embodiment, data can be synchronously acquired through the communication interface between the industrial camera and the pipe cutting machine control system to ensure the time consistency between image data and parameter data.
[0021] Step S102: Based on the preset initial visual detection model, perform defect identification on the real-time surface image sequence to obtain the initial defect identification results and the corresponding image feature vectors.
[0022] Specifically, in this embodiment, the preset initial visual detection model is a deep learning model (such as the YOLO model or Faster R-CNN model based on CNN) that has been pre-trained based on a large number of defect samples, used to automatically identify defect regions in the image; the initial defect identification result includes "defect detected" or "defect not detected", and if a defect is detected, it also includes information such as the location coordinates and approximate range of the defect; the image feature vector is high-dimensional data output by the intermediate layer of the model, which contains visual features (such as grayscale distribution, edge information, texture features, etc.) that can characterize the differences between defective and non-defective regions in the image, and is the core data foundation for subsequent defect analysis.
[0023] Step S103: If the initial defect identification result is a detected defect, then extract the defect type label corresponding to the defect.
[0024] Specifically, in this embodiment, the defect type label is an identifier used to distinguish the specific category of defects, such as scratches, dents, cracks, and oxide residue. It is preset in the visual inspection model. When the model identifies a defect, it will match the corresponding type label according to the visual characteristics of the defect. If no defect is detected, there is no need for subsequent parameter adjustment process, and the cutting operation is directly performed according to the current cutting decision parameters.
[0025] Step S104: Generate defect feature samples based on image feature vectors and defect type labels.
[0026] Specifically, in this embodiment, the defect feature sample is a comprehensive representation of the currently detected defect, which integrates the visual features and semantic category information of the defect for subsequent matching and comparison with historical defect data. Its core function is to transform high-dimensional, abstract image feature vectors into structured feature data that can be used for matching, while binding defect type information to ensure the uniqueness and distinguishability of the features.
[0027] Step S105: Input the defect feature samples into the historical defect feature database for similarity matching to obtain similar historical defect samples and corresponding historical processing records.
[0028] Specifically, in this embodiment, the historical defect feature library is a database that stores feature samples, processing strategies, and processing results of all defects detected in past processing processes; similarity matching refers to determining the degree of similarity between the current defect feature sample and historical samples by calculating the feature distance (such as Euclidean distance or cosine distance); similar historical defect samples are historical samples with a high degree of similarity to the current defect features; historical processing records refer to data such as the cutting parameter adjustment scheme, the adjusted cutting effect (such as fracture quality evaluation), and processing environment parameters used when the corresponding historical sample appeared.
[0029] Step S106: Adjust the current cutting decision parameters based on the matching degree of similar historical defect samples and historical processing records.
[0030] Specifically, in this embodiment, the matching degree is the similarity value between the current defect feature sample and similar historical samples. The higher the matching degree, the greater the reference value of the corresponding historical processing records. The core logic of parameter adjustment is to optimize the current cutting decision parameters by combining the historical cutting parameters and fracture quality evaluation data of similar samples. For example, if the fracture quality is significantly improved after adjusting a certain parameter in a historical sample, the current parameter is optimized with reference to that adjustment direction to ensure that the adjusted parameters can adapt to the current defect state and improve the cutting quality.
[0031] Step S107: Perform the cooling pipe cutting operation based on the adjusted cutting decision parameters, and simultaneously collect the fracture image data of the corresponding pipe segment after cutting.
[0032] Specifically, in this embodiment, the adjusted cutting decision parameters are the cutting speed, feed rate, cutting pressure, and other parameters optimized in step S106. The pipe cutting machine control system executes the cutting operation based on these parameters. The fracture image data refers to the images of the pipe fracture surface after cutting, collected by an industrial camera, which are used to evaluate the cutting quality (such as fracture surface smoothness, presence of burrs, cracks, etc.). The purpose of synchronous collection is to establish the correspondence between "parameter adjustment - cutting result" and provide a basis for subsequent data updates and model optimization.
[0033] Step S108: Associate and store the real-time surface image sequence, initial defect identification results, defect feature samples, adjusted cutting decision parameters, and post-cut fracture image data, and update them to the historical defect feature database.
[0034] Specifically, in this embodiment, associated storage refers to binding all data in the current processing flow according to timestamps or pipe numbers to ensure data integrity and traceability; updating the historical defect feature library means adding the currently generated defect feature samples and corresponding processing data and processing results to the historical database to enrich the amount of historical data.
[0035] Step S109: Based on the updated historical defect feature library, incrementally train the preset initial visual detection model, and use the trained model as the visual detection model for the next surface defect identification.
[0036] Specifically, in this embodiment, incremental training refers to fine-tuning the model using only newly added samples from the historical defect feature library, rather than retraining with all samples, which can significantly reduce training costs and time. Its core purpose is to enable the visual detection model to learn the defect features of new defect types or new processing scenarios, continuously improving the accuracy and generalization ability of defect recognition. The trained model is used as the next recognition model, realizing a closed loop of "detection-learning-optimization", enabling the system to have adaptive evolution capabilities.
[0037] Reference Figure 2 In one embodiment of this example, step S104, which generates defect feature samples based on image feature vectors and defect type labels, includes steps S201 to S206: Step S201: Extract the edge contour information of the defect region from the initial defect identification results.
[0038] Specifically, in this embodiment, the edge contour information of the defect area refers to the boundary line information between the defect and the normal area of the pipe surface, which can be extracted from the initial defect identification result by edge detection algorithms (such as Canny algorithm and Sobel algorithm). The edge contour can intuitively reflect the shape characteristics of the defect and is an important basis for distinguishing different defect types (such as linear scratches and irregular depressions), providing a basis for subsequent calculation of defect geometric parameters.
[0039] Step S202: Based on the edge contour information, calculate the area of the defect region and the aspect ratio of the minimum bounding rectangle.
[0040] Specifically, in this embodiment, the area of the defect region refers to the number of pixels enclosed by the edge contour (which can be converted into the actual area after pixel size calibration), reflecting the size of the defect; the aspect ratio of the minimum bounding rectangle refers to the ratio of the length to the width of the smallest rectangle that can completely enclose the defect contour, reflecting the regularity of the defect shape (such as the aspect ratio of a long strip scratch being much greater than that of a circular depression).
[0041] Step S203: Extract deep feature components related to texture and brightness from the image feature vector.
[0042] Specifically, in this embodiment, texture-related features refer to the texture variation information of the surface of the defect area (such as the texture of cracks and the rough texture of oxide scale), and brightness-related features refer to the gray value difference information between the defect area and the normal area. These two types of features are important visual attributes of defects. Deep feature components refer to the high-dimensional feature subset selected from the image feature vector that can accurately represent the texture and brightness differences. Unlike the shallow gray and edge features, they are more abstract and distinguishable, and can improve the representation ability of defect features.
[0043] Step S204: Perform multimodal fusion of the defect type label, the area and aspect ratio of the defect region with the deep feature components.
[0044] Specifically, in this embodiment, multimodal fusion refers to integrating different types of feature data (semantic defect type labels, geometric area and aspect ratio, and visual deep feature components) into a unified feature set. The fusion method can be feature splicing, weighted fusion, etc. The purpose is to comprehensively utilize defect information from different dimensions, avoid the limitations of a single feature, and make the generated feature samples more comprehensive and accurate in representing the current defect.
[0045] Step S205: Based on the fused feature set, construct a structured feature vector containing spatial attributes and visual semantic attributes.
[0046] Specifically, in this embodiment, spatial attributes refer to the spatial distribution information reflected by the geometric features (area, aspect ratio) of the defect, visual semantic attributes refer to the visual features and semantic category information reflected by the deep feature components (texture, brightness) and defect type labels; and structured feature vectors refer to fixed-dimensional vectors formed by arranging the fused feature set in a preset order.
[0047] Step S206: Bind the structured feature vector with the defect type label to form a defect feature sample.
[0048] Specifically, in this embodiment, binding refers to establishing a unique correspondence between the structured feature vector and the defect type label (such as adding a label encoding at the end of the feature vector), so that the defect feature sample simultaneously contains the comprehensive visual features of the defect and clear category information.
[0049] Reference Figure 3 In one embodiment of this example, step S203, which extracts deep feature components related to texture and brightness from the image feature vector, includes steps S301 to S304: Step S301: Input the image feature vector into a preset feature parsing network.
[0050] Specifically, in this embodiment, the preset feature parsing network is a deep learning network (such as an attention-based CNN network) specifically designed to filter and enhance specific features. Its input is the high-dimensional image feature vector output by the initial visual detection model, and its output is the filtered deep feature components. The core function of this network is to accurately extract features related to defect texture and brightness from complex image feature vectors, eliminate irrelevant and redundant features, and improve the effectiveness of features.
[0051] Step S302: The feature parsing network includes at least one channel attention module for filtering and enhancing key channels related to texture variation and brightness distribution from multiple feature channels of the image feature vector.
[0052] Specifically, multiple feature channels in an image feature vector refer to the feature mapping channels extracted by different convolutional kernels in a deep learning model. Each channel corresponds to a specific visual feature (such as some channels corresponding to texture features and some channels corresponding to edge features). The channel attention module is a network structure that can automatically learn the importance of each channel (such as the SE module in SENet). By calculating the attention weights of each channel, it strengthens the key channel features related to texture changes and brightness distribution, and suppresses the feature responses of irrelevant channels, thereby achieving accurate feature selection.
[0053] Step S303: Locate the feature response region in the key channel that corresponds to the spatial location of the defect region through the spatial attention module in the feature parsing network.
[0054] Specifically, in this embodiment, the spatial attention module is used to focus on the spatial location of the defect area. By generating a spatial attention map, it strengthens the feature response corresponding to the defect area in the key channel and weakens the feature response of the normal area.
[0055] Step S304: Fuse the enhanced features of the key channel with the focused features of the feature response region to obtain deep feature components used to describe the texture and brightness properties of the defect surface.
[0056] Specifically, in this embodiment, the enhanced features of the key channel refer to the texture and brightness-related features enhanced by the channel attention module, and the focused features of the feature response region refer to the defect region features located by the spatial attention module. The fusion method can be element-wise addition or splicing. The fused deep feature components contain accurate texture and brightness information and focus on the defect region, which can efficiently characterize the core visual attributes of the defect and provide high-quality feature data for subsequent feature matching.
[0057] Reference Figure 4 In one embodiment of this example, step S105 inputs the defect feature sample into the historical defect feature database for similarity matching, and obtains similar historical defect samples and corresponding historical processing records, including steps S401 to S407: Step S401: Based on the structured feature vector in the defect feature sample, calculate its similarity with the feature vectors of all historical samples in the historical defect feature database.
[0058] Specifically, in this embodiment, the similarity calculation adopts the cosine similarity algorithm, which quantifies the degree of similarity between the current structured feature vector and the historical sample feature vector by calculating the cosine value of the angle between them (the closer the cosine value is to 1, the higher the similarity).
[0059] Step S402: Based on the defect type label, filter the historical defect feature library to form a candidate sample set of defects of the same type.
[0060] Specifically, in this embodiment, the screening process involves extracting all historical samples whose defect type labels match the current defect from the historical defect feature library, forming a candidate sample set.
[0061] Step S403: Select all historical samples from the candidate sample set whose similarity exceeds the preset similarity threshold as initial similar samples.
[0062] Specifically, in this embodiment, the preset similarity threshold is a minimum similarity standard (e.g., 0.8) set based on actual processing experience, used to filter out historical samples that are sufficiently similar to the current defect features; the initial similar samples are historical samples in the candidate sample set that meet the similarity threshold requirements, and their corresponding historical processing records have high reference value for the current defect processing; the threshold setting can be dynamically adjusted according to the processing accuracy requirements, and the higher the accuracy requirements, the higher the threshold can be set.
[0063] Step S404: Obtain the historical processing record corresponding to each initial similar sample. The historical processing record shall at least contain the historical cutting decision parameters and the fracture quality evaluation obtained after cutting with those parameters.
[0064] Specifically, in this embodiment, historical cutting decision parameters refer to the adjusted parameters such as cutting speed and feed rate used when the historical sample appeared; fracture quality evaluation refers to the quality level (such as excellent, good, qualified, unqualified) obtained from the fracture image data after cutting, which is the core indicator for measuring the effect of historical parameter adjustment; the purpose of obtaining historical processing records is to provide specific reference for current parameter adjustment and clarify the effect of different parameter adjustment schemes.
[0065] Step S405: Sort the initial similar samples based on the fracture quality evaluation, and select the historical samples with the highest evaluation first.
[0066] Specifically, in this embodiment, the sorting rule is to sort the fracture quality evaluation from high to low, and the parameter adjustment scheme corresponding to the historical sample with the highest evaluation (such as excellent) has the best effect, so it is selected first.
[0067] Step S406: If the number of historical samples with the highest rating is insufficient, supplement the selection of historical samples with other rating levels according to the similarity.
[0068] Specifically, in this embodiment, insufficient number of historical samples with the highest rating means that the number of excellent-level samples selected is less than the preset number (e.g., 3), which cannot provide sufficient reference for parameter adjustment; at this time, samples with the second highest rating (e.g., good) are selected in order of similarity from high to low to ensure that the total number of selected samples meets the reference requirements.
[0069] Step S407: The final selected historical sample and its corresponding complete historical processing record are used as the output similar historical defect sample and historical processing record.
[0070] Specifically, in this embodiment, the complete historical processing record includes not only historical cutting decision parameters and fracture quality evaluation, but also the processing environment parameters (such as temperature and humidity) and pipe material parameters at that time; the output results will be directly used for subsequent parameter adjustment calculations, providing a comprehensive and reliable historical reference for the handling of current defects.
[0071] Reference Figure 5 In one embodiment of this example, step S106, based on the matching degree of similar historical defect samples and historical processing records, adjusts the current cutting decision parameters, including steps S501 to S508: Step S501: Extract historical cutting decision parameters and post-processing fracture quality evaluation from the historical processing records corresponding to similar historical defect samples.
[0072] Specifically, in this embodiment, the extracted historical cutting decision parameters are the final parameters after adjustment for each similar sample, and the fracture quality evaluation is the corresponding quality level. These two data are the core reference data for parameter adjustment. The historical cutting decision parameters provide specific adjustment directions and numerical references, while the fracture quality evaluation is used to determine the reference weights for each historical sample.
[0073] Step S502: Assign corresponding reference weights to each similar historical defect sample based on the similarity level.
[0074] Specifically, in this embodiment, the reference weight is a coefficient that measures the reference value of each similar sample. The higher the similarity, the greater the reference weight (e.g., the similarity value is used directly as the weight).
[0075] Step S503: Based on the reference weights, the historical cutting decision parameters are fused to generate initial reference decision parameters.
[0076] Specifically, in this embodiment, the fusion method adopts the weighted average method, that is, for each historical cutting decision parameter (such as cutting speed), the weighted average of all similar samples for that parameter is calculated as the corresponding item of the initial reference decision parameter; the initial reference decision parameter is a parameter scheme that integrates the optimal experience of all similar samples, providing a basic reference value for the current parameter adjustment.
[0077] Step S504: Calculate the parameter adjustment tendency vector based on the initial reference decision parameters and the current cutting decision parameters.
[0078] Specifically, in this embodiment, the parameter adjustment tendency vector is a vector that represents the direction and magnitude of the current parameter adjustment. Its core function is to quantify the difference between the initial reference decision parameter and the current parameter, clarify the trend (such as increase or decrease) and relative magnitude of each key parameter item (such as cutting speed) that needs to be adjusted, and provide a quantitative basis for subsequent parameter adjustments.
[0079] Step S505: Obtain the specific historical processing record corresponding to the sample with the best fracture quality evaluation among similar historical defect samples.
[0080] Specifically, in this embodiment, the sample with the best fracture quality evaluation is the sample with "excellent" fracture quality in the historical processing record. The specific historical processing record refers to the complete processing data corresponding to the sample, with particular attention to the cutting conditions (such as processing environment temperature, pipe material batch, tool wear status, etc.). The purpose of selecting this sample is to provide the best experience scenario reference for subsequent environmental correction.
[0081] Step S506: Generate an environmental correction factor based on the difference between the cutting conditions contained in a specific historical processing record and the current cutting conditions.
[0082] Specifically, in this embodiment, the difference in cutting conditions refers to the difference between the current processing environment (temperature, humidity), pipe material, tool condition, etc., and the processing of a specific historical sample; the environmental correction factor is a coefficient used to correct the parameter adjustment tendency vector. Its function is to eliminate the influence of differences in different processing scenarios on parameter adjustment (such as the need to appropriately reduce the cutting speed in a high-temperature environment) and ensure that the adjusted parameters are adapted to the current processing scenario.
[0083] Step S507: Correct the parameter adjustment tendency vector using the environmental correction factor.
[0084] Specifically, in this embodiment, the correction method adopts vector dot product operation, which multiplies the environmental correction factor with each element of the parameter adjustment tendency vector to obtain the corrected parameter adjustment tendency vector. The corrected vector not only retains the adjustment trend of historical best experience, but also adapts to the current processing scenario, improving the accuracy and applicability of parameter adjustment.
[0085] Step S508: Adjust the tendency vector based on the corrected parameters to adjust the current cutting decision parameters.
[0086] Specifically, in this embodiment, the adjustment process involves adjusting the tendency vector based on the corrected parameters one by one to adjust each key parameter of the current cutting decision parameters (such as increasing or decreasing the current cutting speed based on the adjustment coefficient corresponding to the cutting speed in the vector). The adjusted parameters are the optimal cutting parameters that adapt to the current defect and processing scenario and can be directly used for subsequent cutting operations.
[0087] Reference Figure 6 In one embodiment of this example, step S504, based on the initial reference decision parameters and the current cutting decision parameters, calculates the parameter adjustment tendency vector, including steps S601 to S606: Step S601: Identify at least one key parameter item included in the current cutting decision parameters. The key parameter item includes at least cutting speed, feed rate and cutting pressure.
[0088] Specifically, in this embodiment, key parameters refer to the core parameters that have the greatest impact on cutting quality. In addition to cutting speed (affecting cutting efficiency and surface roughness), feed rate (affecting cutting force and fracture smoothness), and cutting pressure (affecting tool life and cutting depth), they may also include parameters such as tool rotation speed. The purpose of identifying key parameters is to focus on the core adjustment objects, avoid ineffective adjustments to irrelevant parameters, and improve the efficiency and pertinence of parameter adjustments.
[0089] Step S602: For each key parameter item, calculate the first difference between the corresponding parameter value in the initial reference decision parameters and the corresponding parameter value in the current cutting decision parameters.
[0090] Specifically, in this embodiment, the first difference is the result of subtracting the current parameter value from the initial reference parameter value. Its positive or negative sign indicates the direction of parameter adjustment (a positive difference indicates that the current parameter needs to be increased, and a negative difference indicates that the current parameter needs to be decreased), and the absolute value indicates the absolute magnitude of the adjustment. By calculating the first difference, the basic adjustment requirements of each key parameter item can be intuitively obtained.
[0091] Step S603: Based on each first difference and the corresponding parameter value in the current cutting decision parameters, obtain the relative rate of change.
[0092] Specifically, in this embodiment, the relative change rate = (first difference / current parameter value) × 100% is used to characterize the relative magnitude of parameter adjustment. Compared with the absolute difference, the relative change rate can better reflect the proportional relationship of adjustment and avoid misjudgment of the adjustment magnitude due to the different values of the parameter itself (for example, the same adjustment of 1 mm / s cutting speed has a large difference in impact on the current speed of 2 mm / s and 10 mm / s).
[0093] Step S604: Obtain the trend of fracture quality evaluation changes caused by the adoption of historical cutting decision parameters in similar historical defect samples.
[0094] Specifically, the trend refers to the direction of change in the fracture quality evaluation after historical parameter adjustments compared to before the adjustments (e.g., from qualified to excellent, i.e., a positive trend; from good to qualified, i.e., a negative trend). This trend reflects the effectiveness of the historical parameter adjustment scheme and provides a basis for scaling up or down the current parameter adjustments.
[0095] Step S605: Based on the trend of change, the relative rate of change is scaled according to the trend to generate an adjustment coefficient.
[0096] Specifically, in this embodiment, trend scaling refers to appropriately increasing the relative rate of change (e.g., multiplying by 1.1) to enhance the adjustment effect if the historical parameter adjustment shows a positive trend; and appropriately decreasing the relative rate of change (e.g., multiplying by 0.8) to reduce the adjustment risk if it shows a negative trend. The adjustment coefficient, i.e. the scaled relative rate of change, is used to quantify the final adjustment range of each key parameter item.
[0097] Step S606: Serialize the adjustment coefficients corresponding to all key parameter items to generate a parameter adjustment tendency vector.
[0098] Specifically, in this embodiment, serialization refers to arranging each adjustment coefficient into a fixed-dimensional vector according to the preset key parameter order (such as cutting speed, feed rate, and cutting pressure); this vector fully contains the adjustment direction and magnitude information of all core parameters and can be directly used for subsequent parameter adjustment calculations.
[0099] Reference Figure 7 In one embodiment of this example, step S605, which involves scaling the relative rate of change according to the trend to generate an adjustment coefficient, includes steps S701 to S706: Step S701: Extract multiple sets of historical correspondences between parameter value adjustment and fracture quality evaluation changes from the historical processing records corresponding to similar historical defect samples.
[0100] Specifically, in this embodiment, the parameter value adjustment amount refers to the absolute range of historical parameter adjustment (e.g., when the cutting speed is adjusted from 5mm / s to 3mm / s, the adjustment amount is -2mm / s), and the fracture quality evaluation change amount refers to the difference between the quality level after adjustment and before adjustment (e.g., using numerical quantification levels: excellent = 4, good = 3, qualified = 2, unqualified = 1, the change amount from qualified to excellent is 2).
[0101] Step S702: Determine whether there is a change in material batch or tool wear exceeding a preset threshold in the current decision-making scenario.
[0102] Specifically, in this embodiment, material batch change refers to the fact that the material batch of the pipe being processed is different from the batch during the processing of historical samples, which may lead to differences in material properties such as hardness and toughness; tool wear exceeding the preset threshold refers to the tool wear reaching or exceeding the set maximum allowable value (e.g., wear > 0.5 mm), which will affect cutting performance; both of these situations are scenario changes that have a significant impact on cutting quality, and historical data needs to be screened specifically.
[0103] Step S703: If it exists, then select a subset of historical records when the same type of scene changes occur from the historical correspondence.
[0104] Specifically, in this embodiment, "similar scenario changes" refers to situations in the historical records where there are also changes in material batches or tool wear exceeding the threshold. The purpose of filtering the historical record subset is to ensure that the mapping relationship established later is adapted to the current special scenario, avoid inaccurate adjustment coefficients due to scenario differences, and improve the adaptability of the solution.
[0105] Step S704: Based on a subset of historical records, establish a nonlinear mapping relationship between the parameter value adjustment and the change in fracture quality evaluation.
[0106] Specifically, in this embodiment, the nonlinear mapping relationship refers to the nonlinear functional relationship between the parameter adjustment amount and the quality change amount established by the fitting algorithm (such as polynomial fitting, neural network fitting). Since the parameter adjustment and quality change are not a simple linear relationship (such as a significant improvement in quality when the adjustment is small, but a decrease in quality when the adjustment is too large), the nonlinear mapping can more accurately characterize the relationship between the two.
[0107] Step S705: Based on the nonlinear mapping relationship, determine the trend guiding factor corresponding to the parameter value adjustment amount when the change in the fracture quality evaluation is at its maximum positive value.
[0108] Specifically, in this embodiment, the maximum positive quality change refers to the maximum improvement in quality evaluation (e.g., from unqualified to excellent, the change is 3); the trend guiding factor is the coefficient corresponding to the parameter adjustment amount corresponding to the maximum positive change, and its function is to guide the current parameter adjustment in the direction that can achieve the optimal quality improvement, ensuring the effectiveness of the adjustment coefficient.
[0109] Step S706: Multiply the trend guiding factor with the relative rate of change, and perform amplitude limiting processing based on the nonlinear saturation characteristics to finally generate an adjustment coefficient suitable for the current decision-making scenario.
[0110] Specifically, the nonlinear saturation characteristic means that when the product result exceeds the preset maximum adjustment range (such as ±30%), it is limited to the maximum range to avoid the cutting quality deterioration due to excessive adjustment range; the result after the amplitude limiting process is the final adjustment coefficient, which not only ensures the positive trend of adjustment, but also controls the adjustment risk and adapts to the current decision-making scenario.
[0111] Reference Figure 8 In one embodiment of this example, step S506, which generates an environmental correction factor based on the difference between the cutting conditions contained in a specific historical processing record and the current cutting conditions, includes steps S801 to S806: Step S801: Extract the environmental feature parameters of the current cutting conditions.
[0112] Specifically, in this embodiment, environmental characteristic parameters refer to environmental and equipment-related parameters that affect the cutting process, including processing environment temperature, humidity, pipe material hardness, pipe diameter, tool wear, and tool material. These parameters directly affect the stability and cutting quality of the cutting process and are the core considerations for environmental correction.
[0113] Step S802: Extract the corresponding historical environment feature parameters from specific historical processing records.
[0114] Specifically, in this embodiment, the corresponding historical environmental characteristic parameters refer to the parameter items (such as temperature, humidity, material hardness, etc.) that correspond to the current environmental characteristic parameters when processing a specific historical sample (with the best fracture quality). The purpose of extracting these parameters is to compare them with the current parameters and quantify the differences in the scenario.
[0115] Step S803: Calculate the second difference between the current environmental characteristic parameters and the historical environmental characteristic parameters.
[0116] Specifically, in this embodiment, the second difference is the result of subtracting the historical environmental parameter value from the current environmental parameter value, which is used to quantify the degree of difference between the current and historical processing scenarios (e.g., the current temperature is 25℃, the historical temperature is 20℃, and the difference is 5℃); the differences of different environmental parameter items are calculated separately to form a difference vector.
[0117] Step S804: Based on the preset environmental impact weight matrix, the second difference is weighted.
[0118] Specifically, in this embodiment, the environmental impact weight matrix is a weight matrix set according to the degree of influence of each environmental parameter on the cutting quality (e.g., temperature has a greater impact on the cutting quality, so the weight is set to 0.3; humidity has a smaller impact, so the weight is set to 0.1). The weighted processing is to multiply the difference vector with the weight matrix through matrix multiplication to obtain the weighted difference value, highlighting the difference impact of important environmental parameters.
[0119] Step S805: Input the weighted second difference into the preset nonlinear correction function.
[0120] Specifically, in this embodiment, a preset nonlinear correction function (such as the Sigmoid function or the ReLU function) is used to map the weighted difference value to a correction coefficient between 0 and 1. Its core function is to quantify the environmental difference into a coefficient that can be used to adjust the bias vector of the correction parameter, so as to avoid over-correction or under-correction caused by the difference value being too large or too small.
[0121] Step S806: Based on the output of the nonlinear correction function, generate an environmental correction factor for correcting the parameter adjustment tendency vector.
[0122] Specifically, in this embodiment, the environmental correction factor is the output of the nonlinear correction function. If the current environment is small compared to the historical environment, the correction factor is close to 1, and the correction to the parameter adjustment tendency vector is small. If the difference is large, the correction factor deviates from 1, and the vector is corrected accordingly to ensure that the adjusted parameters can adapt to the current environmental conditions.
[0123] In one embodiment of this example, step S109 incrementally trains the preset initial visual detection model based on the updated historical defect feature library, and uses the trained model as the visual detection model for the next surface defect identification, including steps S901 to S907: Step S901: Extract newly added defect feature samples and corresponding defect type labels from the updated historical defect feature library.
[0124] Specifically, in this embodiment, the newly added defect feature samples refer to the defect feature samples generated and stored in the historical database during this processing, and the corresponding defect type label is the category identifier of the sample. The purpose of extracting these newly added samples is to provide fresh data for incremental training, enabling the model to learn the defect features in this processing scenario and achieve continuous model optimization. Compared to full training, incremental training using only newly added samples can significantly reduce the amount of data processing and training time, and reduce the consumption of computing resources.
[0125] Step S902: Divide the newly added defect feature samples into an incremental training set and an incremental validation set according to a preset ratio.
[0126] Specifically, in this embodiment, the preset ratio can be flexibly set according to the number of new samples, preferably 7:3, that is, 70% of the new samples are used as an incremental training set for fine-tuning model parameters, and 30% of the new samples are used as an incremental validation set for validating the performance of the trained model. The partitioning process uses random sampling to ensure that the sample distribution of the training set and the validation set is consistent, avoiding model validation bias caused by uneven sample distribution. By separating the training set and the validation set, real-time monitoring of the training process can be achieved, and problems such as model overfitting can be detected in a timely manner.
[0127] Step S903: Freeze the parameters of the underlying feature extraction network of the preset initial visual detection model, and only unfreeze the parameters of the top-level classifier network of the model.
[0128] Specifically, in this embodiment, the underlying feature extraction network (such as the convolutional layer and pooling layer of a CNN) of the preset initial visual detection model is used to extract general visual features of the image. These features have strong universality in different defect recognition scenarios. Freezing their parameters can avoid the degradation of general feature extraction ability due to retraining. The top-level classifier network (such as the fully connected layer and Softmax layer) is used to map the extracted general features to specific defect type labels. Unfreezing their parameters can make the model focus on learning the mapping relationship between specific defect features and labels corresponding to new samples, thereby improving the efficiency and targeting of incremental training.
[0129] Step S904: Fine-tune the top-level classifier network after it has been thawed using the incremental training set, and calculate the loss value between the predicted defect type and the true defect type label using the cross-entropy loss function.
[0130] Specifically, in this embodiment, the fine-tuning training employs the mini-batch stochastic gradient descent (SGD) optimization algorithm, setting a relatively small learning rate (e.g., 0.001) to avoid model parameter oscillations or overfitting due to an excessively large learning rate. The cross-entropy loss function effectively measures the difference between the model's prediction results and the true labels; the smaller the loss value, the higher the model's prediction accuracy for defect types. During training, the parameters of the top-level classifier network are continuously adjusted based on the loss value using the backpropagation algorithm, allowing the model to gradually adapt to the feature distribution of newly added samples.
[0131] Step S905: Validate the model in real time during the fine-tuning training process based on the incremental validation set, and calculate the model's defect identification accuracy and recall.
[0132] Specifically, in this embodiment, defect identification accuracy refers to the proportion of defect samples correctly identified by the model in the validation set out of the total number of validation samples, reflecting the accuracy of the model's identification; recall refers to the proportion of all real defect samples in the validation set correctly identified by the model, reflecting the model's ability to cover defects; the combination of the two can comprehensively evaluate the model's performance. During the training process, after each round of training, an incremental validation set is used for validation, and the changing trends of accuracy and recall are recorded to provide a basis for determining the training stopping condition.
[0133] Step S906: Stop training when both accuracy and recall meet the preset performance thresholds, or when the number of training iterations reaches the preset upper limit.
[0134] Specifically, the preset performance threshold is set according to the accuracy requirements of defect identification in actual processing, such as accuracy ≥ 95% and recall ≥ 93%; the preset upper limit of training iterations (e.g., 100 rounds) is used to avoid overtraining or excessively long training time. Training terminates when any stopping condition is met, and the model parameters at this point are the optimized parameters; if the upper limit of training iterations is reached but the performance does not meet the standard, the learning rate, batch size and other training hyperparameters can be adjusted appropriately and fine-tuned again.
[0135] Step S907: Save the trained model parameters as the visual detection model to be used in the next surface defect identification.
[0136] Specifically, in this embodiment, the model parameters are saved using a common deep learning model parameter file format (such as .pth, .h5), and are associated with metadata such as the corresponding training time and new sample information for easy subsequent traceability and management. The optimized model is used as the next recognition model, realizing iterative updates of the model, enabling the system to continuously accumulate processing experience, improve its adaptability to new defect types and new processing scenarios, and form a complete closed loop of "detection-learning-optimization".
[0137] Secondly, this application also discloses an artificial intelligence-based adaptive learning system for surface defects in pipe cutting machines.
[0138] An AI-based adaptive learning system for surface defects in a pipe cutting machine, comprising: The first acquisition module is used to acquire the real-time surface image sequence corresponding to the cooling pipe to be detected and the current cutting decision parameters; The second acquisition module is used to perform defect identification on the real-time surface image sequence based on a preset initial visual detection model, and obtain the initial defect identification result and the corresponding image feature vector. The label extraction module is used to extract the defect type label corresponding to the defect if the initial defect identification result is a detected defect. The sample generation module is used to generate defect feature samples based on image feature vectors and defect type labels; The third acquisition module is used to input defect feature samples into the historical defect feature database for similarity matching, and to obtain similar historical defect samples and corresponding historical processing records. The parameter adjustment module is used to adjust the current cutting decision parameters based on the matching degree of similar historical defect samples and historical processing records. The data collection module is used to perform cooling pipe cutting operations based on the adjusted cutting decision parameters, and simultaneously collect the fracture image data of the corresponding pipe segment after cutting; The data update module is used to associate and store real-time surface image sequences, initial defect identification results, defect feature samples, adjusted cutting decision parameters, and post-cutting fracture image data, and update them to the historical defect feature library. The incremental training module is used to incrementally train the preset initial visual detection model based on the updated historical defect feature library, and use the trained model as the visual detection model for the next surface defect identification.
[0139] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. An adaptive learning method for surface defects in a pipe cutting machine based on artificial intelligence, characterized in that, include: Obtain the real-time surface image sequence corresponding to the cooling pipe to be detected and the current cutting decision parameters; Based on a preset initial visual detection model, the real-time surface image sequence is used to identify defects, and the initial defect identification results and corresponding image feature vectors are obtained. If the initial defect identification result is a detected defect, then the defect type label corresponding to the defect is extracted; Based on the image feature vector and the defect type label, generate defect feature samples; The defect feature samples are input into the historical defect feature database for similarity matching to obtain similar historical defect samples and corresponding historical processing records; Based on the matching degree of the similar historical defect samples and the historical processing records, the current cutting decision parameters are adjusted; The cooling pipe cutting operation is performed based on the adjusted cutting decision parameters, and the fracture image data of the corresponding pipe segment after cutting is collected simultaneously. The real-time surface image sequence, initial defect identification results, defect feature samples, adjusted cutting decision parameters, and post-cutting fracture image data are associated and stored, and then updated to the historical defect feature library. Based on the updated historical defect feature library, the preset initial visual detection model is incrementally trained, and the trained model is used as the visual detection model for the next surface defect identification.
2. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 1, characterized in that, The step of generating defect feature samples based on the image feature vector and the defect type label includes: Extract the edge contour information of the defect region from the initial defect identification result; Based on the edge contour information, calculate the area of the defect region and the aspect ratio of the minimum bounding rectangle; Extract the deep feature components related to texture and brightness from the image feature vector; The defect type label, the area and aspect ratio of the defect region, and the deep feature components are fused in a multimodal manner. Based on the fused feature set, a structured feature vector containing spatial attributes and visual semantic attributes is constructed; The structured feature vector is bound to the defect type label to form a defect feature sample.
3. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 2, characterized in that, The extraction of deep feature components related to texture and brightness from the image feature vector includes: The image feature vector is input into a preset feature parsing network; The feature parsing network includes at least one channel attention module for filtering and enhancing key channels related to texture variation and brightness distribution from multiple feature channels of the image feature vector; The spatial attention module in the feature parsing network is used to locate the feature response region in the key channel that corresponds to the spatial location of the defect region. By fusing the enhanced features of the key channels with the focused features of the feature response regions, the deep feature components used to describe the texture and brightness properties of the defective surface are obtained.
4. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 1, characterized in that, The step of inputting the defect feature samples into the historical defect feature database for similarity matching to obtain similar historical defect samples and corresponding historical processing records includes: Based on the structured feature vector in the defect feature sample, calculate its similarity with the feature vectors of all historical samples in the historical defect feature database. Based on the defect type labels, the historical defect feature database is filtered to form a candidate sample set of defects of the same type; All historical samples with similarity exceeding a preset similarity threshold are selected from the candidate sample set as initial similar samples; Obtain the historical processing record corresponding to each of the initial similar samples. The historical processing record includes at least the historical cutting decision parameters and the fracture quality evaluation obtained after cutting with the parameters. Based on the fracture quality evaluation, the initial similar samples are sorted, and the historical samples with the highest evaluation are selected first. If the number of historical samples with the highest rating is insufficient, historical samples of other rating levels will be selected based on the similarity. The final selected historical samples and their corresponding complete historical processing records are used as the output similar historical defect samples and historical processing records.
5. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 1, characterized in that, The adjustment of the current cutting decision parameters based on the matching degree of the similar historical defect samples and historical processing records includes: Extract historical cutting decision parameters and post-processing fracture quality evaluation from the historical processing records corresponding to the similar historical defect samples; Based on the degree of similarity, each similar historical defect sample is assigned a corresponding reference weight; Based on the reference weights, the historical cutting decision parameters are fused to generate initial reference decision parameters; Based on the initial reference decision parameters and the current cutting decision parameters, calculate the parameter adjustment tendency vector; Obtain the specific historical processing record corresponding to the sample with the best fracture quality evaluation among the similar historical defect samples; An environmental correction factor is generated based on the difference between the cutting conditions contained in the specific historical processing records and the current cutting conditions; The environmental correction factor is used to correct the parameter adjustment tendency vector; Adjust the current cutting decision parameters based on the corrected parameter adjustment tendency vector.
6. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 5, characterized in that, The calculation of the parameter adjustment tendency vector based on the initial reference decision parameters and the current cutting decision parameters includes: Identify at least one key parameter item included in the current cutting decision parameters, wherein the key parameter item includes at least cutting speed, feed rate and cutting pressure; For each of the key parameter items, calculate the first difference between the corresponding parameter value in the initial reference decision parameters and the corresponding parameter value in the current cutting decision parameters; Based on each of the first differences and the corresponding parameter values in the current cutting decision parameters, the relative rate of change is obtained; The trend of fracture quality evaluation changes after the adoption of historical cutting decision parameters is obtained in the similar historical defect samples. Based on the stated trend, the relative rate of change is scaled to generate an adjustment coefficient. The adjustment coefficients corresponding to all key parameter items are serialized to generate the parameter adjustment tendency vector.
7. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 6, characterized in that, The step of scaling the relative rate of change according to the trend to generate an adjustment coefficient includes: From the historical processing records corresponding to the similar historical defect samples, extract multiple sets of historical correspondences between parameter value adjustment and fracture quality evaluation changes; Determine whether there are any material batch changes or tool wear conditions exceeding preset thresholds in the current decision-making scenario; If they exist, then a subset of historical records in which the same type of scenario changes occur is selected from the historical correspondences; Based on the aforementioned historical data subset, a nonlinear mapping relationship is established between the parameter value adjustment amount and the change amount of fracture quality evaluation. Based on the nonlinear mapping relationship, determine the trend guiding factor corresponding to the parameter value adjustment amount when the change in the fracture quality evaluation is at its maximum positive value; The trend guiding factor is multiplied by the relative rate of change, and then subjected to amplitude limiting based on nonlinear saturation characteristics to finally generate an adjustment coefficient suitable for the current decision-making scenario.
8. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 5, characterized in that, The generation of environmental correction factors based on the differences between the cutting conditions contained in the specific historical processing records and the current cutting conditions includes: Extract environmental feature parameters of the current cutting conditions; Extract the corresponding historical environment feature parameters from the specific historical processing records; Calculate the second difference between the current environmental characteristic parameters and the historical environmental characteristic parameters; The second difference is weighted based on a preset environmental impact weight matrix. The weighted second difference is input into the preset nonlinear correction function; Based on the output of the nonlinear correction function, an environmental correction factor is generated to correct the parameter adjustment tendency vector.
9. The adaptive learning method for surface defects of a pipe cutting machine based on artificial intelligence according to claim 1, characterized in that, The step of incrementally training the preset initial visual detection model based on the updated historical defect feature library, and using the trained model as the visual detection model for the next surface defect identification includes: Extract newly added defect feature samples and corresponding defect type labels from the updated historical defect feature library; The newly added defect feature samples are divided into an incremental training set and an incremental verification set according to a preset ratio; The parameters of the underlying feature extraction network of the preset initial visual detection model are frozen, and only the parameters of the top-level classifier network of the model are unfrozen; The thawed top-level classifier network was fine-tuned using the incremental training set, and the loss value between the predicted defect type and the true defect type label was calculated using the cross-entropy loss function. The model is validated in real time during the fine-tuning training process based on the incremental validation set, and the defect identification accuracy and recall of the model are calculated. Training stops when both accuracy and recall meet preset performance thresholds, or when the number of training iterations reaches a preset upper limit. The trained model parameters are saved and used as the visual detection model for the next surface defect identification.
10. An adaptive learning system for surface defects in a pipe cutting machine based on artificial intelligence, characterized in that, include: The first acquisition module is used to acquire the real-time surface image sequence corresponding to the cooling pipe to be detected and the current cutting decision parameters; The second acquisition module is used to perform defect identification on the real-time surface image sequence based on a preset initial visual detection model, and obtain the initial defect identification result and the corresponding image feature vector. The tag extraction module is used to extract the defect type tag corresponding to the defect if the initial defect identification result is a detected defect. The sample generation module is used to generate defect feature samples based on the image feature vector and the defect type label; The third acquisition module is used to input the defect feature sample into the historical defect feature database for similarity matching, and to obtain similar historical defect samples and corresponding historical processing records. The parameter adjustment module is used to adjust the current cutting decision parameters based on the matching degree of the similar historical defect samples and the historical processing records. The data collection module is used to perform cooling pipe cutting operations based on the adjusted cutting decision parameters, and simultaneously collect the fracture image data of the corresponding pipe segment after cutting; The data update module is used to associate and store the real-time surface image sequence, initial defect identification results, defect feature samples, adjusted cutting decision parameters, and post-cutting fracture image data, and update them to the historical defect feature library. The incremental training module is used to incrementally train the preset initial visual detection model based on the updated historical defect feature library, and use the trained model as the visual detection model for the next surface defect identification.
