Quality detection method, device and equipment based on metal ingot and storage medium

By adopting a quality detection method based on metal ingots in smelting production, the YOLO V5 model is used to detect the surface and space defects of metal ingots, which solves the problems of low manual detection efficiency and poor accuracy, and achieves more efficient inspection and higher quality products.

CN119887768AInactive Publication Date: 2025-04-25BEIJING MINING & METALLURGICAL TECH GRP CO LTD

Patent Information

Application Number
CN202510370210.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In smelting and production, manual waste ingots have problems such as low efficiency, inconsistent standards and lack of data management, resulting in high missed detection rate and affecting production quality.

Method used

Using a quality detection method based on metal ingots, a modified YOLO V5 defect detection model is constructed by collecting RGB and depth images, and the surface defect type and spatial defect of metal ingots are detected, and the comprehensive confidence is calculated to determine whether the ingot is a waste ingot.

Benefits of technology

It improves the detection efficiency, reduces the missed detection rate, improves production efficiency and product quality, and reduces the labor intensity of operators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887768A_ABST
    Figure CN119887768A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial detection, and discloses a quality detection method, system and equipment based on a metal ingot and a storage medium. The method comprises the following steps: acquiring an RGB metal ingot image and a depth metal ingot image corresponding to each metal ingot to be detected on a casting production line; inputting the acquired RGB metal ingot images into the metal ingot surface defect target detection network model to obtain surface defect type confidence; preprocessing the metal ingot image of each depth; obtaining the surface space defect confidence coefficient according to the metal ingot surface depth data and the zero cross point of each curvature change; according to the surface defect type confidence coefficient and the surface space defect confidence coefficient, the comprehensive confidence coefficient of the to-be-detected metal ingot is obtained, and if the comprehensive confidence coefficient exceeds a preset fusion threshold value, it is determined that the to-be-detected metal ingot is a waste ingot. The to-be-detected metal ingot is detected according to the comprehensive confidence coefficient, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial detection technology, and in particular to a quality detection method, device, equipment and storage medium based on metal ingots. Background Art

[0002] In the smelting production process, the smelting and casting process of lead, zinc and their alloys refers to pouring the melted metal into a mold for cooling and solidification to obtain metal ingots of the required shape and size. Qualified ingots are then stacked, packaged, weighed, labeled, and put in and out of storage in accordance with the specified requirements. In the smelting and casting production process, there are strict requirements on the quality of the cast ingots. Any waste ingots with defects such as scum, burrs, protrusions or dripping on the surface must be identified and removed to prevent them from entering the subsequent process and affecting the quality of downstream production.

[0003] At present, the detection of scrap ingots mainly relies on manual visual inspection and manual removal. However, manual inspection is difficult to meet the needs of continuous and high-speed production, especially in a high-temperature and dusty working environment. The labor intensity of operators is high and they are prone to fatigue, resulting in an increase in the missed detection rate. Summary of the invention

[0004] In a first aspect, the present invention provides a quality detection method based on a metal ingot, the method comprising: Collecting RGB metal ingot images and depth metal ingot images corresponding to each metal ingot to be tested on the melting and casting production line; An improved YOLO V5 defect detection model is constructed, a metal ingot surface defect target detection network model is obtained according to the improved YOLO V5 defect detection model, and each of the collected RGB metal ingot images is input into the metal ingot surface defect target detection network model to obtain a surface defect type confidence; Preprocessing each of the deep metal ingot images to obtain a plurality of preprocessed deep metal ingot images; Acquire metal ingot surface depth data and a plurality of zero crossing points of curvature changes according to each of the preprocessed depth metal ingot images, and obtain surface space defect confidence according to the metal ingot surface depth data and each of the zero crossing points of curvature changes; The comprehensive confidence of the metal ingot to be tested is obtained according to the surface defect type confidence and the surface space defect confidence. If the comprehensive confidence exceeds a preset fusion threshold, it is determined that the metal ingot to be tested is a waste ingot.

[0005] In an optional embodiment, the metal ingot surface defect target detection network model is obtained according to the improved YOLO V5 defect detection model, including: Acquire a plurality of metal ingot sample images, perform labeling processing on each of the metal ingot sample images, and construct a sample training data set according to the labeled metal ingot sample images; The improved YOLO V5 defect detection model is trained using the sample training data set to obtain target parameters and target weights; The metal ingot surface defect target detection network model is constructed according to the target parameters and target weights.

[0006] In an optional embodiment, obtaining the surface space defect confidence according to the metal ingot surface depth data and each zero crossing point of the curvature change includes: Acquire the depth data of each zero-crossing point and the curvature intensity value of each zero-crossing point, and determine the average depth according to the depth data of each zero-crossing point; Acquire a plurality of absolute deviation values ​​according to the depth data of each zero crossing point and the average depth; Each of the absolute deviation values ​​and each of the curvature intensity values ​​is normalized to obtain the surface space defect confidence.

