Forging flaw detection method and system based on real-time image recognition

By using real-time image recognition technology and deep learning algorithms in forging detection, combined with industrial cameras and adaptive light sources, the problems of inaccurate identification and unstable production process in forging defect detection are solved, and efficient and accurate defect detection and automated adjustment of production processes are achieved.

CN120013925APending Publication Date: 2025-05-16SHAOXING TIANMING METAL MATERIALS CO LTD
View PDF 0 Cites 13 Cited by

Patent Information

Application Number
CN202510229028.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The prior art has problems such as inaccurate identification, unstable production process and high labor costs in the detection of forging defects, especially in the identification of complex surface textures and defect types.

Method used

The forging flaw detection detection method based on real-time image recognition is adopted, combined with high-resolution industrial cameras, adaptive light sources, image preprocessing algorithms and deep learning technology, and feature extraction and identification of defect areas through convolutional neural networks to realize defect classification and positioning, and automatically adjust processing parameters through defect impact index and processing stability index.

Benefits of technology

It improves the detection accuracy and efficiency of forging surface defects, realizes real-time feedback and adaptive adjustment of the production process, reduces the generation of unqualified forgings, optimizes production efficiency, and reduces the need for manual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013925A_ABST
    Figure CN120013925A_ABST
Patent Text Reader

Abstract

The invention provides a forge piece flaw detection method and system based on real-time image recognition, and relates to the technical field of automatic detection.The method comprises the steps that a forge piece surface image is collected through a high-resolution industrial camera, and the image quality is optimized in combination with a self-adaptive light source system; the collected image is preprocessed and enhanced, noise is removed, and the contrast ratio is improved; carrying out defect classification and identification on the image by utilizing a deep learning algorithm, and accurately identifying defect types such as cracks and air holes; comprehensively evaluating the quality of the forge piece through the defect influence index DII and the machining stability index SSI; and a detection result is fed back to a production control system in real time for self-adaptive adjustment. The system comprises an image acquisition unit, an image processing unit, a defect classification unit, a quality evaluation unit and a feedback control unit. According to the method, the accuracy and efficiency of forging defect detection are improved, the production process is optimized, the labor cost is reduced, and the method has relatively high practical value and application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automated detection technology, and in particular to a forging flaw detection method and system based on real-time image recognition. Background Art

[0002] In modern manufacturing, forgings, as important mechanical components, are widely used in the automotive, aviation, energy and other industries, especially in the manufacture of gear products, where they occupy an irreplaceable position. The quality of forgings directly affects the performance and service life of mechanical equipment. Therefore, surface defect detection and quality assessment of forgings are crucial in the production process. Traditional forging quality inspection methods mainly rely on manual visual inspection and mechanical flaw detection equipment. These methods are not only time-consuming and inefficient, but also easily affected by human factors, making it difficult to ensure the accuracy and consistency of the inspection results.

[0003] In recent years, with the development of image processing technology, artificial intelligence (AI) and automation technology, defect detection technology based on real-time image recognition has gradually become an ideal alternative. Although traditional image recognition technology has been applied in some fields, it still faces many challenges in forging defect detection. The surface of forgings is often affected by complex processing and environmental factors, resulting in irregular surface morphology, large changes in lighting conditions, and a wide variety of defects, including cracks, pores, scratches, dents, etc., which makes it difficult for traditional image-based detection methods to achieve efficient and accurate recognition.

[0004] Existing forging inspection methods based on image recognition mostly use simple edge detection, morphological processing and image segmentation technology, but these methods perform poorly when dealing with forgings with complex surface textures or defects that are difficult to distinguish, and are prone to missed detection or false detection. At the same time, many existing inspection systems do not make full use of advanced technologies such as deep learning, resulting in their classification accuracy and recognition speed when facing complex defects that cannot meet actual production needs.

[0005] Therefore, a new forging defect detection method is urgently needed, which can adapt to the complex and changing production environment and forging surface conditions while ensuring high accuracy and efficiency. Combining real-time image recognition technology, deep learning algorithm and automatic control system can effectively improve the detection accuracy and efficiency of forging surface defects, and realize real-time feedback and adaptive adjustment of the production process, thereby significantly improving the quality of forgings and the stability of the production line.

[0006] The present invention provides a forging flaw detection method based on real-time image recognition. By introducing deep learning, automatic control and real-time feedback mechanism, the present invention solves the problems of inaccurate defect identification, unstable production process and high labor cost in the prior art, and has broad application prospects. Summary of the invention

[0007] In order to solve the problems of low defect detection accuracy, low efficiency and poor adaptability in the prior art, especially the technical problem of difficulty in identifying complex surface textures and defect types, the present invention provides a forging flaw detection method and system based on real-time image recognition.

[0008] The technical solution provided by the present invention is as follows:

[0009] First aspect:

[0010] The present invention provides a forging flaw detection method based on real-time image recognition, comprising:

[0011] S1. Image acquisition: Use a high-resolution industrial camera to take real-time photos of the forgings to obtain the surface images of the forgings, which include the defect features on the surface of the forgings. During image acquisition, the exposure time, focus depth and resolution parameters of the industrial camera are automatically adjusted through the adaptive control module to ensure that clear image data is always obtained under different processing conditions;

[0012] S2, Image preprocessing: Preprocess the collected images, including image denoising, contrast enhancement and edge detection, to ensure that the image quality meets the requirements of subsequent analysis;

[0013] S3, defect area extraction: based on the image processing algorithm, the defect area is extracted from the processed image, and the non-defective area is removed using the morphological analysis algorithm to extract the possible defective area, wherein the morphological analysis algorithm includes an opening operation and a closing operation;

[0014] S4. Feature extraction and identification: The extracted defect areas are subjected to feature extraction and identification through a convolutional neural network (CNN). The network uses multiple convolutional layers and pooling layers for deep learning and can identify multiple types of defects, including cracks, pores, and surface irregularities.

[0015] S5. Defect classification and location: Combine image features and deep learning models to classify and locate defects, and output defect location coordinates and defect types;

[0016] S6. Quality assessment: Based on the defect type and location, combined with the preset quality standards, the quality of the forging is assessed to determine whether it meets the predetermined processing requirements. Two parameters are used to quantify the severity of the defect:

[0017] The defect influence index DII indicates the degree of influence of defects on forging performance, taking into account the type, location and size of defects. The processing stability index SSI indicates the stability of forging surface quality, which is mainly calculated based on the uniformity of defect distribution and the trend of size change.

[0018] S7. Report generation: According to the defect detection results, the forging quality inspection report is automatically generated. The report content includes the defect type, location, quantity and its possible impact on the processing results;

