Adapter piece welding detection method and device, electronic equipment and storage medium

By using an image recognition model to identify the solder marks and pad areas of the adapter piece, the problem of high maintenance costs in existing technologies is solved, and accurate identification and testing of various types of adapter pieces is achieved.

CN120976598APending Publication Date: 2025-11-18CONTEMPORARY AMPEREX TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410611971.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing methods for testing the welding of adapter pieces require configuring offset parameters for each type of adapter piece, resulting in high maintenance costs and difficulty in adapting to the identification of multiple types of adapter pieces.

Method used

An image recognition model is used to identify the adapter pieces. Through feature extraction and classifier analysis, training is conducted using training images of various types of adapter pieces to identify solder marks and pad areas. The detection boxes are then sorted by confidence and adjusted to reduce maintenance costs.

Benefits of technology

It enables accurate identification of various adapter pieces, reduces maintenance costs, improves testing efficiency and accuracy, and adapts to the needs of different adapter piece models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976598A_ABST
    Figure CN120976598A_ABST
Patent Text Reader

Abstract

The invention provides an adapter piece welding detection method, electronic equipment and a storage medium. The method comprises the following steps: obtaining a to-be-identified image, wherein the to-be-identified image comprises a switching piece of a battery; inputting a to-be-recognized image into an image recognition model, and extracting image features from the to-be-recognized image through a feature extraction layer of the recognition model; analyzing the image features through a classifier of an image recognition model to obtain a recognition result; the identification result comprises a result image with a detection frame marking a target area on the switching piece; the target area comprises a welding printing area and / or a bonding pad area; the image recognition model is obtained by training the training images corresponding to the various types of switching sheets. According to the embodiment of the invention, the image recognition model is obtained by training the training images corresponding to the various types of switching pieces, so that the image recognition model can recognize the various switching pieces, and the operation and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a tab welding detection method and device, electronic equipment and storage medium. BACKGROUND

[0002] In the field of new energy technology, in order to detect whether the blue glue covers the welding mark in the positive tab and the negative tab in the ultrasonic welding of lithium batteries, the welding mark and the welding pad of the adapter tab need to be identified.

[0003] The existing identification method determines the position of a certain feature from an image containing the adapter tab, and then offsets the position relationship between the welding mark, the welding pad and the certain feature to determine the position of the welding mark and the welding pad. In actual production, there can be multiple types of adapter tabs, and the offset parameters of the welding mark and the welding pad corresponding to different types of adapter tabs are different, so a set of offset parameters needs to be set in advance for each type of adapter tab. The operation and maintenance cost is high. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide a tab welding detection method and device, electronic equipment and storage medium, which can adapt to the identification of multiple types of battery adapter tabs and reduce the operation and maintenance cost.

[0005] In a first aspect, the embodiments of the present application provide a tab welding detection method, comprising:

[0006] Obtaining a to-be-identified image, the to-be-identified image comprising an adapter tab of a battery;

[0007] Inputting the to-be-identified image into an image recognition model, and extracting image features from the to-be-identified image through a feature extraction layer of the image recognition model; the image features are used to represent at least one of edge, texture and shape features of a target object on the adapter tab; the target object comprises a welding mark and / or a welding pad;

[0008] Analyzing the image features through a classifier of the image recognition model to obtain an identification result, the identification result comprising a result image with a bounding box of a target region on the adapter tab with a mark; the target region comprises a welding mark region and / or a welding pad region; the image recognition model is obtained by training a plurality of types of adapter tabs corresponding to training images.

[0009] The embodiments of the present application identify the to-be-identified image by using the image recognition model to determine the welding mark region and / or the welding pad region in the to-be-identified image. Since the image recognition model is obtained by training a plurality of types of adapter tabs corresponding to training images, the image recognition model can identify a plurality of types of adapter tabs, thereby reducing the operation and maintenance cost.

[0010] In any embodiment, the image features are analyzed by a classifier of the image recognition model to obtain a recognition result, including:

[0011] The image features are analyzed by the classifier to obtain all the candidate detection boxes corresponding to the same target object;

[0012] The confidence of each candidate detection box is calculated by an activation function in the classifier;

[0013] The recognition result is obtained based on the confidence of each candidate detection box.

[0014] The embodiments of the present application obtain the recognition result based on the confidence of the candidate detection box, so that the detection box for representing the target object can be determined more accurately.

[0015] Based on any embodiment, the recognition result is obtained based on the confidence of each candidate detection box, including:

[0016] According to the confidence of each candidate detection box, the candidate detection boxes are sorted from the highest confidence to the lowest, and one of the candidate detection boxes is selected as the target detection box, and the following steps are performed until all the candidate detection boxes are selected as the target detection box to obtain the recognition result.

[0017] The steps are as follows:

[0018] The overlapping degree between the target detection box and the candidate detection box with a confidence lower than that of the target detection box is calculated.

[0019] If the overlapping degree is greater than a preset threshold, the candidate detection box is removed.

[0020] The embodiments of the present application sort the confidence of the candidate detection box, and select the target detection box based on the sorting, so that the accuracy of the target detection box screening is improved.

[0021] In any embodiment, before obtaining the image to be recognized, the method further includes:

[0022] The size of the original image is adjusted based on the target size of the input image by the image recognition model to obtain a first adjusted image; the size of the first adjusted image corresponds to a horizontal coordinate direction size smaller than the target horizontal coordinate size corresponding to the target size, and / or the size of the first adjusted image corresponds to a vertical coordinate direction size smaller than or equal to the target vertical coordinate size corresponding to the target size;

[0023] The first adjusted image is filled according to the target size to obtain the image to be recognized.

[0024] This application embodiment adjusts the size of the original image and then fills it, so that the size of the obtained image to be recognized meets the requirements of the image recognition model while reducing the image distortion rate.

[0025] In any embodiment, adjusting the size of the original image based on the target size of the input image using an image recognition model to obtain a first adjusted image includes:

[0026] Obtain the ratio of the original image's size in the horizontal direction to its size in the vertical direction;

[0027] The desired resizing of the original image is determined based on the ratio and the target size;

[0028] The original image is adjusted according to the size to be adjusted to obtain the first adjusted image.

[0029] This application embodiment reduces the probability of image distortion during scaling by adjusting the original image according to its aspect ratio.