[0007] In an optional embodiment, the method further comprises: The thickness of the metal ingot to be measured is calculated according to the average depth. If the thickness of the metal ingot to be measured is lower than a preset thickness threshold, it is determined that the metal ingot to be measured is a waste ingot.

[0008] In an optional embodiment, the step of obtaining the comprehensive confidence of the metal ingot to be tested according to the surface defect type confidence and the surface space defect confidence includes: Obtaining a first product value of a first weight value and the surface defect type confidence, and a second product value of a second weight value and the surface space defect confidence; The comprehensive confidence of the metal ingot to be tested is determined according to the sum of the first product value and the second product value.

[0009] In a second aspect, the present invention provides a quality inspection system based on metal ingots, the system comprising: a data acquisition module, an image processing module, a defect recognition module, a positioning module, a communication module and a control module; The data acquisition module is used to obtain the RGB metal ingot image and the depth metal ingot image corresponding to each metal ingot image to be tested, and send each of the RGB metal ingot image and the depth metal ingot image to the image processing module; The image processing module is used to preprocess the deep metal ingot image and construct a sample training data set; The defect recognition module is used to obtain the surface space defect confidence according to the preprocessed deep metal ingot image, obtain the metal ingot surface defect target detection network model according to the sample training data set, and obtain the surface defect type confidence according to the metal ingot surface defect target detection network model, obtain the comprehensive confidence of the metal ingot to be tested according to the surface defect type confidence and the surface space defect confidence, and judge whether the metal ingot to be tested is a scrap ingot according to the comprehensive confidence; The positioning module is used to obtain the position information of the metal ingot to be tested in the image of the metal ingot to be tested; The communication module is used to send a control signal according to the judgment result of the metal ingot to be tested; The control module is used to perform a retaining or rejecting operation on the metal ingot to be tested according to the position information of the image of the metal ingot to be tested and the control signal.

[0010] In an optional embodiment, the system further comprises: an ingot casting machine; the data acquisition module comprises: a camera group, two lighting lamps, an image transmission device and a fixing bracket; The camera group includes an RGB camera and a depth camera; The fixed support spans above the ingot casting machine, and the RGB camera and the depth camera are respectively installed on the top of the fixed support and are respectively arranged above the metal ingot to be tested; The two lighting lamps are respectively mounted on the fixing brackets and are arranged on both sides of the RGB camera and the depth camera; The image transmission device is used to obtain the RGB metal ingot image and the depth metal ingot image corresponding to each metal ingot image to be tested, and send each of the RGB metal ingot image and the depth metal ingot image to the image processing module.

[0011] In an optional embodiment, the positioning module is further used to determine whether the metal ingot to be tested is located at a preset standard position, and if the metal ingot to be tested is located at the preset standard position, send a valid signal to the communication module; The communication module is further configured to send a control signal to the control module according to the effective signal.

[0012] In a third aspect, the present invention provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the quality inspection method based on metal ingots described in any one of the aforementioned embodiments.

[0013] In a fourth aspect, the present invention provides a computer storage medium storing a computer program, wherein when the computer program is executed on a processor, the quality detection method based on metal ingots according to any one of the aforementioned embodiments is implemented.

[0014] The embodiments of the present application have the following beneficial effects: The metal ingot quality inspection method provided in the embodiment of the present application collects RGB metal ingot images and depth metal ingot images corresponding to each metal ingot to be inspected on the melting and casting production line; constructs an improved YOLO V5 defect detection model, obtains a metal ingot surface defect target detection network model according to the improved YOLO V5 defect detection model, inputs each of the collected RGB metal ingot images into the metal ingot surface defect target detection network model, and obtains a surface defect type confidence; preprocesses each of the depth metal ingot images to obtain a plurality of preprocessed depth metal ingot images; obtains metal ingot surface depth data and a plurality of zero crossing points of curvature changes according to each of the preprocessed depth metal ingot images, and obtains a surface space defect confidence according to the metal ingot surface depth data and each zero crossing point of the curvature change; obtains a comprehensive confidence of the metal ingot to be inspected according to the surface defect type confidence and the surface space defect confidence, and if the comprehensive confidence exceeds a preset fusion threshold, determines that the metal ingot to be inspected is a scrap ingot. The present application obtains a comprehensive confidence based on the surface defect type confidence and the surface space defect confidence, and detects the metal ingot to be tested based on the comprehensive confidence, thereby improving the detection efficiency, effectively reducing the possibility of missed detection, and improving production efficiency and product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. For ordinary technicians in this field, other related drawings can also be obtained based on these drawings without creative work.