[0019] S8, System feedback and control: Feedback defect detection results to the production control system, automatically adjust machining process parameters, and optimize forging quality;

[0020] S9. Real-time feedback: In the above inspection process, all steps are automatically adjusted through the real-time feedback mechanism to ensure the continuity and quality of forging processing.

[0021] Second aspect:

[0022] The present invention provides a forging flaw detection system based on real-time image recognition, comprising:

[0023] Used for surface defect detection and quality assessment of gear forgings, including industrial cameras, light sources, processing equipment, data storage equipment, display equipment and control equipment, all of which are connected and work together through industrial communication protocols;

[0024] The industrial camera is installed near the detection window of the forging processing equipment, forming an angle of 30° to 60° with the normal line of the forging surface, and is used to collect real-time images of the forging processing surface; the industrial camera is connected to the processing equipment through a high-speed data line to ensure that the image data can be efficiently transmitted, and the high-speed data line includes a GigE interface or a USB 3.0 interface;

[0025] The light source adopts a multi-directional LED ring design, which is installed around the industrial camera and fixed near the detection window by a special bracket; the light intensity of the light source is precisely adjusted to eliminate shadows and reflection interference in the image; the light source is connected to the power supply device through a power cord and linked with the control device through a digital signal to ensure stable lighting during the detection process;

[0026] The processing device includes an embedded computer or an industrial PC, which is connected to the industrial camera to receive the collected image data and process the image by hardware acceleration; the image preprocessing algorithm and defect classification algorithm are run in the processing device, including support vector machine SVM and convolutional neural network CNN algorithm, which are used to analyze the image in real time and identify the defect type and distribution; the processing device communicates with the data storage device and the control device through an Ethernet interface;

[0027] The data storage device is connected to the processing device via an industrial communication protocol, including MODBUS or PROFINET, for storing image data, defect classification results, comprehensive scores, and historical inspection records; the data storage device supports data backup and remote access functions, which facilitates operators to conduct quality traceability and process optimization analysis;

[0028] The display device is connected to the processing device via an HDMI or VGA interface to display the inspection results in real time, including defect distribution diagrams, comprehensive quality scores and statistical data; at the same time, the display device integrates an audible and visual alarm device, which triggers an alarm to prompt the operator when the number of defects or the defect impact index exceeds a set threshold;

[0029] The control device is connected to the processing device through a two-way communication interface, and is used to receive the flaw detection results and adjust the parameters of the forging processing equipment in real time; the control device directly controls the operating state of the processing equipment, including adjusting the cutting speed, feed rate and coolant injection angle to optimize the processing process;

[0030] All components of the flaw detection system are connected through standardized interfaces and adopt a modular design to ensure the scalability and maintainability of the system, while supporting remote monitoring and fault diagnosis functions; through the above composition and connection method, the system can achieve efficient and accurate surface defect identification and quality control during the forging processing, thereby improving production efficiency and product quality.

[0031] The beneficial effects brought about by the technical solution provided by the present invention include at least:

[0032] (1) In the present invention, by combining high-resolution industrial cameras and adaptive light source technology, the system is able to obtain high-quality forging images under different lighting conditions. These images are processed through efficient image preprocessing algorithms, such as denoising and enhancement, to ensure image clarity and detail. Then, advanced deep learning algorithms (such as convolutional neural networks, CNN) are used to classify and analyze defect areas, and various defect types such as cracks, pores, and depressions on the surface of forgings are accurately identified. This technical means effectively eliminates the errors of traditional manual detection through the combination of deep learning and image processing technology, improves the accuracy and reliability of defect identification, and avoids the potential risks brought by human subjective judgment.

[0033] (2) In the present invention, not only can the surface defects of forgings be detected in real time, but the detection results can also be fed back to the production control system to form a closed-loop feedback. By introducing the defect impact index (DII) and the processing stability index (SSI) into the system, the system can automatically adjust the key parameters in the processing process, such as processing speed, coolant flow, etc., according to the type and distribution of defects. When large defects or tool wear are detected on the surface of the forging, the system will promptly issue adjustment suggestions or control instructions to avoid further defect generation and production abnormalities. This technical means makes the production process more stable, reduces the generation of unqualified forgings, and optimizes production efficiency.

[0034] (3) In the present invention, through the automated forging defect detection and quality assessment process, the system greatly reduces the need for manual inspection, reduces labor costs and the risk of human operational errors. The quality assessment report is automatically generated and transmitted to the production management system in real time through the network, so that the quality information of each forging can be quickly recorded and traced. This automated and standardized detection method not only improves production efficiency, but also enhances the traceability of product quality, ensuring that the data of each link can be traced back to the source, providing strong support for subsequent quality improvement and troubleshooting, and further improving the transparency of the production line and the level of production management. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 A schematic diagram of a process flow of a forging flaw detection method based on real-time image recognition provided by an embodiment of the present invention;

[0037] Figure 2 A schematic flow chart of a defect classification algorithm in a forging flaw detection method based on real-time image recognition provided by an embodiment of the present invention;

[0038] Figure 3 A schematic diagram of the training process of a convolutional neural network model in a forging flaw detection method based on real-time image recognition provided by an embodiment of the present invention;

[0039] Figure 4 A schematic flow chart of a dynamic contour model in a forging flaw detection method based on real-time image recognition provided by an embodiment of the present invention;

[0040] Figure 5A schematic diagram of a process flow of comprehensive scoring in a forging flaw detection method based on real-time image recognition provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0042] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0043] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0044] In the embodiments of the present invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are consistent.

[0045] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0046] Reference Manual Attached Figure 1 , showing a schematic flow chart of a forging flaw detection method based on real-time image recognition provided by an embodiment of the present invention.

[0047] The embodiment of the present invention provides a forging flaw detection method based on real-time image recognition. The method can be implemented by a forging flaw detection device based on real-time image recognition. The forging flaw detection device based on real-time image recognition can be a terminal or a server. The processing flow of the forging flaw detection method based on real-time image recognition can include the following steps:

[0048] S1. Image acquisition: Use a high-resolution industrial camera to take real-time photos of forgings to obtain surface images of forgings, including defect features on the surface of forgings. During image acquisition, the exposure time, focus depth and resolution parameters of the industrial camera are automatically adjusted through the adaptive control module to ensure that clear image data is always obtained under different processing conditions.

[0049] It should be noted that the use of high-resolution industrial cameras to take real-time photos of the forging surface is the basis of the entire system. Due to factors such as processing conditions, heat treatment process and surface coating, there are many situations on the forging surface that may affect the image quality, including uneven lighting, surface reflection and environmental vibration. The selection of industrial cameras must meet the requirements of high resolution and high frame rate to ensure that clear and detailed surface images can be captured under complex working conditions. During the image acquisition process, the exposure time, focus depth and resolution of the camera are dynamically adjusted through the adaptive control module, which can not only adapt to the geometric shape and material characteristics of the forging, but also adapt to the dynamic changes on the production line to ensure that image data with strong consistency is obtained. These data lay a solid foundation for subsequent image processing and defect analysis.

