Intelligent detection system for forging defects of forge piece products

Through multi-angle visual acquisition, image registration stitching and surface expansion algorithms, combined with image segmentation and deep learning, the problems of incomplete coverage and low recognition accuracy of forging surface defect detection are solved, and comprehensive detection and efficient recognition of forging surfaces are achieved.

CN120558975AActive Publication Date: 2025-08-29FUSHUN JIAYE MASCH MFG CO LTD

Patent Information

Application Number
CN202511065186.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-08-29
Estimated Expiration
2045-07-31

AI Technical Summary

Technical Problem

In the prior art, the forging surface structure is complex and the types of defects are diverse, resulting in incomplete defect detection coverage, low recognition accuracy and lack of adaptability, which affects the quality stability of forging products and the level of manufacturing process automation.

Method used

Multi-angle visual acquisition and image registration splicing are adopted, combined with surface expansion algorithm, defect candidate areas are extracted through image segmentation algorithm, and image matching and similarity comparison of multi-feature dimensions are combined, confidence evaluation and lightweight deep network are introduced for secondary judgment, so as to achieve comprehensive coverage and accurate identification of forging surfaces.

Benefits of technology

It realizes blind spot-free coverage of forging surface defects, improves the accuracy of multiple types of defect identification and system adaptability, and improves the stability of forging product quality control and the automation level of manufacturing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120558975A_ABST
    Figure CN120558975A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent detection system for forging defects of a forge piece product, and relates to the technical field of industrial intelligent detection.The intelligent detection system comprises the steps that multi-angle images of a to-be-detected workpiece are collected and then spliced, and a complete surface expansion view of the product is generated; obtaining defect types of the defect candidate regions through region coordinates and region sizes of the defect candidates; obtaining a confidence value of a corresponding defect type judgment result; a lightweight deep network recognition model is called for secondary judgment, new sample data are generated in a manner of supporting manual annotation, and an equipment end is connected with a programmable controller for intelligent defect detection of the workpiece to be detected. According to the invention, the problems of incomplete defect coverage, failure to realize high-precision automatic identification of multiple types of defects and influence on the detection accuracy and the production efficiency caused by diversified and complex forging surface defects and limited image acquisition angles in the prior art can be solved, comprehensive acquisition and splicing of multi-angle images are realized, and the detection accuracy and the production efficiency are improved. The technical effect of improving the defect detection accuracy of the forge piece product is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial intelligent detection technology, and in particular to an intelligent detection system for forging defects of forging products. Background Art

[0002] Forgings, as essential structural components, are widely used in the automotive, aerospace, energy, rail transit, and heavy equipment manufacturing sectors. Their quality and stability are directly linked to the safety and service life of the entire machine. During the forging process, various factors, including raw material purity, die condition, process temperature control, lubrication conditions, and operating methods, can easily lead to surface defects such as bubbles, scratches, dents, cold shuts, and flow marks. These defects not only affect the appearance but can also lead to localized stress concentrations and premature fatigue crack initiation, compromising product performance and even causing failure.

[0003] At present, the detection of forging surface defects on industrial sites mainly relies on manual visual inspection. This method has low detection efficiency, limited accuracy, poor stability, and is easily affected by the operator's experience level. It is difficult to meet the requirements of modern manufacturing for high consistency and large-scale quality control.

[0004] In summary, due to the complex surface structure of forgings, diverse defect types and irregular shapes, the existing technology has failed to build a stable and reliable multi-angle visual fusion and intelligent recognition mechanism, resulting in incomplete defect detection coverage, low classification accuracy and inability to dynamically adapt to changes in actual working conditions, further affecting the intelligent level of forging product quality control and the automation efficiency of the manufacturing process. Summary of the Invention

[0005] The purpose of this application is to provide an intelligent forging defect detection system for forging products, so as to solve the technical problems in the prior art that due to the complex surface structure of forgings, various defect types and various image interference factors, efficient fusion of multi-angle visual information and high-precision defect recognition and judgment cannot be achieved, resulting in incomplete defect detection coverage, low recognition accuracy and lack of adaptability, which further affects the quality stability of forging products and the level of automation of the manufacturing process.

[0006] In view of the above problems, the present application provides an intelligent detection system for forging defects of forging products, including: an image acquisition module, the image acquisition module is used to collect multi-angle images of the workpiece to be inspected by configuring a high-resolution industrial camera and a rotating drive component, and index the obtained images in chronological order, the industrial camera is installed on a controllable rotating platform, and the workpiece to be inspected is fixed to the central axis position by a positioning fixture; an image stitching module, the image stitching module is used to stitch the collected multi-angle images, unify the coordinates and unfold the surface of the complete stitched image, and generate a complete surface unfolding map of the product; a defect candidate area extraction module, the defect candidate area extraction module is used to extract defect candidate areas with defects through an image segmentation algorithm, and obtain the area coordinates and area size of the defect candidate, the area size includes the defect area and the maximum boundary size of the defect area; a defect type determination module, the defect type determination module is used to extract the extracted defect candidate areas The image features of the defect candidate area are matched and compared with the pre-built defect image sample library to obtain the defect type of the defect candidate area. The defect image sample library includes five standardized defect image feature templates. The five types of defects include bubbles, scratches, dents, cold shuts, and flow marks; a defect confidence determination module is used to calculate the feature similarity, category separation, regional structure quality, and sample coverage of each candidate defect area, and input the defect confidence calculation formula to obtain the confidence value of the corresponding defect type judgment result; an abnormal area secondary judgment module is used to call a lightweight deep network recognition model for secondary judgment of low-confidence samples, and at the same time supports manual annotation to generate new sample data and add it to the defect sample library; an automation control module is used to connect the programmable controller at the device end and cooperate with the operation panel to perform intelligent detection and feedback adjustment management of defects in the workpiece to be inspected.