[0016] Figure 1 A schematic diagram of a process of a quality detection method based on metal ingots provided in an embodiment of the present application is shown; Figure 2 A schematic structural diagram of a quality detection system based on metal ingots provided in an embodiment of the present application is shown; Figure 3 Another structural schematic diagram of a quality detection system based on metal ingots provided in an embodiment of the present application is shown; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown.

[0017] Icons: 200-quality inspection system based on metal ingots; 201-data acquisition module; 202-image processing module; 203-defect recognition module; 204-positioning module; 205-communication module; 206-control module; 207-ingot casting machine; 208-metal ingot to be tested; 2011-illumination lamp; 2012-image transmission device; 2013-camera group; 2014-fixed bracket; 400-electronic equipment; 401-transceiver; 402-processor, 403-memory. DETAILED DESCRIPTION

[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0019] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0020] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.

[0021] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0022] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0023] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0024] At present, the traditional scrap ingot detection method has the following problems: 1. Low efficiency: Manual detection is difficult to meet the continuous and high-speed production needs, especially in a high-temperature and dusty working environment. The operators have high labor intensity and are prone to fatigue, which leads to an increase in the missed detection rate; 2. Inconsistent standards: Different operators have subjective differences in the judgment standards of quality issues, making it difficult to form objective and consistent quality inspection specifications; 3. Lack of data management: The lack of systematic scrap ingot data records and statistics cannot provide effective data support for production process optimization, which restricts the refined development of quality management.

[0025] With the development of the economy and the changes in the supply and demand relationship of upstream and downstream products, the traditional manual inspection method can no longer meet the high-efficiency requirements of modern ingot production. Therefore, this application proposes a quality inspection method, system, equipment and storage medium based on metal ingots to replace manual operation, ensure that the quality of ingots on the melting and casting production line meets the standards, and reduce the labor intensity of operators.

[0026] Example 1 An embodiment of the present application provides a quality detection method based on metal ingots.

[0027] See also Figure 1 , quality inspection methods based on metal ingots include: S101, collecting RGB metal ingot images and depth metal ingot images corresponding to each metal ingot 208 to be tested located on the melting and casting production line.

[0028] In this embodiment, an RGB camera and a depth camera are set to obtain RGB metal ingot images and depth metal ingot images corresponding to each metal ingot 208 to be tested, and the obtained images of the metal ingots 208 to be tested should meet the requirements of no blurring, no ghosting, etc., and the images of the metal ingots 208 to be tested should ensure that the surfaces of the metal ingots 208 to be tested are completely presented.

[0029] It should be noted that the present application provides color and texture information through RGB images, provides three-dimensional geometric information through depth images, and can comprehensively describe the characteristics of metal ingots by acquiring image information. For example, RGB images can help identify surface color changes or texture anomalies, while depth images can help measure the size, shape, and surface concavity of metal ingots. By improving the quality of the acquired image of the metal ingot 208 to be tested, the false detection rate can be further reduced and the detection efficiency can be improved.

[0030] S102, constructing an improved YOLO V5 defect detection model, obtaining a metal ingot surface defect target detection network model according to the improved YOLO V5 defect detection model, inputting each of the collected RGB metal ingot images into the metal ingot surface defect target detection network model, and obtaining a surface defect type confidence.

[0031] It should be noted that the YOLO V5 (You Only Look Once version 5) defect detection model is mainly used for target detection. YOLO V5 mainly consists of four parts: input end, backbone network (Backbone), neck network (Neck) and detection head (Head).

[0032] The improvements of this application to the traditional YOLO V5 model are: 1. Adding a prediction head for small object detection and a fine-scale anchor box. By combining the three prediction heads of YOLOv5 itself, the four-head structure obtains four feature maps of different scales, which are then spliced ​​for detection. 2. Integrating CBAM (Convolutional block attention module) into the Neck of YOLOv5. CBAM is a simple but effective attention module. Given a feature map, CBAM will infer the attention map along two independent dimensions, channel and space, and then multiply the attention map with the input feature map to perform adaptive feature refinement.

[0033] By improving the traditional YOLO V5 model, it is possible to detect targets at more and finer scales, alleviate the negative impact of drastic changes in target scale, and enhance the model's ability to focus on target features under complex backgrounds and noise interference.

[0034] Furthermore, the present application obtains the optimal target parameters and target weights for scrap ingot detection by training the improved YOLO V5 defect detection model according to the sample training data set. The optimal target parameters and target weights are used as the parameters and weights of the metal ingot surface defect target detection network model. The settings of parameters and weights can be quickly configured in the "Parameter Setting" interface.