[0050] S2. Image preprocessing: Preprocess the acquired images, including image denoising, contrast enhancement and edge detection, to ensure that the image quality meets the requirements of subsequent analysis.

[0051] It should be noted that after the image is collected, image preprocessing must be performed to improve the usability of the original data. Unprocessed raw images usually contain a lot of noise and low-contrast areas, which will directly affect the accuracy of subsequent defect extraction and classification. By introducing an image denoising algorithm, high-frequency and random noise can be effectively removed, making the key features of the forging surface clearer. At the same time, the contrast enhancement processing method can highlight the grayscale difference between the defects and normal areas on the forging surface, providing a more obvious feature boundary for the subsequent edge detection algorithm. In addition, edge detection can accurately locate the boundary information of the forging surface, providing support for morphological analysis and defect classification. The processing logic at this stage is designed to minimize irrelevant interference and improve the efficiency and accuracy of subsequent analysis.

[0052] S3. Defective area extraction: Based on the image processing algorithm, the defective area is extracted from the processed image. The non-defective area is removed using the morphological analysis algorithm to extract the possible defective area. The morphological analysis algorithm includes opening and closing operations.

[0053] It should be noted that the extraction of defect areas is one of the core steps of the detection system. The surface of forgings usually contains complex textures and processing marks, which may be confused with the actual defect features. In order to accurately separate the defect areas, the system uses an algorithm based on morphological analysis, including operations such as opening and closing operations. Through these operations, isolated small noise points and misjudgments of smooth surface areas can be removed, and coherent areas with typical defect features can be extracted. The logic of this process is to distinguish the defect area from the background area based on the geometric characteristics of the pixel distribution. In addition, the extracted defect area will also serve as the input for subsequent feature analysis, laying the foundation for determining the defect type and evaluating its impact.

[0054] S4. Feature extraction and identification: The extracted defect area is subjected to feature extraction and identification through the convolutional neural network (CNN). The network uses multiple convolutional layers and pooling layers for deep learning and can identify various types of defects, including cracks, pores, and surface irregularities.

[0055] It should be noted that deep feature extraction and recognition of the extracted defective areas through convolutional neural networks (CNN) is a key step to ensure the intelligence and accuracy of the detection system. Traditional defect recognition methods usually rely on manually designed features, which is not only inefficient but also difficult to adapt to a variety of defect types. CNN can automatically learn high-level semantic features of images, including subtle textures of cracks, distribution patterns of pores, and irregular shape features of the surface, by stacking multiple convolutional layers and pooling layers. This feature extraction method not only reduces human intervention, but also significantly improves the robustness of recognition. The trained CNN model can quickly and accurately output the feature vector of each defective area, providing support for subsequent classification and positioning.

[0056] S5. Defect classification and location: Combine image features and deep learning models to classify and locate defects, and output defect location coordinates and defect types.

[0057] It should be noted that the classification and positioning of defects are important links for accurate processing of detection results. After completing feature extraction, the defects are quantitatively and qualitatively analyzed in combination with the classification model. Through pre-trained deep learning models (such as the combination of support vector machines and convolutional neural networks), the system can accurately classify defects into various types such as cracks, pores, surface depressions, etc. This classification method combines the high efficiency of traditional statistical learning and the strong generalization ability of deep learning, ensuring high-precision recognition of complex defect features. At the same time, the system uses image coordinate transformation technology to accurately mark the location of each defect and the area it occupies on the surface of the forging. The classification and positioning results not only provide detailed input data for quality assessment, but can also be used to further analyze potential problems with processing equipment, such as tool wear or improper processing parameter settings.

[0058] S6. Quality assessment: Based on the defect type and location, combined with the preset quality standards, the quality of the forging is assessed to determine whether it meets the predetermined processing requirements. Two parameters are used to quantify the severity of the defect:

[0059] The defect influence index DII indicates the influence of defects on the performance of forgings, taking into account the type, location and size of defects. The processing stability index SSI indicates the stability of the surface quality of forgings, which is mainly calculated based on the uniformity of defect distribution and the trend of size change.

[0060] It should be noted that according to the results of classification and positioning, the system needs to conduct a comprehensive assessment of the overall quality of the forgings. At this time, the system introduces two parameters, the defect impact index (DII) and the processing stability index (SSI), to quantify the severity of defects on the surface of forgings and the consistency of quality. DII quantifies the potential impact of defects on forging performance by combining the type, location and area of ​​defects, while SSI reflects the stability of the processing process by analyzing the uniformity and change trend of defect distribution. The introduction of these two parameters is intended to provide a more comprehensive quality evaluation index than simply relying on the defect area or number. During the evaluation process, the system determines whether the forgings meet the processing requirements based on the preset quality standards, and generates a comprehensive quality score for each forging to provide data support for production decisions.

[0061] S7. Report generation: Based on the defect detection results, a forging quality inspection report is automatically generated. The report content includes the defect type, location, quantity and its possible impact on the processing results.

[0062] It should be noted that based on the above test and evaluation results, the system can automatically generate a forging quality inspection report. The report includes the defect type, quantity, location, area and comprehensive quality score of each forging, and provides suggestions for issues that may affect subsequent processing and performance. The report format follows a standardized template to ensure that the information is clear and easy to interpret. In addition, the report can also be transmitted to the production management system via the network to achieve unified management and traceability of quality information. This report generation method reduces the workload of manual recording, while improving the transparency and traceability of the production process, providing an important basis for quality improvement.

[0063] S8, System feedback and control: Feedback defect detection results to the production control system, automatically adjust machining process parameters, and optimize forging quality.

[0064] It should be noted that the system further optimizes the processing of forgings through real-time feedback and control mechanisms. After each inspection, the system feeds back the defect distribution and quality assessment results to the production control system and automatically adjusts the operating parameters of the processing equipment. For example, when many cracks are found on the surface of the forging, the system may reduce the processing speed or increase the flow of coolant to reduce the impact of thermal stress; when the defect distribution shows abnormal tool wear, the system will prompt to replace the tool. This feedback mechanism based on real-time detection results can effectively reduce the production of unqualified forgings and improve the operating efficiency of the production line.

[0065] S9. Real-time feedback: In the above inspection process, all steps are automatically adjusted through the real-time feedback mechanism to ensure the continuity and quality of forging processing.

