High-precision copper-aluminum bar bending system based on machine vision detection

By employing an adaptive self-attention method and closed-loop control of the slider stroke, the visual inspection accuracy of copper and aluminum busbars and the precision of the bending process are improved. This solves the problems of initial positioning error and springback error of copper and aluminum busbars, and achieves high-precision bending and consistent production.

CN122033084APending Publication Date: 2026-05-15DONGGUAN BELAN AUTOMATION EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGGUAN BELAN AUTOMATION EQUIP CO LTD
Filing Date
2026-04-02
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In traditional visual inspection of copper and aluminum busbars, the extraction accuracy of edge key points and specific feature points is insufficient, the capture of visual feature spatial relationships relies on fixed patterns, and the initial position and size recognition of complex workpiece shapes are easily interfered with by image noise. Furthermore, the traditional Transformer self-attention offset term does not depend on workpiece key points, and feature aggregation lacks global correlation, resulting in large errors in the initial positioning, size measurement, and shape recognition of copper and aluminum busbars, which cannot provide accurate visual data support for bending systems. In the bending process of copper and aluminum busbars, the slider stroke lacks closed-loop feedback adjustment, the bending springback error cannot be accurately quantified and compensated, and the calculation accuracy of translation axis positioning error and rotation angle error is insufficient, resulting in low bending accuracy, poor product consistency, and difficulty in improving the pass rate of mass production.

Method used

A lightweight RetinaFace model is used to extract and normalize the coordinates of key points on the copper-aluminum busbar. An adaptive mapping function is constructed to generate a visual Transformer multi-head offset table. The offset term formula is reconstructed to introduce key point dependency. Dynamic attention is incorporated to calculate self-attention weights and achieve global feature aggregation. The intrinsic parameters of the industrial camera are calibrated using the Zhang Zhengyou calibration method. The Zernike sub-pixel algorithm is used to extract accurate edge coordinates. The Euclidean distance and cosine theorem are used to calculate the positioning and rotation angle errors. The Tent chaotic mapping is used to optimize the Elman neural network to construct an error prediction model. A mathematical model of slider stroke and bending angle is established to achieve closed-loop control of slider stroke with secondary compensation for springback.

Benefits of technology

It achieves high-precision detection and recognition of the initial position, size, and shape of copper and aluminum busbars, significantly reduces the error of key point detection and shape recognition, significantly improves the accuracy of bending forming angle and product consistency, provides rapid response of slider stroke adjustment, and achieves precise closed-loop control of the entire bending process, solving the industry pain points of copper and aluminum busbar bending positioning deviation and springback loss control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122033084A_ABST
    Figure CN122033084A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of machine vision, and particularly discloses a copper-aluminum bar high-precision bending system based on machine vision detection, which comprises an industrial camera, a free arm, a copper-aluminum bar vision detection module, a data storage module and a bending control module. According to the scheme, a lightweight RetinaFace model is adopted to extract the coordinates of the key points of the copper-aluminum bar, a self-adaptive mapping function and a self-adaptive self-attention method are constructed, and high-precision detection and recognition of the initial position, size and shape of the copper-aluminum bar are achieved; internal reference calibration of an industrial camera is completed through a Zhang Zhengyou calibration method, precise edge coordinates are extracted through a Zernike moment sub-pixel algorithm, a sliding block stroke and bending angle mathematical model is established to achieve a sliding block stroke closed-loop control method of rebound secondary compensation, and full-process closed-loop precise control of the copper-aluminum bar bending process is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision, specifically to a high-precision bending system for copper and aluminum busbars based on machine vision inspection. Background Technology

[0002] The comprehensive application of machine vision, automation control, and mechanical bending technologies in bending copper and aluminum busbars can significantly improve bending accuracy and product consistency, effectively increasing production speed. Traditional visual inspection of copper and aluminum busbars suffers from insufficient accuracy in extracting edge key points and specific feature points, reliance on fixed patterns for capturing spatial relationships of visual features, and susceptibility to image noise interference in initial position and size recognition under complex workpiece shapes. Furthermore, traditional Transformer self-attention offset terms lack workpiece key point dependence, and feature aggregation lacks global correlation, ultimately leading to large errors in initial positioning, size measurement, and shape recognition of copper and aluminum busbars, failing to provide accurate visual data support for the bending system. In the bending process of copper and aluminum busbars, the slider stroke lacks closed-loop feedback adjustment, bending springback error cannot be accurately quantified and compensated, and the accuracy of translation axis positioning error and rotation angle error calculation is insufficient. Additionally, traditional error prediction models are prone to getting trapped in local optima, and the bending angle deviates significantly from the actual forming angle, resulting in low bending accuracy, poor product consistency, and difficulty in improving batch production pass rates. Summary of the Invention