[0007] One or more technical solutions provided in this application have at least the following technical effects or advantages: Through multi-angle visual acquisition and image registration and splicing, combined with the surface unfolding algorithm, complete and continuous surface visual information of forging products can be obtained, realizing defect detection without blind area coverage; based on the image segmentation algorithm, defect candidate areas are extracted, and combined with image matching and similarity comparison of multiple feature dimensions (such as texture, edge, and space vector), the recognition accuracy of multiple types of defects (bubbles, scratches, dents, cold shuts, and flow marks) is effectively improved; through the defect confidence scoring mechanism, the feature similarity, regional structure quality, sample coverage and other factors are comprehensively judged, effectively improving the classification accuracy of boundary samples and complex morphological defects. Confidence; when the confidence is lower than the preset threshold, the system automatically calls a lightweight deep neural network for secondary judgment, and supports the inclusion of manual annotation results into the sample library to achieve continuous optimization and self-evolution of the recognition model; that is, by integrating multi-angle image acquisition, image registration and splicing, and surface expansion processing, defect candidate areas are extracted and combined with multi-feature image matching algorithms for defect type identification. At the same time, confidence evaluation and low-confidence secondary judgment mechanisms are introduced to achieve the technical effect of fully covering the forging surface, accurately identifying a variety of typical forging defects, and improving recognition stability and system adaptability.

[0008] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, which can be implemented in accordance with the contents of the description, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are specifically listed below. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in this application or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely exemplary, and a person of ordinary skill in the art can obtain other drawings based on the provided drawings without creative work.

[0010] Figure 1 This is a structural diagram of an intelligent detection system for forging defects of forging products in this application.

[0011] Description of reference numerals: 11 image acquisition module, 12 image stitching module, 13 defect candidate area extraction module, 14 defect type determination module, 15 defect confidence determination module, 16 abnormal area secondary determination module, 17 automation control module. DETAILED DESCRIPTION

[0012] This application provides an intelligent forging defect detection system for forgings, addressing existing issues such as the inability to efficiently integrate multi-angle image information and identify defects with high confidence due to the complex surface structure, diverse defect types, and numerous image interference factors. This results in a limited defect detection range and unstable recognition accuracy, further impacting the consistency and intelligent level of product quality control. The system achieves the technical goals of comprehensive extraction, precise classification, and dynamic identification of typical defects on forging surfaces, achieving the technical effects of improving defect detection coverage, recognition accuracy, and system adaptability.

[0013] Below, the technical solutions in this application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this application, rather than all the embodiments of this application. It should be understood that this application is not limited to the example embodiments described herein. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. It should also be noted that, for the convenience of description, only the parts related to this application, rather than all of them, are shown in the accompanying drawings.

[0014] Please see the attached Figure 1 , the present application provides an intelligent forging defect detection system for forging products, specifically comprising: The image acquisition module 11 is used to collect multi-angle images of the workpiece to be inspected by configuring a high-resolution industrial camera and a rotating drive component, and to index the obtained images in chronological order. The industrial camera is installed on a controllable rotating platform, and the workpiece to be inspected is fixed to the central axis position by a positioning fixture.

[0015] Specifically, by configuring a high-resolution industrial camera and a rotary drive component, it is used to capture multi-angle images of the workpiece to be inspected. The industrial camera is installed on a rotating platform with controllable rotation capabilities. The rotating platform can perform equal-angle or continuous rotation scanning around the workpiece to be inspected, forming an all-round visual acquisition path. The workpiece to be inspected is fixed to the central axis position of the rotating platform by a positioning fixture to ensure that the workpiece's posture is stable and the axis is consistent during the rotation process, avoiding image distortion or loss due to offset. During the image acquisition process, the rotating platform is driven to rotate according to the set angle step value, and the industrial camera is triggered to capture a frame of image at each predetermined angle or during continuous movement, thereby obtaining an image sequence covering different angles of the workpiece surface. Each captured image has a one-to-one correspondence with its corresponding acquisition sequence number and rotation angle parameter, and the image file is automatically indexed according to the acquisition order for subsequent image alignment, stitching and surface unfolding processing.

[0016] Through the above structure and method, full-surface multi-angle image acquisition of the inspected workpiece under stable positioning conditions can be achieved, ensuring uniform coverage of the imaging angle of view without significant occlusion and missed areas, while ensuring that there is a clear sequential index relationship and angle reference information between images, providing a continuous, standardized, and traceable image input basis for subsequent image alignment, stitching, and surface expansion processing, thereby improving the integrity and recognition accuracy of overall defect detection.

[0017] The image stitching module 12 is used to stitch the collected multi-angle images, unify the coordinates and unfold the surface of the stitched complete image, and generate a complete surface unfolding image of the product.

[0018] Specifically, the collected multi-angle images are first spatially aligned using an image registration algorithm. Feature points are extracted from the overlapping regions of adjacent images, achieving precise image matching and transform matrix calculation, completing image stitching and fusion. This stitching results in a complete image covering the forging surface. However, this complete image remains in the two-dimensional coordinate system of each viewpoint, resulting in spatial inconsistencies. To achieve a unified spatial reference frame, the pixel coordinates of the stitched images are transformed, mapping each image component into a unified two-dimensional plane coordinate system. This coordinate unification process, based on the forging's surface geometry, establishes a mapping relationship between the surface and the plane, completing a surface-to-plane unfolding operation. The unfolding operation utilizes geometric mapping and pixel resampling techniques to convert the forging surface coordinates into unfolded plane coordinates, eliminating surface distortion and viewpoint differences, and generating a seamless, continuous, and complete surface unfolding image. This surface unfolding image comprehensively reflects the distribution of defects on the forging surface, facilitating region extraction and identification by subsequent defect detection algorithms. Through this stitching, coordinate unification, and surface unfolding process, the fused reconstruction of multi-angle images of the forging surface is achieved, providing a high-quality visual foundation for the overall surface unfolding.

[0019] The defect candidate region extraction module 13 is used to extract defect candidate regions with defects through an image segmentation algorithm, and obtain the region coordinates and region size of the defect candidate, where the region size includes the defect area and the maximum boundary size of the defect region.