[0066] It should be noted that the calculation method of the defect impact index (DII) and the processing stability index (SSI) plays a key role in the overall performance of the system. In the calculation of DII, the system combines the defect classification results and derives the final value by comprehensively considering the risk weight of each defect type, the defect area and its distance from the key functional area. This calculation method ensures that the actual impact of different types of defects on the performance of forgings can be accurately reflected. SSI calculates the standard deviation of the defect area of ​​each inspection area based on the uniformity of defect distribution, and normalizes it based on the defect area change rate between areas to quantify the stability of the processing process. The calculation logic of the two parameters is rigorous, which fully reflects the innovation and practicality of the detection system.

[0067] In a possible implementation, the installation position and light source layout of the industrial camera meet the following requirements:

[0068] Camera installation position: The industrial camera is installed at the detection window of the forging processing equipment, and the angle is maintained at 30° to 60° with the normal line of the forging surface to ensure the clarity of image acquisition;

[0069] Light source layout: Multi-directional LED ring light source is used to evenly distribute the light intensity and avoid surface reflection or shadow interference;

[0070] Protective measures: Equip industrial cameras with dust-proof and shock-proof housings, and use airflow cleaning devices to keep the lenses clean in harsh environments;

[0071] Calibration: During initial installation and regular maintenance, the camera and light source are calibrated to ensure imaging accuracy and consistency. Through reasonable camera and light source design, the image acquisition quality can be significantly improved, providing high-precision input data for flaw detection.

[0072] It should be noted that the hardware and software of the entire system are interconnected through standardized interfaces, and a distributed control architecture is used to ensure fast data processing and efficient transmission. The industrial camera and light source work synchronously with the detection window of the processing equipment through physical connection, and the image data is transmitted to the processing equipment through a high-speed communication interface (such as GigE) for real-time analysis. The test results are transmitted to the data storage and display device via Ethernet or wireless, and a closed-loop feedback is formed through the control device and the processing equipment. This design logic ensures the scalability, stability and reliability of the system, thereby meeting the complex needs of forging flaw detection in an industrial environment.

[0073] In a possible implementation, the defect impact index DII further includes:

[0074] The calculation formula of defect impact index DII is as follows:

[0075]

[0076] Among them, A i represents the area of ​​the i-th defect, C i is the correction factor for the defect type, where cracks are 1.5, pores are 1.0, and other types are 0.8. i Indicates the depth of the defect, L i It represents the shortest distance between the defect and the edge of the forging, n is the total number of defects, and the parameter A in the above formula is i , C i , D i and L i They are all obtained from the collected images through the image recognition hybrid analysis module.

[0077] It should be noted that cracks (correction factor 1.5): Cracks are one of the most serious defects in forgings because they directly affect the structural integrity and load-bearing capacity of the material. Under mechanical loads, cracks may cause stress concentration, which in turn causes the forging to rupture or fail. Therefore, the correction factor for cracks is set to 1.5, indicating that it has a relatively large negative impact on the overall quality of the forging and requires higher attention and correction.

[0078] Porosity (correction factor 1.0): Porosity is an internal defect caused by the inability of gas to be completely discharged during the forging process. Although pores affect the density and compressive properties of forgings, they have less impact on the structural integrity of the material than cracks. Therefore, the correction factor for pores is set to 1.0, which means that it has a relatively low impact on the quality of forgings, but it still needs to be corrected and monitored.

[0079] Other types of defects (correction factor 0.8): In addition to cracks and pores, forging surfaces may also have defects such as surface scratches, dents, and wear. Although these defects may affect the appearance or local function, they usually do not significantly reduce the overall performance of the forging like cracks or pores. In order to reflect the relatively small impact of these defects on forging performance, the correction factor for other types of defects is set to 0.8, indicating that they have a lower correction demand and a lower priority.

[0080] The setting logic of this correction factor is designed to flexibly adjust the priority of quality assessment and subsequent processing according to the actual impact of different defect types on forging performance. It can help the system more accurately reflect the impact of each defect on forging quality and formulate targeted repair or processing adjustment measures accordingly.

[0081] In a possible implementation, the processing stability index SSI further includes:

[0082] The calculation formula of the processing stability index SSI is as follows:

[0083]

[0084] Among them, S i represents the size of the i-th defect, F i represents the morphological complexity of the defect area, D i It represents the average distance between the defect and other parts of the forging surface, and N represents the total number of defects.

[0085] In a possible implementation, the morphological complexity parameters further include:

[0086] Morphological complexity F i The calculation method is:

[0087]

[0088] Among them, P i is the perimeter of the i-th defect, A i is the area of ​​the i-th defect, and the morphological complexity parameter F i Used to characterize the regularity of the defect shape. A regular circular shape corresponds to a lower F i values, while irregular shapes correspond to higher F i By calculating the morphological complexity, the recognition and classification capabilities of complex defect areas can be further improved, and the accuracy of the defect classification algorithm can be optimized.

[0089] like Figure 2 As shown, in a possible implementation manner, defect classification further includes:

[0090] The defect classification algorithm uses a combination model of support vector machine SVM and convolutional neural network CNN. The specific steps include:

[0091] S501, feature vector extraction: extracting geometric features and texture features of defects from the preprocessed image, and constructing a multi-dimensional feature vector. The geometric features include area, perimeter and morphological complexity, and the texture features include gray-level co-occurrence matrix and edge gradient.

[0092] S502, SVM preliminary classification: Use SVM to perform preliminary classification on the feature vectors to screen out high-probability defect areas;

[0093] S503, CNN fine classification: Input the initially classified defect areas into the CNN model for deep learning analysis to further determine the specific categories of the defects;

[0094] S504, classification result fusion: the output results of SVM and CNN are integrated to generate the final defect classification result, ensuring that the classification accuracy reaches more than 95%;

[0095] By combining the SVM and CNN algorithms, the accuracy and stability of classification can be improved while ensuring real-time performance.

[0096] like Figure 3 As shown, in a possible implementation, the training process of the convolutional neural network model specifically includes:

[0097] S601, Dataset construction: Collect defect images of multiple batches of forgings, manually annotate defect areas and categories, and construct a training dataset including more than 100,000 images;

[0098] S602, data enhancement: enhance the image data by random rotation, cropping, flipping and adding noise to expand the amount of training data and avoid overfitting;

[0099] S603, network structure design: ResidualNetwork-50 deep network is used as the basic model, and the number of network layers and parameter settings are optimized on this basis to meet the specific needs of forging flaw detection;

[0100] S604, model training and optimization: Use a deep learning framework with GPU acceleration for model training, use the cross entropy loss function as the optimization target, and adjust network parameters through the stochastic gradient descent SGD algorithm. Deep learning frameworks with GPU acceleration include TensorFlow or PyTorch.