[0003] To address the aforementioned issues and overcome the shortcomings of existing technologies, this invention provides a high-precision bending system for copper and aluminum busbars based on machine vision inspection. It addresses the problems in traditional copper and aluminum busbar visual inspection, such as insufficient accuracy in extracting edge key points and specific feature points, reliance on fixed patterns for capturing visual feature spatial relationships, susceptibility to image noise interference in initial position and size recognition under complex workpiece shapes, and the lack of workpiece key point dependency in traditional Transformer self-attention offset terms and the lack of global correlation in feature aggregation. These issues ultimately lead to large errors in initial positioning, size measurement, and shape recognition of the copper and aluminum busbars, failing to provide accurate visual data support for the bending system. This solution defines the edges and specific key points of the copper and aluminum busbars, uses a lightweight RetinaFace model to extract and normalize key point coordinates, constructs an adaptive mapping function to generate a visual Transformer multi-head offset table, reconstructs the offset term formula to introduce key point dependency, and incorporates an adaptive self-attention method that integrates dynamic attention to calculate self-attention weights and completes global feature aggregation. This achieves high-precision detection and recognition of the initial position, size, and shape of the copper and aluminum busbars, as well as key point detection and shape recognition. The identification error is significantly reduced, providing a precise visual inspection data foundation for the bending process. Addressing the issues in copper and aluminum busbar bending, such as the lack of closed-loop feedback adjustment for slider stroke, inaccurate quantification and compensation for bending springback error, insufficient accuracy in calculating translation axis positioning and rotation angle errors, and the tendency of traditional error prediction models to get trapped in local optima and large deviations between the bending angle and the actual forming angle, leading to low bending accuracy, poor product consistency, and difficulty in improving batch production pass rates, this solution utilizes the Zhang Zhengyou calibration method to calibrate the intrinsic parameters of the industrial camera, the Zernike sub-pixel algorithm to extract precise edge coordinates, the Euclidean distance and cosine theorem to calculate positioning and rotation angle errors, the Tent chaotic mapping optimization sparrow search algorithm to improve the Elman neural network for constructing an error prediction model, and the establishment of a slider stroke and bending angle mathematical model to achieve secondary compensation for springback through a closed-loop control method for slider stroke. This achieves precise closed-loop control throughout the entire copper and aluminum busbar bending process, automatic compensation for bending springback error, rapid slider stroke adjustment response, and significantly improved bending forming angle accuracy and product consistency, effectively solving the industry pain points of positioning deviation and uncontrolled springback in copper and aluminum busbar bending.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a high-precision bending system for copper and aluminum busbars based on machine vision inspection. The high-precision bending system for copper and aluminum busbars based on machine vision inspection includes an industrial camera, a free arm, a copper and aluminum busbar vision inspection module, a data storage module, and a bending control module.

[0005] The industrial camera takes pictures of the copper-aluminum busbar to obtain high-precision images of the copper-aluminum busbar.

[0006] The free arm consists of a translation axis and a rotation axis, used to grip and convey copper and aluminum bars, and to adjust the position of the copper and aluminum bars;

[0007] The copper-aluminum busbar visual inspection module uses an adaptive self-attention method to accurately detect and identify the initial position, size, and shape of the copper-aluminum busbar.

[0008] The data storage module stores data during the bending process of the copper-aluminum busbar, including initial state information, bending parameters, and actual bending angle.

[0009] The bending control module performs bending actions according to preset bending angles and positions through a slider stroke closed-loop control method.

[0010] Furthermore, in the copper-aluminum busbar visual inspection module, the aforementioned adaptive self-attention method specifically includes the following steps:

[0011] Step A1: Define the key points of the copper-aluminum busbar. The key points of the copper-aluminum busbar include edge key points and specific key points. The edge key points include the center and vertex coordinates of the copper-aluminum busbar. The specific key points include the position of the copper-aluminum busbar, the current bending angle, and specific markers.