[0020] Specifically, during the defect detection process, an image segmentation algorithm is first applied to the acquired complete surface image to identify potential defect areas. This image segmentation algorithm can employ threshold segmentation, edge detection, region growing, or a deep learning-based semantic segmentation model, adaptively adjusting to the forging surface characteristics to accurately distinguish defect areas from normal surfaces. Through segmentation, the system extracts a set of candidate defect regions from the image. For each candidate defect region, its specific location coordinates in the image coordinate system are calculated as the spatial identifier of the region. Furthermore, the system analyzes the geometric properties of the candidate defect region and calculates its area. This is calculated by multiplying the total number of pixels within the region by the actual size of each pixel, reflecting the actual area occupied by the defect. Furthermore, the system measures the maximum bounding dimension of the candidate defect region—the longest horizontal or vertical boundary distance within the region—to characterize the linear dimensions of the defect. This maximum bounding dimension helps distinguish defect morphology and severity, supporting subsequent classification and confidence assessment. Obtaining the coordinates and size information of the candidate defect regions provides accurate basic data support for subsequent defect feature extraction, type determination, and location feedback.

[0021] The defect type determination module 14 is used to match and compare the extracted image features of the defect candidate area with a pre-built defect image sample library to obtain the defect type of the defect candidate area. The defect image sample library includes five standardized defect image feature templates. The five types of defects include bubbles, scratches, dents, cold shuts, and flow marks.

[0022] Specifically, feature extraction is first performed on the defect candidate regions extracted through image segmentation. This extraction includes, but is not limited to, the region's texture features, edge shape, grayscale distribution, color information, and spatial geometric features, forming a multi-dimensional image feature vector. The extracted features are intended to comprehensively reflect the visual and structural characteristics of the defect, providing sufficient information for subsequent matching. The obtained defect candidate region features are then input into a pre-configured defect image matching module, which contains a pre-built defect image sample library. This library contains standardized image feature templates for typical forging defects, covering five common defect types: bubbles, scratches, dents, cold shuts, and flow marks. The matching module calculates the similarity between the defect candidate region features and each defect template in the sample library and comprehensively evaluates the degree of match using various image similarity algorithms (such as cosine similarity, edge matching, and spatial distance metrics). In the matching results, the defect type is determined by the template category with the highest similarity, thereby automatically classifying the defect type within the defect candidate region. This matching process effectively combines the rich defect feature information of the sample library with the multi-dimensional feature representation of the defect candidate area, improving the accuracy and robustness of defect identification and adapting to the intelligent detection needs of diverse forging defects.

[0023] The defect confidence determination module 15 is used to calculate the feature similarity, category separation, regional structure quality, and sample coverage of each candidate defect area, and input the defect confidence calculation formula to obtain the confidence value of the corresponding defect type judgment result.

[0024] Specifically, for each defect candidate region, the system first calculates the feature similarity between that region and each category template in the defect sample library. Feature similarity comprehensively considers multi-dimensional features such as texture, shape, and color. Similarity is quantified using methods such as cosine similarity, edge matching distance, and high-dimensional spatial distance, reflecting the degree of match between the defect candidate region and the standard defect. Simultaneously, the system evaluates category separation, which measures the difference between the similarity between the defect candidate region's features and the most similar category template and the similarity between the other category templates. A higher degree of separation indicates a clearer defect type determination and higher category discrimination. Furthermore, the system calculates regional structural quality, measuring the shape integrity and smoothness of the defect candidate region. This eliminates anomalous regions caused by noise or image missegmentation, ensuring the rationality and stability of the defect region. Furthermore, the system evaluates sample coverage, analyzing the representativeness of the current defect candidate region's features within the defect sample library. This determines whether there are representative samples in the sample library that are similar to the defect and provide sufficient coverage, assisting in determining the reliability of defect recognition. These multiple metrics are used as input variables and combined with a pre-defined defect confidence calculation formula for comprehensive calculation. The resulting output is a confidence value for the defect type determination result for the defect candidate region. This confidence value reflects the credibility of the identification result and provides a basis for subsequent judgment optimization, manual review, or secondary identification. This confidence calculation mechanism effectively improves the stability and accuracy of the forging defect detection system for complex and variable defects, enhancing the system's adaptability and robustness.

[0025] The abnormal area secondary determination module 16 is used to call a lightweight deep network recognition model to perform secondary determination on low-confidence samples, and supports manual annotation to generate new sample data and add it to the defect sample library.

[0026] Specifically, for candidate defect areas whose defect confidence scores fall below a preset threshold, the system automatically triggers a secondary identification process. This process uses a lightweight deep neural network recognition model to reanalyze low-confidence samples. This lightweight deep neural network model boasts a compact structure and low computational resource consumption, ensuring accuracy while adapting to the real-time detection requirements of industrial sites. During the secondary identification process, the deep network performs a deep semantic understanding of the input image features of the candidate defect areas, comprehensively extracting complex textures, shapes, and local details. This overcomes the limitations of traditional feature matching in the initial identification process and improves the accuracy and robustness of defect classification. If the secondary identification results still fail to meet the clear identification criteria, the system supports the activation of a manual annotation module, where professionals manually confirm and annotate the problematic defect areas. After review, the manually annotated results are added to the defect image sample library as high-quality sample data, dynamically enriching the library content. The continuous updating of the sample library not only improves the representativeness and coverage of defect templates but also facilitates iterative training and performance improvement of the recognition model, enabling system self-learning and evolution, ensuring the long-term stable and efficient operation of the defect detection system.

[0027] The automation control module 17 is used to connect the programmable controller at the equipment end and cooperate with the operation panel to perform intelligent detection of defects in the workpiece to be inspected and feedback adjustment management.

[0028] Specifically, the equipment connects to a programmable logic controller (PLC) via a high-speed communication interface, enabling real-time data transmission and command interaction. The PLC, as the system's core control unit, coordinates the operating status and process management of each inspection module. The operator panel features a touchscreen display for human-machine interaction. This allows the operator to monitor defect inspection progress, view inspection results, adjust inspection parameters, and control system operation in real time. Bidirectional communication between the operator panel and the PLC is achieved via an industrial bus or Ethernet, ensuring the immediate transmission of commands and feedback. During the defect inspection process, the system provides real-time feedback on identification results and defect location information to the PLC. Based on pre-set feedback adjustment strategies, the PLC automatically adjusts inspection equipment parameters or triggers appropriate process adjustments, such as adjusting the camera angle, lighting intensity, or controlling the workpiece transport speed, to optimize inspection results and production quality. This collaborative management mechanism achieves a closed-loop linkage between intelligent inspection and production control, improving the accuracy and real-time nature of defect identification while effectively supporting automated production line operation and dynamic quality control.