[0101] S605, Model verification and testing: Verify the performance of the trained model on an independent test data set to ensure that the model's defect recognition accuracy and recall rate are not less than 95%;

[0102] Through the above training method, the convolutional neural network model can effectively adapt to the complex forging defect characteristics and improve the reliability and accuracy of the flaw detection system.

[0103] like Figure 4 As shown, in a possible implementation manner, a dynamic contour model ACM is used for positioning and segmenting multiple types of defect regions, further comprising:

[0104] S701, initializing the contour curve: setting an initial contour around the defect area, and the initial contour can be obtained by morphological operation;

[0105] S702, energy function definition: construct an energy function for the contour curve. The energy function includes three parts: internal energy, external energy and constraint energy:

[0106] E=E internal +E external +E constraint

[0107] Among them, Einternal Indicates the smoothness of the contour curve, defined as the sum of the squares of the first and second order derivatives of the curve, E external represents the energy guided by the image gradient, maximizing the matching of contours in the gradient intensity region, E constraint represents the constraint energy combined with the geometric features of the defect region;

[0108] S703, iterative optimization: using the gradient descent method to iteratively minimize the energy function, and gradually optimize the contour position to make it consistent with the actual defect boundary;

[0109] S704, output of segmentation results: outputting the optimized contour curve as the accurate segmentation result of the defect area;

[0110] By introducing the dynamic contour model, the ability to accurately locate the boundaries of complex defect areas can be significantly improved, providing a reliable basis for subsequent defect feature extraction and quality assessment.

[0111] like Figure 5 As shown, in a possible implementation, the quality assessment process combines the processing stability index SSI and the defect impact index DII for comprehensive scoring, and the specific steps include:

[0112] S801. Calculation of comprehensive score:

[0113]

[0114] Among them, Q represents the comprehensive quality score of the forging, ranging from 0 to 1, α and β are weight factors, which represent the influence weights of SSI and DII on the score respectively. The weights are obtained by fitting the historical inspection data, and satisfy α+β=1, SSI max and DII max The maximum value of the corresponding indicator is used for normalization;

[0115] S802, judgment criteria: according to the size of Q value, the forgings are divided into three categories: qualified, unqualified and needing re-inspection, and the corresponding quality report is generated;

[0116] S803, dynamic adjustment: Combine multiple batches of test data to dynamically adjust the values ​​of α and β to ensure that the scoring results are consistent with the actual processing requirements;

[0117] Through this scoring mechanism, the quality of forgings can be quantitatively evaluated, providing a scientific basis for the production process.

[0118] In a possible implementation, the real-time feedback mechanism further includes:

[0119] The inspection results are transmitted to the processing control system in real time through industrial communication protocols, such as MODBUS or PROFINET. The processing parameters, including cutting speed, feed rate and coolant injection angle, are automatically adjusted according to the defect distribution and classification results. When the number of defects or DII exceeds the set threshold, the early warning mechanism is triggered to prompt the operator to check the process flow. The real-time control model is optimized by combining historical inspection data and feedback parameters to improve the stability and efficiency of the processing process. Through the real-time feedback mechanism, closed-loop control of defect detection and processing parameter adjustment is achieved, significantly improving the intelligence level of the production line.

[0120] This embodiment describes a forging flaw detection method based on real-time image recognition, which aims to achieve efficient recognition and quality assessment of forging surface defects, and is specifically applicable to the machining process of gear forgings. In the application of actual production lines, this method can achieve real-time detection and feedback of forging surface defects without interfering with the normal production rhythm.

[0121] In this embodiment, the forging processing equipment is equipped with a high-resolution industrial camera installed above the detection window to ensure that the camera continuously captures the surface of the forging. Specifically, the industrial camera forms a 45° angle with the normal line of the forging surface, and the clarity and contrast of the image are ensured by precisely adjusting the camera exposure parameters. The image data is transmitted to the processing equipment in real time via the GigE interface. At the same time, the light source system adopts a ring LED design, which can evenly illuminate the surface of the forging to avoid image quality degradation caused by uneven lighting.

[0122] After the image data is transmitted to the processing equipment, it first undergoes image preprocessing, including denoising and contrast enhancement. To remove the noise in the image, a denoising algorithm based on Gaussian filtering is used to eliminate environmental interference and random noise in the image. Contrast enhancement improves the grayscale difference between the forging surface and the defect in the image through adaptive histogram equalization technology, making the defect more prominent and convenient for subsequent analysis.

[0123] After preprocessing, edge detection and defect area extraction are performed. Based on the morphological algorithm, opening and closing operations are used to remove unnecessary noise and smooth irregular edges in the image, thereby extracting possible defect areas. This process can effectively improve the accuracy of defect areas and provide clear boundary information for subsequent classification and analysis.

[0124] The extracted defect areas are then analyzed through deep learning using a convolutional neural network (CNN). The network has been trained on a large number of forging defect samples and can automatically identify various defect types such as cracks, pores, and surface depressions. During the classification process, the CNN algorithm can accurately distinguish the type of each defect and calibrate the location and size of the defect based on information such as the texture, morphology, and size of the forging surface.

[0125] After the defect types are classified and located, the system calculates the impact index of each defect. Cracks are the most serious defects, and their correction factors are set to 1.5, pores to 1.0, and other types of defects to 0.8. This calculation method takes into account the degree of influence of different defects on the performance of forgings. The defect impact index DII combines the defect type, location and area to evaluate its potential impact on the performance of forgings, while the processing stability index (SSI) reflects the stability of the processing process based on the uniformity of defect distribution.

[0126] Once the defect information and quality assessment results are generated, the system automatically generates a detailed quality report, which includes the defect type, quantity, location, area of ​​each forging, and the comprehensive quality score calculated based on DII and SSI. The report is displayed in a standardized format, which is convenient for operators to make quick judgments and can be transmitted to the production management system in real time through the network to facilitate quality traceability and improvement.

[0127] In addition, the flaw detection system also has a real-time feedback function. When the system detects that there are more serious defects on the surface of the forging, the test results will be directly fed back to the production control system to automatically adjust the parameters of the processing equipment. For example, when the system detects that the crack is more serious, the control system may adjust the processing speed or increase the coolant flow to reduce the impact of thermal stress and prevent the crack from further expanding. At the same time, if the tool wear causes more defects, the system will issue a prompt to replace the tool to reduce the generation of defects caused by equipment problems.

[0128] Through the technical solution of this embodiment, after being applied on the actual production line, the detection system can quickly and accurately identify the surface defects of forgings, and provide real-time feedback to the processing equipment for adjustment, thereby achieving precise control of the quality of forgings. It has been verified that the system operates stably in continuous production, greatly improving production efficiency and the qualified rate of forgings, and reducing the workload of manual inspection, effectively reducing quality losses and rework costs caused by defects.