[0012] Step A3: Key point extraction. A lightweight RetinaFace model is used to extract key points from the copper-aluminum busbar image. The coordinates of the extracted key points are normalized to the [0, 1] interval. The formula used is as follows: ;

[0013] In the formula, These are the normalized coordinates of the key points of the copper-aluminum busbar. These are the coordinates of the key points of the copper-aluminum busbars before normalization. and These are the width and height of the image frame;

[0014] Step A4: Construct an adaptive mapping function, establish and initialize a visual Transformer architecture, adapt multiple attention heads and multiple layers, generate a multi-head offset table, initialize a mapping function from a specific keypoint to the offset table, and use the visual Transformer's multiple attention heads to capture different types of spatial relationships of specific keypoints to generate dynamic attention offset terms. This includes the following steps:

[0015] Step A41: Linear layer dimension expansion. Design an independent learnable linear layer for each attention head and each Transformer layer, and expand the dimension of the learnable linear layer.

[0016] Step A42: Generate a multi-head offset table by splitting the mapping function into an independent offset table for each attention head through a reshape operation;

[0017] Step A43: Independent adaptation between layers. Repeat steps A41 and A42 above for each Transformer layer to generate a mapping function specific to each Transformer layer.

[0018] Step A44: Calculate the relative relationship between the query and the keypoints based on specific keypoints, generate a dynamic attention offset term, and reconstruct the offset term formula of the traditional Transformer by introducing keypoint dependency. The formula used is as follows: ;

[0019] In the formula, This is the reconstructed offset term formula. It is a normalized set of specific key points. It is a function that maps specific keypoints to offset tables. and It is a query Patch coordinates, and It is a specific key point Patch coordinates;

[0020] Step A5: Calculate the self-attention weights. Map each patch to a feature vector of the same dimension using a linear embedding layer to generate mapped features. Incorporate the dynamic attention offset term into the self-attention weight calculation. The formula used is as follows: ; ;

[0021] In the formula, This is the adjusted self-attention score. It is the first A query vector, It is the first Transpose of each edge key point It is the vector dimension of the mapped features. It is the self-attention weight. It is the number of key points. Yes Traversal;

[0022] Step A6: Feature aggregation. The mapped features are weighted and summed using attention weights. The self-attention output is passed through layer normalization and a feedforward network to complete the calculation of a Transformer block. The outputs of the Transformer blocks are stacked to obtain the global features.

[0023] Step A7: Shape recognition, map global features to shape vectors for training, and output the initial position, size and shape of the copper-aluminum busbar.

[0024] Furthermore, in the bending control module, the slider stroke closed-loop control method specifically includes the following steps:

[0025] Step B1: Machine vision error detection. The Zhang Zhengyou calibration method is used to complete the intrinsic parameter calibration of the industrial camera. The conversion relationship between pixels and actual size is determined by calibrating the checkerboard pattern to obtain the conversion coefficient.

[0026] Step B2: Subpixel edge extraction. The Zernike moment subpixel algorithm is used to extract the edges of the copper and aluminum busbars and obtain the precise coordinates of the workpiece corner points.

[0027] Step B3: Error calculation. The translation axis positioning error is obtained by decomposing the Euclidean distance between the theoretical position and the actual position. The perpendicular coordinates are calculated based on the slope of the rectangular working area edge. The rotation angle error is calculated using the cosine theorem.

[0028] Step B4: Bending forming angle and springback error, calculate the forming angle and springback angle using the coordinates of three points on the side image;

[0029] Step B5: Construct an error prediction model, establish and initialize an Elman neural network, introduce Tent chaotic mapping to optimize the traditional sparrow search algorithm, utilize the ergodicity and randomness of the Tent chaotic sequence to generate a highly diverse initial sparrow population, avoid local optima, divide sparrows into three categories: discoverers, joiners, and scouts, iteratively update positions, and quickly converge to the global optimum, use mean squared error (MSE) as the fitness function to optimize the initial weights and thresholds of the Elman neural network;

[0030] Step B6: Bending springback compensation. Establish a mathematical model of the slider stroke and bending angle, and correct the springback error through a second bend. The formula used is as follows: ;

[0031] In the formula, It is the downward stroke of the slider. It is the width of the lower mold opening. It is the target bending angle. It is the bending radius. It is the fillet radius of the lower mold. It refers to the initial bending degree of the copper-aluminum busbar. It is the bending coefficient of copper and aluminum busbars.

[0032] The beneficial effects achieved by the present invention using the above solution are as follows:

[0033] (1) In the traditional visual inspection of copper and aluminum busbars, the extraction accuracy of edge key points and specific feature points is insufficient, the capture of visual feature spatial relationships depends on fixed patterns, the initial position and size recognition under complex workpiece shapes are easily interfered with by image noise, and the traditional Transformer self-attention offset term has no workpiece key point dependence and feature aggregation lacks global correlation, which ultimately leads to large errors in the initial positioning, size measurement and shape recognition of copper and aluminum busbars, and cannot provide accurate visual data support for the bending system. This solution defines the edges and specific key points of copper and aluminum busbars, uses a lightweight RetinaFace model to extract and normalize the key point coordinates, constructs an adaptive mapping function to generate a visual Transformer multi-head offset table, reconstructs the offset term formula to introduce key point dependence, and incorporates an adaptive self-attention method that calculates self-attention weights and completes global feature aggregation. This achieves high-precision detection and recognition of the initial position, size and shape of copper and aluminum busbars, and significantly reduces the errors in key point detection and shape recognition, providing an accurate visual inspection data foundation for the bending process.

[0034] (2) In the process of bending copper and aluminum strips, the lack of closed-loop feedback adjustment of the slider stroke, the inability to accurately quantify and compensate for bending springback error, the insufficient accuracy of translation axis positioning error and rotation angle error calculation, and the tendency of traditional error prediction models to fall into local optima and large deviation between bending angle and actual forming angle, resulting in low bending accuracy, poor product consistency, and difficulty in improving the pass rate of mass production, this solution completes the calibration of the intrinsic parameters of the industrial camera using the Zhang Zhengyou calibration method, extracts accurate edge coordinates using the Zernike sub-pixel algorithm, calculates positioning and rotation angle errors using Euclidean distance and cosine theorem, improves the Elman neural network to construct the error prediction model using the Tent chaotic mapping optimization sparrow search algorithm, and establishes a slider stroke closed-loop control method to realize secondary compensation of springback by establishing a mathematical model of slider stroke and bending angle. This achieves full-process closed-loop precise control of the bending process of copper and aluminum strips, automatic compensation of bending springback error, fast slider stroke adjustment response, and significantly improved bending forming angle accuracy and product consistency, effectively solving the industry pain points of positioning deviation and uncontrolled springback in the bending of copper and aluminum strips. Attached Figure Description

[0035] Figure 1 The present invention provides a module connection diagram for a high-precision bending system for copper and aluminum busbars based on machine vision inspection.

[0036] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation

[0037] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0038] Example 1: See Figure 1 This embodiment provides a high-precision bending system for copper and aluminum busbars based on machine vision inspection. The high-precision bending system for copper and aluminum busbars based on machine vision inspection includes an industrial camera, a free arm, a copper and aluminum busbar vision inspection module, a data storage module, and a bending control module.

[0039] The industrial camera takes pictures of the copper-aluminum busbar to obtain high-precision images of the copper-aluminum busbar.

[0040] The free arm consists of a translation axis and a rotation axis, used to grip and convey copper and aluminum bars, and to adjust the position of the copper and aluminum bars;

[0041] The copper-aluminum busbar visual inspection module uses an adaptive self-attention method to accurately detect and identify the initial position, size, and shape of the copper-aluminum busbar.

[0042] The data storage module stores data during the bending process of the copper-aluminum busbar, including initial state information, bending parameters, and actual bending angle.

[0043] The bending control module performs bending actions according to preset bending angles and positions through a slider stroke closed-loop control method.

[0044] Example 2: See Figure 1 This embodiment, based on the above embodiment, describes an adaptive self-attention method in the copper-aluminum busbar visual inspection module, specifically including the following steps:

[0045] Step A1: Define the key points of the copper-aluminum busbar. The key points of the copper-aluminum busbar include edge key points and specific key points. The edge key points include the center and vertex coordinates of the copper-aluminum busbar. The specific key points include the position of the copper-aluminum busbar, the current bending angle, and specific markers.

[0046] Step A3: Key point extraction. A lightweight RetinaFace model is used to extract key points from the copper-aluminum busbar image. The coordinates of the extracted key points are normalized to the [0, 1] interval. The formula used is as follows: ;

[0047] In the formula, These are the normalized coordinates of the key points of the copper-aluminum busbar. These are the coordinates of the key points of the copper-aluminum busbars before normalization. and These are the width and height of the image frame;