[0029] The intelligent forging defect detection system for forging products can achieve the technical goal of accurately identifying and locating multiple categories of forging surface defects, and achieve the technical effect of improving the defect detection accuracy, coverage and system automation level.

[0030] Furthermore, this application also includes: Based on the overlapping areas between adjacent images in the multi-angle image, an image registration operation is performed, and the multi-angle images are stitched using an image stitching algorithm to generate a stitched image covering the entire product surface. A coordinate unification operation is performed on the stitched image to convert the pixel coordinates in different image sources into a unified image plane coordinate system to eliminate positional deviations caused by different shooting angles. Based on the product's unfolding rules, the pixel information in the stitched image is sequentially unfolded along the direction of the product's outer surface to generate a product surface unfolded map with a unified plane structure for subsequent defect identification processing.

[0031] Specifically, first, based on the overlapping areas between adjacent images in the multi-angle image, feature points are extracted and matched, and image registration is achieved by calculating the transformation matrix. The image registration process ensures that the corresponding relationship between the spatial positions of each image is accurately established, laying the foundation for seamless image stitching. Subsequently, an image stitching algorithm is used to fuse the multiple registered images of the multi-angle image to generate a complete stitched image covering the surface of the product to be inspected, thereby achieving the continuity and integrity of the visual information. After stitching is completed, a coordinate unification operation is performed on the stitched image. This operation effectively eliminates the spatial position deviation caused by differences in shooting angle and viewpoint by converting the pixel coordinates from different image sources into a unified two-dimensional image plane coordinate system, ensuring the spatial consistency and measurement accuracy of the stitched image.

[0032] Next, based on the forging product's unfolding rules, the pixels in the stitched image are sequentially arranged and unfolded along the product's outer surface, completing the surface-to-plane mapping conversion and generating a surface unfolded image with a uniform planar structure. This unfolded image accurately reflects the spatial distribution of surface defects, facilitating subsequent defect recognition algorithms to accurately locate and classify defective areas.

[0033] Finally, through the above-mentioned image registration, stitching, coordinate unification and expansion processing procedures, the system achieves efficient fusion and structural optimization of multi-angle collected images, providing a solid image foundation for the intelligent identification of forging defects.

[0034] Through feature matching and image registration algorithms based on the overlapping areas of multi-angle images, accurate stitching and spatial position correction of multiple images can be achieved, and ultimately a unified unfolded image covering the entire surface of the forging product is generated for subsequent efficient and accurate defect identification and positioning.

[0035] Furthermore, this application also includes: Adjacent images are determined according to a preset shooting order, and image feature extraction operations are performed on the overlapping parts of the adjacent images in combination with the image indexes. The features include edge features, corner features, and texture features. Feature points extracted from the overlapping area of ​​one image are matched with feature points in the corresponding area of ​​its adjacent image. The descriptor matching algorithm SIFT is used to calculate the distance between feature point pairs, and the initial matching point set is screened based on the distance threshold. The RANSAC algorithm is used to robustly screen the initial matching point set, eliminate abnormal matches, and obtain a consistent matching pair set. Based on the consistent matching pair set, the homography matrix between the images is estimated to achieve spatial alignment of the image coordinate system. The transformation results are iteratively optimized, and the registered images are superimposed according to a unified coordinate system. A multi-resolution fusion strategy is used to smooth the transition of pixels in the overlapping area to avoid obvious stitching gaps, generating a stitched image that covers the entire product surface, has continuous texture, and complete contours.

[0036] Specifically, the multiple captured images are sorted according to a preset shooting order to determine the relationship and index information between adjacent images. For overlapping regions between adjacent images, image feature extraction is first performed. The extracted features include edge features, which capture distinct image contours; corner features, which identify corners or significant change points; and texture features, which reflect detailed structural details and surface variations within the region. The scale-invariant feature transform (SIFT) algorithm is preferably used to construct feature descriptors for these feature points, and the similarity between feature points is calculated based on the Euclidean distance between the descriptors. Based on a set distance threshold, all feature point pairs are screened to obtain an initial set of matching points. To further enhance the robustness of the matching, the random sampling consensus (RANSAC) algorithm is used to iteratively screen the initial set of matching points, eliminating anomalous matching pairs and ultimately obtaining a set of consistent matching pairs. Based on this consistent set of matching pairs, the homography matrix estimation method is used to model the geometric transformation relationship between adjacent images, completing the spatial alignment of the image coordinate systems. Furthermore, the estimated transformation parameters are subjected to local iterative optimization to eliminate local distortion and improve image registration accuracy. After image registration, all images are superimposed according to a unified coordinate system to form a preliminary stitched image. To eliminate visual artifacts such as brightness inconsistencies and texture abruptness at overlapping image boundaries, a multi-resolution fusion strategy is employed to smooth the pixel information in the overlapping areas, achieving seamless stitching. Ultimately, a high-quality stitched image is generated, covering the entire forging surface with continuous texture and complete contours.

[0037] Furthermore, this application also includes: The image area in the expanded image is processed by an image segmentation algorithm to extract image areas that may have defects as defect candidate areas. The image segmentation algorithm includes a segmentation network based on pixel-level classification and a region growing method based on edge detection, which is used to separate areas with abnormal texture, color or boundary features in the image from the background; in each extracted defect candidate area, the spatial coordinate information of the area is obtained, including the upper left corner coordinate point and the lower right corner coordinate point, to determine the position of the defect area in the image; the area size of each defect candidate area is calculated, and the area size includes the defect area and the maximum boundary size of the defect area. The defect area is calculated based on the number of effective pixels in the area, and the maximum boundary size of the defect area is the longest side length of the defect in the horizontal direction or the vertical direction.