[0129] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0130] (1) In the present invention, by combining high-resolution industrial cameras and adaptive light source technology, the system is able to obtain high-quality forging images under different lighting conditions. These images are processed through efficient image preprocessing algorithms, such as denoising and enhancement, to ensure image clarity and detail. Then, advanced deep learning algorithms (such as convolutional neural networks, CNN) are used to classify and analyze defect areas, and various defect types such as cracks, pores, and depressions on the surface of forgings are accurately identified. This technical means effectively eliminates the errors of traditional manual detection through the combination of deep learning and image processing technology, improves the accuracy and reliability of defect identification, and avoids the potential risks brought by human subjective judgment.

[0131] (2) In the present invention, not only can the surface defects of forgings be detected in real time, but the detection results can also be fed back to the production control system to form a closed-loop feedback. By introducing the defect impact index (DII) and the processing stability index (SSI) into the system, the system can automatically adjust the key parameters in the processing process, such as processing speed, coolant flow, etc., according to the type and distribution of defects. When large defects or tool wear are detected on the surface of the forging, the system will promptly issue adjustment suggestions or control instructions to avoid further defect generation and production abnormalities. This technical means makes the production process more stable, reduces the generation of unqualified forgings, and optimizes production efficiency.

[0132] (3) In the present invention, through the automated forging defect detection and quality assessment process, the system greatly reduces the need for manual inspection, reduces labor costs and the risk of human operational errors. The quality assessment report is automatically generated and transmitted to the production management system in real time through the network, so that the quality information of each forging can be quickly recorded and traced. This automated and standardized detection method not only improves production efficiency, but also enhances the traceability of product quality, ensuring that the data of each link can be traced back to the source, providing strong support for subsequent quality improvement and troubleshooting, and further improving the transparency of the production line and the level of production management.

[0133] The present invention also provides a forging flaw detection system based on real-time image recognition, which is applied to the forging flaw detection method based on real-time image recognition, and comprises:

[0134] This embodiment describes a forging flaw detection system based on real-time image recognition, which is specially designed for defect detection and quality assessment of forgings (such as gear products) during machining. By combining high-precision image acquisition equipment, advanced image processing algorithms and deep learning technology, the system can perform real-time and accurate detection of forging surface defects, and conduct a comprehensive quality assessment, providing instant feedback for the production process, thereby improving production efficiency and the qualification rate of forgings.

[0135] The system architecture includes main modules such as image acquisition unit, image processing unit, data analysis and feedback unit, control and report generation unit, etc. Each module cooperates with each other to form an efficient automated inspection system. Specifically, the image acquisition unit consists of an industrial camera and a synchronous light source, the image processing unit includes multiple high-performance computing servers, the data analysis and feedback unit is responsible for real-time feedback of processing results and transmission of control instructions, and the report generation unit is responsible for the automatic generation and transmission of quality reports.

[0136] The image acquisition unit is installed above the inspection window of the production line and uses a high-resolution industrial camera (such as a 40-megapixel CMOS camera). The camera uses autofocus technology to ensure that the acquired image has sufficient clarity and details. The camera's exposure time and frame rate are dynamically adjusted by the system according to the actual production environment to adapt to different forging surfaces and lighting conditions.

[0137] In terms of light source configuration, the system uses a ring-shaped LED light source, which is evenly arranged around the detection area. The ring design eliminates the shadow problem caused by the change of the light source angle. The brightness of the light source is automatically adjusted by the dimming circuit to ensure that the forging surface in the image can be clearly presented regardless of low light or strong light conditions, avoiding image errors caused by uneven lighting or reflection.

[0138] After the image acquisition is completed, the system first pre-processes the image to remove noise that may affect the detection results. The Gaussian filter algorithm is used to remove high-frequency noise in the image and reduce the interference of fine surface texture on subsequent processing. Then, the adaptive histogram equalization technology is applied to enhance the image contrast, especially in low-contrast areas. This method can highlight the grayscale difference between defects and normal areas, providing a clear visual basis for subsequent defect identification.

[0139] After the image is enhanced, the system uses the Canny edge detection algorithm to extract the edge information of the forging surface. Through the edge information, the system can determine the potential defect area. In order to further improve the accuracy of the defect area, the system combines morphological operations (opening and closing operations) to remove small noise points in the image and obtain connected defect areas through regional expansion methods. After this process, the defect areas such as cracks, pores, and depressions on the forging surface can be accurately separated to avoid misjudgment caused by surface texture interference.

[0140] After the defect area is extracted, the system inputs the image area into a trained convolutional neural network (CNN) model for deep learning analysis. The CNN model has been trained on a large number of different types of forging defects and can automatically identify defect types such as cracks, pores, surface depressions, scratches, etc. based on the texture, morphology, size and other characteristics of the defect area.

[0141] To improve classification accuracy, the system combines traditional machine learning algorithms, such as support vector machines (SVM), to perform secondary classification on the feature vectors extracted by CNN. Each defect area will be accurately calibrated, and information such as defect type, location, and size will be output to ultimately generate defect classification results.

[0142] After defect classification is completed, the system calculates the Defect Impact Index (DII) and Process Stability Index (SSI) based on the defect type and its impact on forging performance.

[0143] DII (Defect Impact Index): Considering the type, area and distance of the defect from the key functional area, the influence of the defect on the performance of the forging is calculated. Cracks have the greatest impact on the performance of forgings, followed by pores, and other defects have a smaller impact. Therefore, the system sets different correction factors for different types of defects, with the correction factor for cracks being 1.5, pores being 1.0, and other defects being 0.8. Through these correction factors, the system comprehensively evaluates the potential impact of each defect on the performance of the forging.

[0144] SSI (Processing Stability Index): SSI mainly reflects the uniformity of defect distribution on the forging surface. It measures the stability of the production process by calculating the standard deviation of the defect area and the defect area change rate. If the defect distribution is uneven and the area changes greatly, the SSI value will be high, indicating that there may be problems in the processing process, such as abnormal equipment or improper operation.

[0145] After completing the defect assessment, the system automatically generates a quality report, which includes the defect type, quantity, location, area, defect impact index (DII) and processing stability index (SSI) of each forging. The report format is unified and clearly displays the specific information of each defect. The report is transmitted to the production management system via Ethernet or wirelessly to provide data support for production scheduling and quality monitoring. The report can not only help technicians evaluate the quality of forgings, but also trace every link in the production process to facilitate quality improvement.