[0035] It should be understood that when training the model, attention should be paid to setting hyperparameters. For the image data and targets on site, a smaller learning rate is required. In the preliminary training, a learning rate of 0.001, Adam optimizer, and batch size of 8 were selected according to the GPU memory capacity. The training cycle was set to 300, as well as the CIoU Loss (Complete Intersection over Union Loss) loss function that takes into account the center point distance and aspect ratio, and an early stopping mechanism was used on the validation set. When the validation loss did not decrease for 10 consecutive cycles, the training was terminated. After the preliminary model has been trained and fitted, a learning rate of 0.00001 was used for fine-tuning the model to obtain a metal ingot surface defect target detection network model.

[0036] Specifically, each metal ingot is identified by an RGB camera, and the image of the metal ingot 208 to be tested is obtained online, and the image of the metal ingot 208 to be tested is input into the metal ingot surface defect target detection network model for real-time reasoning. The metal ingot surface defect target detection network model outputs the confidence level of each defect type on the surface of the measured metal ingot based on the target detection result.

[0037] In one embodiment, a plurality of metal ingot sample images are obtained, and each of the metal ingot sample images is annotated, and a sample training data set is constructed based on the annotated metal ingot sample images; an improved YOLO V5 defect detection model is constructed, and the improved YOLO V5 defect detection model is trained with the sample training data set to obtain target parameters and target weights; and a metal ingot surface defect target detection network model is constructed based on the target parameters and target weights.

[0038] It should be noted that the present application constructs a sample training data set by the following method: First, collect metal ingot sample images, and classify waste ingots with scum, burrs, unevenness, and dripping according to the defect type. Second, collect multiple metal ingot sample images, and manually annotate the collected image data. It should be noted that (1) the feature saliency priority principle is adopted to determine the local feature area that meets the preset visual saliency requirements in the preprocessed metal ingot image, and only the local feature area that meets the preset visual saliency requirements is annotated with the minimum circumscribed rectangular box. This method can reduce the annotation workload while ensuring that the model can learn the most important features. (2) It is necessary to annotate the positive and negative samples at the same time, that is, in addition to annotating the defects, it is also necessary to annotate the normal qualified metal ingots. (3) Since the metal skin attached to the metal ingot surface will be detected as a defect, thereby affecting the recognition judgment, the metal skin needs to be annotated so that the model can learn its features to distinguish it from the slag.

[0039] By constructing a sample data set, this application enables the model to be exposed to richer sample features and changes during the training process, thereby improving the generalization detection capability of the metal ingot surface defect target detection network model for metal ingot defects of different types and in different environments, and enabling the metal ingot surface defect target detection network model to more accurately identify various defects in practical applications.

[0040] S103, preprocessing each of the deep metal ingot images to obtain a plurality of preprocessed deep metal ingot images.

[0041] It should be noted that each RGB metal ingot image is enhanced by any one of the following methods, wherein the enhancement methods include: affine transformation, Mosaic enhancement, random HSV (Hue, Saturation, Value) enhancement, and the like.

[0042] It is further explained that the depth metal ingot image is filtered using mean filtering to eliminate the noise in the depth data. For example, for the pixel with coordinates (X, Y) in the depth metal ingot image, the result of using mean filtering of the k×k neighborhood is:

[0043] in, is the grayscale value of the pixel with coordinates (x, y) after mean filtering, k is the size of the neighborhood, a k×k neighborhood means a square area with (x, y) as the center and r pixels extending up, down, left, and right, r is the neighborhood radius, that is, the distance from the center pixel to the edge, r = (K-1) / 2. i and j are the offsets relative to the center pixel (x, y) in the neighborhood, and the value ranges of i and j are -r to r, respectively.

[0044] It should be understood that due to the large imaging range of the camera, the detection is focused on the surface depth data of a single or a group of metal ingots in the metal melting and casting line, and the ROI cropping algorithm is used to crop the filtered depth metal ingot image to remove the depth data of the metal ingots in other positions. The cropping height is the height of a mold plus the gap height as the cropped sub-image height, and the cropping width is the mold width to ensure that the cropped sub-image is consistent with the original image data in the coordinate system, that is, the pixel coordinates of the cropped sub-image correspond to the pixel coordinates of the corresponding position in the original image. In this way, the data can be accurately located and associated in subsequent analysis and processing.

[0045] S104, respectively acquiring metal ingot surface depth data and a plurality of zero crossing points of curvature changes according to each of the preprocessed depth metal ingot images, and obtaining the surface space defect confidence of the image of the metal ingot 208 to be tested according to the metal ingot surface depth data and the zero crossing points of the curvature changes.

[0046] In one embodiment, the depth data of each of the zero-crossing points and the curvature intensity value of each of the zero-crossing points are obtained, and the average depth is determined based on the depth data of each of the zero-crossing points; a plurality of absolute deviation values ​​are obtained based on the depth data of each of the zero-crossing points and the average depth; each of the absolute deviation values ​​and each of the curvature intensity values ​​are normalized to obtain the surface space defect confidence.