[0038] Specifically, the image regions in the expanded image are first processed using an image segmentation algorithm to extract image regions that may contain defects as candidate defect regions. This image segmentation algorithm includes a deep segmentation network based on pixel-level classification, which can classify and judge each pixel, achieving accurate segmentation of regions with abnormal texture, color, or boundary features. This algorithm is also combined with a region growing method based on edge detection. By detecting obvious edge information in the image and expanding along the boundary, it further enhances the boundary clarity of the defect area.

[0039] Next, the combined segmentation method effectively separates the abnormal feature area from the background, improving the accuracy and completeness of defect area extraction. For each extracted defect candidate area, the system obtains its spatial coordinate information, including the coordinates of the upper left and lower right corners, accurately locating the defect area within the entire expanded image.

[0040] Next, the region size index for each defect candidate region is calculated. Region size consists of two components: the defect area and the maximum boundary dimension. The defect area is calculated by counting the number of valid pixels within the region and converting it into the actual pixel size, reflecting the actual coverage of the defect. The maximum boundary dimension is calculated by measuring the longest horizontal or vertical boundary length of the defect region, reflecting the linear dimension of the defect. This dimension information facilitates subsequent defect classification and severity assessment.

[0041] Furthermore, this application also includes: Input the image features of the defect candidate area into the image similarity comparison algorithm, perform feature matching and similarity comparison with the pre-built defect image sample library, and determine the defect type of the defect candidate area; Among them, the image similarity comparison algorithm calls a pre-built defect image sample library, which is a set of standard image templates established according to different defect types. Each template corresponds to a defect type and stores the corresponding feature encoding results; performs feature matching operations between the defect candidate area and various defect templates in the sample library, and uses the image similarity comparison algorithm to calculate the similarity score. The similarity score is used to measure the degree of matching between the defect candidate area and various defect templates; and determines the defect type of the defect candidate area based on the defect template category corresponding to the maximum value of the similarity score.

[0042] Specifically, the image features extracted from the defect candidate area are input into an image similarity comparison algorithm. Feature matching and similarity scoring are performed against image features in a pre-built defect image sample library to determine the defect type corresponding to the defect candidate area. The defect image sample library establishes a set of standardized image templates based on different defect types. Each template corresponds to a defect type and stores the feature encoding results associated with the template, which is used to represent the template's multi-dimensional feature information, such as texture, shape, and color.

[0043] The similarity comparison algorithm calculates the feature matching between the defect candidate region and various defect templates in the sample library. It then uses a variety of image similarity evaluation metrics, such as cosine similarity, edge matching distance, and high-dimensional feature space distance, to quantify the similarity between the defect candidate region and each defect template. Based on the similarity score calculation results, the matching strength between the defect candidate region and each defect template is determined.

[0044] By comparing the similarity scores of various defect templates, the template category with the highest score is selected as the final defect type determination result for the defect candidate area. This method combines rich defect sample features with multi-dimensional similarity calculation to effectively improve the accuracy and robustness of defect type identification.

[0045] Furthermore, this application also includes: Multi-dimensional image features are extracted from the defect candidate area and the template images in the sample library, including texture features, shape features, semantic features, and spatial distribution features; the extracted multi-dimensional image features are vectorized and normalized to unify the dimensions and scales to form a standard feature code; feature matching is performed based on the extracted image features of the defect candidate area and the feature vectors of various defect templates in the defect image sample library, and feature similarity is obtained based on the extracted image features of the defect candidate area and the feature vectors of various defect templates in the defect image sample library. , including cosine similarity , edge shape matching distance Distance to high-dimensional space ; The feature similarity Input the preset similarity fusion scoring function to obtain the fusion score between the defect candidate area and various defect templates to obtain the similarity fusion score; the similarity fusion score calculation formula is: =α× +β×(1- )+γ×(1- );in, is the cosine similarity, is the edge shape matching distance, is the high-dimensional space distance, α, β, and γ are preset weighting coefficients, and α+β+γ=1; the fusion scores of the defect candidate areas and various defect templates are sorted, and the defect type corresponding to the highest score is taken as the recognition result.

[0046] Specifically, image preprocessing and detection algorithms (such as edge detection, heatmaps, and anomaly detection) are used to identify candidate regions that may contain defects. Each candidate region is cropped and resized (e.g., to a fixed size) to facilitate subsequent feature extraction. The cropped image regions are then extracted using the intermediate layer outputs of a pretrained convolutional neural network (such as ResNet, VGG, or MobileNet). Multidimensional image features are extracted from the defect candidate regions and template images in the sample library using an image feature extraction algorithm. The extracted multidimensional features are converted into one-dimensional vectors and normalized (e.g., L2 normalization or minimum / maximum normalization) to form standardized candidate region feature vectors. Samples of various typical defect images are collected and stored by defect type to construct a defect image sample library. The image preprocessing, resizing, feature extraction, and normalization process is repeated for the template image to ensure comparability between the candidate region and template features. The feature vectors of each defect template are stored in a feature database. These can be: a single representative template (Prototype-based), a multi-sample average feature vector (Centroid), or a vector collection of all samples (for clustering or distance weighting). The extracted features primarily include texture features, which describe surface details and texture variations; shape features, which reflect the geometric contours and edge information of the defect area; semantic features, which represent high-level semantic attributes of the defects in the image, such as abstract information related to the defect category; and spatial distribution features, which reveal the positional relationships and layout patterns of the defect features in the image. The extracted image features are vectorized, converted into numerical vectors in a unified format, and normalized to ensure consistency across different feature dimensions and scales. Feature vectors for the defect candidate areas and the defect templates are obtained. This process forms a standardized image feature encoding, providing a unified input basis for subsequent feature matching.

[0047] Then, based on the standardized image feature encoding, the image features of the defect candidate area are matched with the feature vectors of various defect templates in the defect image sample library. During the feature matching process, multiple similarity calculation methods are used to quantify the feature similarity between the defect candidate area and each defect template. Feature similarity , including cosine similarity , edge shape matching distance Distance to high-dimensional space ; The feature similarity Input the preset similarity fusion scoring function to obtain the fusion score between the defect candidate area and various defect templates to obtain the similarity fusion score; =α× +β×(1- )+γ×(1- );in, is the cosine similarity, is the edge shape matching distance, is the high-dimensional space distance, α, β, and γ are preset weighting coefficients, and α+β+γ=1; the fusion scores of the defect candidate areas and various defect templates are sorted, and the defect type corresponding to the highest score is taken as the recognition result.

