Anode copper plate defect detection method and system based on deep learning
By using deep learning technology to preprocess and detect cracks in the front, top, and side views of the anode copper plate, the shortcomings of manual inspection are overcome, achieving efficient and automated defect detection and improving the production efficiency of refined copper.
Patent Information
- Application Number
- CN202310523144.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-05-10
AI Technical Summary
In existing technologies, defect detection of anode copper plates relies on manual inspection, which is labor-intensive and prone to missed or incorrect detections, making it impossible to achieve efficient quality inspection.
A deep learning-based approach is adopted. The front view, top view and side view of the anode copper plate are obtained for preprocessing. Edge extraction algorithm and Gaussian filtering are used to remove noise. Crack detection is performed by combining deformable convolutional network. Different weights are assigned according to the crack location and a detection report is output.
It has achieved automated and intelligent detection of defects in anode copper plates, improved detection efficiency, reduced missed and false detections, supported industrial-level computing power and traceable remelting, and improved the yield of refined copper.
Smart Images

Figure CN116630251B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of anode copper quality detection, and particularly relates to an anode copper plate defect detection method and system based on deep learning. BACKGROUND
[0002] With the continuous development of industry towards modernization and intelligence, the copper industry, as one of the pillar industries of industry, is also booming and requires to reduce manual work and realize intelligent and efficient production. In the electrolytic refining process of copper, first, part of the impurities is removed by using crude copper, and anode copper is cast, and then electrolytic refining is carried out, and cathode copper, i.e. refined copper, is cast. As an intermediate product, anode copper plays an important role in the production of refined copper. The ear contact area of anode copper plate, the spacing between adjacent two anode copper plates, and the ear load-bearing performance of anode copper plate determine the precipitation rate of refined copper. At present, the defect detection of anode copper mainly relies on manual work. When the quality of anode copper is evaluated, the detector needs to visually determine the waste plate of each anode copper plate, which is labor-intensive and prone to missed detection and misjudgment. Therefore, how to batch and real-time process the related defects of anode copper plate has become a problem to be solved. SUMMARY
[0003] In order to solve the above technical problems, the present application provides an anode copper plate defect detection method and system based on deep learning.
[0004] The technical solution of the present application is as follows: an anode copper plate defect detection method based on deep learning, comprising:
[0005] Step S1: obtaining the front view, top view and side view of the anode copper plate, pre-processing, and obtaining the edge graph of the front view, top view and side view respectively;
[0006] Step S2: judging whether the ear of the anode copper plate is bent according to the edge graph of the front view, top view and side view, and judging whether the body of the anode copper plate is a conical plate according to the edge graph of the side view;
[0007] Step S3: inputting the front view, top view and side view into an anode copper plate defect detection network, detecting crack defects, and assigning different weights according to the crack position, and finally outputting a detection report.
[0008] Compared with the prior art, the present application has the following advantages:
[0009] 1. This invention discloses a deep learning-based defect detection method for anode copper plates. Users can obtain corresponding analysis reports by taking three views of the anode copper plate with their mobile phones and uploading them. The method of this invention can be used on a server-side small computer that supports edge AI inference computation. Users only need to connect their mobile phones and the small computer (acting as a server) to the same local area network to achieve industrial-grade computing power.
[0010] 2. The method provided by this invention utilizes deep learning to achieve traceable and efficient defect detection of anode copper plates. Waste plates are set with hyperparameters according to the relevant requirements of the enterprise, and after comprehensive evaluation, it is determined whether they need to be recycled. This maximizes the utilization of anode copper plates and improves the yield of refined copper. Attached Figure Description
[0011] Figure 1 This is a flowchart of a deep learning-based defect detection method for anode copper plates in an embodiment of the present invention;
[0012] Figure 2A This is a schematic diagram of the main view of the anode copper plate in an embodiment of the present invention;
[0013] Figure 2B This is a schematic top view of the anode copper plate in an embodiment of the present invention;
[0014] Figure 2C This is a schematic side view of the anode copper plate in an embodiment of the present invention;
[0015] Figure 3 This is a structural block diagram of a deep learning-based defect detection system for anode copper plates according to an embodiment of the present invention. Detailed Implementation
[0016] This invention provides a deep learning-based method for detecting defects in anode copper plates, which modernizes and automates the detection of defects in anode copper plates, fills a gap in the field of anode copper plate quality inspection, and improves the production efficiency of copper plates.
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below through specific implementations and in conjunction with the accompanying drawings.
[0018] Example 1
[0019] like Figure 1 As shown in the figure, an embodiment of the present invention provides a method for detecting defects in anodized copper plates based on deep learning, comprising the following steps:
[0020] Step S1: Obtain the front view, top view, and side view of the anode copper plate, perform preprocessing, and obtain the edge maps of the front view, top view, and side view respectively;
[0021] Step S2: judging whether the ear part of the anode copper plate is bent according to the edge maps of the front view, the top view and the side view, and judging whether the body of the anode copper plate is a tapered plate according to the edge map of the side view;
[0022] Step S3: inputting the front view, the top view and the side view into the anode copper plate defect detection network, detecting the crack defects, assigning different weights according to the crack positions, and finally outputting a detection report.
[0023] In one embodiment, the above step S1: obtaining the front view, the top view and the side view of the anode copper plate, and pre-processing to obtain the edge maps of the front view, the top view and the side view, specifically includes:
[0024] Step S11: obtaining the front view, the top view and the side view of the anode copper plate;
[0025] Firstly, the user obtains the front view, the top view and the side view of the anode copper plate by taking pictures of the anode copper plate, as shown in FIGS. Figure 2A 、 2B and 2C.
[0026] Step S12: removing the noise in the front view, the top view and the side view by using the Gaussian filter method to obtain the filtered front view, top view and side view;
[0027] In the embodiment of the application, the Gaussian filter is used to remove the noise in the three views. The Gaussian filter is a linear smoothing filter, and the template of the filter is obtained by discretizing a two-dimensional Gaussian function. Since the center value of the Gaussian template is the largest and gradually decreases around the center, the filtered result is better than that of the average filter.
[0028] Step S13: binarizing the filtered front view, top view and side view by using the threshold method, and performing morphological processing again by using the opening and closing operation to obtain the binary map of the front view, the top view and the side view;
[0029] The threshold method is used to obtain the foreground of the image as the white part and the background as the black part. In order to further refine the processing, the opening and closing operation is used to perform morphological processing on the image, so as to obtain a more accurate foreground and background binary map.
[0030] Step S14: performing edge extraction on the binary map by using an edge extraction algorithm to obtain the edge map of the front view, the top view and the side view, and the pixel value is 0 or 1, 1 representing the edge and 0 representing the non-edge.
[0031] Finally, the edge extraction algorithm is used to extract the edge of the binary map, and finally the edge map of the anode copper plate is obtained, and the pixel value of the image only exists in two types of values "0" and "1".
[0032] In actual production, when the ears of the anode copper plate bend, the anode copper plate may accidentally fall during transport by forklift or on the assembly line, causing significant damage to related machinery. If the anode copper plate is conical, meaning its thickness is uneven during casting and condensation, excessively thick anode copper plates may short-circuit during the electrolytic deposition of cathode copper, while excessively thin anode copper plates will affect the copper precipitation rate. Therefore, this invention uses edge views of the anode copper plate from three perspectives to determine whether there are defects in the plate body and ears.
[0033] In one embodiment, step S2 above—determining whether the ear of the anode copper plate is bent based on the edge views of the front view, top view, and side view, and determining whether the plate body of the anode copper plate is a tapered plate based on the edge view of the side view—specifically includes:
[0034] Step S21: Based on the edge diagram of the main view, calculate the angle between the ear of the anode copper plate and the horizontal plane, and compare it with a predetermined threshold. Plates exceeding the threshold are judged as scrap plates.
[0035] from Figure 2A As can be seen from the main view, there is a certain angle between the ear of the anode copper plate and the horizontal plane. By measuring this angle and comparing it with the threshold set by the copper plant, the anode copper plate with an angle between the ear and the horizontal plane exceeding the threshold is judged as a scrap plate.
[0036] Step S22: Based on the edge diagram of the top view, determine whether the ear edge of the anode copper plate is on a straight line and parallel to the horizontal plane with the edge of the plate body. If not, it means that there is ear bending and the plate is judged as a waste plate.
[0037] from Figure 2B As can be seen from the top view, the edge of the ear of the anode copper plate should be in a straight line with the edge of the plate body and parallel to the horizontal plane; otherwise, it is a scrap plate.
[0038] Step S23: Based on the edge diagram of the side view, determine whether the edge of the anode copper plate is two parallel straight lines. If not, it is determined to be a conical plate.
[0039] from Figure 2C As can be seen from the side view, the edge of the ear of the anode copper plate forms a straight line with the edge of the plate body and is perpendicular to the ground; otherwise, it is judged as a waste plate. At the same time, it can also be seen from the side view that if the two edges of the anode copper plate body are not two parallel straight lines, the anode copper plate is judged to be a conical plate.
[0040] In this embodiment of the invention, least squares regression and Hough transform are performed on the edge image of the anode copper plate to determine whether it is a straight line. Simultaneously, the length of the straight line and its corresponding angle are set to determine the angle between the ear of the anode copper plate and the horizontal plane.
[0041] The present application detects three views of the anode copper plate, and makes a final determination combined with the detection results of the three views. Taking the front view as an example, it is impossible to determine whether the anode copper plate is a conical plate only by relying on the front view. The conical plate is mainly determined by the side view. The ear bending phenomenon can be determined from the three views. As long as any one view shows the ear bending phenomenon, even if the remaining views do not detect the ear bending due to the limited viewing angle, it will be determined as a waste plate.
[0042] In addition, the anode copper plate may have cracks, which will also affect production. For example, when the ear of the anode copper plate has a crack, the ear of the anode copper plate is broken due to poor load-bearing performance during electrolytic refining of the cathode copper, and the anode copper plate falls to the bottom of the electrolytic cell, which needs to be salvaged by manual operation of the machine in the later stage, greatly increasing the relevant cost. Therefore, the present application also detects the cracks of the anode copper plate.
[0043] In one embodiment, the above step S3: input the front view, top view and side view into the anode copper plate defect detection network, detect the crack defect, and give different weights according to the crack position, and finally output the detection report, which specifically includes:
[0044] Step S31: in the anode copper plate defect detection network, a deformable convolution is constructed. The sampling position of the deformable convolution is not fixed, an offset is added to each sampling point, and a same number of new sampling point coordinates are obtained. By learning the offset, the offset condition of the deformable convolution kernel is calculated, so that the position information and crack characteristics of the crack are combined, so that the network can detect cracks in any direction, and non-vertical crack detection frame prediction is realized.
[0045] For the existing target detection task, the main method is to input a single picture to detect the target to be detected, and the detection frame is usually a vertical rectangular target detection frame. In the anode copper plate crack detection task of the present application, the crack is usually a linear defect extending in a certain direction, therefore, the present application constructs a non-vertical target detection frame to adapt to the anode copper plate crack detection.
[0046] The crack detection of the embodiment of the present application mainly includes two steps: firstly, the crack target frame is positioned; and secondly, the crack target frame is classified. Different from the existing two-stage target detection algorithm, the deformable convolution is introduced, that is, the sampling position of convolution is not fixed, an offset is added to each sampling point, a same number of new sampling coordinates are obtained, if the offset is a decimal, the value is obtained by using the bilinear interpolation method; generally, the angle of the detection frame is predicted by avoiding the prediction angle, but the point set obtained by positioning is regressed, so that the prediction of the non-vertical target detection frame is realized. The offset is learned by training the neural network, which can be used to represent the specific convolution kernel calculation offset, and the position information and the crack features are combined. The backbone of the anode copper plate defect detection network is the FPN network, and the extracted feature maps are used for crack positioning and classification. Each point of the feature map represents a point set. The positioning is firstly obtained by the offset generated by the deformable learning to obtain the coordinate position of the corresponding point set, and then the directional conversion function is used to select four sampling points closest to the corresponding real value in the sampling points to generate an irregular quadrilateral frame, and the positioning is further refined. The classification is to regress the target frame with cracks obtained in the positioning. If the IOU of the crack frame generated in the positioning and the real crack frame is greater than 0.5, it is considered that there is a crack. For the loss function, the smoothL1loss is used in the positioning stage, and the focalloss is used in the classification stage.
[0047] Step S32: the main view, the top view and the side view are subjected to the anode copper plate defect detection network, the positions of the cracks are output, different weights are given to different cracks by combining the crack weight fingerprint library, and finally the total confidence of the anode copper plate is calculated by combining the crack correlation in the three views, and the anode copper plate with a confidence higher than a preset threshold is determined as a waste plate.
[0048] Since the cracks in the three views have correlation: ① the cracks in the ear part of the anode copper plate are more dangerous than the cracks in the body part, and need to be given higher weights. Different weights need to be given to the cracks in different view positions; ② if there is a crack in one view, and the crack length at the corresponding position in any view is greater than the crack length set value allowed by the copper factory, the anode copper plate is directly determined as a waste plate and is remelted and recast; ③ for the anode copper plate determined as a waste plate, the crack position is framed in the corresponding position of the related view of the anode copper plate.
[0049] In addition, based on the prediction result frame of the crack obtained by the anode copper plate defect detection network, the application also constructs a crack weight fingerprint library to set the weight of the detected crack. The crack weight fingerprint library is at the corresponding position of the ear part in the three view images of the anode copper plate. Different grids are divided to calibrate the influence degree of the crack on the anode copper plate. The closer to the ear part position, the greater the corresponding weight in the fingerprint library. The result of the crack target detection is weighted and summed with the fingerprint library weight to obtain the crack influence degree value. In combination with the crack correlation condition in the three view images, the total confidence of the waste plate is threshold set to obtain the final anode copper plate crack detection result. If the total confidence is greater than the set threshold, the waste plate is determined.
[0050] Step S33: mark the position of the crack in the side view corresponding to the waste plate in step S32. Output the related position information in the detection report for later tracking and tracing of the waste plate for remelting and remanufacturing.
[0051] If the anode copper plate is determined as a waste plate in step S32, the position of the crack in the side view of the anode copper plate needs to be marked, and the batch number of the anode copper plate is recorded. Subsequently, the staff can split the batch of anode copper plates according to the record to take out the waste plate according to the detection result, so that the detection process of the anode copper plate can be traced.
[0052] The application introduces deformable convolution to construct a non-vertical target detection frame to adapt to anode copper plate crack detection. In addition, the anode copper plate defect detection network of the application combines three views with different angles to detect cracks, and realizes a single target recognition task across different angles.
[0053] The application adopts JetsonXvaierNX to realize the anode copper plate defect detection method. JetsonXvaierNX has a 6-core NVIDIA Carmel ARM64-bit CPU and a 384-core NVIDIA Volta GPU with 48 Tensor Cores. It is a powerful AI development board that can run multiple modern neural networks in parallel and process high-resolution data from multiple sensors at the same time, and supports all general AI frameworks. At the same time, JetsonXavierNX supports Linux system, can run python file, realizes image processing algorithm, can form report in real time, and users can see the processing result in real time on mobile terminal.
[0054] The application discloses an anode copper plate defect detection method based on deep learning, three views of an anode copper plate are photographed by a user through a mobile phone and are uploaded, and an analysis report corresponding to the anode copper plate can be obtained.
[0055] Embodiment two
[0056] As Figure 3 shown, the application embodiment provides an anode copper plate defect detection system based on deep learning, comprising the following modules:
[0057] A preprocessing module 41 is used for acquiring a front view, a top view and a side view of an anode copper plate, performing preprocessing, and obtaining edge maps of the front view, the top view and the side view respectively;
[0058] An image processing module 42 is used for judging whether an ear part of the anode copper plate is curved according to the edge maps of the front view, the top view and the side view, and judging whether a body of the anode copper plate is a tapered plate according to the edge map of the side view;
[0059] A crack detection module 43 is used for inputting the front view, the top view and the side view into an anode copper plate defect detection network, detecting crack defects, giving different weights according to crack positions, and finally outputting a detection report.
[0060] The above embodiments are provided only for the purpose of describing the application, and are not intended to limit the scope of the application. The scope of the application is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the application shall be encompassed within the scope of the application.
Claims
1. A deep learning-based anode copper plate defect detection method, characterized by, The method comprises the following steps: Step S1: Obtain the front view, top view and side view of the anode copper plate, and perform preprocessing to obtain the edge graph of the front view, top view and side view, respectively; Step S2: Determine whether the ear part of the anode copper plate is bent according to the edge graph of the front view, top view and side view, and determine whether the body of the anode copper plate is a tapered plate according to the edge graph of the side view, specifically comprising: Step S21: According to the edge graph of the front view, the angle between the ear part of the anode copper plate and the horizontal plane is calculated, and compared with a predetermined threshold value, and if the threshold value is exceeded, it is determined as a waste plate; Step S22: According to the edge graph of the top view, it is determined whether the edge of the ear part of the anode copper plate and the edge of the body are on a straight line and parallel to the horizontal plane, and if not, it is determined as a waste plate; Step S23: According to the edge graph of the side view, it is determined whether the edge of the body of the anode copper plate is two parallel straight lines, and if not, it is determined as a tapered plate; Step S3: Input the front view, top view and side view into the anode copper plate defect detection network, detect the crack defects, and assign different weights according to the crack positions, and finally output a detection report, specifically comprising: Step S31: In the anode copper plate defect detection network, a deformable convolution is constructed, the sampling position of the deformable convolution is not fixed, an offset is added to each sampling point, and a same number of new sampling point coordinates are obtained; by learning the offset, the offset condition of the deformable convolution kernel is calculated, thereby combining the position information of the crack and the crack feature, so that the network can detect cracks in any direction, and non-vertical crack detection frame prediction is realized; Step S32: The front view, top view and side view are input into the anode copper plate defect detection network, the positions of the cracks are output, different weights are assigned to different cracks by combining the crack weight fingerprint library, and finally the total confidence of the anode copper plate is calculated by combining the crack correlation in the three views, and the waste plate higher than the preset threshold value is determined as a waste plate; Step S33: In the side view corresponding to the waste plate in step S32, the position of the crack is marked, and the relevant position information is output in the detection report, which is used for tracking, tracing, recycling and remanufacturing of the waste plate in the later period. 2.The deep learning-based anode copper plate defect detection method of claim 1, wherein, The step S1: obtaining the front view, top view and side view of the anode copper plate, and performing preprocessing to obtain the edge graph of the front view, top view and side view, specifically comprising: Step S11: Obtain the front view, top view and side view of the anode copper plate; Step S12: Remove the noise in the front view, top view and side view by using the Gaussian filtering method to obtain the filtered front view, top view and side view; Step S13: Perform binarization on the filtered front view, top view and side view by using the threshold method, and perform morphological processing again by using the opening and closing operation to obtain the binary graph of the front view, top view and side view; Step S14: Perform edge extraction on the binary graph by using an edge extraction algorithm to obtain the edge graph of the front view, top view and side view, and the pixel value is 0 or 1, 1 represents the edge, and 0 represents the non-edge.
3. A deep learning-based anode copper sheet defect detection system, characterized by, The method comprises the following modules: The preprocessing module 41 is configured to acquire a front view, a top view and a side view of the anode copper plate, and perform preprocessing to obtain edge maps of the front view, the top view and the side view, respectively. The image processing module 42 is configured to determine whether the ears of the anode copper plate are bent according to the edge maps of the front view, the top view and the side view, and determine whether the body of the anode copper plate is a tapered plate according to the edge map of the side view, and specifically includes the following steps: Step S21: According to the edge map of the front view, the angle between the ears of the anode copper plate and the horizontal plane is calculated and compared with a predetermined threshold value. If the angle exceeds the threshold value, the anode copper plate is determined to be a waste plate. Step S22: According to the edge map of the top view, it is determined whether the edges of the ears of the anode copper plate and the edges of the body are on a straight line and parallel to the horizontal plane. If not, the anode copper plate is determined to be a waste plate. Step S23: According to the edge map of the side view, it is determined whether the edges of the body of the anode copper plate are two parallel straight lines. If not, the anode copper plate is determined to be a tapered plate. The crack detection module 43 is configured to input the front view, the top view and the side view into an anode copper plate defect detection network, detect crack defects, and assign different weights according to crack positions, and finally output a detection report, and specifically includes the following steps: Step S31: In the anode copper plate defect detection network, a deformable convolution is constructed. The sampling positions of the deformable convolution are not fixed, and an offset is added to each sampling point to obtain the same number of new sampling point coordinates. By learning the offset, the deformable convolution kernel calculates the offset, thereby combining the position information of the crack and the crack features, so that the network can detect cracks in any direction, and realize non-vertical crack detection frame prediction. Step S32: The front view, the top view and the side view are input into the anode copper plate defect detection network, and the positions of the cracks are output. Different weights are assigned to different cracks by combining a crack weight fingerprint library, and finally the total confidence of the anode copper plate is calculated by combining the crack correlation in the three views. If the total confidence is higher than a predetermined threshold value, the anode copper plate is determined to be a waste plate. Step S33: In the side view corresponding to the waste plate in step S32, the positions of the cracks are marked, and the position information is output in the detection report, which is used for tracking, tracing, recycling and remanufacturing of the waste plate in the later stage.