[0047] It should be noted that the curvature change is detected by the LoG operator. The LoG (Laplacian of Gaussian) operator is a commonly used image edge detection operator that indirectly reflects edge information such as the concave and convex changes of the deep metal ingot image by detecting the zero crossing point of the second-order derivative in the image, as shown in the following formula:

[0048] in, is the value of the Gaussian-Laplacian operator at the point (x, y), which is used to detect edges and curvature changes in the deep metal ingot image; x and y represent coordinate variables in the two-dimensional space, corresponding to the pixel positions in the deep metal ingot image, e is the base of the Gaussian function, which is a constant value, and σ is the standard deviation of the Gaussian kernel. It should be noted that this application sets the Gaussian kernel standard deviation σ to 1.5 according to the surface defect size of the metal ingot. After convolving the deep metal ingot image with the LoG operator, multiple zero crossing points are obtained, which reflects the change in image curvature.

[0049] It is further explained that the depth data of the metal ingot surface is obtained by a depth camera, where each pixel value in the depth data represents the distance between the position and the camera. The LoG operator is used to detect the zero crossing points of the curvature change to locate the concave and convex edges. The depth data of each zero crossing point is combined with the absolute deviation from the average depth, and the absolute value of the curvature intensity at the zero crossing point. The depth deviation and the curvature intensity are fused with a weight of 6:4 to generate a comprehensive index. The comprehensive index is normalized to the range of 0~1 to obtain the confidence level of the spatial defect type.

[0050] Among them, the degree of unevenness of the metal ingot surface is obtained by calculating the absolute deviation of the depth of each point from the average depth, and the significance of the defect is reflected by calculating the absolute value of the curvature intensity at the zero crossing point.

[0051] It should be noted that by accurately locating the concave and convex edges on the surface of the metal ingot and combining the depth data and curvature intensity to generate the confidence of the spatial defect type, the accuracy and reliability of the model for defect detection are further improved.

[0052] In one embodiment, the thickness of the metal ingot 208 to be tested is calculated according to the average depth. If the thickness of the metal ingot 208 to be tested is lower than a preset thickness threshold, the metal ingot 208 to be tested is determined to be a waste ingot.

[0053] It should be noted that the average depth is the ratio of the total depth value of the depth data in the standard position to the number of effective pixels. The current average depth minus the average depth of the standard position when the mold is empty is the thickness value of the metal ingot. If the average thickness of the metal ingot is lower than the target threshold, the metal ingot surface defect confidence analysis is ignored, and the metal ingot is directly determined as a waste ingot. If the metal ingot is determined to be a waste ingot, the waste ingot is directly removed from the production line through the control module 206, and no comprehensive confidence judgment is performed.

[0054] S105, obtaining the comprehensive confidence of the metal ingot 208 to be tested according to the surface defect type confidence and the surface space defect confidence. If the comprehensive confidence exceeds a preset fusion threshold, determining that the metal ingot 208 to be tested is a waste ingot.

[0055] In one embodiment, a first product value of a first weight value and the surface defect type confidence, and a second product value of a second weight value and the surface space defect confidence are obtained; and a comprehensive confidence of the metal ingot 208 to be tested is determined based on the sum of the first product value and the second product value.

[0056] The comprehensive confidence of each defect type is calculated by combining the surface defect type confidence of the metal ingot surface RGB image and the spatial defect type confidence of the depth image. The calculation method is shown in the following formula:

[0057] Among them, C is the comprehensive confidence, is the first weight value, is the second weight value.

[0058] In the embodiment of the present application, the =0.6 and =0.4, and the preset fusion threshold is set to 0.8. When the comprehensive confidence exceeds the preset fusion threshold, it is determined that the metal ingot 208 to be tested has effective defects, and the metal ingot is determined to be a waste ingot, and then a rejection command is output, and the waste ingot rejection device is linked to reject the waste ingot from the production line. In other embodiments, the weight value and the preset fusion threshold can be dynamically adjusted through the historical data of the production site, which is not limited in this embodiment of the present application.

[0059] The metal ingot quality inspection method provided in this embodiment obtains a comprehensive confidence based on the surface defect type confidence and the surface space defect confidence, and inspects the metal ingot 208 to be inspected according to the comprehensive confidence, thereby improving the inspection efficiency, effectively reducing the possibility of missed inspection, and improving production efficiency and product quality.