[0048] The calculated multidimensional feature similarity is input into a preset similarity fusion scoring function. A weighted or nonlinear fusion strategy is used to obtain a comprehensive fusion score between the defect candidate region and various defect templates. The fusion score reflects the overall degree of match, taking into account feature similarities across multiple dimensions, including texture, shape, semantics, and spatial distribution. The fusion score results are sorted by numerical value, and the defect template category with the highest score is selected as the final identification result for the defect candidate region. This method effectively integrates multidimensional feature information, improving the accuracy and robustness of defect recognition and is suitable for intelligent detection of multiple types of forging defects.

[0049] Furthermore, this application also includes: Calculate the cosine similarity between feature vectors , edge shape matching distance Distance to high-dimensional space ; Cosine similarity between feature vectors extracted based on image texture, shape or deep semantic features Calculation is used to measure the consistency of image feature directions; based on the edge contour features of the defect candidate area and the template image, the Hausdorff distance is used to calculate the edge shape matching distance to measure the similarity of geometric structures; based on the deep feature encoding results extracted by the convolutional neural network, the high-dimensional space distance is calculated to describe the image differences in the semantic space. The high-dimensional space distance is the Euclidean distance.

[0050] Specifically, we first generate corresponding feature vectors for the texture, shape, and deep semantic features extracted from the image. We then calculate the cosine similarity between the feature vectors to measure the directional consistency of the two sets of feature vectors in high-dimensional space. This cosine similarity reflects the similarity of image features, with values ​​closer to 1 indicating greater directional consistency.

[0051] Then, the edge shape matching distance is calculated using the Hausdorff distance, based on the edge contour features of the defect candidate region and the template image. This distance measures the maximum and minimum distances between two sets of edge points, accurately reflecting the similarity of geometric structures. The calculation process considers the shortest distance between the edge points, and smaller values ​​indicate closer shape matching.

[0052] Next, based on the deep feature encoding results extracted by the convolutional neural network (CNN), the distance between the defect candidate area and the template image in a high-dimensional semantic space is calculated, using the Euclidean distance as the metric. This high-dimensional space distance reflects the difference in the image at the semantic level.

[0053] By comprehensively using cosine similarity, Hausdorff distance and Euclidean distance in high-dimensional space, the system realizes the multi-dimensional feature similarity evaluation of forging defect images, providing a multi-angle judgment basis for defect identification.

[0054] Furthermore, this application also includes: The image features of the defect candidate area are matched with the feature vectors of various defect templates in the defect image sample library to obtain feature similarity , category separation , regional structural quality , sample coverage ; The degree of separation of the classes It is a measure of the similarity difference between defect candidate regions in various defect templates, which measures the clarity of classification discrimination and reflects the distribution concentration of classification confidence. The structural quality of the area To evaluate image quality features such as edge clarity, contour closure, and texture contrast of defect candidate area images to avoid misjudgment due to image blur or noise; The sample coverage Based on the distribution density and representativeness of the matching template in the sample library, it is determined whether the defect candidate area is within the effective coverage of the sample library, which is used to improve the robustness in small sample scenarios; The defect confidence calculation formula is: ; in, Score the defect confidence level, is the feature similarity, is the degree of class separation, is the regional structural quality, is the sample coverage, a, b, c, d are the preset weight coefficients, and a+b+c+d=1.

[0055] Specifically, a multi-dimensional matching calculation is performed on the image features of the defect candidate region against the feature vectors of various defect templates in the defect image sample library. Comprehensive evaluation metrics, including feature similarity, class separation, regional structure quality, and sample coverage, are obtained. Feature similarity quantifies the proximity of the defect candidate region to different defect types by comparing the similarities between the feature vectors of the defect candidate region and each defect template. It is a basic indicator for determining defect type. Class separation measures the clarity of classification discrimination based on the difference in similarity between the defect candidate region and various defect templates. Specifically, the distribution and concentration of classification confidence is reflected by calculating the difference in similarity between the defect candidate region and the most similar category and the second most similar category. A greater class separation indicates that the features of the defect candidate region can distinguish between different categories, and the classification result is more reliable. Regional structure quality assesses the image quality of the defect candidate region, covering metrics such as edge clarity, contour closure, and texture contrast. This metric is used to eliminate misjudgments caused by image blur, noise, or acquisition anomalies, ensuring that defect judgments are based on high-quality image regions. Sample coverage evaluates the distribution density and representativeness of matching templates in the sample library, determining whether the defect candidate region falls within the effective coverage of the sample library. By analyzing the distribution characteristics of relevant defect templates in the sample library, the system's recognition robustness for small samples or rare defects can be improved. ;in, Score the defect confidence level, is the feature similarity, is the degree of class separation, is the regional structural quality, is the sample coverage, a, b, c, d are the preset weight coefficients, and a+b+c+d=1.

[0056] The above indicators are combined and input into the defect confidence calculation model. Through weighted fusion or nonlinear mapping, the confidence value of the corresponding defect type determination result is obtained. This confidence value reflects the credibility of the defect identification and guides the subsequent automatic determination or manual review process.

[0057] Furthermore, this application also includes: When the confidence value is lower than the preset confidence value, the lightweight deep neural network recognition model is called to perform a secondary defect type determination on the current defect candidate area; if the output confidence of the lightweight deep recognition model is lower than the preset secondary confidence threshold, it is determined that the identification result of the defect candidate area is unclear, and the defect candidate area is manually labeled with the defect type; the manually labeled defect candidate area and defect category information are added to the defect image sample library.