[0048] Step A4: Construct an adaptive mapping function, establish and initialize a visual Transformer architecture, adapt multiple attention heads and multiple layers, generate a multi-head offset table, initialize a mapping function from a specific keypoint to the offset table, and use the visual Transformer's multiple attention heads to capture different types of spatial relationships of specific keypoints to generate dynamic attention offset terms. This includes the following steps:

[0049] Step A41: Linear layer dimension expansion. Design an independent learnable linear layer for each attention head and each Transformer layer, and expand the dimension of the learnable linear layer.

[0050] Step A42: Generate a multi-head offset table by splitting the mapping function into an independent offset table for each attention head through a reshape operation;

[0051] Step A43: Independent adaptation between layers. Repeat steps A41 and A42 above for each Transformer layer to generate a mapping function specific to each Transformer layer.

[0052] Step A44: Calculate the relative relationship between the query and the keypoints based on specific keypoints, generate a dynamic attention offset term, and reconstruct the offset term formula of the traditional Transformer by introducing keypoint dependency. The formula used is as follows: ;

[0053] In the formula, This is the reconstructed offset term formula. It is a normalized set of specific key points. It is a function that maps specific keypoints to offset tables. and It is a query Patch coordinates, and It is a specific key point Patch coordinates;

[0054] Step A5: Calculate the self-attention weights. Map each patch to a feature vector of the same dimension using a linear embedding layer to generate mapped features. Incorporate the dynamic attention offset term into the self-attention weight calculation. The formula used is as follows: ; ;

[0055] In the formula, This is the adjusted self-attention score. It is the first A query vector, It is the first Transpose of each edge key point It is the vector dimension of the mapped features. It is the self-attention weight. It is the number of key points. Yes Traversal;

[0056] Step A6: Feature aggregation. The mapped features are weighted and summed using attention weights. The self-attention output is passed through layer normalization and a feedforward network to complete the calculation of a Transformer block. The outputs of the Transformer blocks are stacked to obtain the global features.

[0057] Step A7: Shape recognition, map global features to shape vectors for training, and output the initial position, size and shape of the copper-aluminum busbar.

[0058] Example 3: See Figure 1 This embodiment is based on the above embodiment. In the bending control module, the slider stroke closed-loop control method specifically includes the following steps:

[0059] Step B1: Machine vision error detection. The Zhang Zhengyou calibration method is used to complete the intrinsic parameter calibration of the industrial camera. The conversion relationship between pixels and actual size is determined by calibrating the checkerboard pattern to obtain the conversion coefficient.

[0060] Step B2: Subpixel edge extraction. The Zernike moment subpixel algorithm is used to extract the edges of the copper and aluminum busbars and obtain the precise coordinates of the workpiece corner points.

[0061] Step B3: Error calculation. The translation axis positioning error is obtained by decomposing the Euclidean distance between the theoretical position and the actual position. The perpendicular coordinates are calculated based on the slope of the rectangular working area edge. The rotation angle error is calculated using the cosine theorem.

[0062] Step B4: Bending forming angle and springback error, calculate the forming angle and springback angle using the coordinates of three points on the side image;

[0063] Step B5: Construct an error prediction model, establish and initialize an Elman neural network, introduce Tent chaotic mapping to optimize the traditional sparrow search algorithm, utilize the ergodicity and randomness of the Tent chaotic sequence to generate a highly diverse initial sparrow population, avoid local optima, divide sparrows into three categories: discoverers, joiners, and scouts, iteratively update positions, and quickly converge to the global optimum, use mean squared error (MSE) as the fitness function to optimize the initial weights and thresholds of the Elman neural network;

[0064] Step B6: Bending springback compensation. Establish a mathematical model of the slider stroke and bending angle, and correct the springback error through a second bend. The formula used is as follows: ;

[0065] In the formula, It is the downward stroke of the slider. It is the width of the lower mold opening. It is the target bending angle. It is the bending radius. It is the fillet radius of the lower mold. It refers to the initial bending degree of the copper-aluminum busbar. It is the bending coefficient of copper and aluminum busbars.

[0066] Example 4 is based on the above examples. It uses the Zhang Zhengyou calibration method to complete the calibration of the intrinsic parameters of the industrial camera for machine vision error detection. The average reprojection error in this scheme is 0.14 pixels.

[0067] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0068] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

[0069] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.

Claims