[0030] In any embodiment, the size of the resulting image is the target size; after obtaining the recognition result, the method includes:

[0031] The size of the resulting image is adjusted based on the size of the adjusted image to obtain a second adjusted image;

[0032] The second adjusted image is restored based on the size of the original image to obtain the target result image, which has the same size as the original image.

[0033] This application embodiment restores the size of the resulting image to the size of the original image, thereby enabling the localization of the target region on the original image.

[0034] In any embodiment, the method further includes:

[0035] If the blue adhesive on the adapter is misplaced, the recognition result indicates an abnormality.

[0036] Obtain the historical recognition results corresponding to the historical adapter pieces; wherein, the historical adapter pieces are those that are in the same batch as the current adapter pieces to be recognized corresponding to the image to be recognized, and that were recognized by the image recognition model before the current adapter pieces to be recognized and whose historical recognition results were obtained.

[0037] The image to be identified is labeled based on the detection box information in the historical recognition results to obtain the recognition result.

[0038] In this embodiment of the application, considering the situation where the model cannot reason, in order to identify the target area on the current adapter, the location information of the target area of ​​the historical adapter can be used as the location information of the target area on the current adapter, so as to enable subsequent detection work.

[0039] In any embodiment, after obtaining the recognition result output by the image recognition model, the method further includes:

[0040] Obtain the preset offset parameters, which are used to adjust the border of the detection box;

[0041] The detection boxes in the recognition results are adjusted based on the offset parameters.

[0042] The embodiments of this application adjust the detection frame by offset parameters to meet the requirements of different production environments.

[0043] In any embodiment, the method further includes:

[0044] Obtain initial training samples, which include multiple training images and labels corresponding to each initial training image; the labels include at least one of the solder areas and pad areas of the adapter piece on the training image; the solder areas include the front solder area and the back solder area.

[0045] The initial training samples are augmented to obtain augmented training samples; wherein the augmentation process includes at least one of scaling, rotation, brightness adjustment, random flipping, and random cropping of the training images in the initial training samples.

[0046] An image recognition model is obtained by training a convolutional neural network model using augmented training samples.

[0047] This application embodiment uses an image recognition model to identify the image to be identified, thereby determining the solder area and / or pad area in the image. Since the image recognition model is obtained by training using training images corresponding to various adapter pieces, the image recognition model can identify various adapter pieces, thus reducing maintenance costs.

[0048] In any embodiment, after obtaining the recognition result output by the image recognition model, the method further includes:

[0049] Detect whether the target area is covered with blue adhesive;

[0050] If the target area is covered with blue glue and the target area is a solder pad area; or if the target area is not covered with blue glue and the target area is a solder pad area, then the blue glue coverage is considered normal.

[0051] This application embodiment determines whether an anomaly exists by judging whether the target area is covered with blue glue based on the detected target area and the type of the target area. Since the accuracy of target area recognition can be improved by using an image recognition model, the accuracy of detecting whether the blue glue is covered abnormally can be improved.

[0052] In any embodiment, detecting whether the target area is covered with blue adhesive includes:

[0053] Extract the blue channel pixel values ​​corresponding to each pixel in the target area;

[0054] If the blue channel pixel value is greater than the first threshold, and the ratio of the number of pixels with blue channel pixel values ​​greater than the first threshold to the total number of pixels in the target area is greater than the second threshold, then the target area is determined to be covered with blue adhesive; otherwise, the target area is determined not to be covered with blue adhesive.

[0055] In this embodiment, when blue adhesive is applied to the adapter, the blue channel pixel value of the area with blue adhesive on the image will increase. Therefore, the size of the blue channel pixel value can be used to determine whether blue adhesive is covered, thus improving detection efficiency.

[0056] Secondly, embodiments of this application provide an image recognition device, comprising:

[0057] An image acquisition module is used to acquire an image to be identified, the image to be identified including a battery adapter piece;

[0058] The recognition module is used to input the image to be recognized into the image recognition model and obtain the recognition result output by the image recognition model; the recognition result includes a result image with a detection box marking the target area on the adapter piece; the target area includes solder area and / or pad area; the image recognition model is obtained by training using training images corresponding to various adapter pieces.

[0059] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a bus, wherein,

[0060] The processor and the memory communicate with each other via the bus;

[0061] The memory stores program instructions that can be executed by the processor, and the processor can execute the method of the first aspect by calling the program instructions.

[0062] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium, comprising:

[0063] The non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the method of the first aspect.

[0064] Fifthly, embodiments of this application provide a computer program product, including computer program instructions, which, when read and executed by a processor, perform the method of the first aspect.

[0065] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0066] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1 This is a schematic flowchart of a welding inspection method for an adapter piece provided in an embodiment of this application;

[0068] Figure 2 This is a schematic diagram of an adapter before identification, provided in an embodiment of this application.

[0069] Figure 3 A schematic diagram of a result image provided in an embodiment of this application;

[0070] Figure 4 This is another schematic diagram of the result provided in an embodiment of this application;

[0071] Figure 5 Flowchart of another adapter piece welding inspection method provided in this application embodiment;

[0072] Figure 6 This is a schematic diagram of the structure of an image recognition device provided in an embodiment of this application;

[0073] Figure 7 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0074] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0076] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0077] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0078] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0079] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0080] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0081] In battery manufacturing, testing the adapter pieces is a crucial step in ensuring battery quality and performance. As a key internal connection component of the battery, the quality and reliability of the adapter pieces directly affect the overall performance of the battery.

[0082] To detect whether the blue adhesive on the positive and negative electrode plates of a battery is obscuring the solder marks during ultrasonic welding, it is necessary to perform positioning inspection on the battery adapter solder marks and pads. If abnormal adhesive coverage is found on the adapter plates or blue adhesive is obscuring the solder pads, it will affect the inspection of the next process and will also lead to quality problems such as poor discharge performance of the battery cell, thus affecting the cell yield.

[0083] Before performing blue glue inspection, the positions of solder marks and / or pads on the adapter piece can be identified. In existing technologies, a specific feature A on the adapter piece is typically used for positioning, and then the solder marks and / or pads are offset from a fixed physical distance of feature A to locate them. However, in practical applications, adapter pieces often come in various models, and the fixed physical distance between feature A and the solder marks and / or pads differs for different models. This method requires configuring a set of offset parameters for each adapter model, resulting in high maintenance costs.

