A method and system for detecting invisible crack defects in powder metallurgy
By acquiring, stitching, noise-reducing, and contrast-enhancing images, virtual crack samples are generated and their quality is verified. Combined with a semi-supervised learning training model, the high cost of detecting hidden cracks in powder metallurgy products and the problem of sample acquisition are solved, achieving accurate and automated detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN CHUANGKEWEI VISION TECH CO LTD
- Filing Date
- 2025-11-07
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies are difficult to efficiently and economically detect hidden cracks in powder metallurgy products. Traditional physical detection methods are costly and easily affected by the porous structure of materials, while deep learning-based detection methods rely on a large number of real samples, which is difficult to obtain and cannot meet the needs of production lines of small and medium-sized enterprises.
By acquiring and stitching the original images of powder metallurgy workpieces, eliminating noise and enhancing contrast, generating virtual crack samples for quality verification, extracting physical feature vectors, and using semi-supervised learning to train a detection model for detection.
It achieves accurate and automated detection, reduces reliance on real samples, lowers detection costs, and meets the production line needs of small and medium-sized enterprises.
Smart Images

Figure CN121437990B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metallurgical product defect detection technology, specifically to a method and system for detecting hidden crack defects in powder metallurgy. Background Technology
[0002] Powder metallurgy products, with their advantages of high material utilization and near-net-shape forming, have been widely used in high-end fields such as aerospace and automobile manufacturing. However, these products are prone to developing hidden cracks due to uneven density and thermal stress differences during processes such as pressing and sintering. These cracks are mostly micron-sized or subcutaneous and are difficult to detect with the naked eye, but they can significantly affect the mechanical properties of the products. Therefore, accurate detection of these cracks is a key technical requirement to ensure the quality and application safety of powder metallurgy products.
[0003] Currently, the detection of hidden cracks in powder metallurgy mainly relies on two types of technologies: one is traditional physical detection technologies such as X-ray CT and ultrasound, which require specialized equipment and operation, are costly, and are easily affected by the porous structure of materials, generating false signals; the other is visual detection technology based on deep learning, which can achieve automated detection, but is highly dependent on a large number of labeled real crack samples. Real hidden crack samples need to be obtained by destroying the workpiece or by high-precision imaging, which is few in number and costly. The labeling process also requires manual positioning of micron-level cracks, which is labor-intensive. As a result, the sample size is insufficient to meet the model training requirements, ultimately affecting the detection accuracy and generalization ability, and making it difficult to adapt to the actual application scenarios of small and medium-sized enterprise production lines. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for detecting hidden cracks in powder metallurgy, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting hidden crack defects in powder metallurgy, comprising the following steps: Step S100: Obtain the original image of the powder metallurgy workpiece, stitch together the images of workpieces whose size exceeds the coverage of a single image, and output the original image; Step S200: Perform noise reduction processing and contrast enhancement processing on the original image in sequence to output a clean image with no noise and high contrast; Step S300: Generate a virtual crack sample based on the clean image. During the generation process, the virtual crack sample is quality checked. If the check is qualified, proceed to the next step. If the check is unqualified, return to the previous corresponding step for reprocessing. Step S400: Extract the physical feature vectors of the qualified virtual crack sample and the clean image containing real cracks. The physical feature vectors include geometric features, grayscale features and texture features. Step S500: Train the detection model using a semi-supervised learning method. Use the detection model to detect the newly acquired workpiece by sequentially performing the following steps: original image acquisition and stitching, original image noise elimination and contrast enhancement, virtual crack sample generation and verification, and physical feature vector extraction. Output the probability of crack existence and crack level.
[0006] Preferably, step S100 further includes the following step: Step S110: Perform core parameter calibration on the image data used to acquire the original image; Step S120: Determine the acquisition method of the original image based on the workpiece size. Acquire a single original image for workpieces with sizes smaller than a preset range, and acquire multiple original images for workpieces with sizes larger than a preset range. Step S130: The multiple original images are stitched together using a feature matching algorithm, and the deviation of the stitched image is controlled within a preset range, and the original image is output.
[0007] Preferably, step S110 further includes the following step: Step S111: The core parameter calibration includes the calibration of image resolution and pixel size, so that the calibrated image resolution is not lower than the preset resolution and the pixel size is not greater than the preset pixel size; Step S112: The pixel size is calibrated using standard resolution data to ensure that the calibrated pixel size meets the accuracy requirements for crack feature recognition; In step S120, the preset range is the range of workpiece sizes that can be completely covered by a single image. For workpieces smaller than the preset range, the relative distance between the image and the workpiece is controlled to be a preset distance when acquiring the image. For workpieces larger than the preset range, the overlap rate of adjacent images is controlled to be no less than a preset overlap rate when acquiring multiple original images. In step S130, the feature matching algorithm is the SIFT feature matching algorithm, and the preset deviation range is no greater than the preset deviation to ensure the integrity and continuity of the stitched image.
[0008] Preferably, step S200 further includes the following steps: Step S210: Perform adaptive bilateral filtering on the original image. The adaptive bilateral filtering kernel size is 5×5, the spatial standard deviation is set to 2.0, and the grayscale standard deviation is set to 15.0, so as to eliminate micropore texture noise with a size not greater than 3μm and retain crack edge features. Step S220: Perform adaptive histogram equalization on the image after adaptive bilateral filtering, divide the image into 8×8 sub-blocks, and set the sub-block contrast limit threshold to 0.02 to enhance the contrast of dark areas with a grayscale mean of less than 100, so that the grayscale difference between the crack and the substrate is increased to 20-30 grayscale levels, and output the clean image.
[0009] Preferably, step S300 further includes the following step: Step S310: Obtain a preset number of clean images containing real cracks that have undergone original image acquisition and stitching, original image noise removal and contrast enhancement processing; extract the physical parameters of the real cracks; generate multiple sets of differentiated parameters based on the physical parameters; and construct a physical feature template library. Step S320: Based on the parameters of the physical feature template library, draw the crack outline in the crack-free area of the clean image, perform grayscale filling and smoothing on the crack outline, and output the crack outline image. Step S330: Select a flat background area in the clean image, and perform pixel-level fusion of the crack outline image with the flat background area to output a virtual crack sample; Step S340: Perform physical parameter matching degree verification and background fusion degree verification on the virtual crack sample respectively, and comprehensively judge whether the virtual crack sample is qualified based on the results of the two verifications; if it is qualified, continue to execute the physical feature vector extraction step; if it is unqualified, and the unqualification is caused by the physical parameter matching degree verification result, return to the crack contour drawing step for reprocessing; if the unqualification is caused by the background fusion degree verification result, return to the background area filtering step for reprocessing.
[0010] Preferably, step S340 further includes the following step: Step S341: The physical parameters include crack length, center width, curvature, number of branches, center gray value, and edge gradient rate. The verification standard for the matching degree of the physical parameters is: the deviation between the physical parameters extracted from the virtual crack sample and the corresponding parameters in the physical feature template library is no greater than 10%. Step S342: The verification criteria for the background fusion degree include: selecting at least 20 sampling points along the crack edge in the virtual crack sample, with the gray level difference between each sampling point and the adjacent background pixel not exceeding 3; calculating the structural similarity index between the crack region and the background region, wherein the structural similarity index is not less than 0.9; Step S343: Determine the verification result of the virtual crack sample; if the virtual crack sample simultaneously meets the physical parameter matching degree standard and the background fusion degree standard, it is determined to be a qualified virtual crack sample, and the physical feature vector extraction step continues; if it does not meet the physical parameter matching degree standard, it is determined to be an unqualified virtual crack sample, and the crack contour drawing step is returned to redraw the crack contour; if it does not meet the background fusion degree standard, it is determined to be an unqualified virtual crack sample, and the background area filtering step is returned to re-filter the background area; if both standards are not met at the same time, the crack contour drawing step is returned to reprocess first, and the background area filtering step is executed again after the physical parameter deviation meets the requirements, until a qualified virtual crack sample is generated.
[0011] Preferably, in step S400, the geometric features are extracted using an edge detection algorithm and a region segmentation algorithm, including crack length, average width, maximum width, curvature, number of branches, and the ratio of the total branch length to the main crack length; the grayscale features are extracted using grayscale statistics, including the grayscale value at the crack center, the grayscale value at the edge, the mean grayscale gradient, and the grayscale variance; the texture features are extracted using a grayscale co-occurrence matrix, including contrast and correlation. Step S500 further includes the following steps: Step S510: The semi-supervised learning includes a supervised training phase and an unsupervised fine-tuning phase. In the supervised training phase, a preset number of labeled real crack sample physical feature vectors containing labeled information are input, the cross-entropy loss function is used, the learning rate is set to 0.001, and the number of iterations is no less than 50 rounds. In the unsupervised fine-tuning phase, the physical feature vectors of the qualified virtual crack samples are input, the model parameters are adjusted based on feature similarity constraints, the number of iterations is no less than 30 rounds, and the training termination condition is that the accuracy of the validation set is no less than 98% and there is no improvement for 5 consecutive rounds. Step S520: During the detection process, if the probability of the presence of the crack is not less than 0.8, it is determined that a crack exists; the crack level includes no crack, micro crack and harmful crack, wherein the length of the micro crack is not greater than 0.5 mm, the length of the harmful crack is greater than 0.5 mm, and a detection report containing crack parameters and judgment results is output, and the detection time of a single sample is not greater than 0.5 s.
[0012] This invention also provides a powder metallurgy hidden crack defect detection system, comprising: The original image processing module is used to acquire the original image of the powder metallurgy workpiece, stitch together images of workpieces whose size exceeds the coverage of a single image, and output the original image. The clean image generation module is used to sequentially perform noise reduction processing and contrast enhancement processing on the original image to output a noise-free, high-contrast clean image; The virtual crack sample generation module is used to generate virtual crack samples based on the clean image. During the generation process, the virtual crack sample is quality checked. If the check is qualified, the subsequent module is triggered. If the check is unqualified, the process is returned to the previous corresponding module for reprocessing. The physical feature extraction module is used to extract the physical feature vectors of the qualified virtual crack sample and the clean image containing real cracks. The physical feature vectors include geometric features, grayscale features and texture features. The detection model training and execution module is used to train the detection model using a semi-supervised learning method. The detection model is then used to detect newly acquired workpieces by sequentially performing the following steps: original image acquisition and stitching, original image noise elimination and contrast enhancement, virtual crack sample generation and verification, and physical feature vector extraction and processing. The module outputs the probability of crack presence and crack level.
[0013] The present invention also provides an electronic device, which is a physical device, comprising: The processor and the memory are communicatively connected. The memory is used to store at least one executable instruction executed by the processor, which executes the executable instruction to implement the powder metallurgy hidden crack defect detection method as described above.
[0014] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the powder metallurgy hidden crack defect detection method as described above.
[0015] Compared with the prior art, the beneficial effects of the present invention are: By acquiring the original images of powder metallurgy workpieces and stitching together workpieces exceeding the specified range, complete initial data is provided for subsequent inspection, thus avoiding the omission of potential crack locations. By sequentially performing noise reduction and contrast enhancement processing on the original images, clean images are output, which eliminates microporous textures and reflective interference while enhancing crack features. By generating and verifying virtual crack samples based on the clean images, the dependence on real samples is reduced, and the difficulty of obtaining samples is solved. By extracting physical feature vectors and using semi-supervised learning to train a model to detect new workpieces, accurate and automated detection is achieved, providing a reliable basis for crack determination. Attached Figure Description
[0016] Figure 1 This is a main flowchart of a method for detecting hidden cracks in powder metallurgy, provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a powder metallurgy hidden crack defect detection system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0017] 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.
[0018] The method in this embodiment is executed by a terminal, which can be a mobile phone, tablet computer, PDA, laptop or desktop computer, etc. Of course, it can also be other devices with similar functions, and this embodiment does not limit them.
[0019] Please see Figure 1 This invention provides a method for detecting hidden crack defects in powder metallurgy, the method being applied to, including: Step S100: Obtain the original image of the powder metallurgy workpiece, stitch together the images of workpieces whose size exceeds the coverage of a single image, and output the original image.
[0020] Among them, "powder metallurgy workpiece" refers to workpieces made through powder metallurgy processes (such as metal powder pressing and sintering), with common materials including iron-based, titanium-based, and copper-based materials, and widely used in aerospace, automobile manufacturing and other fields; "original image" refers to the initial image directly acquired by the system without any noise reduction, contrast adjustment or other processing, which can truly reflect the original state of the surface and near-surface of the powder metallurgy workpiece; "single image coverage range" refers to the range of workpiece area that the image acquisition device (such as an industrial camera with an objective lens) can completely capture in a single shooting operation, which is determined by the resolution of the image acquisition device and the magnification of the objective lens; "image stitching" refers to the process by which the system combines multiple partially overlapping partial images of the workpiece into a complete workpiece image when the size of the workpiece exceeds the single image coverage range, using algorithms such as feature matching and coordinate alignment.
[0021] Additionally, it's important to note that the core purpose of this step is to provide complete and accurate initial image data to support all subsequent inspection stages. If the original image is incomplete or contains missing areas, subsequent processing may miss the location of potential cracks. Conversely, preserving the original image without any preprocessing avoids damaging crack characteristics during initial processing. The system's approach for this step is as follows: first, determine whether splicing is necessary based on the actual dimensions of the workpiece; then, acquire a complete original image through image acquisition or splicing operations; finally, output this image to the next processing stage, ensuring that subsequent steps are based on comprehensive image data.
[0022] In one possible implementation, the system acquires the original image in the following ways: for small workpieces, the image is acquired directly in a single shot by the image acquisition module; for large workpieces, the workpiece is moved by an electric stage, and the image acquisition module takes multiple local images at a preset overlap rate (e.g., not less than 50%), and then the SIFT feature matching algorithm is used to stitch the multiple local images together. During the stitching process, the image deviation is controlled to be no greater than a preset value (e.g., 2 pixels) to ensure that the stitched original image has no obvious misalignment or missing areas.
[0023] Specifically, step S100 further includes the following steps: Step S110: Perform core parameter calibration on the image data used to acquire the original image; Step S120: Determine the acquisition method of the original image based on the workpiece size. Acquire a single original image for workpieces with sizes smaller than a preset range, and acquire multiple original images for workpieces with sizes larger than a preset range. Step S130: The multiple original images are stitched together using a feature matching algorithm, and the deviation of the stitched image is controlled within a preset range, and the original image is output.
[0024] Among them, "core parameters of image data" refers to key parameters affecting the quality of the original image and the accuracy of crack identification, including image resolution (reflecting the richness of image details) and pixel size (reflecting the actual physical size corresponding to a unit pixel); "preset range" refers to the workpiece size threshold set by the system based on the coverage capability of a single shot by the image acquisition module, which is determined by the resolution of the image acquisition module and the magnification of the objective lens; "feature matching algorithm" refers to the algorithm used to achieve accurate stitching of multiple local images, the core of which is to achieve coordinate alignment between different images by extracting feature points (such as edges and texture features) in the image. By refining step S100, the core parameter calibration, shooting mode selection, and image stitching process are standardized to ensure the accuracy and integrity of the original image—core parameter calibration can avoid subsequent crack size measurement errors due to inaccurate pixel size, shooting mode selection can adapt to workpieces of different sizes to reduce image redundancy, and image stitching can solve the problem of incomplete coverage of large workpieces in a single shot. The three together ensure that the original image meets the basic requirements for subsequent processing.
[0025] Additionally, it should be noted that core parameter calibration can be performed using a standard resolution board (such as the 1951 USAF resolution board). By capturing images of the resolution board and calculating the spacing between feature line pairs, the pixel size can be inferred to determine if it conforms to the preset value. The preset range can be adjusted according to the actual application scenario. For example, for small precision powder metallurgy parts (e.g., size ≤ 30mm × 30mm), the preset range can be set to 30mm × 30mm; for medium-sized parts (e.g., size 30mm × 30mm - 100mm × 100mm), the preset range can be set to 50mm × 50mm. The preset deviation range for image stitching can be set according to the crack recognition accuracy requirements. For example, when detecting micron-level cracks, the preset deviation should not exceed 2 pixels; when detecting sub-millimeter-level cracks, the preset deviation can be widened to 3 pixels.
[0026] For example, in a feasible implementation, the workpiece to be inspected is a titanium-based powder metallurgy blade (60mm×40mm×8mm). The system executes a refined process of step S100: Step S110, the core parameters of the image data are calibrated using a 1951USAF resolution board to ensure that the image resolution is 2448×2048 (5 million pixels) and the pixel size is calibrated to 0.2μm / pixel; Step S120, it is determined that the workpiece size of 60mm×40mm exceeds the preset range of 50mm×50mm, and a multi-frame shooting method is adopted. The workpiece is moved by an electric stage with a 50% overlap rate to capture 3 local original images; Step S130, the SIFT feature matching algorithm is used to stitch the 3 local images, extract and match the feature points of each image, calculate the coordinate offset, and finally the deviation of the stitched original image is 1.8 pixels. The original image that completely covers the blade area is output, providing high-precision initial data for subsequent noise elimination and contrast enhancement.
[0027] Furthermore, step S110 also includes the following steps: Step S111: The core parameter calibration includes the calibration of image resolution and pixel size, so that the calibrated image resolution is not lower than the preset resolution and the pixel size is not greater than the preset pixel size; Step S112: The pixel size is calibrated using standard resolution data to ensure that the calibrated pixel size meets the accuracy requirements for crack feature recognition; In step S120, the preset range is the range of workpiece sizes that can be completely covered by a single image. For workpieces smaller than the preset range, the relative distance between the image and the workpiece is controlled to be a preset distance when acquiring the image. For workpieces larger than the preset range, the overlap rate of adjacent images is controlled to be no less than a preset overlap rate when acquiring multiple original images. For example, if the preset small size is 50mm×50mm, and the workpiece size is 80mm×80mm which exceeds this range, set the preset distance to 10mm (50x objective lens working distance) and the preset overlap rate to 50%, and take 4 partial images with a 50% overlap rate using a motorized stage. In step S130, the feature matching algorithm is the SIFT feature matching algorithm, and the preset deviation range is no greater than the preset deviation to ensure the integrity and continuity of the stitched image. The SIFT feature matching algorithm is used for stitching. The preset deviation is set to 2 pixels. The final stitched image deviation is 1.5 pixels, outputting a complete and clear original image of the gear, ensuring that any hidden cracks that may exist at the root of the gear teeth can be accurately identified in the future.
[0028] Among them, "standard resolution data" refers to feature pattern data of known dimensions on a standard resolution board (such as 1951 USAF, ISO12233), used to calibrate the accuracy of pixel size; "relative distance between image and workpiece" refers to the vertical distance between the image acquisition module (lens) and the workpiece surface, which affects the image's focus sharpness and actual coverage; "overlap rate of adjacent images" refers to the proportion of overlapping areas between multiple local images to the area of a single image, and the overlap rate directly affects the stitching accuracy. By further refining the core parameter calibration and shooting methods, clarifying the calibration basis, relative distance control, and overlap rate requirements, the consistency and reliability of the original images are improved—standard resolution data can provide an objective benchmark for pixel size calibration, avoiding subjective errors; a fixed relative distance can ensure that the image magnification is consistent when shooting different workpieces, avoiding the same size crack appearing as different pixel sizes in different images; sufficient overlap rate can provide sufficient feature matching area for image stitching, reducing the risk of stitching misalignment.
[0029] Additionally, it should be noted that the preset resolution can be set according to the crack size requirements. For example, when detecting invisible cracks of 5-50μm, the preset resolution should be no less than 2 megapixels (1600×1200), and when detecting smaller cracks (2-5μm), the preset resolution should be no less than 5 megapixels (2448×2048). The preset magnification can be selected with different objectives; for example, a 20x objective can be used to detect surface cracks, and a 50x objective can be used to detect near-surface subcutaneous cracks. The preset angle can be set to 10°-20° (ring low). Angle light source) to avoid strong reflections caused by direct light. The preset intensity can be set to 5000-8000 lux to ensure uniform image grayscale. The preset pixel size is usually set to 0.1-0.3μm / pixel to balance detail accuracy and image data volume. The preset distance can be set according to the objective lens focal length. For example, if the working distance of a 50x objective lens is 10mm, then the preset distance is set to 10mm. The preset overlap rate can be set to 40%-60%. Too low an overlap rate (<40%) will easily lead to insufficient feature points, while too high an overlap rate (>60%) will increase shooting and stitching time.
[0030] For example, in one feasible implementation, the system performs a refinement step for an iron-based powder metallurgy gear (size 80mm×80mm×15mm): Step S111, setting the preset resolution to 2448×2048, preset magnification to 50x, preset angle to 15°, and preset intensity to 6000 lux, and selecting a matching 5-megapixel industrial camera, a 50x metallurgical objective lens, and a ring low-angle light source; Step S112, using a 1951USAF resolution board to capture a calibration image, where the spacing between a certain feature line pair on the resolution board is 20μm, corresponding to 100 pixels in the image, and the pixel size is calculated to be 0.2μm / pixel, which meets the preset pixel size requirements.
[0031] Step S200: Perform noise reduction processing and contrast enhancement processing on the original image in sequence to output a clean image with no noise and high contrast.
[0032] Among them, "noise elimination processing" refers to the process by which the system uses a specific algorithm to remove useless information (i.e., "noise") that interferes with crack identification in the original image. The noise in the original image of the powder metallurgy workpiece mainly comes from the micropore texture of the workpiece surface and the reflection of light during shooting. "Contrast enhancement processing" refers to the process by which the system adjusts the grayscale differences in different areas of the original image through algorithms to make the grayscale contrast between the crack area and the workpiece substrate area more obvious. "Clean image" refers to an image that has no obvious noise interference and a significantly improved contrast between the crack and the substrate after noise elimination processing and contrast enhancement processing. This image can clearly present the characteristics of possible hidden cracks.
[0033] Additionally, it's important to note that the core purpose of this step is to eliminate interference factors in the original image and enhance crack features. Micropore textures (typically ≤3μm in size) in the original image are easily misidentified as cracks, and reflected light can obscure the grayscale features of hidden cracks. Noise removal can eliminate these interferences. Furthermore, the original grayscale difference between hidden cracks and the substrate is usually small (5-10 gray levels). Contrast enhancement can increase this difference to a range that can be recognized by subsequent algorithms, laying the foundation for subsequent virtual sample generation and crack feature extraction. The system's approach to this step is: first remove noise to avoid interference, then enhance contrast to highlight the cracks, following the order of "denoising first, then enhancing" to avoid amplifying noise during enhancement.
[0034] In one possible implementation, when the system performs noise cancellation processing, it employs an adaptive bilateral filtering algorithm with a filter kernel size of 5×5, a spatial standard deviation of 2.0, and a grayscale standard deviation of 15.0. This algorithm can specifically eliminate microporous texture noise with a size ≤3μm, while preserving the grayscale abrupt change features of crack edges. When performing contrast enhancement processing, it employs an adaptive histogram equalization algorithm, dividing the image into 8×8 sub-blocks and setting the sub-block contrast limit threshold to 0.02. This algorithm can locally enhance dark areas (which may hide invisible cracks) with a grayscale mean below 100, avoiding over-enhancement artifacts caused by overall equalization.
[0035] Specifically, step S200 further includes the following steps: Step S210: Perform adaptive bilateral filtering on the original image. The adaptive bilateral filtering kernel size is 5×5, the spatial standard deviation is set to 2.0, and the grayscale standard deviation is set to 15.0, so as to eliminate micropore texture noise with a size not greater than 3μm and retain crack edge features. Step S220: Perform adaptive histogram equalization on the image after adaptive bilateral filtering, divide the image into 8×8 sub-blocks, and set the sub-block contrast limit threshold to 0.02 to enhance the contrast of dark areas with a grayscale mean of less than 100, so that the grayscale difference between the crack and the substrate is increased to 20-30 grayscale levels, and output the clean image.
[0036] Among them, "adaptive bilateral filtering algorithm" refers to a filtering algorithm that considers both spatial distance and gray-level difference, which can smooth noise while preserving image edge features; "filter kernel size" refers to the range of pixel neighborhoods involved in the calculation in the filtering algorithm. The larger the kernel, the stronger the smoothing effect, but the higher the risk of edge blurring; "spatial standard deviation" refers to a parameter that controls the influence of spatial distance on filtering weights. The larger the value, the wider the influence range of the spatial neighborhood; "gray-level standard deviation" refers to a parameter that controls the influence of gray-level difference on filtering weights. The smaller the value, the only smoothing effect is on areas with small gray-level differences; "adaptive histogram equalization algorithm" refers to an algorithm that divides the image into multiple sub-blocks and performs histogram equalization on each sub-block separately, which can avoid local over-enhancement caused by overall equalization; "sub-block contrast limit threshold" refers to a parameter that limits the contrast enhancement during sub-block histogram equalization, used to suppress noise amplification. By specifying the exact algorithm parameters for noise reduction and contrast enhancement, the quality of the clean image is ensured. The parameter settings of the adaptive bilateral filtering can specifically eliminate the micropore texture noise (≤3μm) of the powder metallurgy workpiece, while preserving the crack edges (large grayscale differences). The parameter settings of the adaptive histogram equalization can locally enhance the contrast of dark areas (which may hide cracks) and avoid artifacts caused by over-enhancement. The final output clean image can clearly present the features of hidden cracks, laying the foundation for subsequent virtual sample generation and feature extraction.
[0037] Additionally, it should be noted that the filter kernel size can be adjusted according to the noise size. For example, when the micropore noise is ≤2μm, the filter kernel should be set to 3×3, and when the noise is ≤3μm, it should be set to 5×5. The spatial standard deviation can be set to 1.5-2.5, and the grayscale standard deviation can be set to 10-20. These need to be adjusted according to the grayscale distribution of the image. For images with uniform grayscale distribution, the grayscale standard deviation can be appropriately increased. The sub-block size can be set to 4×4-16×16. The smaller the sub-block, the more refined the local enhancement effect, but the greater the computational load. For powder metallurgy images, it is usually set to 8×8. The sub-block contrast limit threshold can be set to 0.01-0.03. For images with small grayscale differences, the threshold can be appropriately reduced to avoid insufficient enhancement.
[0038] For example, in one feasible implementation, the system performs a refinement step on the original image of the copper-based powder metallurgy bushing (50mm × 30mm × 5mm) output in step S100: In step S210, an adaptive bilateral filtering algorithm is used, with the filter kernel size set to 5×5, spatial standard deviation to 2.0, and grayscale standard deviation to 15.0. After processing, the 2-3μm micropore texture noise in the image is effectively eliminated, and the edge of an invisible crack with a width of about 8μm at the tooth surface is clearly preserved. In step S220, an adaptive histogram equalization algorithm is used to divide the image into 8×8 sub-blocks. The sub-block contrast limit threshold is set to 0.02. Before processing, the gray level difference between the crack and the substrate is 7 gray levels, and after processing, it is increased to 22 gray levels. The crack details in the dark area are no longer covered by the background. In the final output clean image, the gray level of the bushing substrate area is uniform, and the hidden cracks show obvious gray level bands, which meets the requirements for the clarity of crack features when generating virtual samples in the future.
[0039] Step S300: Generate a virtual crack sample based on the clean image. During the generation process, the virtual crack sample is quality checked. If the check is qualified, proceed to the next step; if the check is unqualified, return to the previous corresponding step for reprocessing.
[0040] Among them, "virtual crack sample" refers to an image sample containing simulated hidden cracks generated by the system based on a clean image (crack-free area) and combined with the physical characteristics of real cracks (such as length, width, and grayscale gradient). This sample can replace real crack samples for model training. "Quality verification" refers to the process by which the system judges the validity of the generated virtual crack sample. The judgment criteria revolve around the authenticity of the virtual crack (consistency with the physical characteristics of real cracks) and the degree of integration with the clean image (no obvious embedding traces). "Preceding steps" refers to the previous processing step corresponding to the step that causes the sample to be unqualified during the generation of virtual crack samples. For example, if the crack contour drawing does not meet the standard, it corresponds to the "crack contour drawing step", and if the background fusion does not meet the standard, it corresponds to the "background area screening step".
[0041] Additionally, it's important to note that the core purpose of this step is to address the industry pain point of the difficulty and high cost of obtaining real hidden crack samples. Real hidden crack samples require destructive workpiece acquisition (such as metallographic cutting) or high-precision imaging, resulting in high cost and limited quantity per sample, which cannot meet the needs of model training. By generating virtual crack samples, the number of samples can be significantly expanded, while quality verification ensures sample validity and prevents unqualified samples from affecting the accuracy of subsequent model training. The system's approach for this step is as follows: first, virtual cracks are generated based on real crack features; then, the validity of the sample is determined through verification. If valid, the process proceeds to the next step; otherwise, it backtracks to the problematic stage for reprocessing, forming a closed loop of "generation-verification-backtracking" to ensure that the quality of the output virtual samples meets the standards.
[0042] In one possible implementation, the process of generating virtual crack samples by the system includes: first, based on a preset number (e.g., 3-5) of real crack clean images, extracting the physical parameters of the real cracks (e.g., length 0.1-2mm, width 5-50μm, grayscale gradient 6 gray levels / 10μm) to construct a physical feature template library; then, drawing crack outlines in the crack-free areas of the clean images according to the template library parameters, filling in grayscale and blending with the background; during quality verification, the system judges from two dimensions: physical parameter matching degree (the deviation between the virtual crack and the template library parameters is no more than 10%) and background blending degree (the grayscale difference between the crack and the background is no more than 3, and the structural similarity index is no less than 0.9). If either dimension fails to meet the standard, the corresponding previous step is returned (parameter deviation returns to the crack outline drawing step, and blending degree failure returns to the background area filtering step).
[0043] Specifically, step S300 further includes the following steps: Step S310: Obtain a preset number of clean images containing real cracks that have undergone original image acquisition and stitching, original image noise removal and contrast enhancement processing; extract the physical parameters of the real cracks; generate multiple sets of differentiated parameters based on the physical parameters; and construct a physical feature template library. Step S320: Based on the parameters of the physical feature template library, draw the crack outline in the crack-free area of the clean image, perform grayscale filling and smoothing on the crack outline, and output the crack outline image. Step S330: Select a flat background area in the clean image, and perform pixel-level fusion of the crack outline image with the flat background area to output a virtual crack sample; Step S340: Perform physical parameter matching degree verification and background fusion degree verification on the virtual crack sample respectively, and comprehensively judge whether the virtual crack sample is qualified based on the results of the two verifications; if it is qualified, continue to execute the physical feature vector extraction step; if it is unqualified, and the unqualification is caused by the physical parameter matching degree verification result, return to the crack contour drawing step for reprocessing; if the unqualification is caused by the background fusion degree verification result, return to the background area filtering step for reprocessing.
[0044] The "preset number of clean images containing real cracks" refers to the number of samples the system uses to extract the physical parameters of real cracks, typically 3-5. Too few samples will result in insufficient parameter representativeness, while too many will increase acquisition costs. The "physical parameters of real cracks" refer to the parameters describing the morphology and grayscale characteristics of real hidden cracks, including length, center width, curvature, number of branches, center grayscale value, and edge gradient rate. The "physical feature template library" refers to a database storing multiple sets of differentiated physical parameters to guide the generation of virtual cracks. The "flat background area" refers to the area in the clean image that is free of holes, impurities, and has uniform grayscale to avoid overlap between virtual cracks and interference. The "physical parameter matching degree verification" refers to judging the degree of consistency between the virtual crack parameters and the template library parameters. The "background fusion degree verification" refers to judging the visual fusion effect between the virtual crack and the background area. By clarifying the complete process of virtual sample generation (parameter extraction - contour drawing - background fusion - quality verification), the authenticity and validity of virtual samples are ensured. The physical feature template library provides real parameter basis for virtual cracks, crack contour drawing and background fusion ensure that the shape of virtual cracks matches the scene, and quality verification selects qualified samples to avoid unqualified samples affecting the model training accuracy, thus solving the pain point of difficulty in obtaining real samples.
[0045] Additionally, it should be noted that the preset quantity can be adjusted according to the crack type. For example, it can be set to 3 sets when detecting a single type of crack (such as a linear crack), and 5 sets when detecting multiple types of cracks (such as branch cracks or network cracks). The differential generation of physical parameters can be achieved by random combination, such as randomly selecting values for length in the range of 0.1-2mm and width in the range of 5-50μm, while satisfying the constraint that "the longer the length, the higher the upper limit of the width". The screening of flat background areas can be achieved through texture analysis algorithms (such as gray-level co-occurrence matrix contrast). Areas with a contrast ratio ≤200 are judged as flat areas. The judgment logic of quality verification can be set with priority. If two verifications are not met at the same time, the physical parameter matching problem is solved first, and then the background blending problem is processed to ensure that the physical properties of the virtual crack first conform to the real characteristics.
[0046] For example, in one feasible implementation, the system performs a refinement step on the clean image of the iron-based powder metallurgy bearing ring (60mm × 40mm × 10mm) output in step S200: Step S310: Obtain 3 clean images containing real hidden cracks (crack length 0.6-1.5mm, width 10-25μm), extract physical parameters and generate 100 sets of differential parameters to construct a physical feature template library; Step S320: Select a set of parameters from the template library (length 1.0mm, width 12μm, curvature radius 12mm, number of branches 1), draw the crack outline using Bezier curve in the crack-free area of the clean image, fill the gray level (center gray level = matrix gray level - 40) and perform 3×3 mean filtering, and output the crack outline image; Step S330: Select a flat background area with a contrast of ≤200 by using the gray-scale co-occurrence matrix contrast filter, fuse the crack outline image with the area, feather the edge by 6 pixels, match the gray-scale difference with ≤3 after illumination, and add a virtual micropore with a diameter of 2μm. Step S340, verify the virtual sample: the physical parameter deviation is 6% (meets the ≤10% standard), the background fusion grayscale difference is 2, and the structural similarity index is 0.92 (meets the standard), so it is judged as qualified and the feature extraction step is continued; another virtual sample has a background fusion grayscale difference of 4 (does not meet the standard), so it returns to step S330 to re-screen the flat area, and the fusion is qualified.
[0047] Furthermore, step S340 also includes the following steps: Step S341: The physical parameters include crack length, center width, curvature, number of branches, center gray value, and edge gradient rate. The verification standard for the matching degree of the physical parameters is: the deviation between the physical parameters extracted from the virtual crack sample and the corresponding parameters in the physical feature template library is no greater than 10%. Step S342: The verification criteria for the background fusion degree include: selecting at least 20 sampling points along the crack edge in the virtual crack sample, with the gray level difference between each sampling point and the adjacent background pixel not exceeding 3; calculating the structural similarity index between the crack region and the background region, wherein the structural similarity index is not less than 0.9; Step S343: Determine the verification result of the virtual crack sample; if the virtual crack sample simultaneously meets the physical parameter matching degree standard and the background fusion degree standard, it is determined to be a qualified virtual crack sample, and the physical feature vector extraction step continues; if it does not meet the physical parameter matching degree standard, it is determined to be an unqualified virtual crack sample, and the crack contour drawing step is returned to redraw the crack contour; if it does not meet the background fusion degree standard, it is determined to be an unqualified virtual crack sample, and the background area filtering step is returned to re-filter the background area; if both standards are not met at the same time, the crack contour drawing step is returned to reprocess first, and the background area filtering step is executed again after the physical parameter deviation meets the requirements, until a qualified virtual crack sample is generated.
[0048] The "verification standard for physical parameter matching" refers to a quantitative indicator for judging the consistency between the physical parameters of the virtual crack and the parameters of the template library, i.e., the parameter deviation is no more than 10%, calculated as "|virtual parameter - template parameter| / template parameter × 100%". The "verification standard for background fusion" refers to an indicator for judging the visual consistency between the virtual crack and the background region, including edge grayscale difference (≤3) and structural similarity index (≥0.9). Edge grayscale difference reflects whether the grayscale transition between the crack and the background is natural, and structural similarity index reflects the overall visual fusion effect. "Simultaneously failing to meet two standards" means that the virtual crack does not meet either the physical parameter matching requirement or the background fusion requirement, and must be processed according to priority. By clarifying the verification standards and the processing logic for unqualified samples, the quality of qualified virtual samples is ensured. Specific quantitative standards can avoid subjective judgment errors and ensure the consistency of virtual samples in different batches. The hierarchical processing logic for unqualified samples (parameters first, then fusion) can prioritize ensuring that the physical properties of the virtual crack conform to the real characteristics, and then optimize the visual fusion effect. The final output qualified samples can effectively replace real samples for model training.
[0049] Additionally, it should be noted that the threshold for physical parameter deviation can be adjusted according to the crack detection accuracy requirements. For example, for high-precision detection (crack size error ≤ 5%), the deviation threshold is set to 5%, while for routine detection it is set to 10%. The number of edge sampling points can be set to 15-25. The more uniform the sampling points are, the more accurate the verification results will be. They are usually evenly distributed along the crack edge. The threshold for the structural similarity index can be set to 0.85-0.95. For scenarios with high visual fusion requirements (such as surface crack detection), it should be set to above 0.9. For internal crack detection, it can be appropriately reduced to 0.85. If both criteria are not met, the background fusion problem can be addressed first, followed by the physical parameter problem. Adjustments should be made based on the main reasons for sample non-compliance. If the parameter deviation is too large, the parameters should be adjusted first.
[0050] For example, in one feasible implementation, the system performs a refinement verification step on a virtual crack sample of an iron-based powder metallurgy gear: Step S341: Extract the physical parameters of the virtual crack (length 1.1mm, width 13μm). The corresponding parameters in the template library are (length 1.2mm, width 12μm). Calculate the length deviation of 8.3% and the width deviation of 8.3%, both ≤10%, which meets the physical parameter matching standard. Step S342: 20 sampling points are uniformly selected along the crack edge. The maximum gray level difference between each sampling point and the background is 2. The structural similarity index between the crack area and the background is calculated to be 0.93, which meets the background fusion standard. Step S343: Determine that the sample is qualified, and continue with the feature extraction step; Another virtual sample has a physical parameter deviation of 12% (not satisfied) and a background grayscale difference of 4 (not satisfied). The system first returns to step S320 to redraw the crack outline. After adjusting the parameters, the deviation is reduced to 9%. Then it returns to step S330 to re-fuse, and the grayscale difference is reduced to 2. Finally, the verification is qualified, ensuring that the sample can be used for model training without introducing errors.
[0051] Step S400: Extract the physical feature vectors of the qualified virtual crack sample and the clean image containing real cracks. The physical feature vectors include geometric features, grayscale features and texture features.
[0052] Among them, "qualified virtual crack sample" refers to a virtual crack sample that is determined to be valid after quality verification in step S300; "clean image containing real cracks" refers to a clean image that actually contains real hidden cracks after processing in step S200; "physical feature vector" refers to a set of numerical combinations that the system converts into the physical properties of the cracks in the sample (such as geometric shape, grayscale distribution, and texture structure), and this vector can be directly identified and calculated by the detection model; "geometric features" refers to attributes that describe the spatial morphology of the crack, such as length, width, and curvature; "grayscale features" refers to attributes that describe the grayscale difference between the crack area and the substrate area, such as the center grayscale value and grayscale gradient; "texture features" refers to attributes that describe the texture difference between the crack area and the surrounding area, such as contrast and correlation.
[0053] Additionally, it's important to note that the core purpose of this step is to convert image-based samples into a numerical form that the model can process. The detection model cannot directly identify cracks in an image; it needs to extract physical feature vectors to transform the intuitive features of the cracks into quantifiable parameters. These vectors contain multi-dimensional information, including geometry, grayscale, and texture, comprehensively reflecting the crack's attributes and avoiding misjudgments caused by single-dimensional features. The system's approach to this step is as follows: for two types of samples—qualified virtual crack samples and clean images containing real cracks—multi-dimensional physical features are extracted separately. The features of each type of sample are then integrated into a feature vector, providing standardized input data for subsequent model training.
[0054] In one possible implementation, when the system extracts the physical feature vector: geometric features are extracted using an edge detection algorithm (such as the Canny algorithm) combined with a region segmentation algorithm (such as the region growing method) to calculate crack length, average width, maximum width, curvature, number of branches, and the ratio of total branch length to main crack length; grayscale features are extracted using grayscale statistics to calculate the grayscale value at the crack center, the grayscale value at the edge, the mean of the grayscale gradient, and the grayscale variance; texture features are extracted using a grayscale co-occurrence matrix algorithm to calculate the contrast and correlation of the crack region; finally, the above 12 feature parameters are integrated into a 12-dimensional physical feature vector, with each vector corresponding to a sample.
[0055] Step S400 further includes: Step S410: The geometric features are extracted using edge detection and region segmentation algorithms, including crack length, average width, maximum width, curvature, number of branches, and the ratio of total branch length to main crack length; the grayscale features are extracted using grayscale statistics, including crack center grayscale value, edge grayscale value, mean grayscale gradient, and grayscale variance; the texture features are extracted using the grayscale co-occurrence matrix, including contrast and correlation.
[0056] The "edge detection algorithm" refers to the algorithm used by the system to identify areas of abrupt grayscale changes (i.e., crack edges) in an image. In this embodiment, the Canny algorithm is preferred. This algorithm can accurately locate the continuous edges of cracks through four steps: Gaussian filtering for noise reduction, calculation of gradient magnitude and direction, non-maximum suppression, and dual threshold detection. The "region segmentation algorithm" refers to the algorithm used by the system to separate the cracked region detected by the edge from the workpiece substrate region. In this scheme, the region growing method is used, that is, using the crack pixels obtained by edge detection as "seed points", and according to the growth threshold of "seed point grayscale value ± 8", surrounding pixels with similar grayscale are included in the crack. The system achieves precise segmentation of cracks from the substrate. "Gray-level statistics" refers to the process of calculating and analyzing the gray-level values of the segmented crack region. By statistically analyzing parameters such as gray-level mean, variance, and gradient, it reflects the depth differences of the crack (e.g., low gray-level at the crack center and high gray-level at the edges). The "gray-level co-occurrence matrix" is a matrix constructed by the system to describe the texture features of the crack region by calculating the probability of gray-level combinations of two pixels at a fixed distance and in a fixed direction in the image. Its derived parameters, "contrast" (reflecting the texture difference between the crack and the substrate) and "correlation" (reflecting the continuity of the crack region's texture), distinguish cracks from micropores and impurities. Key performance indicators; "Geometric features" refer to a set of parameters describing the spatial morphology of the crack, including crack length (the distance extended along the centerline, calculated by pixel count combined with a 0.2μm / pixel calibration value), average width (crack area divided by length), maximum width (the dimension at the widest point of the crack), curvature (represented by the radius of curvature, reflecting the degree of crack curvature), number of branches (the number of branches with a length ≥ 0.5mm), and the ratio of the total length of branches to the length of the main crack (reflecting the degree of branch development); "Grayscale features" refer to a set of parameters describing the grayscale distribution of the crack region, including the grayscale value at the crack center (the grayscale value at the deepest point of the crack). The grayscale features include: mean grayscale value, edge grayscale value (mean grayscale value at the interface between the crack and the matrix), mean grayscale gradient value (the rate of change of grayscale value from the crack center to the edge), and grayscale variance (the degree of dispersion of grayscale values within the crack region, reflecting the uniformity of crack depth); "texture features" refers to the set of parameters describing the texture structure of the crack region, namely the contrast and correlation derived from the grayscale co-occurrence matrix; "physical feature vector" refers to the 12-dimensional numerical combination formed by integrating the above geometric features (6 items), grayscale features (4 items), and texture features (2 items). This vector can convert the crack features in image form into quantitative data that the model can directly calculate.
[0057] By extracting features with clear physical meaning (such as length and grayscale gradient), the model's decision-making basis becomes interpretable, while avoiding misjudgments caused by a single feature (such as relying solely on grayscale). The implementation idea is "segmentation before extraction": first, the crack area is located through edge detection and region segmentation, and then features are extracted in three dimensions: geometry, grayscale, and texture. Finally, these features are integrated into a 12-dimensional vector to provide standardized input for subsequent model training.
[0058] In one possible implementation, the algorithm selection can be flexibly adjusted when the system executes S410: if the crack edge is blurry (such as subcutaneous microcracks), the low threshold of the Canny algorithm can be reduced to 40 and the high threshold to 140 to enhance the edge detection sensitivity; if the gray level of the workpiece substrate is uneven, the growth threshold of the region growing method can be reduced to "seed point gray level ±5" to avoid mistakenly including substrate pixels in the crack area; when performing gray level statistics, three different sub-blocks (center, edge, and transition area) can be taken from the crack area to calculate the gray level values separately, and then the average value can be taken to improve accuracy; the calculation parameters of the gray level co-occurrence matrix can be set to "distance 1 pixel, direction 0° / 45° / 90° / 135°", and the statistical average value of the four directions can be taken as the final texture feature to ensure the stability of the feature.
[0059] Step S500: Train the detection model using a semi-supervised learning method. Use the detection model to detect the newly acquired workpiece by sequentially performing the following steps: original image acquisition and stitching, original image noise elimination and contrast enhancement, virtual crack sample generation and verification, and physical feature vector extraction. Output the probability of crack existence and crack level.
[0060] Among them, "semi-supervised learning" refers to a learning method in which the system trains the model by combining a small number of labeled samples (samples with class labels) and a large number of unlabeled samples (samples without class labels). The labeled samples are used to determine the basic parameters of the model, and the unlabeled samples are used to optimize the model's generalization ability. "Detection model" refers to an algorithm model that, after training, can determine whether a workpiece has cracks and the severity of the cracks based on the input physical feature vector. "Newly acquired workpiece" refers to the powder metallurgy workpiece to be detected by the system that has not undergone any detection processing. "Crack existence probability" refers to the probability value of the workpiece having hidden cracks calculated by the detection model based on the physical feature vector. The value ranges from 0 to 1, with a higher value indicating a higher probability. "Crack level" refers to the crack severity category classified by the system based on the crack existence probability and crack physical parameters (such as length). It usually includes three categories: no cracks, micro-cracks, and harmful cracks.
[0061] Additionally, it's important to note that the core objective of this step is to train a high-precision detection model using semi-supervised learning and apply it to the detection of new workpieces, achieving automated and accurate identification of hidden cracks. Compared to traditional fully supervised learning, which requires a large number of labeled samples, semi-supervised learning only requires a small number of labeled samples (e.g., 10-20), reducing sample labeling costs. Furthermore, the model's detection based on physical feature vectors avoids the uninterpretability of "black box" models, ensuring reliable detection results. The system's approach for this step is as follows: first, the model is trained in stages using semi-supervised learning (supervised training establishes the foundation, unsupervised fine-tuning improves generalization); then, the trained model is applied to new workpieces, detecting the physical feature vectors of the new workpieces after the initial complete process; finally, a quantified probability and level of existence are output, providing a basis for workpiece quality assessment.
[0062] In one possible implementation, when the system uses semi-supervised learning to train the detection model, it consists of two stages: The first stage is supervised training, where 10-20 real crack sample physical feature vectors with labeled information (labeled "cracked / no crack" and crack level) are input, the cross-entropy loss function is used, the learning rate is set to 0.001, and the training is iterated for 50 rounds to determine the basic parameters of the model; The second stage is unsupervised fine-tuning, where qualified virtual sample physical feature vectors (including cracked and no-crack categories) output from step S400 are input, and the model parameters are adjusted based on feature similarity constraints (e.g., cracked samples must meet the requirements of length ≥ 0.2 mm and width ≥ 5 μm), and the training is iterated for 30 rounds. The training terminates when the accuracy of the validation set is not less than 98% and there is no improvement for 5 consecutive rounds; When detecting a new workpiece, if the model calculates that the probability of crack existence is ≥ 0.8, it determines that a crack exists, and then classifies the crack according to its length (length ≤ 0.5 mm is a micro-crack, length > 0.5 mm is a harmful crack), and outputs the results.
[0063] Specifically, step S500 further includes the following steps: Step S510: The semi-supervised learning includes a supervised training phase and an unsupervised fine-tuning phase. In the supervised training phase, a preset number of labeled real crack sample physical feature vectors containing labeled information are input, the cross-entropy loss function is used, the learning rate is set to 0.001, and the number of iterations is no less than 50 rounds. In the unsupervised fine-tuning phase, the physical feature vectors of the qualified virtual crack samples are input, the model parameters are adjusted based on feature similarity constraints, the number of iterations is no less than 30 rounds, and the training termination condition is that the accuracy of the validation set is no less than 98% and there is no improvement for 5 consecutive rounds. Step S520: During the detection process, if the probability of the presence of the crack is not less than 0.8, it is determined that a crack exists; the crack level includes no crack, micro crack and harmful crack, wherein the length of the micro crack is not greater than 0.5 mm, the length of the harmful crack is greater than 0.5 mm, and a detection report containing crack parameters and judgment results is output, and the detection time of a single sample is not greater than 0.5 s.
[0064] The "supervised training phase" refers to the stage where the system trains the basic parameters of the detection model using samples with explicit annotation information (labeled as "cracked / no crack" and the corresponding crack level). The role of the labeled samples is to provide the model with the "correct answer," ensuring that the model initially grasps the correspondence between crack features and labels. The "unsupervised fine-tuning phase" refers to the stage where the system optimizes the model's generalization ability using qualified unlabeled virtual samples (containing only feature vectors, without labels). Through "feature similarity constraints" (such as crack samples needing to meet "length ≥ 0.2mm and width ≥ 5μm"), the model learns more crack morphologies in the unlabeled state, avoiding overfitting to labeled samples. The "preset number of labeled samples" refers to the total number of labeled samples required for supervised training, usually set to 10-20. Too few parameters will lead to inaccurate model parameters, while too many will increase the cost of manual annotation (annotating one micron-level crack sample takes 2-3 hours). The "crack presence probability threshold" refers to the critical probability value for the system to determine whether a workpiece has a crack. In this scheme, it is set to 0.8, that is, when the probability calculated by the model is ≥0.8, it is judged as "crack present", and when it is <0.8, it is judged as "no crack". This threshold balances the false negative rate and false positive rate (too high a threshold will easily lead to false negatives, and too low a threshold will easily lead to false positives). The "crack grade classification standard" refers to the basis for the system to classify the severity of cracks based on crack length. "No crack" means that no crack features were detected, "micro crack" means that the crack length is ≤0.5mm (which has little impact on the mechanical properties of the workpiece), and "harmful crack" means that the crack length is >0.5mm (which will significantly reduce the strength of the workpiece and needs to be rejected).
[0065] By using semi-supervised learning with "a small number of labeled samples + a large number of virtual samples", the accuracy of the model is improved while reducing the labeling cost, and finally the automated detection of new workpieces is achieved. The approach is to "build a foundation first and then optimize": first, supervised training is used to enable the model to master the basic crack features, then unsupervised fine-tuning is used to expand the model's ability to recognize different crack morphologies, and finally the trained model is applied to the detection of new workpieces to output quantitative results.
[0066] In one possible implementation, the system can adjust parameters as needed when executing S510 and S520: if the crack type in the detection scenario is singular (e.g., only linear cracks), the preset number of annotations can be reduced to 10, and the number of iterations can be reduced to 40 rounds (supervised) or 20 rounds (unsupervised); if the detection scenario has extremely high requirements for the false detection rate (e.g., aerospace parts), the crack existence probability threshold can be increased to 0.9, while increasing the number of virtual samples for unsupervised fine-tuning (e.g., 1500); the crack level classification can also be combined with the width supplementary standard, such as stipulating that "cracks with a width > 20 μm are judged as harmful cracks even if the length ≤ 0.5 mm", which is suitable for size-sensitive application scenarios (e.g., high-pressure seals).
[0067] For example, in one feasible implementation, the workpiece to be inspected is an iron-based powder metallurgy turbine disk (material Fe-3Ni-0.5Mo, density 7.4g / cm³, dimensions 300mm×50mm×20mm). The specific process of the system executing steps S410, S510, and S520 is as follows: Step S410 (Feature Extraction): The system extracts features from 1000 qualified virtual crack samples (including linear and branched cracks) and 20 clean images containing real cracks (crack length 0.3-1.8 mm, width 6-35 μm): Edge detection: The Canny algorithm (low threshold 50, high threshold 150, Gaussian kernel 5×5) is used to accurately detect crack edges with a width ≥5μm; Region segmentation: Using the crack edge pixels as seed points, region growth is performed according to the threshold of "seed point gray value ±8" to segment out the complete crack region; Feature calculation: In terms of geometric features, the measured length of a real crack is 0.8 mm, the average width is 12 μm, the radius of curvature of the bend is 15 mm, and the number of branches is 1; in terms of grayscale features, the grayscale value of the crack center is 115 (the grayscale value of the matrix is 155), and the average grayscale gradient is 6.2; in terms of texture features, the contrast is 360 and the correlation is 0.72. Vector integration: The above 12 features are integrated into a physical feature vector of [0.8,12,15,1,0.25,115,142,6.2,9,360,0.72], generating a total of 1020 vectors.
[0068] Step S510 (Model Training): Supervised training: Input 15 labeled sample vectors (8 with cracks and 7 without cracks), use the cross-entropy loss function, learning rate 0.001, iterate for 50 rounds, and the model achieves 95% accuracy on the validation set after training; Unsupervised fine-tuning: Input 1000 virtual sample vectors and adjust the parameters according to the feature similarity constraint of "length ≥ 0.2mm and width ≥ 5μm". After 30 iterations, the accuracy of the final model validation set is improved to 98.5%. Training is stopped after 5 consecutive rounds without improvement.
[0069] Step S520 (New workpiece inspection): The new turbine disk workpiece is sequentially processed through original image acquisition (multiple images stitched together, with a deviation of 1.5 pixels), noise reduction (adaptive bilateral filtering), contrast enhancement (adaptive histogram equalization), and feature extraction (same as S410 process) to obtain a physical feature vector. After the model inputs this vector, it calculates the probability of crack existence as 0.91, the crack length as 0.7 mm (width as 14 μm), and determines it as "crack exists, level is harmful crack"; The system outputs a test report containing the location (root of turbine blade), length, and width of the crack. The test time for a single sample is 0.45s, and the error between the test results and the results of manual metallographic cutting (crack length 0.72mm) is ≤3%, meeting the requirements for testing accuracy in the aerospace field.
[0070] In this embodiment, by acquiring the original image of the powder metallurgy workpiece and stitching together the workpieces that exceed the specified range, complete initial data is provided for subsequent detection, thus avoiding the omission of possible crack locations. By sequentially performing noise reduction and contrast enhancement processing on the original image, a clean image is output, which eliminates micropore texture and reflective interference and enhances crack features. By generating and verifying virtual crack samples based on the clean image, the dependence on real samples is reduced and the difficulty of obtaining samples is solved. By extracting physical feature vectors and using semi-supervised learning to train a model to detect new workpieces, accurate and automated detection is achieved, providing a reliable basis for crack determination.
[0071] Based on the above embodiments, such as Figure 2 As shown, the present invention also provides a powder metallurgy hidden crack defect detection system to support the powder metallurgy hidden crack defect detection method of the above embodiments. The powder metallurgy hidden crack defect detection system includes: The original image processing module 11 is used to acquire the original image of the powder metallurgy workpiece, stitch together images of workpieces whose size exceeds the coverage of a single image, and output the original image. The clean image generation module 12 is used to sequentially perform noise reduction processing and contrast enhancement processing on the original image to output a noise-free, high-contrast clean image. The virtual crack sample generation module 13 is used to generate virtual crack samples based on the clean image. During the generation process, the virtual crack sample is quality checked. If the check is qualified, the subsequent module is triggered. If the check is unqualified, the process is returned to the previous corresponding module for reprocessing. The physical feature extraction module 14 is used to extract the physical feature vectors of the qualified virtual crack sample and the clean image containing real cracks. The physical feature vectors include geometric features, grayscale features and texture features. The detection model training and execution module 15 is used to train the detection model using a semi-supervised learning method. The detection model is used to detect the physical feature vector of the newly acquired workpiece after the original image acquisition and stitching, original image noise elimination and contrast enhancement, virtual crack sample generation and verification, and physical feature vector extraction and processing. The module outputs the probability of crack existence and crack level.
[0072] In an optional embodiment, the original image processing module 11 is further configured to perform core parameter calibration on the image data used to acquire the original image; determine the acquisition method of the original image according to the workpiece size, acquire a single original image for workpieces with a size smaller than a preset range, and acquire multiple original images for workpieces with a size larger than a preset range; stitch the multiple original images using a feature matching algorithm, control the deviation of the stitched image to be within a preset range, and output the original image.
[0073] The core parameter calibration includes calibrating the image resolution and pixel size to ensure that the calibrated image resolution is not lower than the preset resolution and the pixel size is not greater than the preset pixel size; the pixel size is calibrated using standard resolution data to ensure that the calibrated pixel size meets the accuracy requirements for crack feature recognition. The preset range is the range of workpiece sizes that can be completely covered by a single image. For workpieces smaller than the preset range, the relative distance between the image and the workpiece is controlled to be a preset distance when acquiring the image. For workpieces larger than the preset range, the overlap rate of adjacent images is controlled to be no less than a preset overlap rate when acquiring multiple original images. The feature matching algorithm is the SIFT feature matching algorithm, and the preset deviation range is no greater than the preset deviation to ensure the integrity and continuity of the stitched image.
[0074] In an optional embodiment, the clean image generation module 12 is further configured to perform adaptive bilateral filtering on the original image, wherein the adaptive bilateral filtering kernel size is 5×5, the spatial standard deviation is set to 2.0, and the grayscale standard deviation is set to 15.0, so as to eliminate micropore texture noise with a size not greater than 3μm and retain crack edge features; and to perform adaptive histogram equalization on the image after the adaptive bilateral filtering, dividing the image into 8×8 sub-blocks, with the sub-block contrast limit threshold set to 0.02, so as to enhance the contrast of dark areas with a grayscale mean of less than 100, thereby increasing the grayscale difference between the crack and the substrate to 20-30 grayscale levels, and outputting the clean image.
[0075] In an optional embodiment, the virtual crack sample generation module 13 is further configured to acquire a preset number of clean images containing real cracks, processed by original image acquisition and stitching, original image noise reduction and contrast enhancement, extract the physical parameters of the real cracks, generate multiple sets of differentiated parameters based on the physical parameters, and construct a physical feature template library; draw crack outlines in the crack-free areas of the clean images based on the parameters of the physical feature template library, perform grayscale filling and smoothing on the crack outlines, and output crack outline images; filter flat background areas in the clean images, perform pixel-level fusion of the crack outline images and the flat background areas, and output virtual crack samples; perform physical parameter matching degree verification and background fusion degree verification on the virtual crack samples respectively, and comprehensively judge whether the virtual crack samples are qualified based on the results of the two verifications; if they are qualified, the physical feature vector extraction step is continued; if they are unqualified, and the unqualification is caused by the physical parameter matching degree verification result, the process returns to the crack outline drawing step for reprocessing; if the unqualification is caused by the background fusion degree verification result, the process returns to the background area filtering step for reprocessing.
[0076] The physical parameters include crack length, center width, curvature, number of branches, center grayscale value, and edge gradient rate. The verification standard for the matching degree of the physical parameters is: the deviation between the physical parameters extracted from the virtual crack sample and the corresponding parameters in the physical feature template library is no greater than 10%. The verification standard for the background fusion degree includes: selecting at least 20 sampling points along the crack edge in the virtual crack sample, with the grayscale difference between each sampling point and the adjacent background pixel being no greater than 3; calculating the structural similarity index between the crack region and the background region, with the structural similarity index being no less than 0.9; judging the verification result of the virtual crack sample; if the... If a virtual crack sample meets both the physical parameter matching standard and the background blending standard, it is considered a qualified virtual crack sample, and the physical feature vector extraction step continues. If it does not meet the physical parameter matching standard, it is considered an unqualified virtual crack sample, and the process returns to the crack contour drawing step to redraw the crack contour. If it does not meet the background blending standard, it is considered an unqualified virtual crack sample, and the process returns to the background area filtering step to re-filter the background area. If both standards are not met, the process returns to the crack contour drawing step for reprocessing, and the background area filtering step is performed only after the physical parameter deviation meets the requirements, until a qualified virtual crack sample is generated.
[0077] In an optional embodiment, the geometric features in the physical feature extraction module 14 are extracted using edge detection and region segmentation algorithms, including crack length, average width, maximum width, curvature, number of branches, and the ratio of total branch length to main crack length; the grayscale features are extracted using grayscale statistics, including crack center grayscale value, edge grayscale value, mean grayscale gradient, and grayscale variance; the texture features are extracted using a grayscale co-occurrence matrix, including contrast and correlation.
[0078] In an optional embodiment, the semi-supervised learning in the detection model training and execution module 15 includes a supervised training phase and an unsupervised fine-tuning phase. The supervised training phase inputs a preset number of labeled physical feature vectors of real crack samples containing labeled information, employs a cross-entropy loss function, sets the learning rate to 0.001, and iterates at least 50 times. The unsupervised fine-tuning phase inputs the physical feature vectors of the qualified virtual crack samples, adjusts the model parameters based on feature similarity constraints, iterates at least 30 times, and terminates training when the validation set accuracy is at least 98% and there is no improvement for 5 consecutive rounds. During the detection process, if the probability of a crack's existence is at least 0.8, it is determined that a crack exists. The crack levels include no crack, micro-crack, and harmful crack, where the length of a micro-crack is no greater than 0.5 mm, and the length of a harmful crack is greater than 0.5 mm. A detection report containing crack parameters and the determination result is output, and the detection time for a single sample is no greater than 0.5 seconds.
[0079] In this embodiment, by acquiring the original image of the powder metallurgy workpiece and stitching together the workpieces that exceed the specified range, complete initial data is provided for subsequent detection, thus avoiding the omission of possible crack locations. By sequentially performing noise reduction and contrast enhancement processing on the original image, a clean image is output, which eliminates micropore texture and reflective interference and enhances crack features. By generating and verifying virtual crack samples based on the clean image, the dependence on real samples is reduced and the difficulty of obtaining samples is solved. By extracting physical feature vectors and using semi-supervised learning to train a model to detect new workpieces, accurate and automated detection is achieved, providing a reliable basis for crack determination.
[0080] Furthermore, the powder metallurgy hidden crack defect detection system can run the above-mentioned powder metallurgy hidden crack defect detection method. For specific implementation, please refer to the method embodiment, which will not be repeated here.
[0081] Based on the above embodiments, such as Figure 3 As shown, the present invention also provides an electronic device, the electronic device comprising: The processor 22 includes at least one processor 22, at least one memory 21, a communication interface 23, and a communication bus 24, wherein the processor 22 is communicatively connected to the memory 21. In this embodiment, the memory 21 can be implemented in any suitable manner, for example, the memory 21 can be a read-only memory, a hard disk drive, a solid-state drive, or a USB flash drive, etc.; the memory 21 is used to store at least one executable instruction executed by the processor; In this embodiment, the processor 22 can be implemented in any suitable manner. For example, the processor 22 can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) that can be executed by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc.; the processor is used to execute the executable instructions to implement the powder metallurgy hidden crack defect detection method as described above.
[0082] Based on the above embodiments, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the powder metallurgy hidden crack defect detection method as described above.
[0083] Those skilled in the art will recognize that the modules and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, equipment, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or equipment, and may be electrical, mechanical, or other forms.
[0086] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0088] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program instructions, such as USB flash drives, portable hard drives, read-only storage servers, random access storage servers, magnetic disks, or optical disks.
[0089] Furthermore, it should be noted that the combination of the various technical features in this case is not limited to the combination methods described in the claims of this case or the combination methods described in the specific embodiments. All technical features described in this case can be freely combined or combined in any way, unless they contradict each other.
[0090] It should be noted that the above examples are merely specific embodiments of the present invention, and the present invention is obviously not limited to the above embodiments, with many similar variations. All modifications that can be directly derived or conceived by those skilled in the art from the content disclosed in this invention should fall within the protection scope of this invention.
[0091] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A powder metallurgy invisible crack defect detection method characterized by, Includes the following steps: Step S100: Obtain the original image of the powder metallurgy workpiece, stitch together the images of workpieces whose size exceeds the coverage of a single image, and output the original image; Step S200: Perform noise reduction processing and contrast enhancement processing on the original image in sequence to output a clean image with no noise and high contrast; Step S300: Generate a virtual crack sample based on the clean image. During the generation process, the virtual crack sample is quality checked. If the check is qualified, proceed to the next step. If the check is unqualified, return to the previous corresponding step for reprocessing. Step S400: Extract the physical feature vectors of the qualified virtual crack sample and the clean image containing real cracks. The physical feature vectors include geometric features, grayscale features and texture features. Step S500: The detection model is trained using a semi-supervised learning method. The detection model is used to detect the newly acquired workpiece by sequentially performing the following steps: original image acquisition and stitching, original image noise elimination and contrast enhancement, virtual crack sample generation and verification, and physical feature vector extraction and processing. The probability of crack existence and crack level are output. Step S300 further includes the following steps: Step S310: Obtain a preset number of clean images containing real cracks that have undergone original image acquisition and stitching, original image noise removal and contrast enhancement processing; extract the physical parameters of the real cracks; generate multiple sets of differentiated parameters based on the physical parameters; and construct a physical feature template library. Step S320: Based on the parameters of the physical feature template library, draw the crack outline in the crack-free area of the clean image, perform grayscale filling and smoothing on the crack outline, and output the crack outline image. Step S330: Select a flat background area in the clean image, and perform pixel-level fusion of the crack outline image with the flat background area to output a virtual crack sample; Step S340: Perform physical parameter matching degree verification and background fusion degree verification on the virtual crack sample respectively, and comprehensively determine whether the virtual crack sample is qualified based on the results of the two verifications; if it is qualified, continue to execute the physical feature vector extraction step; if it is unqualified, and the unqualification is caused by the physical parameter matching degree verification result, return to the crack outline drawing step for reprocessing; if the unqualification is caused by the background fusion degree verification result, return to the background area filtering step for reprocessing. Step S340 further includes the following steps: Step S341: The physical parameters include crack length, center width, curvature, number of branches, center gray value, and edge gradient rate. The verification standard for the matching degree of the physical parameters is: the deviation between the physical parameters extracted from the virtual crack sample and the corresponding parameters in the physical feature template library is no greater than 10%. Step S342: The verification criteria for the background fusion degree include: selecting at least 20 sampling points along the crack edge in the virtual crack sample, with the gray level difference between each sampling point and the adjacent background pixel not exceeding 3; calculating the structural similarity index between the crack region and the background region, wherein the structural similarity index is not less than 0.9; Step S343: Determine the verification result of the virtual crack sample; if the virtual crack sample simultaneously meets the physical parameter matching degree standard and the background fusion degree standard, it is determined to be a qualified virtual crack sample, and the physical feature vector extraction step continues; if it does not meet the physical parameter matching degree standard, it is determined to be an unqualified virtual crack sample, and the crack contour drawing step is returned to redraw the crack contour; if it does not meet the background fusion degree standard, it is determined to be an unqualified virtual crack sample, and the background area filtering step is returned to re-filter the background area; if both standards are not met at the same time, the crack contour drawing step is returned to reprocess first, and the background area filtering step is executed again after the physical parameter deviation meets the requirements, until a qualified virtual crack sample is generated.
2. The method for detecting hidden cracks in powder metallurgy according to claim 1, characterized in that, Step S100 further includes the following steps: Step S110: Perform core parameter calibration on the image data used to acquire the original image; Step S120: Determine the acquisition method of the original image based on the workpiece size. Acquire a single original image for workpieces with sizes smaller than a preset range, and acquire multiple original images for workpieces with sizes larger than a preset range. Step S130: The multiple original images are stitched together using a feature matching algorithm, and the deviation of the stitched image is controlled within a preset range, and the original image is output.
3. The method for detecting hidden cracks in powder metallurgy according to claim 2, characterized in that, Step S110 further includes the following steps: Step S111: The core parameter calibration includes the calibration of image resolution and pixel size, so that the calibrated image resolution is not lower than the preset resolution and the pixel size is not greater than the preset pixel size; Step S112: The pixel size is calibrated using standard resolution data to ensure that the calibrated pixel size meets the accuracy requirements for crack feature recognition; In step S120, the preset range is the range of workpiece sizes that can be completely covered by a single image. For workpieces smaller than the preset range, the relative distance between the image and the workpiece is controlled to be a preset distance when acquiring the image. For workpieces larger than the preset range, the overlap rate of adjacent images is controlled to be no less than a preset overlap rate when acquiring multiple original images. In step S130, the feature matching algorithm is the SIFT feature matching algorithm, and the preset range is no greater than a preset deviation to ensure the integrity and continuity of the stitched image.
4. The method for detecting hidden cracks in powder metallurgy according to claim 1, characterized in that, Step S200 further includes the following steps: Step S210: Perform adaptive bilateral filtering on the original image. The adaptive bilateral filtering kernel size is 5×5, the spatial standard deviation is set to 2.0, and the grayscale standard deviation is set to 15.0, so as to eliminate micropore texture noise with a size not greater than 3μm and retain crack edge features. Step S220: Perform adaptive histogram equalization on the image after adaptive bilateral filtering, divide the image into 8×8 sub-blocks, and set the sub-block contrast limit threshold to 0.02 to enhance the contrast of dark areas with a grayscale mean of less than 100, so that the grayscale difference between the crack and the substrate is increased to 20-30 grayscale levels, and output the clean image.
5. The method for detecting hidden cracks in powder metallurgy according to claim 1, characterized in that, In step S400, the geometric features are extracted using edge detection and region segmentation algorithms, including crack length, average width, maximum width, curvature, number of branches, and the ratio of total branch length to main crack length; the grayscale features are extracted using grayscale statistics, including crack center grayscale value, edge grayscale value, mean grayscale gradient, and grayscale variance; the texture features are extracted using the grayscale co-occurrence matrix, including contrast and correlation. Step S500 further includes the following steps: Step S510: The semi-supervised learning includes a supervised training phase and an unsupervised fine-tuning phase. In the supervised training phase, a preset number of labeled real crack sample physical feature vectors containing labeled information are input, the cross-entropy loss function is used, the learning rate is set to 0.001, and the number of iterations is no less than 50 rounds. In the unsupervised fine-tuning phase, the physical feature vectors of the qualified virtual crack samples are input, the model parameters are adjusted based on feature similarity constraints, the number of iterations is no less than 30 rounds, and the training termination condition is that the accuracy of the validation set is no less than 98% and there is no improvement for 5 consecutive rounds. Step S520: During the detection process, if the probability of the presence of the crack is not less than 0.8, it is determined that a crack exists; the crack level includes no crack, micro crack and harmful crack, wherein the length of the micro crack is not greater than 0.5mm, the length of the harmful crack is greater than 0.5mm, and a detection report containing crack parameters and judgment results is output, and the detection time of a single sample is not greater than 0.5s.
6. A powder metallurgy hidden crack defect detection system, characterized in that, The method for detecting hidden cracks in powder metallurgy as described in any one of claims 1 to 5, and the following steps: The original image processing module is used to acquire the original image of the powder metallurgy workpiece, stitch together images of workpieces whose size exceeds the coverage of a single image, and output the original image. The clean image generation module is used to sequentially perform noise reduction processing and contrast enhancement processing on the original image to output a noise-free, high-contrast clean image; The virtual crack sample generation module is used to generate virtual crack samples based on the clean image. During the generation process, the virtual crack sample is quality checked. If the check is qualified, the subsequent module is triggered. If the check is unqualified, the process is returned to the previous corresponding module for reprocessing. The physical feature extraction module is used to extract the physical feature vectors of the qualified virtual crack sample and the clean image containing real cracks. The physical feature vectors include geometric features, grayscale features and texture features. The detection model training and execution module is used to train the detection model using a semi-supervised learning method. The detection model is then used to detect newly acquired workpieces by sequentially performing the following steps: original image acquisition and stitching, original image noise elimination and contrast enhancement, virtual crack sample generation and verification, and physical feature vector extraction and processing. The module outputs the probability of crack presence and crack level.
7. An electronic device, characterized in that, The electronic device includes: The processor and the memory are communicatively connected. The memory is used to store at least one executable instruction executed by the processor, the processor being used to execute the executable instruction to implement the powder metallurgy hidden crack defect detection method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the powder metallurgy hidden crack defect detection method as described in any one of claims 1 to 5.