[0060] Example 2 In addition, if Figure 2As shown, the embodiment of the present application provides a quality inspection system 200 based on metal ingots, and the system includes: a data acquisition module 201, an image processing module 202, a defect recognition module 203, a positioning module 204, a communication module 205 and a control module 206; the data acquisition module 201 is used to obtain RGB metal ingot images and depth metal ingot images, and send each of the RGB metal ingot images and the depth metal ingot images to the image processing module 202; the image processing module 202 is used to preprocess the depth metal ingot images and construct a sample training data set; the defect recognition module 203 is used to obtain surface space defect confidence according to the preprocessed depth metal ingot images, and obtain the surface space defect confidence according to the sample training data set A metal ingot surface defect target detection network model is obtained, and a surface defect type confidence is obtained according to the metal ingot surface defect target detection network model, a comprehensive confidence of the metal ingot 208 to be tested is obtained according to the surface defect type confidence and the surface space defect confidence, and whether the metal ingot 208 to be tested is a waste ingot is determined according to the comprehensive confidence; the positioning module 204 is used to obtain the position information of the metal ingot 208 to be tested in the image of the metal ingot 208 to be tested; the communication module 205 is used to send a control signal according to the judgment result of the metal ingot 208 to be tested; the control module 206 is used to perform a retention or elimination operation on the metal ingot 208 to be tested according to the position information of the image of the metal ingot 208 to be tested and the control signal.

[0061] It should be noted that the system also includes a human-computer interaction module, which is used for the operator operation interface, and the operator operation interface includes monitoring and parameter modification functions.

[0062] It is further explained that the control module 206 is a PLC (Programmable Logic Controller), which performs retention or rejection operations on the metal ingots 208 to be tested on the production line by receiving valid signals and control signals.

[0063] In one embodiment, if Figure 3As shown, the system also includes: an ingot casting machine 207; the data acquisition module 201 includes: a camera group 2013, two lighting lamps 2011, an image transmission device 2012 and a fixed bracket 2014; the camera group 2013 includes: an RGB camera and a depth camera; the fixed bracket 2014 spans over the ingot casting machine 207, and the RGB camera and the depth camera are respectively mounted on the top of the fixed bracket 2014, and are respectively arranged above the metal ingot 208 to be tested; the two lighting lamps 2011 are respectively mounted on the fixed bracket 2014, and are arranged on both sides of the RGB camera and the depth camera; the image transmission device 2012 is used to obtain the RGB metal ingot image and the depth metal ingot image corresponding to each image of the metal ingot 208 to be tested, and send each of the RGB metal ingot image and the depth metal ingot image to the image processing module 202.

[0064] It should be noted that the lighting lamp 211 is a diffuse reflection fluorescent lamp, which uses two diffuse reflection fluorescent lamps to illuminate the surface of the metal ingots on the assembly line at a low angle and oblique angle. Through strong light irradiation, the influence of light on defect detection caused by the alternation of day and night, weather changes and personnel movement can be avoided.

[0065] In one embodiment, the positioning module 204 is also used to determine whether the metal ingot 208 to be tested is located at a preset standard position. If the metal ingot 208 to be tested is located at the preset standard position, a valid signal is sent to the communication module 205; the communication module 205 is also used to send a control signal to the control module 206 according to the valid signal.

[0066] It should be noted that, assuming that the metal ingots in the assembly line are divided into the 1st block / group, the 2nd block / group, the 3rd block / group, ..., the n-1th block / group, the nth block / group, and the n+1th block / group according to the production order. Under the lens, there may be the n-2th block / group, the n-1th block / group, the nth block / group, and the n+1th block / group of metal ingots at the same time. In the lens, a position that can just completely accommodate 1 block / group of ingots is designated as the standard position. If and only if the nth block / group is completely exposed to the standard position as the assembly line proceeds, the recognition result and ingot removal signal of the nth block / group are valid signals at this moment, and the recognition result and ingot removal signal of the nth block / group will be shielded at other times.

[0067] Furthermore, a "partition" label is set in the training recognition model to train the model to learn the characteristics of the "partition" between adjacent metal ingots. Whether the nth block / group is completely exposed in the standard position can be judged by whether the "partition" is recognized in the standard position. If there is a "partition" in the standard position, the nth block / group is not completely exposed in the standard position.

[0068] This application sets the judgment criteria by setting standard positions to meet the timing and counting requirements of recognition detection and reduce the occurrence of missed detections during the recognition process.

[0069] It can be understood that when it is determined that the defect confidence of the nth block / group of metal ingots is higher than the set threshold, and when the nth block / group is in the standard position and the mark changes from 1 to 0, and the falling edge of the metal ingot position mark is identified, an ingot removal signal is sent to the control module 206 through the communication module 205, and the control module 206 will delay according to the preset number and accurately remove the ingots to be removed.

[0070] The metal ingot-based quality inspection system 200 provided in this embodiment detects the metal ingot 208 to be inspected through the defect recognition module 203, thereby improving the inspection efficiency, and obtains the effective position of the metal ingot 208 to be inspected through the positioning module 204. The modules are linked to realize the automatic removal of waste ingots, effectively reducing the possibility of missed inspections and improving production efficiency and product quality.

[0071] Example 3 In addition, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program runs on the processor, the quality detection method based on metal ingots provided in Example 1 is executed.