[0084] To address this technical problem, embodiments of this application provide a method, apparatus, electronic device, and storage medium for inspecting welded adapter pieces. By utilizing an image recognition model to identify an image containing the adapter piece, the target region on the adapter piece in the image is determined. Since the image recognition model is trained using training images of various types of adapter pieces, it is applicable to the localization of target regions for various types of adapter pieces.

[0085] It is understood that the adapter piece in the embodiments of this application can be an adapter piece made of various materials, such as: nickel sheet adapter piece, copper sheet adapter piece, nickel-plated copper adapter piece, etc., and the shape and size of the adapter piece are not limited.

[0086] It is understood that the adapter welding detection method and model training method provided in this application embodiment can be applied to electronic devices, including terminals and servers; the terminal can specifically be a smartphone, tablet computer, computer, personal digital assistant (PDA), etc.; the server can specifically be an application server or a web server. In addition, the model training method and the prediction method can be executed on the same terminal device or on different terminal devices.

[0087] To facilitate understanding, the technical solutions provided in the embodiments of this application will be described below using a terminal device as the execution subject, illustrating the application scenarios of the adapter piece welding detection method and model training method provided in the embodiments of this application.

[0088] Figure 1 This is a schematic flowchart of a welding inspection method for an adapter piece provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes:

[0089] Step 101: Obtain the image to be identified, which includes the battery adapter piece;

[0090] Step 102: Input the image to be identified into the image recognition model, and extract image features from the image to be identified through the feature extraction layer of the image recognition model; the image features are used to characterize at least one of the edge, texture and shape features of the target object on the adapter piece; the target object includes solder marks and / or pads;

[0091] Step 103: Analyze the image features using the classifier of the image recognition model to obtain the recognition result. The recognition result includes a result image with a detection box marking the target area on the adapter piece. The target area includes solder area and / or pad area. The image recognition model is obtained by training with training images corresponding to various types of adapter pieces.

[0092] In the specific implementation process, the image to be identified can be acquired by an image acquisition device set at a preset position on the production line. For example, the production line includes processes such as ultrasonic final welding and solder stamp adhesive application. After ultrasonic final welding, solder stamps are generated on the adapter piece. Solder stamp adhesive application refers to applying blue adhesive to the solder stamps. An image acquisition device can be set up at the top and bottom of this station to acquire images of both sides of the adapter piece. In this application, the upward-facing side is called the front side of the adapter piece, and the solder stamp on the front side of the adapter piece is called the solder stamp front side. The downward-facing side is called the back side of the adapter piece, and the solder stamp on the back side of the adapter piece is called the solder stamp back side. Figure 2 This is a schematic diagram illustrating the process of identifying an adapter plate according to an embodiment of this application. Regions 201, 202, and 203 contain the features to be identified. The image acquisition device can be an industrial CCD camera, or a high-resolution ordinary camera, high-speed camera, USB camera, etc. After acquiring an image, the image acquisition device can send the acquired image to a terminal device. It is understood that the image acquisition device can also be a component of the terminal device.

[0093] Since the image acquisition device acquires images of the battery adapter, the image to be identified contains the battery adapter.

[0094] After acquiring the image to be recognized, the terminal device inputs it into the image recognition model. The image recognition model performs object detection on the image to identify solder marks and / or pads, and labels the corresponding target regions with bounding boxes. The labeled result image is then output. The image recognition model includes a feature extraction layer and a classifier. The feature extraction layer extracts features from the image to be recognized, i.e., image features. The feature extraction layer can be a convolutional neural network or a recurrent neural network, etc. The classifier determines the target region based on the image features and classifies the target region. Figure 3 This is a schematic diagram of a result image provided in an embodiment of this application. It is understood that the shape of the detection frame can be rectangular, circular, irregular polygonal, etc., and can be set according to actual needs. Detection frames 301 and 303 represent two solder areas; detection frame 302 represents a solder pad area.

[0095] Understandably, some adapter models have only one solder mark. Therefore, after identifying such adapters, the resulting image will show a detection box for only the solder mark area. Figure 4 Another schematic diagram of the result provided in this application embodiment, such as Figure 4 As shown in Figure 401, the detection box for the solder mark area is shown in Figure 401. Of course, during the ultrasonic final soldering process, there may be an anomaly where no solder mark is formed on the adapter plate. In this case, the image recognition model can only recognize the solder pads and not the solder mark. Therefore, the resulting image only shows the solder pad area.

[0096] In addition, the image recognition model is trained using training images corresponding to various adapters. Furthermore, image processing can be performed on the training images of various adapters to generate more training images, which can then be used to train the image recognition model and improve its generalization ability.

[0097] The specific model training process is as follows:

[0098] (1) Obtain initial training samples, which include multiple training images and a label corresponding to each initial training image; the label includes at least one of the solder area and pad area of ​​the adapter piece on the training image. The solder area includes the front solder area and the back solder area. It is understood that the initial training samples can be obtained after image acquisition of multiple adapter pieces.

[0099] (2) Augment the initial training samples to obtain augmented training samples.

[0100] Augmenting the training samples is an important step in model training. It can improve the model's generalization ability, reduce overfitting, and potentially increase training efficiency. Here are some commonly used sample augmentation methods:

[0101] A. Image processing methods:

[0102] Random flipping: Randomly flip the training image horizontally or vertically to generate new samples.

[0103] Random cropping: A portion of the training image is randomly cropped to generate new samples.

[0104] Random rotation: Rotate the training image at a random angle to generate new samples. However, it should be noted that the dimensions of the image may not be preserved after rotation, depending on the rotation angle and the original size of the image.

[0105] Random scaling: The training image is scaled at a random ratio to generate new samples. Scaling typically needs to consider both enlargement and reduction, and may require handling content outside the image boundaries.

[0106] Random brightness adjustment: Randomly adjust the brightness of the training image to generate new samples.

[0107] Translation: Moving an image along the X or Y axis, or both simultaneously, can simulate different positions of an object in an image and help the model generalize better.

[0108] B. Expand the sample set using Generative Adversarial Networks (GANs):

[0109] GANs can generate new synthetic samples by learning the distribution characteristics of training data. The synthetic samples have similar features to the original samples but with slight differences, which can effectively expand the sample set and improve the robustness and generalization ability of the model.