[0146] The forging inspection results are fed back to the production control system in real time. When more serious defects are detected (such as large cracks or uneven distribution), the system will automatically adjust production parameters, such as processing speed, coolant flow, etc., to reduce the impact of thermal stress during processing on the surface quality of forgings. In addition, if tool wear or other processing anomalies are detected, the system will issue a maintenance reminder and recommend replacing the tool or adjusting the processing parameters to improve the overall quality of the forgings.

[0147] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0148] (1) In the present invention, by combining high-resolution industrial cameras and adaptive light source technology, the system is able to obtain high-quality forging images under different lighting conditions. These images are processed through efficient image preprocessing algorithms, such as denoising and enhancement, to ensure image clarity and detail. Then, advanced deep learning algorithms (such as convolutional neural networks, CNN) are used to classify and analyze defect areas, and various defect types such as cracks, pores, and depressions on the surface of forgings are accurately identified. This technical means effectively eliminates the errors of traditional manual detection through the combination of deep learning and image processing technology, improves the accuracy and reliability of defect identification, and avoids the potential risks brought by human subjective judgment.

[0149] (2) In the present invention, not only can the surface defects of forgings be detected in real time, but the detection results can also be fed back to the production control system to form a closed-loop feedback. By introducing the defect impact index (DII) and the processing stability index (SSI) into the system, the system can automatically adjust the key parameters in the processing process, such as processing speed, coolant flow, etc., according to the type and distribution of defects. When large defects or tool wear are detected on the surface of the forging, the system will promptly issue adjustment suggestions or control instructions to avoid further defect generation and production abnormalities. This technical means makes the production process more stable, reduces the generation of unqualified forgings, and optimizes production efficiency.

[0150] (3) In the present invention, through the automated forging defect detection and quality assessment process, the system greatly reduces the need for manual inspection, reduces labor costs and the risk of human operational errors. The quality assessment report is automatically generated and transmitted to the production management system in real time through the network, so that the quality information of each forging can be quickly recorded and traced. This automated and standardized detection method not only improves production efficiency, but also enhances the traceability of product quality, ensuring that the data of each link can be traced back to the source, providing strong support for subsequent quality improvement and troubleshooting, and further improving the transparency of the production line and the level of production management.

[0151] The above contents are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0152] There are a few points to note:

[0153] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.

[0154] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0155] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0156] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A forging flaw detection method based on real-time image recognition, characterized in that: include: S1. Image acquisition: Use a high-resolution industrial camera to take real-time photos of the forgings to obtain the surface images of the forgings, which include the defect features on the surface of the forgings. During image acquisition, the exposure time, focus depth and resolution parameters of the industrial camera are automatically adjusted through the adaptive control module to ensure that clear image data is always obtained under different processing conditions; S2, Image preprocessing: Preprocess the collected images, including image denoising, contrast enhancement and edge detection, to ensure that the image quality meets the requirements of subsequent analysis; S3, defect area extraction: based on the image processing algorithm, the defect area is extracted from the processed image, and the non-defective area is removed using the morphological analysis algorithm to extract the possible defective area, wherein the morphological analysis algorithm includes an opening operation and a closing operation; S4. Feature extraction and identification: The extracted defect areas are subjected to feature extraction and identification through a convolutional neural network (CNN). The network uses multiple convolutional layers and pooling layers for deep learning and can identify multiple types of defects, including cracks, pores, and surface irregularities. S5. Defect classification and location: Combine image features and deep learning models to classify and locate defects, and output defect location coordinates and defect types; S6. Quality assessment: Based on the defect type and location, combined with the preset quality standards, the quality of the forging is assessed to determine whether it meets the predetermined processing requirements. Two parameters are used to quantify the severity of the defect: The defect influence index DII indicates the degree of influence of defects on forging performance, taking into account the type, location and size of defects. The processing stability index SSI indicates the stability of forging surface quality, which is mainly calculated based on the uniformity of defect distribution and the trend of size change. S7. Report generation: According to the defect detection results, the forging quality inspection report is automatically generated. The report content includes the defect type, location, quantity and its possible impact on the processing results; S8, System feedback and control: Feedback defect detection results to the production control system, automatically adjust machining process parameters, and optimize forging quality; S9. Real-time feedback: In the above inspection process, all steps are automatically adjusted through the real-time feedback mechanism to ensure the continuity and quality of forging processing.

2. A forging flaw detection method based on real-time image recognition according to claim 1, characterized in that: The defect impact index DII further includes: The calculation formula of the defect impact index DII is as follows: Among them, A i represents the area of ​​the i-th defect, C i is the correction factor for the defect type, where cracks are 1.5, pores are 1.0, and other types are 0.

8. i Indicates the depth of the defect, L i It represents the shortest distance between the defect and the edge of the forging, n is the total number of defects, and the parameter A in the above formula is i , C i , D i and L i They are all obtained from the collected images through the image recognition hybrid analysis module.

3. A forging flaw detection method based on real-time image recognition according to claim 2, characterized in that: The processing stability index SSI further includes: The calculation formula of the processing stability index SSI is as follows: Among them, S i represents the size of the i-th defect, F i represents the morphological complexity of the defect area, D i It represents the average distance between the defect and other parts of the forging surface, and N represents the total number of defects.

4. A forging flaw detection method based on real-time image recognition according to claim 3, characterized in that: The morphological complexity parameters further include: The morphological complexity F i The calculation method is: Among them, P i is the perimeter of the i-th defect, A i is the area of ​​the i-th defect, the morphological complexity parameter F i Used to characterize the regularity of the defect shape. A regular circular shape corresponds to a lower F i values, while irregular shapes correspond to higher F i By calculating the morphological complexity, the recognition and classification capabilities of complex defect areas can be further improved, and the accuracy of the defect classification algorithm can be optimized.

5. A forging flaw detection method based on real-time image recognition according to claim 4, characterized in that: The defect classification further includes: The defect classification algorithm adopts a combined model of support vector machine SVM and convolutional neural network CNN, and the specific steps include: S501, feature vector extraction: extracting geometric features and texture features of defects from the preprocessed image to construct a multidimensional feature vector, wherein the geometric features include area, perimeter and morphological complexity, and the texture features include gray-level co-occurrence matrix and edge gradient; S502, SVM preliminary classification: Use SVM to perform preliminary classification on the feature vectors to screen out high-probability defect areas; S503, CNN fine classification: Input the initially classified defect areas into the CNN model for deep learning analysis to further determine the specific categories of the defects; S504, classification result fusion: the output results of SVM and CNN are integrated to generate the final defect classification result, ensuring that the classification accuracy reaches more than 95%; By combining the SVM and CNN algorithms, the accuracy and stability of classification can be improved while ensuring real-time performance.