[0072] For details, see Figure 4 The electronic device 400 includes: a transceiver 401, a bus interface and a processor 402, wherein the processor 402 is used to: collect RGB metal ingot images and depth metal ingot images corresponding to each metal ingot 208 to be tested on the melting and casting production line; Preprocessing each of the RGB metal ingot images and each of the depth metal ingot images respectively to obtain a plurality of preprocessed RGB metal ingot images and a plurality of preprocessed depth metal ingot images; Constructing an improved YOLO V5 defect detection model, obtaining a metal ingot surface defect target detection network model according to the improved YOLO V5 defect detection model, inputting each of the preprocessed RGB metal ingot images into the metal ingot surface defect target detection network model, and obtaining a surface defect type confidence; Acquire metal ingot surface depth data and a plurality of zero crossing points of curvature changes according to each of the preprocessed depth metal ingot images, and obtain surface space defect confidence according to the metal ingot surface depth data and each of the zero crossing points of curvature changes; The comprehensive confidence of the metal ingot 208 to be tested is obtained according to the surface defect type confidence and the surface space defect confidence. If the comprehensive confidence exceeds a preset fusion threshold, it is determined that the metal ingot 208 to be tested is a waste ingot.

[0073] In one embodiment, the processor 402 is further configured to: acquire a plurality of metal ingot sample images, perform labeling processing on each of the metal ingot sample images, and construct a sample training data set according to the labeled metal ingot sample images; The improved YOLO V5 defect detection model is trained using the sample training data set to obtain target parameters and target weights; The metal ingot surface defect target detection network model is constructed according to the target parameters and target weights.

[0074] In one embodiment, the processor 402 is further configured to: obtain depth data of each of the zero crossing points and a curvature intensity value of each of the zero crossing points, and determine an average depth according to the depth data of each of the zero crossing points; Acquire a plurality of absolute deviation values ​​according to the depth data of each zero crossing point and the average depth; Each of the absolute deviation values ​​and each of the curvature intensity values ​​is normalized to obtain the surface space defect confidence.

[0075] In one embodiment, the processor 402 is further used to: calculate the thickness value of the metal ingot 208 to be tested according to the average depth, and if the thickness value of the metal ingot 208 to be tested is lower than a preset thickness threshold, determine that the metal ingot 208 to be tested is a waste ingot.

[0076] In one embodiment, the processor 402 is further configured to: obtain a first product value of a first weight value and the surface defect type confidence, and a second product value of a second weight value and the surface space defect confidence; The comprehensive confidence of the metal ingot 208 to be tested is determined according to the sum of the first product value and the second product value.

[0077] In the embodiment of the present application, the electronic device 400 further includes a memory 403. Figure 4 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically connecting various circuits of one or more processors represented by processor 402 and memory represented by memory 403. The bus architecture may also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 401 may be a plurality of components, i.e., including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 402 is responsible for managing the bus architecture and general processing, and the memory 403 may store data used by the processor 402 when performing operations.

[0078] The electronic device 400 provided in the embodiment of the present application can execute the steps of the quality detection method based on metal ingots provided in the above method embodiment 1, which will not be described again here to avoid repetition.

[0079] The electronic device provided in this embodiment obtains a comprehensive confidence based on the surface defect type confidence and the surface space defect confidence, and detects the metal ingot 208 to be tested based on the comprehensive confidence, thereby improving the detection efficiency, effectively reducing the possibility of missed detection, and improving production efficiency and product quality.

[0080] Example 4 The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the quality detection method based on metal ingots provided in Example 1 is implemented.

[0081] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0082] The computer-readable storage medium provided in this embodiment can implement the quality detection method based on metal ingots provided in Example 1, and will not be described again here to avoid repetition.

[0083] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.

[0084] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0085] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A quality detection method based on metal ingots, characterized in that: The method comprises: Collecting RGB metal ingot images and depth metal ingot images corresponding to each metal ingot to be tested on the melting and casting production line; An improved YOLO V5 defect detection model is constructed, a metal ingot surface defect target detection network model is obtained according to the improved YOLO V5 defect detection model, and each of the collected RGB metal ingot images is input into the metal ingot surface defect target detection network model to obtain a surface defect type confidence; Preprocessing each of the deep metal ingot images to obtain a plurality of preprocessed deep metal ingot images; Acquire metal ingot surface depth data and a plurality of zero crossing points of curvature changes according to each of the preprocessed depth metal ingot images, and obtain surface space defect confidence according to the metal ingot surface depth data and each of the zero crossing points of curvature changes; The comprehensive confidence of the metal ingot to be tested is obtained according to the surface defect type confidence and the surface space defect confidence. If the comprehensive confidence exceeds a preset fusion threshold, it is determined that the metal ingot to be tested is a waste ingot.