[0110] The synthetic samples generated by GANs can be mixed with the original samples and used together for model training; this method is called GAN-augmented training.

[0111] In practical applications, appropriate sample augmentation methods can be selected based on the specific task and the characteristics of the dataset. However, it's important to note that while sample augmentation can improve model performance, excessive augmentation may lead the model to learn unnecessary noise or variations; therefore, the degree of augmentation needs to be carefully controlled.

[0112] (3) Use the augmented training samples to train the convolutional neural network model to obtain the image recognition model.

[0113] Understandably, the augmented training samples include the initial training images and the augmented versions of those images. The convolutional neural network model can be a Yolov5 model or another model. After the training samples are input into this model, it extracts features from the training samples to identify objects in the images. During training, the deep learning model learns the visual features of various objects, such as shape, texture, and color, from a large amount of image data. These features are distributed in different locations within the image. Through the interaction of multiple layers of neurons, the model gradually extracts and combines these features, ultimately enabling it to understand the appearance features of objects. When a well-trained deep learning model is applied to a new type of adapter, it uses the learned features to identify objects in images, reducing maintenance workload for subsequent model switching and production preparation.

[0114] This application embodiment uses an image recognition model to identify the image to be identified, thereby determining the solder area and / or pad area in the image. Since the image recognition model is obtained by training using training images corresponding to various adapter pieces, the image recognition model can identify various adapter pieces, thus reducing maintenance costs.

[0115] Based on the above embodiments, the image features are analyzed by the classifier of the image recognition model to obtain the recognition result, including:

[0116] By analyzing image features using a classifier, all candidate detection boxes corresponding to the same target object are obtained;

[0117] The confidence level of each candidate detection box is calculated using the activation function in the classifier;

[0118] The recognition result is obtained based on the confidence level of each candidate detection box.

[0119] In the specific implementation process, the classifier obtains candidate detection boxes in the image to be identified based on image features. It can be understood that there may be multiple target objects in the image to be identified, and the classifier can generate multiple candidate detection boxes for each target object. For example, if the image to be identified contains three target objects: solder pads, left solder marks, and right solder marks, then the classifier can generate multiple candidate detection boxes near these three target objects.

[0120] For each target object, the classifier calculates the confidence score of each candidate detection box using an activation function. The confidence score characterizes the accuracy of the target object selected by the corresponding candidate detection box; that is, the higher the confidence score, the better the candidate detection box represents the region where the target object is located. Therefore, the final candidate detection box can be determined based on the confidence scores of each candidate detection box, and the recognition result can be determined based on the final candidate detection box. For example, including but not limited to, the candidate detection box with the highest confidence score can be used as the final candidate detection box.

[0121] The embodiments of this application determine the final detection box by the confidence level of the candidate detection boxes, and then obtain the recognition result, thereby enabling the detection box used to characterize the target object to be determined more accurately.

[0122] Based on the above embodiments, obtaining the recognition result based on the confidence level of each candidate detection box includes:

[0123] Sort each candidate detection box according to its confidence score. Starting with the candidate detection box with the highest confidence score, select one in sequence as the target detection box and perform the following steps until multiple candidate detection boxes are selected as the target detection boxes to obtain the recognition result.

[0124] The steps are as follows:

[0125] Calculate the degree of overlap between the target detection box and candidate detection boxes with a confidence level lower than that of the target detection box;

[0126] If the degree of overlap is greater than a preset threshold, the candidate detection boxes will be removed.

[0127] In the specific implementation process, after obtaining the confidence level corresponding to each candidate detection box, they can be sorted according to their confidence levels. Then, starting with the candidate detection box with the highest confidence level, one is selected sequentially as the target detection box. The overlap between this target detection box and the candidate detection boxes with confidence levels lower than the target detection box is calculated. If the overlap level is greater than a preset threshold, the candidate detection box is eliminated until all candidate detection boxes are selected as target detection boxes. From this, the final target detection boxes can be obtained. Then, the final target detection boxes are used for analysis to obtain the recognition results.

[0128] This application embodiment improves the accuracy of target detection box screening by sorting the confidence levels of the candidate detection boxes and selecting target detection boxes from the sorted list.

[0129] Based on the above embodiments, before obtaining the image to be identified, the method further includes:

[0130] Based on the image recognition model, the size of the original image is adjusted according to the size requirements of the input image to obtain a first adjusted image; the horizontal axis dimension of the first adjusted image is smaller than the target horizontal axis dimension of the target size, and / or the vertical axis dimension of the first adjusted image is smaller than or equal to the target vertical axis dimension of the target size;

[0131] The first adjusted image is filled according to the target size to obtain the image to be recognized.

[0132] In the specific implementation process, when building an image recognition model, the size of the image input to the model can be set according to requirements. After the setting is completed, this size becomes the size requirement of the image recognition model for the input image. It should be noted that the unit of this size is pixels, and all related descriptions of size below will be in pixels.

[0133] The size of the raw images acquired by image acquisition devices is often larger than the size requirements of the input image for image recognition models. To meet the size requirements of the image recognition model, the raw images need to be compressed. During compression, the raw images can be compressed to a size that is only slightly different from the size requirements. For example, the size of the raw image in the horizontal axis can be compressed to a preset value, and the size in the vertical axis can be compressed according to max2. n This preset value is determined. Therefore, after adjusting the size of the original image, the size of the first adjusted image can be obtained.

[0134] In addition, the size of the original image can be adjusted according to the aspect ratio of the original image so that the aspect ratio of the first adjusted image is equal to or approximately equal to that of the original image, and the length and width of the first adjusted image are both smaller than the size requirements of the image recognition model for the input image.

[0135] After obtaining the first adjusted image, it can be padded to ensure that the size of the padded image meets the size requirements of the image recognition model for the input image. If the value of the first adjusted image in the vertical direction is smaller than the size requirement, the same number of pixels can be padded at the top and bottom, or pixels can be padded only at the top or bottom of the first adjusted image. This ensures that the padded image meets the size requirements of the image recognition model for the input image.

[0136] It should be noted that other methods for filling pixels can be found in the methods described above, and will not be repeated here. Preset values ​​can be used for filling, including but not limited to filling with "0".

[0137] In addition, if the size of the original image is smaller than the size requirement of the input image for the image recognition model, the original image can be directly filled. The filling method is the same as described above.