6. A forging flaw detection method based on real-time image recognition according to claim 5, characterized in that: The training process of the convolutional neural network model specifically includes: S601, Dataset construction: Collect defect images of multiple batches of forgings, manually annotate defect areas and categories, and construct a training dataset including more than 100,000 images; S602, data enhancement: enhance the image data by random rotation, cropping, flipping and adding noise to expand the amount of training data and avoid overfitting; S603, network structure design: ResidualNetwork-50 deep network is used as the basic model, and the number of network layers and parameter settings are optimized on this basis to meet the specific needs of forging flaw detection; S604, model training and optimization: using a deep learning framework with GPU acceleration to perform model training, using a cross entropy loss function as an optimization target, and adjusting network parameters through a stochastic gradient descent (SGD) algorithm, wherein the deep learning framework with GPU acceleration includes TensorFlow or PyTorch; S605, Model verification and testing: Verify the performance of the trained model on an independent test data set to ensure that the model's defect recognition accuracy and recall rate are not less than 95%; Through the above training method, the convolutional neural network model can effectively adapt to the complex forging defect characteristics and improve the reliability and accuracy of the flaw detection system.

7. A forging flaw detection method based on real-time image recognition according to claim 6, characterized in that: The dynamic contour model ACM is used for the location and segmentation of multiple types of defect areas, further including: S701, initializing the contour curve: setting an initial contour around the defect area, and the initial contour can be obtained by morphological operation; S702, energy function definition: construct an energy function for the contour curve. The energy function includes three parts: internal energy, external energy and constraint energy: E=E internal +E external +E constraint Among them, E internal Indicates the smoothness of the contour curve, defined as the sum of the squares of the first and second order derivatives of the curve, E external represents the energy guided by the image gradient, maximizing the matching of contours in the gradient intensity region, E constraint represents the constraint energy combined with the geometric features of the defect region; S703, iterative optimization: using the gradient descent method to iteratively minimize the energy function, and gradually optimize the contour position to make it consistent with the actual defect boundary; S704, output of segmentation results: outputting the optimized contour curve as the accurate segmentation result of the defect area; By introducing the dynamic contour model, the ability to accurately locate the boundaries of complex defect areas can be significantly improved, providing a reliable basis for subsequent defect feature extraction and quality assessment.

8. A forging flaw detection method based on real-time image recognition according to claim 7, characterized in that: The quality assessment process combines the processing stability index SSI and the defect impact index DII for comprehensive scoring. The specific steps include: S801. Calculation of comprehensive score: Among them, Q represents the comprehensive quality score of the forging, ranging from 0 to 1, α and β are weight factors, which represent the influence weights of SSI and DII on the score respectively. The weights are obtained by fitting the historical inspection data, and satisfy α+β=1, SSI max and DII max The maximum value of the corresponding indicator is used for normalization; S802, judgment criteria: according to the size of Q value, the forgings are divided into three categories: qualified, unqualified and needing re-inspection, and the corresponding quality report is generated; S803, dynamic adjustment: Combine multiple batches of test data to dynamically adjust the values ​​of α and β to ensure that the scoring results are consistent with the actual processing requirements; Through this scoring mechanism, the quality of forgings can be quantitatively evaluated, providing a scientific basis for the production process.

9. A forging flaw detection method based on real-time image recognition according to claim 8, characterized in that: The real-time feedback mechanism further comprises: The detection results are transmitted to the processing control system in real time through industrial communication protocols, such as MODBUS or PROFINET; the processing parameters, including cutting speed, feed rate and coolant injection angle, are automatically adjusted according to the defect distribution and classification results; when the number of defects or DII exceeds the set threshold, the early warning mechanism is triggered to prompt the operator to check the process flow; the real-time control model is optimized by combining historical detection data and feedback parameters to improve the stability and efficiency of the processing process. Through the real-time feedback mechanism, closed-loop control of defect detection and processing parameter adjustment is achieved, which significantly improves the intelligence level of the production line.

10. A forging flaw detection system based on real-time image recognition, characterized in that: include: Used for surface defect detection and quality assessment of gear forgings, including industrial cameras, light sources, processing equipment, data storage equipment, display equipment and control equipment, all of which are connected and work together through industrial communication protocols; The industrial camera is installed near the detection window of the forging processing equipment, forming an angle of 30° to 60° with the normal line of the forging surface, and is used to collect real-time images of the forging processing surface; the industrial camera is connected to the processing equipment through a high-speed data line to ensure that the image data can be efficiently transmitted, and the high-speed data line includes a GigE interface or a USB 3.0 interface; The light source adopts a multi-directional LED ring design, which is installed around the industrial camera and fixed near the detection window by a special bracket; the light intensity of the light source is precisely adjusted to eliminate shadows and reflection interference in the image; the light source is connected to the power supply device through a power cord and linked with the control device through a digital signal to ensure stable lighting during the detection process; The processing device includes an embedded computer or an industrial PC, which is connected to the industrial camera to receive the collected image data and process the image by hardware acceleration; the image preprocessing algorithm and defect classification algorithm are run in the processing device, including support vector machine SVM and convolutional neural network CNN algorithm, which are used to analyze the image in real time and identify the defect type and distribution; the processing device communicates with the data storage device and the control device through an Ethernet interface; The data storage device is connected to the processing device via an industrial communication protocol, including MODBUS or PROFINET, for storing image data, defect classification results, comprehensive scores, and historical inspection records; the data storage device supports data backup and remote access functions, which facilitates operators to conduct quality traceability and process optimization analysis; The display device is connected to the processing device via an HDMI or VGA interface to display the inspection results in real time, including defect distribution diagrams, comprehensive quality scores and statistical data; at the same time, the display device integrates an audible and visual alarm device, which triggers an alarm to prompt the operator when the number of defects or the defect impact index exceeds a set threshold; The control device is connected to the processing device through a two-way communication interface, and is used to receive the flaw detection results and adjust the parameters of the forging processing equipment in real time; the control device directly controls the operating state of the processing equipment, including adjusting the cutting speed, feed rate and coolant injection angle to optimize the processing process; All components of the flaw detection system are connected through standardized interfaces and adopt a modular design to ensure the scalability and maintainability of the system, while supporting remote monitoring and fault diagnosis functions; through the above composition and connection method, the system can achieve efficient and accurate surface defect identification and quality control during the forging processing, thereby improving production efficiency and product quality.

Citation Information

Cited By

  • Quality detection system based on industrial big data image analysis

    CN120182271A

  • Defect detection method and system for automotive trim injection molded part based on visual inspection

    CN120747000A

  • Method for identifying iridovirus damage grade of micropterus salmoides based on machine vision assistance

    CN120761383A

  • Refractory material quality detection method and system based on machine learning

    CN120782712A

  • A machine learning-based refractory material quality detection method and system

    CN120782712B