[0058] Specifically, a lightweight deep neural network recognition model is called to perform a secondary defect type determination on the current defect candidate area. This lightweight deep neural network model has efficient feature extraction and classification capabilities through multi-layer convolution and pooling structures, combined with a simplified fully connected layer, and is suitable for quickly performing defect recognition tasks in resource-limited environments. During the secondary determination process, the model outputs the confidence value corresponding to each defect category. If the output confidence is still lower than the set secondary confidence threshold, the recognition result of the defect candidate area is determined to be unclear and needs to enter the manual review stage. The image of the unclearly identified defect area is submitted to the manual labeling module, and professionals accurately label the defect type. After the labeling is completed, the manually confirmed sample image and its defect category information are entered into the defect image sample library for subsequent model training and updating, thereby improving the richness of the sample library and the accuracy of the recognition model. Through this mechanism, effective supplementation of low-confidence defect samples and model adaptive optimization are achieved, enhancing the recognition reliability and applicability of the intelligent detection system for defects in forging products.

[0059] In summary, the intelligent forging defect detection system for forging products provided by this application has the following technical effects: By configuring high-resolution industrial cameras and rotary drive components, multi-angle image acquisition of the forging products to be inspected is achieved, ensuring comprehensive coverage and high-precision capture of surface defects. Multi-angle image stitching, coordinate unification, and surface unfolding technology are used to generate a complete and unfolded product surface map, providing an accurate image basis for defect detection. Advanced image segmentation algorithms are used to extract candidate defect areas, combining regional coordinates and size information to achieve accurate positioning and quantitative analysis of defects, build a standardized multi-type defect image sample library, and perform efficient feature matching and similarity fusion scoring based on multi-dimensional image features to improve the accuracy and robustness of defect recognition. Design innovation The defect confidence calculation method comprehensively considers feature similarity, category separation, regional structure quality and sample coverage, significantly improving the credibility of defect judgment; a secondary judgment is made on low-confidence samples through a lightweight deep neural network, and the sample library and recognition model are continuously optimized in combination with the manual labeling mechanism, enhancing the system's ability to adapt to complex and changeable detection scenarios; that is, by realizing multi-angle high-precision image acquisition and splicing processing, multi-dimensional feature fusion defect recognition algorithm, and confidence-based multi-level judgment and sample library dynamic optimization technical goals, the technical effect of improving the accuracy, reliability and intelligence level of forging defect detection of forging products is achieved.

[0060] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

[0061] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalents, the present application is intended to include these modifications and variations.

Claims

1. An intelligent detection system for forging defects of forging products, characterized in that: include: An image acquisition module, configured to acquire multi-angle images of the workpiece to be inspected by configuring a high-resolution industrial camera and a rotary drive assembly, and indexing the acquired images in chronological order. The industrial camera is mounted on a controllable rotating platform, and the workpiece to be inspected is fixed to the central axis position by a positioning fixture; An image stitching module is used to stitch the collected multi-angle images, unify the coordinates and unfold the surface of the stitched complete image, and generate a complete surface unfolding diagram of the product; A defect candidate region extraction module is used to extract defect candidate regions where defects exist through an image segmentation algorithm, and obtain the region coordinates and region size of the defect candidate, wherein the region size includes the defect area and the maximum boundary size of the defect region; a defect type determination module, which is used to match and compare the extracted image features of the defect candidate area with a pre-built defect image sample library to obtain the defect type of the defect candidate area. The defect image sample library includes five standardized defect image feature templates, and the five defect categories include bubbles, scratches, dents, cold shuts, and flow marks; A defect confidence determination module is used to calculate feature similarity, category separation, regional structure quality, and sample coverage for each candidate defect region, and input a defect confidence calculation formula to obtain a confidence value for the corresponding defect type determination result; Abnormal area secondary judgment module, which is used to call a lightweight deep network recognition model for secondary judgment of low-confidence samples, and supports manual annotation to generate new sample data and add it to the defect sample library; The automation control module is used to connect the programmable controller at the equipment end and cooperate with the operation panel to perform intelligent detection of defects in the workpiece to be inspected and feedback adjustment management.

2. The intelligent forging defect detection system for forging products according to claim 1, characterized in that: The method includes stitching the collected multi-angle images, unifying the coordinates and unfolding the surface of the stitched complete image to generate a complete surface unfolding diagram of the product, including: Based on the overlapping areas between adjacent images in the multi-angle image, the image registration operation is performed, and the multi-angle images are stitched using an image stitching algorithm to generate a stitched image covering the entire product surface; Performing a coordinate unification operation on the stitched image to convert pixel coordinates in different image sources into a unified image plane coordinate system to eliminate position deviations caused by different shooting angles; Based on the product expansion rule, the pixel information in the spliced ​​image is sequentially expanded along the product outer surface direction to generate a product surface expansion map with a unified plane structure for subsequent defect recognition processing.

3. The intelligent forging defect detection system for forging products according to claim 2, characterized in that: The method includes performing an image registration operation based on the overlapping areas between adjacent images in the multi-angle image, and using an image stitching algorithm to stitch the multi-angle images to generate a stitched image covering the entire product surface, including: Determine adjacent images according to a preset shooting order, and perform image feature extraction on portions of the adjacent images located in overlapping areas in combination with image indexes, wherein the features include edge features, corner features, and texture features; The feature points extracted from the overlapping area of ​​one image are matched with the feature points of the corresponding area in its adjacent image. The distance between the feature point pairs is calculated using the descriptor matching algorithm SIFT, and the initial matching point set is screened based on the distance threshold. Using the RANSAC algorithm to perform robustness screening on the initial matching point set, eliminating abnormal matches, and obtaining a consistent matching pair set; Based on the consistent matching pair set, the homography matrix between the images is estimated to achieve spatial alignment of the image coordinate system; Iteratively optimize the transformation results and superimpose the registered images according to a unified coordinate system; A multi-resolution fusion strategy is used to smoothly transition the pixels in the overlapping areas to avoid obvious stitching gaps and generate a stitching image that covers the entire product surface, has continuous texture, and complete contours.