[0138] This application embodiment adjusts the size of the original image and then fills it, so that the size of the obtained image to be recognized meets the requirements of the image recognition model while reducing the image distortion rate.

[0139] Based on the above embodiments, the size of the original image is adjusted according to the size requirements of the input image based on the image recognition model to obtain a first adjusted image, including:

[0140] Obtain the ratio of the original image's size in the horizontal direction to its size in the vertical direction;

[0141] The required adjustment size of the original image is determined based on the ratio and size requirements;

[0142] The original image is adjusted according to the size to be adjusted to obtain the first adjusted image.

[0143] In the specific implementation process, the ratio of the size of the original image in the horizontal axis direction to the size in the vertical axis direction is calculated. When adjusting the size of the original image, the size of the first adjusted image can be adjusted to a size close to the size requirement based on this ratio.

[0144] In this embodiment, the aspect ratio of the original image differs from that of the input image as defined by the image recognition model. Directly adjusting the original image size to match the input image size would clearly contradict the original image's aspect ratio. Such non-proportional scaling would significantly alter the image's shape, potentially causing stretching or compression of the image content, resulting in distortion.

[0145] To reduce image distortion, the image size is first adjusted to be similar to the size of the input image for the image recognition model, and the aspect ratio is comparable to that of the original image. This allows the image to more closely approximate its original aspect ratio during resizing, thus reducing distortion.

[0146] After adjusting the original image to an intermediate image, to meet the size requirements of the image recognition model for the input image, black or white padding pixels (i.e., zero padding) can be added to the top, bottom, left, and right sides of the image. This expansion method does not change the original content of the image; it only adds extra pixel space, allowing the image to reach the required size.

[0147] Therefore, adjusting the original image to an intermediate image first can maintain its original aspect ratio, and then expanding it to the size of the input image for the image recognition model by padding with zeros satisfies the size requirements while preserving the original shape and content of the image as much as possible.

[0148] Based on the above embodiments, after obtaining the recognition result, the method further includes:

[0149] The size of the resulting image is adjusted based on the size of the adjusted image to obtain a second adjusted image;

[0150] The second adjusted image is restored based on the size of the original image to obtain the target result image, which has the same size as the original image.

[0151] In the specific implementation process, the size of the output image of the image recognition model is the same as the size of the input image. Since the image to be recognized input into the image recognition model is the size of the original image, the detection box is relative to the size of the result image after the image recognition model outputs the recognition result. In order to accurately locate the position of the target area in the original image, the size of the result image in the recognition result can be restored so that the size of the restored image is the same as the size of the original image.

[0152] When restoring the size of the result image to the size of the original image, the padded areas in the result image can be removed first to obtain the second adjusted image. For example, if the first adjusted image was padded with 64 pixels on each side of the horizontal axis before being input into the image recognition model, then during restoration, 64 pixels on each side of the horizontal axis need to be deleted from the result image during restoration.

[0153] After obtaining the second adjusted image, the second adjusted image is restored so that the size of the target image obtained after restoration is the same as the size of the original image.

[0154] It should be noted that, in cases where there are two solder marks on the adapter piece, such as... Figure 2 As shown, the detection frames can be sorted according to their horizontal coordinates to match the detection frames with the solder marks.

[0155] This application embodiment restores the size of the resulting image to the size of the original image, thereby enabling the localization of the target region on the original image.

[0156] Based on the above embodiments, the method further includes:

[0157] If the blue adhesive on the adapter is misplaced, the recognition result indicates an abnormality.

[0158] Obtain the historical recognition results corresponding to the historical adapter pieces; wherein, the historical adapter pieces are those that are in the same batch as the current adapter pieces to be recognized corresponding to the image to be recognized, and that were recognized by the image recognition model before the current adapter pieces to be recognized and whose historical recognition results were obtained.

[0159] The image to be identified is labeled based on the detection box information in the historical recognition results to obtain the recognition result.

[0160] In practical applications, when applying adhesive to adapter pieces containing solder marks, uneven application of the blue adhesive may occur, leading to air bubbles in the solder mark area. If such an image is input into an image recognition model, the model may fail to recognize the solder mark area. To ensure the image recognition model outputs results containing solder mark detection frames, historical recognition results for previous adapter pieces can be obtained. In the production process, adapter pieces are placed on a conveyor belt, and an image acquisition device is fixed in place. Each time an adapter piece arrives, the image acquisition device acquires an image and then identifies the solder mark and / or pad. This historical adapter piece refers to an adapter piece that has been recognized by the image recognition device before the current adapter piece. Specifically, it can be the previous adapter piece or the average of the recognition results from a predetermined number of adapter pieces prior to the current adapter piece. For example, the recognition results of the first 10 transition pieces can be obtained, the average value of the vertices of each detection box in the recognition results of the 10 transition pieces can be calculated to obtain the target detection box, and the target detection box can be marked on the image input to the image recognition model as the result image. It should be noted that the number of transition pieces used for averaging can be adjusted according to the actual situation.

[0161] The reason why the recognition results of historical adapter pieces can be used to mark the image to be recognized corresponding to the current adapter piece in order to obtain the recognition result is that the historical adapter pieces and the current adapter pieces are considered to belong to the same batch, their adapter piece parameters are the same, and the equipment parameters corresponding to the image acquisition device when acquiring historical adapter pieces and acquiring the current adapter piece are the same.

[0162] Therefore, if the recognition result of the previous adapter is taken as the recognition result of the current adapter, the terminal device can record the recognition result of the most recent adapter; if the recognition result of the previous preset number of adapters is the average of the recognition results of the current adapter, the terminal device can record the recognition results of the most recent preset number of adapters.

[0163] In this embodiment of the application, considering the situation where the model cannot reason, in order to identify the target area on the current adapter, the location information of the target area of ​​the historical adapter can be used as the location information of the target area on the current adapter, so as to enable subsequent detection work.

[0164] Based on the above embodiments, after obtaining the recognition result output by the image recognition model, the method further includes:

[0165] Obtain the preset offset parameters, which are used to adjust the border of the detection box;

[0166] The detection boxes in the recognition results are adjusted based on the offset parameters.

