Multi-scale milling-grinding tool defect detection method based on tool failure mechanism constraint
By constructing a multi-scale detection method constrained by tool failure mechanism, the instability problem of tool defect detection under complex field conditions in the existing technology is solved, and stable identification and reliable evaluation of milling tool defects are achieved, ensuring the accuracy and consistency of tool replacement decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN GUANGZHENG TECH
- Filing Date
- 2026-03-16
- Publication Date
- 2026-05-19
AI Technical Summary
Existing tool defect detection methods are difficult to reliably identify and classify cracks, chipping, and wear and spalling defects in the cutting edge area, rake face area, and flank face area under interference from vibration, oil and dust, and strong reflective light fluctuations on the rail milling machine. This leads to easy omissions and misjudgments in tool replacement decisions and insufficient consistency.
A multi-scale milling tool defect detection method based on tool failure mechanism constraints is proposed. This method acquires and preprocesses image information, constructs a tool geometric model for region localization and segmentation, performs multi-scale discriminant analysis based on failure mechanism constraints, performs direction consistency enhancement and region consistency enhancement, conducts depth discriminant reliability analysis, outputs defect type and location, and performs defect severity quantification and cross-frame consistency determination to generate traceable tool replacement decisions.
It enables stable identification and graded assessment of tool defects under complex field conditions, ensuring the reliability and consistency of tool replacement decisions, reducing missed detections and misjudgments, and improving the traceability and interpretability of the detection.
Smart Images