2. The quality detection method based on metal ingots according to claim 1 is characterized in that: The metal ingot surface defect target detection network model is obtained according to the improved YOLO V5 defect detection model, including: Acquire a plurality of metal ingot sample images, perform labeling processing on each of the metal ingot sample images, and construct a sample training data set according to the labeled metal ingot sample images; The improved YOLO V5 defect detection model is trained using the sample training data set to obtain target parameters and target weights; The metal ingot surface defect target detection network model is constructed according to the target parameters and target weights.

3. The quality detection method based on metal ingots according to claim 1 is characterized in that: The obtaining of surface space defect confidence according to the metal ingot surface depth data and the zero crossing points of each curvature change comprises: Acquire the depth data of each zero-crossing point and the curvature intensity value of each zero-crossing point, and determine the average depth according to the depth data of each zero-crossing point; Acquire a plurality of absolute deviation values ​​according to the depth data of each zero crossing point and the average depth; Each of the absolute deviation values ​​and each of the curvature intensity values ​​is normalized to obtain the surface space defect confidence.

4. The quality detection method based on metal ingots according to claim 3 is characterized in that: The method further comprises: The thickness of the metal ingot to be measured is calculated according to the average depth. If the thickness of the metal ingot to be measured is lower than a preset thickness threshold, it is determined that the metal ingot to be measured is a waste ingot.

5. The quality inspection method based on metal ingots according to claim 1, characterized in that: The step of obtaining the comprehensive confidence of the metal ingot to be tested according to the surface defect type confidence and the surface space defect confidence comprises: Obtaining a first product value of a first weight value and the surface defect type confidence, and a second product value of a second weight value and the surface space defect confidence; The comprehensive confidence of the metal ingot to be tested is determined according to the sum of the first product value and the second product value.

6. A quality inspection system based on metal ingots, characterized in that: The system includes: a data acquisition module, an image processing module, a defect recognition module, a positioning module, a communication module and a control module; The data acquisition module is used to obtain the RGB metal ingot image and the depth metal ingot image corresponding to each metal ingot image to be tested, and send each of the RGB metal ingot image and the depth metal ingot image to the image processing module; The image processing module is used to preprocess the deep metal ingot image and construct a sample training data set; The defect recognition module is used to obtain the surface space defect confidence according to the preprocessed deep metal ingot image, obtain the metal ingot surface defect target detection network model according to the sample training data set, and obtain the surface defect type confidence according to the metal ingot surface defect target detection network model, obtain the comprehensive confidence of the metal ingot to be tested according to the surface defect type confidence and the surface space defect confidence, and judge whether the metal ingot to be tested is a scrap ingot according to the comprehensive confidence; The positioning module is used to obtain the position information of the metal ingot to be tested in the image of the metal ingot to be tested; The communication module is used to send a control signal according to the judgment result of the metal ingot to be tested; The control module is used to perform a retaining or rejecting operation on the metal ingot to be tested according to the position information of the image of the metal ingot to be tested and the control signal.

7. The metal ingot-based quality inspection system according to claim 6, characterized in that: The system further comprises: an ingot casting machine; the data acquisition module comprises: a camera group, two lighting lamps, an image transmission device and a fixing bracket; The camera group includes an RGB camera and a depth camera; The fixed support spans above the ingot casting machine, and the RGB camera and the depth camera are respectively installed on the top of the fixed support and are respectively arranged above the metal ingot to be tested; The two lighting lamps are respectively mounted on the fixing brackets and are arranged on both sides of the RGB camera and the depth camera; The image transmission device is used to obtain the RGB metal ingot image and the depth metal ingot image corresponding to each metal ingot image to be tested, and send each of the RGB metal ingot image and the depth metal ingot image to the image processing module.

8. The metal ingot-based quality inspection system according to claim 6, characterized in that: The positioning module is further used to determine whether the metal ingot to be tested is located at a preset standard position, and if the metal ingot to be tested is located at the preset standard position, send a valid signal to the communication module; The communication module is further configured to send a control signal to the control module according to the effective signal.

9. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the quality detection method based on metal ingots according to any one of claims 1 to 5.

10. A computer storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed on a processor, the quality detection method based on metal ingots according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Garbage classified collection and transportation supervision method based on deep learning

    CN116030376A

  • Wood board defect online detection method based on yov8 binocular vision

    CN119067920A

  • Production line aluminum alloy ingot surface defect detection method, device and system and storage medium

    CN119671975A

  • Vision inspection system using distance learning of product defect image

    WO2022065621A1

  • Linear array camera-based copper surface defect detection method and apparatus

    WO2023168972A1

Cited By

  • Bullet train axle box defect detection method, system and equipment based on image recognition

    CN120912619A

  • Image recognition-based bullet train axle box defect detection method, system and device

    CN120912619B

  • Slm printing defect detection and repair method and system based on deep learning network

    US12430746B2