[0167] In practical implementation, the size of the detection frame varies depending on the specific process inspection requirements. For example, in the blue adhesive inspection process, the blue adhesive needs to completely cover the solder joint, and the edge of the blue adhesive must extend a certain distance beyond the edge of the solder joint. In this case, an offset parameter can be set. This offset parameter can be based on the size of the detection frame in the recognition result output by the image recognition model, thereby adjusting the size of the detection frame. The offset parameter can be positive or negative, representing whether the detection frame is enlarged or reduced. Furthermore, offset parameters can be set in different directions. For example, assuming the detection frame is rectangular, one parameter can be set on the left and right sides of the horizontal axis, and one parameter can be set on the top and bottom sides of the vertical axis to adjust the detection frame along its various sides.

[0168] In another embodiment, an offset parameter corresponding to the center point of the detection frame can be set. Based on the offset parameter corresponding to the center point, the corresponding size of expanding outward or shrinking inward can be determined with the center point as the reference.

[0169] The embodiments of this application adjust the detection frame by offset parameters to meet the requirements of different production environments.

[0170] Based on the above embodiments, after obtaining the recognition result output by the image recognition model, the method further includes:

[0171] Detect whether the target area is covered with blue adhesive;

[0172] If the target area is covered with blue glue and the target area is a solder pad area; or if the target area is not covered with blue glue and the target area is a solder pad area, then the blue glue coverage is considered normal.

[0173] In the specific implementation process, after identifying the location of the target area on the adapter chip, the terminal device can detect whether the target area is covered with blue glue. In practical applications, the blue glue should cover the solder joint area, but not the pad area. Therefore, if the target area is a solder joint area, the blue glue should cover that area; if the target area is a pad area, it should not be covered by blue glue. If the above requirements are met, the blue glue coverage is considered normal. Otherwise, the blue glue coverage is abnormal.

[0174] Figure 5A flowchart of another adapter piece welding inspection method provided in this application embodiment is shown below. Figure 5 As shown, the method includes:

[0175] Step 501: Acquire images of the adapter plate; acquire images of the battery adapter plate using a CCD camera.

[0176] Step 502: Process the adapter image to the size of the input image for the image recognition model; the method for processing the size of the adapter image is described in the above embodiment and will not be repeated here.

[0177] Step 503: Input the adapter image into the image recognition model;

[0178] Step 504: Determine whether the reasoning is successful; whether the image recognition model can reason successfully. If the reasoning is successful, proceed to step 505; otherwise, proceed to step 506.

[0179] Step 505: Capture the image for detection; based on the detection box inferred by the image recognition model, the adapter image is cropped. It can be understood that there may be multiple target regions in the adapter image, and different target regions correspond to different types. For example, the adapter image may contain one solder area and one pad area; it may also contain two solder areas and one pad area. Of course, the adapter image may contain one target region, such as a solder area or a pad area.

[0180] Step 506: Use the coordinates of the detection box from the previous detection to crop the image; the detection box obtained from the previous adapter piece can be used as the detection box for the current adapter piece image to crop the adapter piece image.

[0181] Step 507: Is blue glue detected? Detect whether the target area is covered by blue glue. It should be noted that the requirements for blue glue coverage vary depending on the type of target area. If the target area is a solder pad area and blue glue coverage is detected, proceed to step 508; if the target area is not covered by blue glue, proceed to step 509. If the target area is a pad area and blue glue coverage is detected, proceed to step 509; if the target area is not covered by blue glue, proceed to step 508.

[0182] Step 508: No abnormalities found in the test results;

[0183] Step 509: Abnormal test result.

[0184] This application embodiment determines whether an anomaly exists by judging whether the target area is covered with blue glue based on the detected target area and the type of the target area. Since the accuracy of target area recognition can be improved by using an image recognition model, the accuracy of detecting whether the blue glue is covered abnormally can be improved.

[0185] Based on the above embodiments, detecting whether the target area is covered with blue adhesive includes:

[0186] Extract the blue channel pixel values ​​corresponding to each pixel in the target area;

[0187] If the blue channel pixel value is greater than the first threshold, and the ratio of the number of pixels with blue channel pixel values ​​greater than the first threshold to the total number of pixels in the target area is greater than the second threshold, then the target area is determined to be covered with blue adhesive; otherwise, the target area is determined not to be covered with blue adhesive.

[0188] In practice, the target area comprises multiple pixels, each containing information about its color. This information is typically represented by three main color channels: red, green, and blue, i.e., the RGB model. Each channel has a corresponding pixel value, which determines the pixel's color. After applying blue glue to the target area, the blue channel pixel values ​​of each pixel in the target area will increase. Therefore, it is possible to determine whether a pixel is covered by blue glue by analyzing its corresponding blue channel pixel value.

[0189] Therefore, if the blue channel pixel value is greater than the first threshold, it indicates that the pixel is covered by blue glue; otherwise, it indicates that the pixel is not covered by blue glue. If the ratio of the number of pixels covered by blue glue in the target area to the total number of pixels in the target area is greater than the second threshold, it is determined that the target area is covered by blue glue. Otherwise, it is determined that the target area is not covered by blue glue.

[0190] Understandably, the first and second thresholds can be set according to the actual situation.

[0191] In this embodiment, when blue adhesive is applied to the adapter, the blue channel pixel value of the area with blue adhesive on the image will increase. Therefore, the size of the blue channel pixel value can be used to determine whether blue adhesive is covered, thus improving detection efficiency.

[0192] Figure 6 This is a schematic diagram of an image recognition device provided in an embodiment of this application. The device can be a module, program segment, or code on an electronic device. It should be understood that this device is similar to the one described above. Figure 1 The method implementation corresponds to this and can be executed. Figure 1The various steps involved in the method embodiment, and the specific functions of the device, can be found in the description above. To avoid repetition, detailed descriptions are appropriately omitted here. The device includes: an image acquisition module 601, a feature extraction module 602, and a recognition module 603, wherein:

[0193] The image acquisition module 601 is used to acquire an image to be identified, the image to be identified including the battery adapter piece;

[0194] The feature extraction module 602 is used to input the image to be identified into the image recognition model, and extract image features from the image to be identified through the feature extraction layer of the image recognition model; the image features are used to characterize at least one of the edge, texture and shape features of the target object on the adapter piece; the target object includes solder marks and / or pads;