Figure CN121904034B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial visual inspection technology, specifically a multi-scale milling tool defect detection method based on tool failure mechanism constraints. Background Technology
[0002] Rail milling is a common procedure in the maintenance system of rail transit lines, mainly used to repair surface irregularities such as rail corrugation and scratches, and restore the geometry of the rail surface. Milling cutters, as key consumable components of milling equipment, directly affect milling quality, work efficiency, and train safety. Due to the combined effects of mechanical impact, thermal load, and abrasive wear during the cutting and friction process on high-hardness rail materials, the cutting edge and related functional surfaces gradually exhibit failure phenomena such as wear, chipping, crack propagation, and peeling of coatings or surface materials. Different failure modes differ in morphological scale, texture characteristics, and spatial distribution. To ensure work quality and safe operation, the industry generally requires periodic inspection and maintenance management of the cutter condition, determining maintenance strategies such as continued use, early warning observation, or cutter replacement based on the degree of wear and damage. With the development of intelligent rail transit equipment and digital operation and maintenance, research and engineering applications of tool condition detection, defect identification and maintenance decision-making are continuously advancing. The related technologies are generally evolving from relying on experience-based judgment to data-driven evaluation, from single-point inspection to process management, and from post-replacement to preventive maintenance.
[0003] For example, the invention patent with publication number CN121073934A discloses a machine learning-based method and system for predicting the in-machine wear state of diamond end mills. The method includes: acquiring a normal, defect-free grinding baseline signal template corresponding to a diamond end mill and a specific grinding wheel specification; acquiring sensor data such as acoustic emission signals and spindle current signals in real time during the grinding process, and simultaneously acquiring image data of the diamond end mill cutting edge; performing differential operations on the real-time acquired sensor data and the baseline signal template to generate a residual signal, and performing time-frequency analysis on the residual signal to extract defect feature vectors; performing quality assessment on the cutting edge image data and obtaining a visual quality confidence score by mapping the fogging index and occlusion rate, while extracting image features; inputting the defect features and image features into a lightweight gradient boosting decision tree fusion prediction model, and using the visual quality confidence score to weight and adjust the image feature input; and outputting the wear state characterizing the grinding defects from the fusion prediction model. This achieves the prediction effect of in-machine wear state by fusing multi-source signals and visual quality constraints during the grinding process, improving the stability and usability of grinding anomaly identification.
[0004] For example, the invention patent with publication number CN120031791B discloses a two-stage tool surface defect detection method and system. The method includes: acquiring multiple tool surface channel images, performing grayscale conversion and attitude correction, cropping them to a preset size to obtain sub-images, and completing numbering and labeling; in the first stage, Radon transform is used to extract Radon domain features of the sub-images to construct a training set and train a residual network to output a first predicted defect probability value. At the same time, edge structure operator convolution is used to extract edge structure features composed of directional gradient histogram operator and local binary mode operator and train a support vector machine to output a second predicted defect probability value. The two probability values are weighted and averaged to obtain a fused defect probability value, and abnormal sub-images are selected accordingly; in the second stage, the abnormal sub-images and normal sub-images with the same number are used to form a defect pair dataset and a Siamese transform detection network is trained. Through weight-sharing convolution feature extraction and transform layer feature alignment, the defect region feature information and segmentation results of the abnormal sub-images are output, thereby achieving a two-stage detection effect from probability screening to precise defect region localization, taking into account the detection requirements of rapid defect screening and precise defect region segmentation.
[0005] Existing methods for tool defect detection and wear condition assessment mostly rely on single-mode signal differential or general image defect detection networks. They typically suppress noise by weighting the overall image quality or using threshold screening. However, under the combined effects of inter-frame displacement caused by vibrations on rail milling machines, random occlusion caused by oil and dust, and fluctuations in strong reflective light, the directional characteristics of cracks, abrupt changes in chipping boundaries, and continuous flaking characteristics of wear in key areas are easily assimilated into unstable textures or pseudo-effects. This leads to unclear boundaries for distinguishing defect types, difficulty in constraining cross-frame consistency, and a lack of comparable scale benchmarks for severe quantification. Consequently, tool replacement decisions experience uncontrollable fluctuations between missed detections and misjudgments, making it difficult to meet the requirements for stable, traceable, and interpretable on-site issuance.
[0006] Therefore, in order to address the above problems, there is an urgent need for a multi-scale milling tool defect detection method based on tool failure mechanism constraints. Summary of the Invention
[0007] Technical problems to be solved
[0008] To address the shortcomings of existing technologies, this invention provides a multi-scale milling tool defect detection method based on tool failure mechanism constraints. This method solves the problem that existing methods are unable to reliably identify and classify cracks, chipping, and wear defects in the cutting edge, rake face, and flank face regions under field interference such as vibration of rail milling machines, oil and dust, and strong reflective light fluctuations. This leads to the problem that cutting tool replacement decisions are prone to missed detections, misjudgments, and lack of consistency.
[0009] Technical solution
[0010] To achieve the above objectives, this invention provides the following technical solution: a multi-scale milling tool defect detection method based on tool failure mechanism constraints, comprising: S1, acquiring image information and deployment scene data of rail milling tools, obtaining acquisition method data and historical structure data, and performing preprocessing; S2, constructing a tool geometric model based on the rail milling tool image information and historical structure data, performing region positioning and segmentation under geometric consistency constraints, and outputting key region masks, cutting edge trajectory baselines, and region scale normalization benchmarks; S3, performing multi-scale discriminant analysis of rail milling tool image information under key region mask constraints, performing direction consistency enhancement and region consistency enhancement based on the results of the multi-scale discriminant analysis of failure mechanism constraints, and outputting enhanced defect feature information; S4, performing depth discriminant credibility analysis on the enhanced defect feature information, outputting defect type and defect location based on the results of the depth discriminant credibility analysis, and performing difficult case archiving and enhancement convergence adjustment; S5, performing defect severity quantification and cross-frame consistency judgment analysis on defect location, defect type, and key region masks, and outputting traceable decision results for continued use, early warning prompts, and immediate tool replacement.
[0011] Furthermore, the specific process of acquiring image information and deployment scene data of rail milling tools, as well as acquisition method data and historical structural data, is as follows: Acquiring rail milling tool image information includes: tool edge image sequence, rake face image sequence, flank face image sequence, frame timestamp sequence, acquisition frame rate data, and mounting hole position image feature data; acquiring deployment scene data includes: milling lathe tool disc acquisition marks and tool change / maintenance station acquisition marks; acquiring acquisition method data includes: industrial camera acquisition marks and microscopic imaging device acquisition marks; acquiring historical structural data includes: geometric dimension parameter data and historical defect annotation sample data.
[0012] Furthermore, the specific preprocessing steps are as follows: Abnormal pixel removal and noise smoothing are performed on the tool cutting edge image sequence, rake face image sequence, and flank face image sequence using a sliding window quantile extremum removal algorithm and a bilateral filtering denoising algorithm; jitter alignment and motion compensation are performed on the continuous frame images corresponding to the frame timestamp sequence using a phase-correlation-based inter-frame displacement estimation algorithm and a sub-pixel image registration algorithm; grayscale dynamic range unification is performed on the tool cutting edge image sequence, rake face image sequence, and flank face image sequence using a local contrast-limited adaptive histogram equalization algorithm and a grayscale range linear normalization algorithm; and dimension unification is performed on the acquired frame rate data and geometric dimension parameter data using distribution normalization and linear normalization algorithms, and coordinate normalization processing is performed on the mounting hole position image feature data.
[0013] Furthermore, based on the image information and historical structural data of the rail milling tool, a tool geometric model is constructed. Under the constraint of geometric consistency, the region is located and segmented, and the key region mask, the cutting edge direction baseline, and the region scale normalization benchmark are output. The specific process is as follows: the tool outline is extracted and the mounting hole position is detected from the tool cutting edge image sequence, the rake face image sequence, and the flank face image sequence. The tool geometric model is established by combining the geometric dimension parameter data. Under the constraint of the tool geometric model, the cutting edge region, the rake face region, and the flank face region are divided, and the key region mask, the cutting edge direction baseline, and the region scale normalization benchmark are output.
[0014] Furthermore, the specific process of performing multi-scale discriminant analysis on the failure mechanism constraints of rail milling tool image information under key region mask constraints is as follows: The cutting edge region image is obtained by cropping the key region mask from the tool cutting edge image sequence; the cutting edge direction angle is obtained from the cutting edge region image using a least-squares straight-line fitting algorithm for the cutting edge contour; the principal direction angle of the slender structure is obtained from the cutting edge region image using a principal direction estimation algorithm for the structure tensor on the gradient structure tensor; the cosine similarity of the included angle is calculated, and the non-negative part is taken to obtain the crack direction consistency; the failure mechanism constraints of the cutting edge region, rake face region, and flank face region are further analyzed using... The proportion of candidate defects is obtained through connected component extraction and region proportion statistics algorithms: the proportion of candidate defects in the cutting edge region is calculated based on the proportion of candidates with abrupt boundary changes, and the proportion of candidate defects in the rake face and flank face regions is calculated based on the proportion of candidates with continuous sheet-like structures. The maximum proportion of candidate defects is taken to obtain the consistency of the regional mechanism. The energy of detail subbands in the cutting edge region, rake face region, and flank face region is calculated using the discrete wavelet multi-scale decomposition algorithm. The logarithm of the ratio of micro-scale detail subband energy to macro-scale detail subband energy is calculated and averaged to obtain the scale defect response value. The tool cutting edge image sequence is then analyzed. The front and rear face image sequences are analyzed using a high-brightness saturation region detection algorithm to calculate the reflective mask area ratio and take the maximum value to obtain the reflective residual penalty. For consecutive frames corresponding to the frame timestamp sequence, the root mean square difference of the gradient amplitude in key regions between frames is calculated and mapped using a grayscale range linear normalization algorithm to obtain the vibration residual penalty. The natural logarithm of the sum of the dimensional defect response value and a certain value is calculated to obtain the dimensional defect logarithmic modulation term. The sum of the reflective residual penalty and the vibration residual penalty is calculated and added to a certain value to obtain the penalty normalization denominator term. The crack direction consistency and regional mechanism are calculated. The product of the consistency degree is divided by the penalty normalization denominator to obtain the mechanism consistency normalization product term; the exponent of the negative number of the mechanism consistency normalization product term is added to the reciprocal of 1 to obtain the consistency logic compression term; the sum of the reflective residual penalty and the vibration residual penalty is calculated and divided by the sum of the scale defect response value and 1 to obtain the penalty scale coupling ratio term; the exponent of the negative number of the penalty scale coupling ratio term is calculated to obtain the penalty exponential decay term; the product of the scale defect logarithmic modulation term, the consistency logic compression term, and the penalty exponential decay term is calculated to obtain the failure mechanism constraint discrimination value.
[0015] Furthermore, the specific process of performing direction-consistent enhancement and region-consistent enhancement based on the multi-scale discriminant analysis results constrained by the failure mechanism and outputting the enhanced defect feature information is as follows: Real-time comparison of the failure mechanism constraint discriminant value and the failure mechanism constraint discriminant threshold: When the failure mechanism constraint discriminant value is less than the failure mechanism constraint threshold, output a check mark and a re-collection trigger mark; in the milling lathe tool head acquisition mark scenario, generate clean oil and dust, adjust the industrial camera incident angle, and re-collection prompt logs; in the tool change maintenance station acquisition mark scenario, perform magnified image acquisition of the cutting edge area based on the key area mask; when the failure mechanism is approximately... When the constraint discrimination value is greater than or equal to the failure mechanism constraint discrimination threshold, failure mechanism constraint enhancement processing is performed and enhanced defect feature information is output: the cutting edge region performs directional consistency enhancement on the response of the slender structure in the vertical direction based on the cutting edge direction baseline and strengthens the abrupt response of the chipping notch boundary; the rake face region and the flank face region enhance the boundary contrast response of the wear area based on the sheet-like continuous distribution constraint and enhance the gray-scale difference response and texture difference response of the coating peeling area; the defect feature information is subjected to scale consistency characterization so that the crack-type defect feature information and the wear and peeling-type defect feature information enter the same comparable characterization space.
[0016] Furthermore, the specific process of performing deep discriminative reliability analysis on the enhanced defect feature information is as follows: Based on a deep learning model with dual-scale input paths, the dual-scale input paths correspond to the micro-scale level and the macro-scale level, respectively. Defect feature information is input into the micro-scale level of the deep learning model to obtain unnormalized discriminative score sequences for edge chipping, edge cracking, coating peeling, and non-uniform wear. The logarithmic difference between the maximum and second-largest scores is calculated using a logarithmic summation and exponential stability algorithm to obtain the log-likelihood difference for the slender structure level. Defect feature information is then input into the macro-scale level of the deep learning model, and the logarithmic difference between the maximum and second-largest scores is calculated using the same algorithm to obtain the log-likelihood difference for the sheet-like structure level. After determining the scene category based on the data from the acquisition method and deployment scenario, the residual reflection penalty and residual vibration penalty under the same scene category are statistically obtained based on historical defect annotation sample data. The scene calibration penalty is calculated based on the deviation between the current residual reflection penalty and the residual vibration penalty within the distribution range of the scene calibration penalty. The exponents of the log-likelihood differences of the slender structure hierarchy, the lamellar structure hierarchy, and the square root of the product of the log-likelihood differences of the slender structure hierarchy and the lamellar structure hierarchy are calculated, and then added to a certain value and the natural logarithm is taken to obtain the hierarchical likelihood fusion logarithm term. The quotient of the failure mechanism constraint discrimination value divided by the sum of the scene calibration penalty and a certain value is calculated to obtain the mechanism calibration normalization ratio term. The exponent of the mechanism calibration normalization ratio term is calculated, and the reciprocal of the sum of the opposite value and a certain value is taken to obtain the mechanism constraint logic compression term. The quotient of the scene calibration penalty divided by the sum of the failure mechanism constraint discrimination value and a certain value is calculated, the opposite value is taken, and the exponent is taken to obtain the calibration exponent decay term. The product of the hierarchical likelihood fusion logarithm term, the mechanism constraint logic compression term, and the calibration exponent decay term is calculated to obtain the defect type discrimination confidence value.
[0017] Furthermore, based on the results of the deep discriminant confidence analysis, the specific process of outputting defect types and locations, and archiving difficult cases and enhancing convergence adjustment is as follows: Real-time comparison of the defect type discrimination confidence value and the defect type discrimination confidence threshold: When the defect type discrimination confidence value is less than the defect type discrimination confidence threshold, an unsigned mark and a difficult case mark are output, and the convergence processing of the failure mechanism constraint enhancement is re-triggered; when the defect type discrimination confidence value is greater than or equal to the defect type discrimination confidence threshold, the defect detection and classification results are output based on the deep learning model, and type signing is performed. The defect type is a set of failure types determined during the model training phase based on the failure modes formed by the milling tool during rail milling operations and combined with the category labeling results of historical defect labeling sample data, including edge chipping, edge cracking, coating peeling, and non-uniform wear; simultaneously, the defect location and its critical area corresponding to the defect type are output, entering the defect severity assessment and tool replacement decision process.
[0018] Furthermore, the specific process for quantifying defect severity and determining cross-frame consistency of the defect location, defect type, and key area mask is as follows: When the defect location is within the cutting edge region: if the defect type is a cutting edge crack, the crack length is obtained through skeletonization and refinement algorithms and the longest path search algorithm, and the crack length ratio is obtained by scale normalization using geometric dimension parameter data; if the defect type is cutting edge chipping, the ratio of the notch area to the cutting edge neighborhood area is obtained through connected component area statistics algorithms; if the defect location is within the rake face or flank face region: if the defect type is coating peeling or non-uniform wear, the area ratio is obtained through connected component merging and area ratio statistics algorithms; the maximum value of the ratio corresponding to the defect type is taken as the defect geometric quantization value; if the defect location is within the key area, the coverage of the circumscribed rectangle is calculated... The distribution range is obtained using a statistical algorithm based on the diameter of the distribution range. Defect distribution expansion is obtained by scaling the geometric dimension parameters. Based on frame timestamp sequences and collected frame rate data, the percentage of frames with consistent defect types and overlapping defect positions satisfying the overlap coefficient condition is statistically analyzed. Cross-frame stability consistency is obtained using an overlap coefficient calculation algorithm. The exponent of the inverse of the defect geometric quantization value is calculated and subtracted to obtain the geometric quantization saturation activation term. The natural logarithm of the sum of the defect distribution expansion and one is calculated to obtain the distribution expansion logarithm enhancement term. The exponent of the inverse of the sum of the cross-frame stability consistency and one is calculated to obtain the cross-frame stability index suppression term. The product of the geometric quantization saturation activation term, the distribution expansion logarithm enhancement term, and the cross-frame stability index suppression term is calculated to obtain the reliable value for blade replacement decision rejection.
[0019] Furthermore, the specific process for outputting traceable decision results for continued use, early warning prompts, and immediate tool replacement is as follows: Real-time comparison of the tool replacement decision rejection confidence value and the tool replacement decision rejection confidence threshold; execution of defect severity assessment and tool replacement decision process: When the tool replacement decision rejection confidence value is less than the tool replacement decision rejection confidence threshold, a "continue use" label is output. The quantitative calculation results of defect length, defect area, and defect distribution range are mapped to the defect severity level, and the tool cutting edge image sequence, rake face image sequence, flank face image sequence, defect type, defect location, etc., are also output. Defect severity level, acquisition method data, and deployment scenario data are created and archived in the tool health database; when the confidence value of the tool change decision rejection is greater than or equal to the confidence threshold of the tool change decision rejection, an early warning prompt mark and a re-acquisition and re-inspection mark are output; when the acquisition deployment scenario is the milling and grinding turning tool head acquisition mark, the re-acquisition strategy is to re-acquire and recalculate the data at the same acquisition frame rate during intermittent shutdown; when the acquisition deployment scenario is the tool change maintenance station acquisition mark and the acquisition method is the industrial camera acquisition mark, the re-inspection strategy is to switch the acquisition method to the microscopic imaging device to re-acquire the key area.
[0020] Beneficial effects
[0021] The present invention has the following beneficial effects:
[0022] (1) This invention achieves stable segmentation and alignment of the cutting edge region, the front face region and the back face region under geometric consistency constraints, so that the entire defect detection process has unified key area boundary constraints, thereby realizing the effect of reproducible and traceable key area positioning results, effectively solving the problem of unstable defect positioning caused by key area drift in the prior art.
[0023] (2) This invention introduces a joint enhancement mechanism of direction consistency and region consistency oriented to failure mechanism, so that the directional information of crack chipping and the flaky distribution information of wear and spalling are specifically enhanced in the same processing link, thereby achieving the effect of clearer expression of distinguishable features of multiple types of defects, and effectively solving the problem that arbitrary enhancement in the prior art leads to the amplification and misleading of defect semantics.
[0024] (3) This invention constructs an enhanced admission path driven by failure mechanism constraint discrimination, so that frame samples that do not meet the failure mechanism consistency condition automatically exit the issuance process and enter the review and re-collection diversion, thereby achieving the effect of controllable convergence of the issuance process under abnormal imaging conditions, effectively solving the problem of misjudgment accumulation caused by inferior frames directly entering the discrimination in the prior art.
[0025] (4) This invention introduces a discriminative credibility assessment and difficult example archiving mechanism into the deep learning inference output, so that uncertain samples are explicitly identified and used for subsequent correction and iterative optimization, thereby achieving the effect of continuous stabilization of defect type issuance results, effectively solving the problem of performance fluctuation of the model in complex scenarios caused by the lack of difficult example closure loop in the prior art.
[0026] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0027] Figure 1 This is a flowchart of the multi-scale milling tool defect detection method based on tool failure mechanism constraints of the present invention;
[0028] Figure 2 This is a schematic diagram of the key detection area division process based on the tool geometric reference model of the present invention;
[0029] Figure 3 Stacked analysis diagram of the contribution of the confidence value items for defect type discrimination in this invention;
[0030] Figure 4 This is a schematic diagram of the multi-scale feature-driven tool defect type identification and classification output process of the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] Please see Figures 1-4 This invention provides a technical solution: a multi-scale milling tool defect detection method based on tool failure mechanism constraints, comprising the following steps: S1, acquiring image information and deployment scene data of rail milling tools, obtaining acquisition method data and historical structure data, and performing preprocessing; S2, constructing a tool geometric model based on the rail milling tool image information and historical structure data, performing region positioning and segmentation under geometric consistency constraints, and outputting key region masks, cutting edge trajectory baselines, and region scale normalization benchmarks; S3, performing multi-scale discriminant analysis of rail milling tool image information under key region mask constraints, performing direction consistency enhancement and region consistency enhancement based on the results of the multi-scale discriminant analysis of failure mechanism constraints, and outputting enhanced defect feature information; S4, performing depth discriminant credibility analysis on the enhanced defect feature information, outputting defect type and defect location based on the results of the depth discriminant credibility analysis, and performing difficult case archiving and enhancement convergence adjustment; S5, performing defect severity quantification and cross-frame consistency judgment analysis on defect location, defect type, and key region masks, and outputting traceable decision results of continued use, early warning prompts, and immediate tool replacement.
[0033] Specifically, the process of acquiring image information and deployment scene data of rail milling tools, as well as data on acquisition methods and historical structure data, is as follows: Image information of rail milling tools is acquired, including: tool cutting edge image sequence, rake face image sequence, flank face image sequence, frame timestamp sequence, acquisition frame rate data, and mounting hole position image feature data. Image acquisition can be performed online using an industrial camera installed near the milling cutter head to capture images of in-service tools. Offline acquisition can be performed on disassembled milling tools at tool replacement or maintenance stations. Offline acquisition uses an industrial camera or microscopic imaging device to obtain higher resolution images of key areas. The mounting hole position image feature data is a sequence of coordinates of the center key points of the mounting holes, containing the two-dimensional coordinate values of each mounting hole in the current frame image coordinate system, with coordinate units of [missing information]. Pixel coordinates or normalized coordinates; collect deployment scenario data, including: milling and grinding tool head acquisition marks and tool change and maintenance station acquisition marks. The milling and grinding tool head acquisition marks correspond to the on-board online acquisition process, and the tool change and maintenance station acquisition marks correspond to the post-disassembly fixed-point acquisition process; acquire acquisition method data, including: industrial camera acquisition marks and microscopic imaging device acquisition marks. The industrial camera acquisition marks correspond to the large field of view fast acquisition method, and the microscopic imaging device acquisition marks correspond to the high-definition acquisition method; acquire historical structural data, including: geometric dimension parameter data and historical defect annotation sample data. The geometric dimension parameter data is imported from tool design drawings, specifications, or factory inspection records, and the historical defect annotation sample data can be formed by aggregating previous tool change inspection records and manual verification annotation results.
[0034] This implementation plan forms the data acquisition and organization results of rail milling tools covering both online and offline working conditions. It obtains a structured input set that can simultaneously support geometric modeling, comparable positioning of key areas, multi-scale defect discrimination, and threshold adjudication. It completes the unified encapsulation of time-series image evidence, acquisition rhythm evidence, and geometric anchor point evidence of mounting hole positions for the tool cutting edge area, rake face area, and flank face area. It establishes a scene-layered identification system for deployment scene data and acquisition method data, and solidifies the historical baseline constraints of geometric dimension parameter data and historical defect annotation sample data. This ensures that the calculation of subsequent failure mechanism constraint discrimination values, defect type discrimination confidence values, and tool replacement decision scrap confidence values has a consistent data caliber, a reproducible acquisition link, and traceable sample basis.
[0035] Specifically, the preprocessing process is as follows: Anomalies and noise smoothing are performed on the tool cutting edge image sequence, rake face image sequence, and flank face image sequence using a sliding window quantile de-scraping algorithm and a bilateral filtering denoising algorithm to suppress random noise caused by oil and dust particles. The window length of the sliding window quantile de-scraping algorithm is configurable, determined by converting the collected frame rate data into the number of frames corresponding to the time span. The quantile parameter is also configurable, using upper and lower quantile truncation intervals and selected within a preset quantile range. Finally, a phase-correlation-based inter-frame displacement estimation algorithm and a sub-pixel image registration algorithm are used to process the continuous frame images corresponding to the frame timestamp sequence. The algorithm performs jitter alignment and motion compensation to suppress the interference of structural trails caused by vibrations on the milling machine on crack and cutting edge boundaries. It unifies the dynamic range of grayscale for tool cutting edge, rake face, and flank face image sequences using a local contrast-limited adaptive histogram equalization algorithm and a grayscale range linear normalization algorithm. It unifies the image sequences to equal time steps using a time axis resampling alignment algorithm for the acquired frame rate data, serving as a unified time reference for subsequent cross-frame stabilization window calculations. Finally, it unifies the dimensions of the acquired frame rate data and geometric dimension parameter data using distribution normalization and linear normalization algorithms, and performs coordinate normalization processing on the mounting hole position image feature data.
[0036] In this implementation plan, robust preprocessing results of image sequences are formed for interference conditions on the rail milling machine. This improves the noise robustness, temporal registration consistency, and grayscale statistical comparability of the tool cutting edge image sequence, rake face image sequence, and flank face image sequence. It also reduces the pseudo-edge and pseudo-texture responses caused by random disturbances from oil and dust and vibration residues. A frame sequence input benchmark with equal time steps is constructed. The plan completes the dimensional unification of the acquired frame rate data and geometric dimension parameter data, and the coordinate normalization of the mounting hole position image feature data. This ensures that subsequent tool geometric model generation, key area mask construction, failure mechanism constraint discrimination value calculation, and cross-frame stability consistency calculation have a unified data caliber, repeatable numerical scale, and stable temporal alignment basis.
[0037] Specifically, the process of constructing a tool geometric model based on rail milling tool image information and historical structural data, performing region positioning and segmentation under geometric consistency constraints, and outputting key region masks, cutting edge trajectory baselines, and region scale normalization benchmarks is as follows: The tool outline is extracted and mounting hole positions are detected from the tool cutting edge image sequence, rake face image sequence, and flank face image sequence. A tool geometric model is then established by combining geometric dimension parameter data. This geometric dimension parameter data includes at least the mounting hole diameter data, mounting hole center distance data, key tool outline dimensions, and geometric positioning dimensions of the cutting edge relative to the mounting hole. The tool geometric model is a two-dimensional geometric reference model constructed based on mounting hole position image feature data and geometric dimension parameter data. Specifically, this includes: extracting the outer contour point set from the tool outline using a Canny edge detection and contour tracking algorithm; obtaining the hole center coordinates using a Hough circle transform detection algorithm; and then, based on the hole center coordinates and the outer contour point set... The similarity transformation parameter estimation algorithm calculates the rotation angle, scale factor, and translation amount, and applies the similarity transformation to the tool contour template to generate a tool geometric reference frame in the current image coordinate system. The tool contour template is determined by geometric dimension parameter data and updated according to the tool model. Under the constraints of the tool geometric model, it is divided into cutting edge region, rake face region, and flank face region. The division includes: after geometrically registering the tool outline with the center of the mounting hole, generating the boundaries of each region in the registration coordinate system according to the geometric proportion relationship determined by the geometric dimension parameter data; using a least squares straight line fitting algorithm to obtain the cutting edge direction baseline, which is represented by the cutting edge reference straight line or equivalent direction vector obtained by fitting the cutting edge contour; converting the region boundaries into pixel-level key region masks through a polygon filling algorithm; and calculating the scale conversion factor based on the center distance of the mounting hole and the known geometric dimension parameter data as the region scale normalization benchmark, outputting the key region mask, the cutting edge direction baseline, and the region scale normalization benchmark.
[0038] like Figure 2 The diagram illustrates the key detection area division process based on the tool geometric reference model, showcasing the overall processing chain for locating key areas of rail milling tools: First, the original image of the milling tool is acquired, and the tool's outline is extracted; then, the tool's geometric structural features are identified based on the outline, and a tool geometric reference model is established accordingly; finally, under the constraints of this geometric reference model, the key defect detection area is divided, forming the detection ranges for the cutting edge area, the rake face area, and the flank face area, providing a unified regional boundary basis for subsequent defect enhancement, detection, and classification.
[0039] In this implementation plan, this step forms a unified geometric reference expression for different tool models and different acquisition postures, completes the stable geometric anchoring of the tool's shape structure and mounting hole position, obtains a tool geometric model representation that can be reused in the current image coordinate system, realizes the boundary determination and spatial scale comparability constraint of the cutting edge region, rake face region, and flank face region, and forms three types of core structured outputs: pixel-level key area mask, cutting edge direction baseline, and regional scale normalization benchmark. It establishes a unified coordinate basis and scale benchmark for subsequent crack direction consistency calculation, regional mechanism consistency statistics, scale defect response value construction, and defect location and type issuance.
[0040] Specifically, the process of performing multi-scale discriminant analysis on the failure mechanism constraints of rail milling tool image information under key region mask constraints is as follows: The key region mask is cropped from the tool cutting edge image sequence to obtain the cutting edge region image. The cutting edge direction angle is obtained from the cutting edge region image using a least-squares straight-line fitting algorithm for the cutting edge contour. The principal direction angle of the slender structure is obtained from the cutting edge region image using a principal direction estimation algorithm on the gradient structure tensor. The cosine similarity of the angles between the two is calculated, and the non-negative part is taken to obtain the crack direction consistency. The proportion of candidate defects is obtained from the cutting edge region, the rake face region, and the flank face region respectively through connected component extraction and region proportion statistics algorithms. The proportion of candidate defects with abrupt boundary changes in the cutting edge region is used as the candidate defect proportion, while the proportion of candidate defects with sheet-like continuity in the rake face region and the flank face region is used as the candidate defect proportion. The proportions of candidate defects in the cutting edge region, the rake face region, and the flank face region are then used to obtain the region proportions through a maximum value selection operator. Mechanism consistency: For the cutting edge region, rake face region, and flank face region, the energy of detail subbands is calculated using the discrete wavelet multi-scale decomposition algorithm. The ratio of micro-scale detail subband energy to macro-scale detail subband energy is calculated, and the logarithm of the comparison value is taken and averaged over the three regions to obtain the scale defect response value. For the tool cutting edge image sequence, rake face image sequence, and flank face image sequence, the area ratio of reflective mask is calculated using the high brightness saturation region detection algorithm. The reflective mask is obtained by merging connected components and performing morphological closing operations on the set of pixels with near-saturation brightness in the corresponding key region. The determination of near-saturation brightness adopts the high quantile truncation criterion of the gray-level distribution of the key region, with a quantile range of 99% to 99.9%. The maximum reflective mask area ratio is taken to obtain the reflective residual penalty. For the consecutive frame images corresponding to the frame timestamp sequence, the root mean square difference of the gradient amplitude of the key region is calculated and mapped using the gray-level range linear normalization algorithm to obtain the vibration residual penalty.
[0041] The natural logarithm of the sum of the scale defect response value and 1 is calculated to obtain the scale defect logarithmic modulation term. The natural logarithmic mapping is used to compress the long-tailed fluctuations of the multi-scale energy ratio into a stable and comparable modulation scale, and to avoid nonlinear amplification dimensional differences in the scale defect response value under different tool types and acquisition methods. The sum of the reflective residual penalty and the vibration residual penalty is calculated and added to 1 to obtain the penalty normalization denominator term. The addition to 1 is used to form a strictly positive normalized denominator boundary, so that the penalty term is effective under extremely strong reflective or strong vibration conditions. The system maintains numerical computability under these conditions and maps the penalty intensity monotonically as a suppressor of subsequent mechanistic consistency evidence. The product of crack direction consistency and regional mechanistic consistency is calculated and divided by the penalty normalization denominator to obtain the mechanistic consistency normalization product term. This product structure characterizes the joint validity condition of directional and regional evidence, avoiding the triggering of mechanistic validity solely based on single-direction consistency or single-regional anomaly. The exponent of the mechanistic consistency normalization product term is inversely calculated and its reciprocal is added to obtain the consistency logic compression term. The contraction is used to map the mechanism consistency normalization product term to a bounded confidence gating weight, making the term exhibit a marginally decreasing growth characteristic as the mechanism evidence gradually strengthens, thereby suppressing the sudden jumps in gating weights caused by a small amount of noise disturbance and improving cross-frame stability. The sum of the reflection residual penalty and the vibration residual penalty is calculated and divided by the sum of the scale defect response value and one to obtain the penalty scale coupling ratio term. The coupling ratio is used to characterize the relative degradation of the scene interference intensity with the scale defect evidence intensity, so that the penalty term no longer only reflects the absolute intensity, but also reflects the proportion of obscuration of observable defects by interference under the support of the current scale defect response value. The exponent of the penalty scale coupling ratio term is calculated to obtain the penalty exponential decay term. The exponential decay is used to construct a fast convergence suppression mechanism for coupling penalty, so that the term decays rapidly as the penalty scale coupling ratio term increases, thereby implementing stronger suppression of pseudo-defect responses under strong reflection and strong vibration conditions. The product of the scale defect logarithmic modulation term, the consistency logic compression term, and the penalty exponential decay term is calculated to obtain the failure mechanism constraint discrimination value. The specific calculation formula is as follows:
[0042] ;
[0043] In the formula, The failure mechanism constraint discrimination value is used to characterize the comprehensive degree to which the defect evidence in the key area of the current frame simultaneously satisfies the constraints in terms of directional distribution consistency, regional mechanism consistency and scale-level observability. It indicates the consistency of crack direction and is used to quantify the strength of the same orientation between the main direction of the slender structure and the direction of the cutting edge. It represents the consistency of regional mechanisms and is used to quantify the degree of consistency in the mechanism dominance of candidate defects among the cutting edge region, the rake face region, and the flank face region. This represents the scale defect response value, used to quantify the relative enhancement of microscale detail subband energy compared to macroscale detail subband energy; It represents the amount of reflection residue penalty, used to characterize the occlusion intensity of the set of bright saturated pixels in the key area on texture details and boundary gradients; It represents the residual penalty for vibration, characterizing the abnormal fluctuations in gradient energy caused by incomplete compensation of minute displacements and structural trailing between frames.
[0044] In this implementation plan, a set of directional evidence, regional evidence, scale evidence, and scene penalty evidence required for calculating the failure mechanism constraint discrimination value is formed. A unified quantitative expression and comparable calibration of crack direction consistency, regional mechanism consistency, scale defect response value, reflective residual penalty amount, and vibration residual penalty amount are completed. A joint discrimination result of defect observability and mechanism consistency under complex field interference conditions is constructed. The output of failure mechanism constraint discrimination value can directly drive failure mechanism constraint enhancement processing and issue gating, thereby improving the differentiation stability and cross-frame consistency of slender structural defects such as crack chipping and flaking structural defects such as wear and spalling in key areas.
[0045] Specifically, the process of performing direction-consistent enhancement and region-consistent enhancement based on the results of multi-scale discriminant analysis constrained by failure mechanism and outputting the enhanced defect feature information is as follows: Real-time comparison of failure mechanism constraint discriminant values and failure mechanism constraint discriminant thresholds:
[0046] When the failure mechanism constraint judgment value is less than the failure mechanism constraint judgment threshold, it is determined that the current frame key area image does not meet the consistency requirements of direction distribution, spatial region and scale level corresponding to the milling tool failure mechanism constraint conditions. The check mark and re-collection trigger mark are output. The key area mask, reflective mask area ratio, reflective residual penalty amount, and vibration residual penalty amount are created and archived to the quality anomaly database. In the milling lathe tool head acquisition mark scenario, the cleaning oil and dust, adjustment of industrial camera incident angle and re-collection operation prompt log are generated. In the tool change maintenance station acquisition mark scenario, the re-collection operation prompt is output: perform magnified image acquisition on the cutting edge area according to the key area mask to form input data that meets the failure mechanism constraint judgment.
[0047] When the failure mechanism constraint discrimination value is greater than or equal to the failure mechanism constraint discrimination threshold, non-arbitrary enhancement of the failure mechanism constraint is performed and the enhanced defect feature information is output: For the cutting edge region, based on the cutting edge direction baseline, directional consistent enhancement is performed on the response of the slender structure in the direction perpendicular to the cutting edge direction. The directional consistent enhancement is implemented using a direction-selective enhancement operator along the normal direction of the cutting edge. The direction-selective enhancement operator is composed of a directional convolution kernel or anisotropic diffusion filter and uses the cutting edge direction baseline to determine the main direction constraint, and simultaneously enhances the boundary abrupt response corresponding to the chipping notch. The boundary abrupt response enhancement is implemented using a boundary enhancement operator based on the consistent constraint of gradient magnitude and curvature; For the rake face region and flank face region, based on the continuous distribution of approximately The system enhances the boundary contrast response of the wear area by employing a local contrast enhancement operator executed within a key region mask and constrained by sheet-like connected domains. It also enhances the grayscale and texture difference responses of the coating peeling area. Grayscale difference response enhancement is achieved using a grayscale difference contrast stretching operator, while texture difference response enhancement is achieved using a texture enhancement operator based on local texture energy. The system performs scale-consistent representation of defect features by employing a multi-scale response recalibration operator based on a regional scale normalization benchmark to uniformly map the feature amplitudes and spatial scales at different scale levels, ensuring that crack-type defect features are integrated into the same comparable representation space as wear and peeling-type defects. Finally, it outputs the enhanced defect feature information.
[0048] In this implementation plan, this step generates online gating and processing results based on failure mechanism constraint discrimination values, enabling immediate adjudication of the validity of key area images and the consistency of defect mechanisms. It completes the closed-loop solidification of the issuance path access control and the review and supplementary collection of non-issued samples, establishes an evidentiary archiving chain for the quality anomaly database, triggers the correction of data collection conditions and the output of supplementary collection instructions for data in different deployment scenarios, forms a non-arbitrary enhancement output mechanism that meets the failure mechanism constraint conditions, strengthens the response to slender structural defects and abrupt changes in the chipping boundary in the cutting edge region, strengthens the contrast and texture difference response of flaky wear and spalling defects in the front and rear cutting edge regions, completes the scale-consistent characterization of defect feature information, and improves the separability, stability, and cross-scenario consistency of subsequent defect type discrimination confidence value calculation.
[0049] Specifically, the process of performing deep discriminative credibility analysis on the enhanced defect feature information is as follows: Based on a deep learning model with dual-scale input paths, where the dual-scale input paths correspond to the micro-scale and macro-scale levels respectively, the defect feature information is input into the micro-scale level of the deep learning model. The micro-scale level is the micro-scale feature path or micro-scale output head of the deep learning model. The input to the micro-scale level is the slender structure enhanced feature information obtained from the defect feature information after directional consistency enhancement. This yields unnormalized discriminative score sequences for edge chipping, edge cracking, coating peeling, and non-uniform wear. The logarithmic summation exponential stability calculation algorithm is used to calculate the logarithmic difference between the maximum and second-largest scores on the score sequences, obtaining the log-likelihood difference value for the slender structure level. The defect feature information is then input into the macro-scale level of the deep learning model. The macro-scale level is the macro-scale feature path or macro-scale output head of the deep learning model. The input to the macro-scale level is the slender structure enhanced feature information obtained from the defect feature information after sheet-like continuous distribution constraint enhancement. The enhanced feature information of the sheet-like structure is obtained, and the logarithmic summation exponential stabilization calculation algorithm, which is the same as that used for the logarithmic likelihood difference of the elongated structure hierarchy, is used to calculate the logarithmic difference between the maximum and second largest scores. The logarithmic and exponential stabilization aggregation algorithm specifically includes: sorting the unnormalized discrimination score sequence to obtain the maximum and second largest scores, performing exponential mapping on the maximum and second largest scores respectively, and using the maximum score as the shift benchmark for exponential shift normalization. Then, performing natural logarithmic inverse mapping on the shifted exponential values to restore the logarithmic domain difference, thereby obtaining the logarithmic difference between the maximum and second largest scores while avoiding exponential overflow or underflow. After determining the scene category based on the data from the acquisition method and the deployment scene data, the distribution range of the residual reflection penalty and residual vibration penalty under the same scene category is obtained based on the statistical data of historical defect annotation samples. The deviation of the current residual reflection penalty and residual vibration penalty is used to calculate the scene calibration penalty.
[0050] The exponents of the log-likelihood differences of the slender structure hierarchy, the log-likelihood differences of the sheet structure hierarchy, and the exponent of the square root of the product of the log-likelihood differences of the slender structure hierarchy and the sheet structure hierarchy are calculated and added to one, then the natural logarithm is taken to obtain the hierarchical likelihood fusion logarithm term. The square root term is introduced to explicitly characterize the synergistic gain between microscale slender structure evidence and macroscale sheet structure evidence, enabling the two hierarchical pathways to obtain an additional joint boost when they simultaneously provide consistent directions. Furthermore, logarithmic domain convergence avoids the numerical explosion of the fusion term caused by extreme high scores in a single pathway and improves cross-scenario comparability. The quotient of the failure mechanism constraint discriminant value divided by the sum of the scene calibration penalty and one is obtained to obtain the mechanism calibration normalization ratio term. The scene calibration penalty is added to the denominator to statistically analyze the reflections and vibrations induced by deployment scene data and acquisition method data. The offset is explicitly discounted to an effective discount of mechanistic evidence; the exponent of the negative of the mechanistic calibration normalization ratio term is added to the reciprocal of 1 to obtain the mechanistic constraint logic compression term. The logic compression mapping is used to transform the mechanistic calibration normalization ratio term into a bounded gating weight, making the weight's random mechanistic evidence enhancement exhibit smooth saturation characteristics; the quotient of the scenario calibration penalty divided by the sum of the failure mechanism constraint discriminant value and 1 is calculated, the negative of which is then taken as the exponent, to obtain the calibration exponent decay term. The decay term is used to construct a monotonically suppressive mechanism for the relative dominance of scenario penalty and mechanistic evidence, so that when the scenario calibration penalty statistically exceeds the failure mechanism constraint discriminant value, the credible output is quickly suppressed; the product of the hierarchical likelihood fusion logarithm term, the mechanistic constraint logic compression term, and the calibration exponent decay term is calculated to obtain the defect type discrimination credible value. The specific calculation formula is as follows:
[0051] ;
[0052] In the formula, The confidence value for defect type identification is used to characterize the reliability of type issuance formed by the combined effect of the current enhanced defect feature information under the influence of microscale slender structure identification evidence, macroscale sheet structure identification evidence, and failure mechanism constraint consistency. It represents the log-likelihood difference of the slender structure hierarchy, which characterizes the category distinction margin for slender structure-dominant defects such as edge cracks and edge chipping. It represents the log-likelihood difference of the lamellar structure hierarchy, used to characterize the category distinction margin for defects dominated by lamellar continuous structures such as coating peeling and non-uniform wear; The failure mechanism constraint discriminant value is used to compress three types of mechanism evidence—directional distribution consistency, regional mechanism consistency, and scale-level observability—into a unified gating input, thereby imposing failure mechanism constraints on the pure data-driven output of the deep learning model and reducing the risk of high-confidence misjudgment that does not conform to the mechanism. This represents the scene calibration penalty, used to characterize the degree of deviation between the residual reflection penalty and the residual vibration penalty in the current scene category and the statistical distribution of historical defect annotation sample data.
[0053] In this embodiment, Table 1 is a comparison table of the confidence value variables and calculation results of defect type discrimination under multiple scenarios. It records in detail the log-likelihood difference of the slender structure level, the log-likelihood difference of the sheet structure level, the failure mechanism constraint discrimination value, the scene calibration penalty amount, and the finally calculated confidence value of defect type discrimination under different scenarios. It is used to quantify the confidence level of defect type discrimination results under different imaging perturbations and mechanism constraints. Specifically: In Scenario 1, the log-likelihood difference for the slender structure hierarchy is 0.6, the log-likelihood difference for the sheet-like structure hierarchy is 0.6, the failure mechanism constraint discrimination value is 0.8, the scenario calibration penalty is 0.2, and the confidence value for defect type discrimination is 1.103674; In Scenario 2, the log-likelihood difference for the slender structure hierarchy is 1.2, the log-likelihood difference for the sheet-like structure hierarchy is 0.6, the failure mechanism constraint discrimination value is 0.8, the scenario calibration penalty is 0.2, and the confidence value for defect type discrimination is 1.263857; In Scenario 3, the log-likelihood difference for the slender structure hierarchy is 0.6, the log-likelihood difference for the sheet-like structure hierarchy is 1.2, the failure mechanism constraint discrimination value is 0.8, the scenario calibration penalty is 0.2, and the confidence value for defect type discrimination is 1.26385. 7; In Scenario 4, the log-likelihood difference for the elongated structure hierarchy is 1.2, the log-likelihood difference for the sheet-like structure hierarchy is 1.2, the failure mechanism constraint discrimination value is 0.8, the scenario calibration penalty is 0.2, and the confidence value for defect type discrimination is 1.415670; In Scenario 5, the log-likelihood difference for the elongated structure hierarchy is 1.2, the log-likelihood difference for the sheet-like structure hierarchy is 1.2, the failure mechanism constraint discrimination value is 1.4, the scenario calibration penalty is 0.2, and the confidence value for defect type discrimination is 1.679764; In Scenario 6, the log-likelihood difference for the elongated structure hierarchy is 1.2, the log-likelihood difference for the sheet-like structure hierarchy is 1.2, the failure mechanism constraint discrimination value is 1.4, the scenario calibration penalty is 0.9, and the confidence value for defect type discrimination is 1.112904.
[0054] Table 1 Comparison of Confidential Value Variables and Calculation Results for Defect Type Discrimination in Multiple Scenarios
[0055]
[0056] like Figure 3The diagram shows the stacked analysis of the component contributions to the confidence value of defect type discrimination. Combined with Table 1, it can be seen that the changes in the confidence value of defect type discrimination under different scenarios are mainly affected by the combined modulation of the hierarchical likelihood fusion logarithmic term, the mechanism constraint logic compression term, and the calibration exponential decay term. Specifically, in scenarios one through four, when the scenario calibration penalty remains at 0.2 and the failure mechanism constraint discrimination value remains at 0.8, as the log-likelihood difference between the slender structure hierarchy and the sheet structure hierarchy gradually increases from 0.6 to 1.2, the confidence value of defect type discrimination increases from 1.103674 to 1.415670, demonstrating the dominant role of the hierarchical likelihood fusion logarithmic term in raising the confidence value. In scenario five, when the log-likelihood difference between the slender structure hierarchy and the sheet structure hierarchy remains at 1.2 and the scenario calibration penalty remains at 0.2... The failure mechanism constraint discrimination value increased from 0.8 to 1.4, and the defect type discrimination confidence value further increased to 1.679764, demonstrating the enhancing effect of the mechanism constraint logic compression term on the confidence value. In scenario six, the log-likelihood difference of the slender structure level and the log-likelihood difference of the sheet structure level remained unchanged at 1.2 and 1.4, respectively. However, the scenario calibration penalty increased from 0.2 to 0.9, and the defect type discrimination confidence value decreased to 1.112904, demonstrating the significant suppressive effect of the calibration exponential decay term on the confidence value under high penalty scenarios. Overall, this stacked analysis diagram intuitively presents the component contribution structure of the defect type discrimination confidence value under multiple scenario conditions. It can be used to explain the source of changes in the discrimination confidence level under different perturbation conditions and support the setting of subsequent threshold issuance strategies.
[0057] This implementation scheme achieves multi-scale discrimination evidence aggregation and credible adjudication for four failure types: edge chipping, edge cracking, coating peeling, and non-uniform wear. It enables defect feature information to have comparable class separability measures at both the micro-scale and macro-scale discrimination levels, improves the fusion stability of slender structure evidence and sheet-like structure evidence in a unified logarithmic domain space, reduces the risk of class bias caused by abnormally high response at a single level, completes the introduction of scene-based class hierarchical calibration constraints driven by acquisition methods and deployment scenarios, enhances the robust suppression capability of statistical offsets of reflective residues and vibration residues, introduces failure mechanism constraint discrimination to gating the mechanism consistency of deep learning model output, improves the reliability and consistency of type issuance results under complex field interference conditions, and reduces the risk of high-confidence misjudgment and missed difficult cases.
[0058] Specifically, the process of archiving difficult cases and adjusting convergence based on the output of defect type and defect location from the depth-based confidence analysis results is as follows: Real-time comparison of defect type confidence value and defect type confidence threshold:
[0059] When the confidence value of defect type discrimination is less than the confidence threshold of defect type discrimination, it is determined that the current enhanced defect feature information, after being input into the deep learning model, has not formed a defect type discrimination result that meets the issuance conditions. The model outputs a non-issuance mark and a difficult case mark, and creates and archives the corresponding frame samples, key area masks, acquisition method data, and deployment scenario data into the difficult case sample library. The model also re-triggers the convergence processing of failure mechanism constraint enhancement, including: performing convergence adjustment on the direction window of direction consistency enhancement based on the cutting edge direction baseline, and performing convergence adjustment on the connected component consistency constraint of the sheet-like continuous candidate based on the key area mask, so that subsequent inputs are more consistent with the failure mechanism characteristics of crack chipping directionality and wear spalling sheet-like characteristics.
[0060] When the confidence value of defect type identification is greater than or equal to the confidence threshold of defect type identification, the deep learning model outputs the defect detection and classification results and issues the type. The defect type is a set of failure types determined by the model training stage based on the failure modes formed by the milling tool in the rail milling operation and the category labeling results of historical defect labeling sample data. These include edge chipping, edge cracking, coating peeling, and non-uniform wear. At the same time, the defect location and the key area corresponding to the defect type are output to ensure that the defect type is consistent with the edge area, rake face area, and flank face area, and then enters the defect severity assessment and tool replacement decision process.
[0061] like Figure 4 The diagram illustrates the multi-scale feature-driven tool defect type identification and classification output process, showcasing the inference chain in the defect type discrimination stage: the defect features obtained by enhancing the constraints of the preceding failure mechanism are taken as input, firstly, cross-scale representation is organized, and then input into a deep learning defect detection network to complete the detection of defect candidates and feature aggregation; at the output end, the defect type classification unit performs type merging and parallel discrimination, and finally forms a unified defect type identification result output, providing a type basis for subsequent defect severity assessment and tool replacement decision.
[0062] This implementation scheme achieves online gating and handling diversion based on a reliable threshold for defect type discrimination. This enables the type discrimination results to have issuerability constraints and the ability to return difficult examples in a closed loop. It reduces the risk of type misjudgment caused by the forced issuance of enhanced features under uncertain conditions. It completes frame-level evidence archiving of unissued samples and the accumulation of a difficult example sample library. It triggers the convergence adjustment of failure mechanism constraint enhancement to improve the matching degree of subsequent inputs to the mechanism of crack chipping directionality and wear spalling flaking. It improves the cross-frame stability and cross-scene consistency of reliable type discrimination. It completes defect detection and classification issuance output when the threshold condition is met. It ensures the spatial consistency constraint of defect type and defect location in the three key areas of the cutting edge region, the front face region, and the back face region, supporting the reliable input of subsequent defect severity assessment and blade replacement decision process.
[0063] Specifically, the process of performing defect severity quantification and cross-frame consistency determination analysis on defect location, defect type, and key area masks is as follows: When the defect location is within the cutting edge region: if the defect type is a cutting edge crack, the crack length is obtained through skeletonization and refinement algorithms and the longest path search algorithm, and the crack length ratio is obtained by scale normalization using geometric dimension parameter data; if the defect type is cutting edge chipping, the ratio of the notch area to the cutting edge neighborhood area is obtained through connected component area statistics algorithms; if the defect location is within the rake face region or flank face region: if the defect type is coating peeling or non-uniform wear, the area ratio is obtained through connected component merging and area ratio statistics algorithms; the maximum value of the ratio corresponding to the defect type is taken as the defect geometric quantification value;
[0064] The distribution range of defects within the critical area is obtained using an algorithm for calculating the coverage of the circumscribed rectangle and an algorithm for statistically analyzing the diameter of the distribution range. The defect distribution extent is then obtained by scaling the geometric dimension parameters. Based on frame timestamp sequences and collected frame rate data, the percentage of frames with consistent defect types and overlapping defect locations that meet the overlap coefficient condition is statistically analyzed. The cross-frame stability consistency is then obtained using an overlap coefficient calculation algorithm. The overlap coefficient is the intersection-union ratio (IUGR) of defect location regions in two adjacent frames, specifically calculated as the ratio of the intersection area to the union area of the defect location regions in two frames, with a value ranging from 0 to 1. The overlap coefficient condition is determined from historical defect annotation sample data: under the same defect type condition, the empirical distribution of the IUGR of adjacent frames is statistically analyzed, and the corresponding IUGR is determined using a criterion that maximizes the pass rate of sample pairs with consistent defect types and minimizes the pass rate of sample pairs with inconsistent defect types.
[0065] The exponent of the inverse of the defect geometric quantization value is calculated and subtracted by one to obtain the geometric quantization saturation activation term. This saturation activation mapping transforms the growth of the defect geometric quantization value into a monotonically increasing decision-driving quantity with a limited upper bound, causing this term to gradually saturate after the defect geometric quantization value reaches the scrap level. The natural logarithm of the sum of the defect distribution expansion and one is calculated to obtain the distribution expansion logarithmic enhancement term. This logarithmic enhancement is used to robustly characterize the spatial diffusion of defects within critical regions. The exponent of the inverse of the sum of the cross-frame stability consistency and one is calculated to obtain the cross-frame stability exponential suppression term, which maps the cross-frame stability consistency to a suppression weight for short-term, occasional pseudo-defects, causing this term to significantly decay when the cross-frame stability consistency is insufficient to support the persistent existence assumption. The product of the geometric quantization saturation activation term, the distribution expansion logarithmic enhancement term, and the cross-frame stability exponential suppression term is calculated to obtain the blade replacement decision scrapping confidence value. The specific calculation formula is as follows:
[0066] ;
[0067] In the formula, The value represents the reliability of the blade replacement decision, which characterizes the comprehensive reliability of the current defect in terms of geometric severity, spatial expansion range and temporal stable reproducibility, all of which simultaneously meet the rejection criteria. It represents the geometric quantification value of defects, and describes the direct influence of geometric quantification indicators such as the proportion of crack length, the proportion of notch area, and the proportion of spalling or wear area on the cutting ability and edge integrity of the tool. It represents the extent of defect distribution and is used to characterize the spatial coverage and spread of defects within critical areas; It represents the consistency of cross-frame stability, characterizing the degree of consistent reproducibility of defect detection results across sequences with equal time steps.
[0068] This implementation plan achieves a quantifiable assessment of defect severity and unified convergence of evidence for edge replacement decisions. It enables the geometric intensity characterization of cracks and chipping defects in the cutting edge region after scale normalization, and provides comparable geometric representations of spalling or wear defects in the rake face and flank face regions based on area proportion. It achieves a unified expression of geometrically quantified defect values across defect types, improving the comparability of severity between different key regions. It also enables the quantitative expression of the spatial coverage and diffusion pattern of defects within key regions, reducing the underestimation of extended risks caused by relying solely on local geometric intensity. Furthermore, it establishes a stable reproduction constraint for defects on equal time-step sequences, suppressing short-term, occasional pseudo-defect responses caused by reflective fluctuations, transient obstruction by oil and dust, and residual vibration from entering the rejection path. Finally, it achieves a joint adjudication output of geometric intensity evidence, spatial expansion evidence, and time-stability evidence, improving the robustness and consistency of edge replacement decision rejection credibility under complex field interference conditions, and reducing the risk of missed or misjudged edge replacement decisions.
[0069] Specifically, the process for outputting traceable decision results for continued use, early warning, and immediate blade replacement is as follows: Real-time comparison of the blade replacement decision rejection confidence value and the blade replacement decision rejection confidence threshold; execution of defect severity assessment and blade replacement decision process:
[0070] When the confidence value for defect rejection in the edge-changing decision is less than the confidence threshold, the output continues to use the label. Under the constraint of the key region mask, the defect area is obtained by counting pixels at the defect location, the defect length is obtained by calculating the longest connected distance of the boundary pixels at the defect location, and the defect distribution range is obtained by calculating the size of the bounding rectangle of the defect location. The three-dimensional feature vector formed by the defect length, defect area, and defect distribution range is then clustered and graded on the defect severity axis using a one-dimensional Gaussian mixture model clustering algorithm, and the number of grades is determined by the Bayesian information criterion. The defect severity axis is formed by normalizing the three-dimensional feature vector to the same dimension. The dimensional projection is obtained, and the number of grades is adaptively selected from the candidate number of grades by the Bayesian information criterion. The defect severity level is mapped by the cluster index of the one-dimensional Gaussian mixture model. The level value range is a positive integer from one to the number of grades. The level boundary is determined by the intersection point where the posterior probabilities of adjacent clusters are equal. The quantitative calculation results of defect length, defect area and defect distribution range are mapped to the defect severity level. The tool cutting edge image sequence, rake face image sequence, flank face image sequence, defect type, defect location, defect severity level, acquisition method data and deployment scenario data are created and archived into the tool health database.
[0071] When the confidence value for scrapping the cutting edge decision is greater than or equal to the confidence threshold for scrapping the cutting edge decision, an early warning prompt and a re-sampling and re-inspection mark are output. When the data acquisition deployment scenario is a milling lathe tool head acquisition mark, the re-sampling strategy is to supplement the data acquisition and recalculation at the same acquisition frame rate during intermittent shutdown. When the data acquisition deployment scenario is a cutting edge maintenance station acquisition mark and the acquisition method is an industrial camera acquisition mark, the re-inspection strategy is to switch the acquisition method to a microscopic imaging device to supplement the acquisition of key areas; and create and archive the supplementary acquisition and recalculation results to the early warning database.
[0072] This implementation plan achieves online adjudication and closed-loop disposal based on the reliable threshold for scrapping decisions in tool replacement decisions. This ensures that the output of tool replacement decisions has an executable path for continued use and a path for early warning re-examination and re-inspection. It also solidifies the unified quantitative collection caliber of defect area, defect length, and defect distribution range, and forms a reproducible classification result for defect severity level. This improves the consistency and traceability of defect severity assessment under different collection deployment scenarios and different collection methods. It forms an evidentiary archiving chain for tool health database and early warning database, ensuring that subsequent health trend analysis, recalculation and re-inspection verification, and tool replacement maintenance record management have stable data basis and result closed loop.
[0073] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0074] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A multi-scale milling tool defect detection method based on tool failure mechanism constraints, characterized in that, Includes the following steps: S1: Collect image information of rail milling tools and deployment scene data, acquire data on acquisition methods and historical structure data, and perform preprocessing. S2, based on the image information of the rail milling tool and historical structural data, constructs the tool geometric model, performs regional positioning and segmentation under geometric consistency constraints, and outputs the key region mask, the cutting edge trajectory baseline and the regional scale normalization benchmark; S3, under the mask constraint of the key area, perform multi-scale discriminant analysis on the image information of the rail milling tool based on the tool failure mechanism, comprehensively consider the consistency characteristics of the defects in terms of direction distribution, spatial region and scale level, and combine imaging interference factors to suppress the multi-scale discriminant analysis results. Based on the multi-scale analysis results, perform direction consistency enhancement and region consistency enhancement on the defect features in the key area, and output the enhanced defect feature information. The cutting edge region image is obtained by cropping from the tool cutting edge image sequence using a key region mask. The cutting edge direction angle is obtained from the cutting edge region image using a least-squares straight-line fitting algorithm for the cutting edge contour. The principal direction angle of the slender structure is obtained from the cutting edge region image using a principal direction estimation algorithm on the gradient structure tensor. The cosine similarity of the included angles is calculated, and the non-negative part is taken to obtain the crack direction consistency. The proportion of candidate defects is obtained from the cutting edge region, rake face region, and flank face region through connected component extraction and region proportion statistics algorithms. The proportion of candidate defects in the cutting edge region is calculated based on the proportion of candidates with abrupt boundary changes, while the proportion of candidate defects in the rake face region and flank face region is calculated based on the proportion of candidates with sheet-like continuity. The region mechanism consistency is obtained by taking the maximum percentage of candidate defects. For the cutting edge, rake face, and flank face regions, the energy of detail sub-bands is calculated using a discrete wavelet multi-scale decomposition algorithm. The logarithm of the ratio of micro-scale detail sub-band energy to macro-scale detail sub-band energy is then taken and averaged to obtain the scale defect response value. For the tool cutting edge image sequence, rake face image sequence, and flank face image sequence, the reflective mask area ratio is calculated using a high-brightness saturation region detection algorithm, and the maximum value is taken to obtain the reflective residual penalty. For consecutive frame images corresponding to the frame timestamp sequence, the root mean square difference of the gradient amplitude of key regions between frames is calculated and mapped using a grayscale range linear normalization algorithm to obtain the vibration residual penalty. The product of the scalar defect logarithmic modulation term, the consistency logic compression term, and the penalty exponential decay term is used to obtain the failure mechanism constraint discriminant value. The specific calculation formula is as follows: ; In the formula, The failure mechanism constraint discrimination value is used to characterize the comprehensive degree to which the defect evidence in the key area of the current frame simultaneously satisfies the constraints in terms of directional distribution consistency, regional mechanism consistency and scale-level observability. It indicates the consistency of crack direction and is used to quantify the strength of the same orientation between the main direction of the slender structure and the direction of the cutting edge. It represents the consistency of regional mechanisms and is used to quantify the degree of consistency in the mechanism dominance of candidate defects among the cutting edge region, the rake face region, and the flank face region. This represents the scale defect response value, used to quantify the relative enhancement of microscale detail subband energy compared to macroscale detail subband energy; It represents the amount of reflection residue penalty, used to characterize the occlusion intensity of the set of bright saturated pixels in the key area on texture details and boundary gradients; It represents the residual penalty for vibration, characterizing the abnormal fluctuations in gradient energy caused by incomplete compensation of minute displacements and structural trailing between frames; S4. Based on the deep learning model, the enhanced defect feature information is used to make a reliable defect type determination. The defect type and defect location are output according to the reliable defect type determination result. Results that do not meet the reliable determination conditions are marked and adjusted. S5 performs defect severity quantification and cross-frame consistency determination analysis on defect location, defect type, and key area mask, and outputs traceable decision results for continued use, early warning prompts, and immediate blade replacement.
2. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process for acquiring image information of rail milling tools and deployment scene data, as well as acquiring acquisition method data and historical structure data, is as follows: The system acquires image information of rail milling tools, including: tool edge image sequence, rake face image sequence, flank face image sequence, frame timestamp sequence, acquisition frame rate data, and mounting hole position image feature data; it also acquires deployment scene data, including: milling lathe tool head acquisition marks and tool change and maintenance station acquisition marks; it obtains acquisition method data, including: industrial camera acquisition marks and microscopic imaging device acquisition marks; and it acquires historical structural data, including: geometric dimension parameter data and historical defect annotation sample data.
3. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process of preprocessing is as follows: The sliding window quantile extremum removal algorithm and the bilateral filtering denoising algorithm are used to remove abnormal pixels and smooth noise in the tool cutting edge image sequence, rake face image sequence and flank face image sequence; the phase correlation-based inter-frame displacement estimation algorithm and the sub-pixel image registration algorithm are used to perform jitter alignment and motion compensation on the continuous frame images corresponding to the frame timestamp sequence. By employing a local contrast-restricted adaptive histogram equalization algorithm and a grayscale range linear normalization algorithm, the dynamic range of grayscale is unified for the tool cutting edge image sequence, the rake face image sequence, and the flank face image sequence. By employing distribution standardization and linear normalization algorithms, the dimensions of the acquired frame rate data and geometric dimension parameter data are unified, and the coordinates of the mounting hole position image feature data are normalized.
4. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process of constructing a tool geometric model based on rail milling tool image information and historical structural data, performing region localization and segmentation under geometric consistency constraints, and outputting key region masks, cutting edge trajectory baselines, and region scale normalization benchmarks is as follows: The tool outline and mounting hole positions are extracted from the tool cutting edge image sequence, rake face image sequence, and flank face image sequence. The tool geometric model is established by combining the geometric dimension parameter data. Under the constraints of the tool geometric model, the cutting edge region, rake face region, and flank face region are divided. The key region mask, cutting edge direction baseline, and region scale normalization benchmark are output.
5. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process of performing multi-scale discriminant analysis on the rail milling tool image information based on the tool failure mechanism under the mask constraint of the key area, comprehensively considering the consistency characteristics of defects in directional distribution, spatial region and scale level, and suppressing the multi-scale discriminant analysis results in combination with imaging interference factors is as follows: The natural logarithm of the sum of the scale defect response value and 1 is calculated to obtain the scale defect logarithmic modulation term; the sum of the reflective residual penalty and the vibration residual penalty is calculated and added to 1 to obtain the penalty normalization denominator term; the product of crack direction consistency and regional mechanism consistency is calculated and divided by the penalty normalization denominator term to obtain the mechanism consistency normalization product term; the exponent of the mechanism consistency normalization product term is calculated and added to 1, and the reciprocal is obtained to obtain the consistency logic compression term. The sum of the residual penalty for reflection and the residual penalty for vibration is calculated and divided by the sum of the scale defect response value and one to obtain the penalty scale coupling ratio term. The exponent of the penalty scale coupling ratio term is obtained by calculating the negative of the exponent term; The product of the logarithmic modulation term of the scalar defect, the logical compression term of the consistency, and the penalty exponential decay term is used to obtain the failure mechanism constraint discriminant value.
6. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process of performing direction-consistent enhancement and region-consistent enhancement on defect features in key areas based on multi-scale discriminant analysis results, and outputting enhanced defect feature information, is as follows: Real-time comparison of failure mechanism constraint discrimination values and failure mechanism constraint discrimination thresholds: When the failure mechanism constraint judgment value is less than the failure mechanism constraint judgment threshold, the check mark and the re-sampling trigger mark are output; in the milling and grinding tool head acquisition mark scenario, clean oil and dust, adjust the industrial camera incident angle and re-sampling prompt log are generated; in the tool change maintenance station acquisition mark scenario, the magnified image acquisition of the cutting edge area is performed based on the key area mask. When the failure mechanism constraint discrimination value is greater than or equal to the failure mechanism constraint discrimination threshold, the failure mechanism constraint enhancement processing is performed and the enhanced defect feature information is output: the cutting edge region performs directional consistency enhancement on the response of the slender structure in the vertical direction based on the cutting edge direction baseline and strengthens the abrupt response of the chipping notch boundary; the rake face region and the flank face region enhance the boundary contrast response of the wear area based on the sheet-like continuous distribution constraint and enhance the gray-scale difference response and texture difference response of the coating peeling area; the defect feature information is subjected to scale consistency characterization so that the crack-type defect feature information and the wear and peeling-type defect feature information enter the same comparable characterization space.
7. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process of performing reliable defect type determination based on the enhanced defect feature information using a deep learning model is as follows: Based on a deep learning model with dual-scale input pathways, the dual-scale input pathways correspond to micro-scale and macro-scale levels, respectively. Defect feature information is input into the micro-scale level of the deep learning model to obtain unnormalized discrimination score sequences for edge chipping, edge cracking, coating peeling, and non-uniform wear. The logarithmic difference between the maximum and second-largest scores is calculated using a logarithmic summation and exponential stability algorithm on the score sequences to obtain the log-likelihood difference value of the slender structure level. The defect feature information is input into the macro-scale level of the deep learning model, and the logarithmic difference between the maximum score and the second largest score is calculated using the logarithmic summation exponential stability calculation algorithm to obtain the log-likelihood difference value of the sheet structure level. After determining the scene category based on the data collected and the deployment scenario data, the scene calibration penalty is calculated based on the distribution range of the residual reflection penalty and the residual vibration penalty under the same scene category obtained from the statistical analysis of historical defect annotation sample data. Calculate the exponents of the log-likelihood differences of the slender structure hierarchy, the exponents of the log-likelihood differences of the sheet structure hierarchy, and the exponents of the square root of the product of the log-likelihood differences of the slender structure hierarchy and the log-likelihood differences of the sheet structure hierarchy. Add these to the exponents and take the natural logarithm to obtain the hierarchical likelihood fusion logarithm term. The quotient of the failure mechanism constraint discrimination value divided by the sum of the scenario calibration penalty and one is used to obtain the mechanism calibration normalization ratio term. The exponent of the computer's calibration normalization ratio term is taken and added to the reciprocal to obtain the mechanism constraint logic compression term; The calibration penalty term is obtained by dividing the scenario calibration penalty by the sum of the failure mechanism constraint judgment value and one, taking the opposite number, and then taking the exponent. The product of the hierarchical likelihood fusion logarithmic term, the mechanism constraint logic compression term, and the calibration exponential decay term is calculated to obtain the confidence value for defect type discrimination.
8. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process of outputting the defect type and defect location based on the reliability judgment result of the defect type, and marking and adjusting the results that do not meet the reliability judgment conditions is as follows: Real-time comparison of the confidence value and confidence threshold for defect type identification: When the confidence value of defect type identification is less than the confidence threshold of defect type identification, output the non-signing flag and the difficult case flag, and re-trigger the convergence process of failure mechanism constraint enhancement; When the confidence value of defect type identification is greater than or equal to the confidence threshold of defect type identification, the deep learning model outputs the defect detection and classification results and issues the type. The defect type is a set of failure types determined by the model training stage based on the failure modes formed by the milling tool in the rail milling operation and the category labeling results of historical defect labeling sample data. These failure types include edge chipping, edge cracking, coating peeling, and non-uniform wear. At the same time, the defect location and the key area corresponding to the defect type are output, and the defect severity assessment and tool replacement decision process is initiated.
9. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process for quantifying defect severity and determining cross-frame consistency of defect location, defect type, and key region mask is as follows: When the defect is located within the cutting edge region: if the defect type is a cutting edge crack, the crack length is obtained through the skeletonization refinement algorithm and the longest path search algorithm, and the crack length ratio is obtained by scale normalization using geometric dimension parameter data; if the defect type is a cutting edge chipping, the ratio of the notch area to the cutting edge neighborhood area is obtained through the connected domain area statistics algorithm. For defects located in the rake face or flank face region: when the defect type is coating peeling or non-uniform wear, the area proportion is obtained by connecting region merging and area proportion statistical algorithm; the maximum value of the proportion corresponding to the defect type is taken as the geometric quantization value of the defect. The distribution range of defects within the critical area is obtained by using the bounding rectangle coverage calculation algorithm and the distribution range diameter statistical algorithm. The defect distribution expansion is obtained by using geometric dimension parameter data for scale normalization. Based on the frame timestamp sequence and the collected frame rate data, the proportion of frames with consistent defect types and overlapping defect positions that meet the overlap coefficient condition is statistically analyzed. The cross-frame stability consistency is obtained by using the overlap coefficient calculation algorithm. Calculate the exponent of the inverse of the defect geometric quantization value and subtract it to obtain the geometric quantization saturation activation term; The natural logarithm of the sum of the defect distribution expansion degree and one is calculated to obtain the distribution expansion logarithm enhancement term; the exponent of the sum of the cross-frame stability consistency degree and one is calculated and its opposite is taken to obtain the cross-frame stability exponent suppression term; the product of the geometric quantization saturation activation term, the distribution expansion logarithm enhancement term, and the cross-frame stability exponent suppression term is calculated to obtain the blade replacement decision rejection confidence value.
10. The multi-scale milling tool defect detection method based on tool failure mechanism constraints according to claim 1, characterized in that: The specific process for providing traceable decision results regarding continued use of the output, early warning prompts, and immediate blade replacement is as follows: Real-time comparison of the confidence value and threshold for blade replacement decision rejection, and execution of defect severity assessment and blade replacement decision process: When the confidence value for scrapping the cutting edge decision is less than the confidence threshold for scrapping the cutting edge decision, the output continues to use the label, and the quantitative calculation results of defect length, defect area and defect distribution range are mapped to the defect severity level. The tool cutting edge image sequence, rake face image sequence, flank face image sequence, defect type, defect location, defect severity level, acquisition method data and deployment scenario data are created and archived into the tool health database. When the confidence value for the blade replacement decision is greater than or equal to the confidence threshold for the blade replacement decision, an early warning prompt and a re-sampling and re-inspection prompt are output. When the data acquisition and deployment scenario is to acquire marks on a milling lathe tool head, the re-acquisition strategy is to acquire and recalculate data at the same acquisition frame rate during intermittent shutdowns. When the data acquisition and deployment scenario is to acquire marks at a tool changing and maintenance station and the acquisition method is to acquire marks using an industrial camera, the re-inspection strategy is to switch the acquisition method to a microscopic imaging device to acquire key areas.