1. A high-precision bending system for copper and aluminum busbars based on machine vision inspection, characterized in that, Includes industrial camera, free arm, copper and aluminum busbar vision inspection module, data storage module and bending control module; The industrial camera takes pictures of the copper-aluminum busbar to obtain high-precision images of the copper-aluminum busbar. The free arm consists of a translation axis and a rotation axis, used to grip and convey copper and aluminum bars, and to adjust the position of the copper and aluminum bars; The copper-aluminum busbar visual inspection module uses an adaptive self-attention method to accurately detect and identify the initial position, size, and shape of the copper-aluminum busbar. The data storage module stores data during the bending process of the copper-aluminum busbar, including initial state information, bending parameters, and actual bending angle. The bending control module performs bending actions according to preset bending angles and positions through a slider stroke closed-loop control method.

2. The high-precision bending system for copper and aluminum busbars based on machine vision inspection according to claim 1, characterized in that, In the visual inspection module for copper-aluminum busbars, the aforementioned adaptive self-attention method specifically includes the following steps: Step A1: Define the key points of the copper-aluminum busbar. The key points of the copper-aluminum busbar include edge key points and specific key points. The edge key points include the center and vertex coordinates of the copper-aluminum busbar. The specific key points include the position of the copper-aluminum busbar, the current bending angle, and specific markers. Step A3: Key point extraction. The lightweight RetinaFace model is used to extract the key points of the copper-aluminum busbar from the copper-aluminum busbar photo. The coordinates of the extracted key points of the copper-aluminum busbar are normalized to the [0, 1] interval. Step A4: Construct an adaptive mapping function, establish and initialize a visual Transformer architecture, adapt multiple attention heads and multiple layers, generate a multi-head offset table, initialize a mapping function from a specific keypoint to the offset table, and use the visual Transformer's multiple attention heads to capture different types of spatial relationships of specific keypoints to generate dynamic attention offset terms. This includes the following steps: Step A41: Linear layer dimension expansion. Design an independent learnable linear layer for each attention head and each Transformer layer, and expand the dimension of the learnable linear layer. Step A42: Generate a multi-head offset table by splitting the mapping function into an independent offset table for each attention head through a reshape operation; Step A43: Independent adaptation between layers. Repeat steps A41 and A42 above for each Transformer layer to generate a mapping function specific to each Transformer layer. Step A44: Calculate the relative relationship between the query and the key points based on specific key points, generate a dynamic attention offset term, introduce key point dependency, and reconstruct the offset term formula of the traditional Transformer; Step A5: Calculate the self-attention weights. Map each patch to a feature vector of the same dimension through a linear embedding layer to generate mapped features. Incorporate the dynamic attention offset into the calculation of the self-attention weights. Step A6: Feature aggregation. The mapped features are weighted and summed using attention weights. The self-attention output is passed through layer normalization and a feedforward network to complete the calculation of a Transformer block. The outputs of the Transformer blocks are stacked to obtain the global features. Step A7: Shape recognition, map global features to shape vectors for training, and output the initial position, size and shape of the copper-aluminum busbar.

3. The high-precision bending system for copper and aluminum busbars based on machine vision inspection according to claim 1, characterized in that, In the bending control module, the slider stroke closed-loop control method specifically includes the following steps: Step B1: Machine vision error detection. The Zhang Zhengyou calibration method is used to complete the intrinsic parameter calibration of the industrial camera. The conversion relationship between pixels and actual size is determined by calibrating the checkerboard pattern to obtain the conversion coefficient. Step B2: Subpixel edge extraction. The Zernike moment subpixel algorithm is used to extract the edges of the copper and aluminum busbars and obtain the precise coordinates of the workpiece corner points. Step B3: Error calculation. The translation axis positioning error is obtained by decomposing the Euclidean distance between the theoretical position and the actual position. The perpendicular coordinates are calculated based on the slope of the rectangular working area edge. The rotation angle error is calculated using the cosine theorem. Step B4: Bending forming angle and springback error, calculate the forming angle and springback angle using the coordinates of three points on the side image; Step B5: Construct an error prediction model, establish and initialize an Elman neural network, introduce Tent chaotic mapping to optimize the traditional sparrow search algorithm, and optimize the initial weights and thresholds of the Elman neural network; Step B6: Bending springback compensation. Establish a mathematical model of the slider stroke and bending angle, and correct the springback error through a second bend.