[0195] The recognition module 603 is used to analyze the image features through the classifier of the image recognition model to obtain the recognition result. The recognition result includes a result image with a detection box marking the target area on the adapter piece. The target area includes solder area and / or pad area. The image recognition model is obtained by training with training images corresponding to various types of adapter pieces.

[0196] Based on the above embodiments, the identification module 603 is specifically used for:

[0197] The image features are analyzed by the classifier to obtain all candidate detection boxes corresponding to the same target object;

[0198] The confidence level of each candidate detection box is calculated using the activation function in the classifier;

[0199] The recognition result is obtained based on the confidence level of each candidate detection box.

[0200] Based on the above embodiments, the identification module 603 is specifically used for:

[0201] The candidate detection boxes are sorted according to their confidence scores. Starting with the candidate detection box with the highest confidence score, one is selected sequentially as the target detection box, and the following steps are performed until multiple candidate detection boxes are selected as the target detection boxes, thereby obtaining the recognition result. The steps are as follows:

[0202] Calculate the degree of overlap between the target detection box and the candidate detection boxes with a confidence level lower than that of the target detection box;

[0203] If the degree of overlap is greater than a preset threshold, the candidate detection box will be removed.

[0204] Based on the above embodiments, the device further includes an image preprocessing module, used for:

[0205] Based on the image recognition model, the size of the original image is adjusted according to the size requirement of the input image to obtain a first adjusted image; the horizontal axis dimension of the first adjusted image is smaller than the target horizontal axis dimension corresponding to the size requirement, and / or the vertical axis dimension of the first adjusted image is smaller than or equal to the target vertical axis dimension corresponding to the size requirement;

[0206] The first adjusted image is filled according to the size requirements to obtain the image to be recognized.

[0207] Based on the above embodiments, this image preprocessing is specifically used for:

[0208] Obtain the ratio of the size of the original image in the horizontal axis direction to its size in the vertical axis direction;

[0209] The required adjustment size of the original image is determined based on the ratio and the size requirement;

[0210] The original image is adjusted according to the size to be adjusted to obtain the first adjusted image.

[0211] Based on the above embodiments, the device further includes an image restoration module, used for:

[0212] The size of the resulting image is adjusted based on the size of the adjusted image to obtain a second adjusted image;

[0213] The second adjusted image is restored according to the size of the original image to obtain the target result image, the size of the target result image being the same as the size of the original image.

[0214] Based on the above embodiments, the identification module 603 is specifically used for:

[0215] If the blue adhesive on the adapter is misaligned, the identification result indicates an identification anomaly.

[0216] Obtain the historical recognition results corresponding to the historical adapter pieces; wherein, the historical adapter pieces are those that are in the same batch as the current adapter pieces to be recognized corresponding to the image to be recognized, and that were recognized using the image recognition model before the current adapter pieces to be recognized to obtain historical recognition results;

[0217] The image to be identified is marked based on the detection box information in the historical recognition results to obtain the recognition results.

[0218] Based on the above embodiments, the device further includes an offset module, used for:

[0219] Obtain a pre-set offset parameter, which is used to adjust the border of the detection box;

[0220] The detection boxes in the recognition results are adjusted according to the offset parameters.

[0221] Based on the above embodiments, the device further includes a training module for:

[0222] Obtain initial training samples, which include multiple training images and a label corresponding to each initial training image; the label includes at least one of the solder area and pad area of ​​the adapter piece on the training image; the solder area includes the front solder area and the back solder area.

[0223] The initial training samples are augmented to obtain augmented training samples; wherein the augmentation process includes at least one of scaling, rotation, brightness adjustment, random flipping, and random cropping of the training images in the initial training samples.

[0224] The image recognition model is obtained by training the convolutional neural network model using the augmented training samples.

[0225] Based on the above embodiments, the device further includes a blue adhesive detection module, used for:

[0226] Detect whether the target area is covered with blue adhesive;

[0227] If the target area is covered with blue glue and the target area is a solder pad area; or if the target area is not covered with blue glue and the target area is a solder pad area, then the blue glue coverage is determined to be normal.

[0228] Based on the above embodiments, the blue adhesive detection module is specifically used for:

[0229] Extract the blue channel pixel values ​​corresponding to each pixel in the target area;

[0230] If the blue channel pixel value is greater than a first threshold, and the ratio of the number of pixels with blue channel pixel values ​​greater than the first threshold to the total number of pixels corresponding to the target area is greater than a second threshold, then the target area is determined to be covered with blue adhesive; otherwise, the target area is determined not to be covered with blue adhesive.

[0231] Figure 7 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of this application, such as... Figure 7 As shown, the electronic device includes: a processor 701, a memory 702, and a bus 703; wherein,

[0232] The processor 701 and the memory 702 communicate with each other through the bus 703;

[0233] The processor 701 is used to call program instructions in the memory 702 to execute the methods provided in the above-described method embodiments, such as: obtaining an image to be identified, the image to be identified including a battery adapter; inputting the image to be identified into an image recognition model, and extracting image features from the image to be identified through the feature extraction layer of the image recognition model; the image features are used to characterize at least one of the edge, texture, and shape features of a target object on the adapter; the target object includes solder marks and / or pads; analyzing the image features through the classifier of the image recognition model to obtain a recognition result, the recognition result including a result image with a detection box marking the target area on the adapter; the target area includes a solder mark area and / or a pad area; the image recognition model is obtained by training using training images corresponding to various types of adapters.

[0234] The processor 701 can be an integrated circuit chip with signal processing capabilities. The processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0235] The memory 702 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0236] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as:

[0237] An image to be identified is obtained, the image to be identified including a battery adapter; the image to be identified is input into an image recognition model, and image features are extracted from the image to be identified through the feature extraction layer of the image recognition model; the image features are used to characterize at least one of the edge, texture, and shape features of the target object on the adapter; the target object includes solder marks and / or pads; the image features are analyzed by the classifier of the image recognition model to obtain a recognition result, the recognition result including a result image with a detection box marking the target area on the adapter; the target area includes a solder mark area and / or a pad area; the image recognition model is obtained by training using training images corresponding to various types of adapters.

[0238] This embodiment provides a non-transitory computer-readable storage medium that stores computer instructions that cause the computer to execute the methods provided in the above-described method embodiments, including, for example:

[0239] An image to be identified is obtained, the image to be identified including a battery adapter; the image to be identified is input into an image recognition model, and image features are extracted from the image to be identified through the feature extraction layer of the image recognition model; the image features are used to characterize at least one of the edge, texture, and shape features of the target object on the adapter; the target object includes solder marks and / or pads; the image features are analyzed by the classifier of the image recognition model to obtain a recognition result, the recognition result including a result image with a detection box marking the target area on the adapter; the target area includes a solder mark area and / or a pad area; the image recognition model is obtained by training using training images corresponding to various types of adapters.

[0240] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0241] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0242] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0243] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0244] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for inspecting the welding of adapter pieces, characterized in that, include: Obtain an image to be identified, the image to be identified including the battery adapter piece; The image to be identified is input into an image recognition model, and image features are extracted from the image to be identified through the feature extraction layer of the image recognition model; the image features are used to characterize at least one of the edge, texture and shape features of the target object on the adapter chip; the target object includes solder marks and / or pads; The image features are analyzed by the classifier of the image recognition model to obtain the recognition result, which includes a result image with a detection box marking the target area on the adapter piece; the target area includes solder area and / or pad area; the image recognition model is obtained by training with training images corresponding to various types of adapter pieces.

2. The method according to claim 1, characterized in that, The step of analyzing the image features using the classifier of the image recognition model to obtain the recognition result includes: The image features are analyzed by the classifier to obtain all candidate detection boxes corresponding to the same target object; The confidence level of each candidate detection box is calculated using the activation function in the classifier; The recognition result is obtained based on the confidence level of each candidate detection box.

3. The method according to claim 2, characterized in that, The process of obtaining the recognition result based on the confidence level of each candidate detection box includes: Sort each candidate detection box according to its confidence level. Starting with the candidate detection box with the highest confidence level, select one in sequence as the target detection box and perform the following steps until multiple candidate detection boxes are selected as the target detection boxes to obtain the recognition result. The steps are as follows: Calculate the degree of overlap between the target detection box and the candidate detection boxes with a confidence level lower than that of the target detection box; If the degree of overlap is greater than a preset threshold, the candidate detection box will be removed.

4. The method according to claim 1, characterized in that, Before obtaining the image to be identified, the method further includes: Based on the image recognition model, the size of the original image is adjusted according to the size requirements of the input image to obtain a first adjusted image; the horizontal dimension of the first adjusted image is smaller than the target horizontal dimension corresponding to the size requirement, and / or the vertical dimension of the first adjusted image is smaller than or equal to the target vertical dimension corresponding to the size requirement; The first adjusted image is filled according to the size requirements to obtain the image to be recognized.

5. The method according to claim 4, characterized in that, The step of adjusting the size of the original image based on the size requirements of the input image according to the image recognition model to obtain a first adjusted image includes: Obtain the ratio of the size of the original image in the horizontal axis direction to its size in the vertical axis direction; The required adjustment size of the original image is determined based on the ratio and the size requirement; The original image is adjusted according to the size to be adjusted to obtain the first adjusted image.

6. The method according to claim 4, characterized in that, After obtaining the recognition result, the method further includes: The size of the resulting image is adjusted based on the size of the adjusted image to obtain a second adjusted image; The second adjusted image is restored according to the size of the original image to obtain the target result image, the size of the target result image being the same as the size of the original image.

7. The method according to claim 1, characterized in that, The method further includes: If the blue adhesive on the adapter is misaligned, the identification result indicates an identification anomaly. Obtain the historical recognition results corresponding to the historical adapter pieces; wherein, the historical adapter pieces are those that are in the same batch as the current adapter pieces to be recognized corresponding to the image to be recognized, and that were recognized using the image recognition model before the current adapter pieces to be recognized to obtain historical recognition results; The image to be identified is marked based on the detection box information in the historical recognition results to obtain the recognition results.

8. The method according to claim 1, characterized in that, After obtaining the recognition result output by the image recognition model, the method further includes: Obtain a pre-set offset parameter, which is used to adjust the border of the detection box; The detection boxes in the recognition results are adjusted according to the offset parameters.

9. The method according to any one of claims 1-8, characterized in that, The method further includes: Obtain initial training samples, which include multiple training images and a label corresponding to each training image; the label includes at least one of the solder area and pad area of ​​the adapter piece on the training image; the solder area includes the front solder area and the back solder area. The initial training samples are augmented to obtain augmented training samples; wherein the augmentation process includes at least one of scaling, rotation, brightness adjustment, random flipping, and random cropping of the training images in the initial training samples; The image recognition model is obtained by training the convolutional neural network model using the augmented training samples.

10. The method according to any one of claims 1-8, characterized in that, After obtaining the recognition result output by the image recognition model, the method further includes: Detect whether the target area is covered with blue glue; If the target area is covered with blue glue and the target area is a solder pad area; or if the target area is not covered with blue glue and the target area is a solder pad area, then the blue glue coverage is determined to be normal.

11. The method according to claim 10, characterized in that, The detection of whether the target area is covered with blue adhesive includes: Extract the blue channel pixel values ​​corresponding to each pixel in the target area; If the blue channel pixel value is greater than a first threshold, and the ratio of the number of pixels with blue channel pixel values ​​greater than the first threshold to the total number of pixels corresponding to the target area is greater than a second threshold, then the target area is determined to be covered with blue adhesive; otherwise, the target area is determined not to be covered with blue adhesive.

12. A welding inspection device for adapter pieces, characterized in that, include: An image acquisition module is used to acquire an image to be identified, the image to be identified including a battery adapter piece; The feature extraction module is used to input the image to be identified into an image recognition model, and extract image features from the image to be identified through the feature extraction layer of the image recognition model; the image features are used to characterize at least one of the edge, texture and shape features of the target object on the adapter piece; the target object includes solder marks and / or pads; The recognition module is used to analyze the image features through the classifier of the image recognition model to obtain the recognition result. The recognition result includes a result image with a detection box marking the target area on the adapter piece. The target area includes solder area and / or pad area. The image recognition model is obtained by training with training images corresponding to various types of adapter pieces.

13. An electronic device, characterized in that, include: Processor, memory, and bus, among which, The processor and the memory communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor can execute the method as described in any one of claims 1-10 by calling the program instructions.

14. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions, which, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-10.

15. A computer program product, characterized in that, It includes computer program instructions, which, when read and executed by a processor, perform the method as described in any one of claims 1-10.