4. The intelligent forging defect detection system for forging products according to claim 1, characterized in that: Extract defect candidate areas with defects through image segmentation algorithms, and obtain the area coordinates and area size of the defect candidate. The area size includes the defect area and the maximum boundary size of the defect area, including: Processing the image regions in the expanded image using an image segmentation algorithm to extract image regions that may have defects as candidate defect regions. The image segmentation algorithm includes a segmentation network based on pixel-level classification and a region growing method based on edge detection, which is used to separate regions with abnormal texture, color, or boundary features in the image from the background; In each extracted defect candidate area, the spatial coordinate information of the area is obtained, including the coordinate points of the upper left corner and the lower right corner, to determine the position of the defect area in the image; Calculate the region size of each defect candidate region, where the region size includes the defect area and the maximum boundary size of the defect region. The defect area is calculated based on the number of valid pixels in the region, and the maximum boundary size of the defect region is the longest side length of the defect in the horizontal or vertical direction.

5. The intelligent forging defect detection system for forging products according to claim 1, characterized in that: The extracted image features of the defect candidate area are matched and compared with the pre-built defect image sample library to obtain the defect type of the defect candidate area. The defect image sample library includes five standardized defect image feature templates. The five types of defects include bubbles, scratches, dents, cold shuts, and flow marks, including: Input the image features of the defect candidate area into the image similarity comparison algorithm, perform feature matching and similarity comparison with the pre-built defect image sample library, and determine the defect type of the candidate area; The image similarity comparison algorithm uses a pre-built defect image sample library, which is a set of standard image templates established according to different defect types. Each template corresponds to a defect type and stores the corresponding feature encoding results. Perform feature matching operations between the defect candidate area and various defect templates in the defect image sample library, and use an image similarity comparison algorithm to calculate a similarity score, which is used to measure the degree of matching between the defect candidate area and various defect templates; The defect type of the defect candidate area is determined according to the defect template category corresponding to the maximum similarity score.

6. The intelligent forging defect detection system for forging products according to claim 5, characterized in that: The image similarity comparison algorithm includes: Extract multi-dimensional image features from defect candidate areas and template images in the defect image sample library, including texture features, shape features, semantic features, and spatial distribution features; The extracted multi-dimensional image features are vectorized and normalized to unify the dimensions and scales to form a standard feature code; Based on the extracted image features of the defect candidate area and the feature vectors of various defect templates in the defect image sample library, feature similarity is obtained. , including cosine similarity , edge shape matching distance Distance to high-dimensional space ; The feature similarity Input a preset similarity fusion scoring function to obtain a fusion score between the defect candidate area and the various defect templates to obtain a similarity fusion score; The similarity fusion score calculation formula is: ; in, is the cosine similarity, is the edge shape matching distance, is the high-dimensional space distance, α, β, γ are preset weighting coefficients, α+β+γ=1; The defect candidate areas and the fusion scores of the various defect templates are sorted, and the defect type corresponding to the highest score is taken as the recognition result.

7. The intelligent forging defect detection system for forging products according to claim 6, characterized in that: Feature matching is performed based on the extracted image features of the defect candidate area and the feature vectors of various defect templates in the defect image sample library. The feature matching includes cosine similarity, edge shape matching distance and high-dimensional space distance, including: Calculate the cosine similarity between feature vectors , edge shape matching distance Distance to high-dimensional space ; Cosine similarity between feature vectors extracted based on image texture, shape, or deep semantic features Calculation, used to measure the consistency of image feature directions; Based on the edge contour features of the defect candidate area and the template image, the Hausdorff distance is used to calculate the edge shape matching distance to measure the geometric structure similarity; Based on the deep feature encoding results extracted by the convolutional neural network, a high-dimensional space distance is calculated to describe the image differences in the semantic space. The high-dimensional space distance is the Euclidean distance.

8. The intelligent forging defect detection system for forging products according to claim 1, characterized in that: Calculate the feature similarity, category separation, regional structure quality, and sample coverage for each candidate defect area, and input the defect confidence calculation formula to obtain the confidence value of the corresponding defect type judgment result, including: The image features of the defect candidate area are matched with the feature vectors of various defect templates in the defect image sample library to obtain feature similarity , category separation , regional structural quality , sample coverage ; The degree of separation of the classes It is a measure of the similarity difference between defect candidate regions in various defect templates, which measures the clarity of classification discrimination and reflects the distribution concentration of classification confidence. The structural quality of the area To evaluate image quality features such as edge clarity, contour closure, and texture contrast of defect candidate area images to avoid misjudgment due to image blur or noise; The sample coverage Based on the distribution density and representativeness of the matching template in the sample library, it is determined whether the defect candidate area is within the effective coverage of the sample library, which is used to improve the robustness in small sample scenarios; The defect confidence calculation formula is: ; in, Score the defect confidence level, is the feature similarity, is the degree of class separation, is the regional structural quality, is the sample coverage, a, b, c, d are the preset weight coefficients, and a+b+c+d=1.

9. The intelligent forging defect detection system for forging products according to claim 1, characterized in that: For low-confidence samples, a lightweight deep network recognition model is called for secondary judgment. At the same time, manual annotation is supported to generate new sample data and add it to the defect sample library, including: When the confidence value is lower than a preset confidence value, a lightweight deep neural network recognition model is called to perform a secondary defect type determination on the current defect candidate area; If the output confidence of the lightweight deep recognition model is lower than the preset quadratic confidence threshold, it is determined that the recognition result of the defect candidate area is unclear, and the defect candidate area is manually labeled with the defect type; The manually annotated defect candidate areas and defect category information are added to the defect image sample library.

Citation Information

Patent Citations

  • Material defect reinspection display method, device and equipment and storage medium

    CN117455865A

  • Surface defect detection method and device

    CN118731042A

  • High-precision defect detection method and system for intelligent glasses

    CN118837379A

  • Electric tricycle body spraying defect detection method and system based on machine vision

    CN119715554A

  • Integrated circuit mask plate defect multispectral cooperative detection method and system

    CN120352354A

Cited By

  • Defect detection system based on machine vision

    CN120997217A

  • Surface defect detection method and system based on curved surface coding and multi-view fusion

    CN121027154A

  • Generator outlet circuit breaker contact defect intelligent identification method and system

    CN121120655A

  • PCB edge size detection method and system based on image recognition

    CN121147173A

  • Defect detection method and device for inner cavity of valve body and electronic equipment

    CN121259461A