Defect detection method and device for battery cover plate and storage medium
By identifying the target area and suspected defects in the battery cover image, performing intersecting operations and comparing the size feature, the problems of traditional low detection efficiency and high error detection rate are solved, and efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202510590929.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-08-15
AI Technical Summary
Traditional manual visual inspection of battery cover defect detection is inefficient, prone to errors and strong subjectivity. The existing visual inspection scheme is difficult to accurately distinguish defects from normal characteristics under complex backgrounds, and is prone to false detection.
By identifying the target area and suspected defects in the battery cover image, intersecting operations are performed to determine the candidate defect, and the dimensional characteristic parameters of the candidate defect are compared with the standard parameters. When the preset conditions are met, it is determined as a real defect, and the detection accuracy is improved by combining the image recognition model and intersecting operations.
Significantly reduce false detection, improve the accuracy and efficiency of battery cover defect detection, ensure that defects in key areas are not missed, and simplify algorithms to reduce the probability of errors.
Smart Images

Figure CN120495242A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of visual inspection based on image data, for example, to a method, device and storage medium for defect detection of a battery cover. Background Art
[0002] Battery cover plates are key components of battery assemblies, and their surface quality directly impacts battery safety and performance. Traditionally, surface defect detection for battery cover plates relies primarily on manual visual inspection. This method is not only time-consuming and labor-intensive, but also suffers from drawbacks such as low efficiency, prone to errors, and high subjectivity.
[0003] With the advancement of industrial automation, visual inspection technologies are increasingly being applied to product quality control. Visual inspection systems capture digital images of battery covers using image acquisition devices and utilize advanced image processing algorithms to automatically identify surface defects. Compared to traditional manual inspection, visual inspection offers advantages such as efficiency and accuracy. However, existing visual inspection solutions for battery cover defect detection still face challenges. For example, in complex background environments, these technologies may not accurately distinguish between genuine defects and normal product features, leading to false detections. Summary of the Invention
[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical elements or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0005] The embodiments of the present disclosure provide a battery cover defect detection method, device, and storage medium, which can significantly reduce false detections and improve the accuracy of battery cover defect detection results.
[0006] According to a first aspect of the present disclosure, a method for detecting defects in a battery cover is provided, comprising:
[0007] Identifying target areas and suspected defects in an image containing a battery cover;
[0008] Performing an intersection operation on the target area and the suspected defects to determine the suspected defects located in the target area, and taking the suspected defects located in the target area as candidate defects;
[0009] Comparing each size characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a comparison result;
[0010] When the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, and the information of the real defect of the battery cover is recorded and output.
[0011] In some embodiments, identifying a target area and suspected defects in an image containing a battery cover includes:
[0012] Identifying position information of the battery cover in an initial image containing the battery cover;
[0013] Based on the position information of the battery cover, the battery cover is straightened in the initial image;
[0014] Cropping the initial image into a target image of a preset size, wherein the target image includes the complete battery cover;
[0015] Target areas and suspected defects are identified in a target image containing a battery cover.
[0016] In some embodiments, identifying a target area and suspected defects in an image containing a battery cover includes:
[0017] An image containing a battery cover is input into an image recognition model, and the target area and suspected defects are identified using the image recognition model, wherein the image recognition model is trained based on a first sample image of a battery cover containing defects and a second sample image of a battery cover not containing defects.
[0018] In some embodiments, performing an intersection operation on the target area and the suspected defect to determine the suspected defect located in the target area, and using the suspected defect located in the target area as a candidate defect, includes:
[0019] An intersection operation is performed on the target area and the suspected defect to determine the suspected defect that has an intersection area with the target area, and the determined suspected defect is used as a candidate defect.
[0020] In some embodiments, each size characteristic parameter of the candidate defect is compared with the corresponding standard parameter to obtain a comparison result, including: comparing each size characteristic parameter of the candidate defect with the corresponding standard parameter to obtain the size relationship between each size characteristic parameter and the corresponding standard parameter; when the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, including: when each size characteristic parameter of the candidate defect is greater than the corresponding standard parameter, the candidate defect is determined to be a real defect.
[0021] In some embodiments, each size characteristic parameter of the candidate defect is compared with the corresponding standard parameter to obtain a comparison result, including: comparing each size characteristic parameter of the candidate defect with the standard parameter corresponding to the size characteristic parameter to obtain a parameter ratio, and obtaining a comprehensive ratio based on the parameter ratios corresponding to all size characteristic parameters of the candidate defect; when the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, including: when the corresponding comprehensive ratio of the candidate defect is greater than the standard ratio, the candidate defect is determined to be a real defect.
[0022] In some embodiments, obtaining a comprehensive ratio based on parameter ratios corresponding to all size characteristic parameters of the candidate defect includes:
[0023] Compare each parameter ratio corresponding to the candidate defect with a preset upper limit ratio;
[0024] When all parameter ratios corresponding to the candidate defects are not greater than the upper limit ratio, a comprehensive ratio is calculated based on all parameter ratios corresponding to the candidate defects;
[0025] Alternatively, when at least one parameter ratio corresponding to the candidate defect is greater than the upper limit ratio, the maximum parameter ratio is used as the comprehensive ratio.
[0026] In some embodiments, calculating the comprehensive ratio based on all parameter ratios corresponding to the candidate defects includes: calculating an average value of all parameter ratios corresponding to the candidate defects, and using the average value as the comprehensive ratio.
[0027] In some embodiments, calculating the average of all parameter ratios corresponding to the candidate defects and using the average as the comprehensive ratio includes:
[0028] Determine the type of the target area where the candidate defect is located, and determine the weight coefficient of each parameter ratio corresponding to the candidate defect according to the type of the target area;
[0029] Based on each parameter ratio corresponding to the candidate defect and its weight coefficient, the weighted average of all parameter ratios corresponding to the candidate defect is calculated, and the weighted average is used as the comprehensive ratio.
[0030] In some embodiments, determining the type of the target region where the candidate defect is located, and determining the weight coefficient of each parameter ratio corresponding to the candidate defect according to the type of the target region, includes:
[0031] Determine the type of the candidate defect and the type of the target area where the candidate defect is located;
[0032] The weight coefficient of each parameter ratio corresponding to the candidate defect is determined according to the type of the candidate defect and the type of the target area where the candidate defect is located.
[0033] In some embodiments, the dimensional characteristic parameters include length, width, depth, and area.
[0034] According to a second aspect of the present disclosure, a battery cover defect detection device is provided, comprising a processor and a memory storing program instructions, wherein the processor executes the battery cover defect detection method provided in the first aspect of the present disclosure.
[0035] According to a third aspect of the present disclosure, a storage medium is provided, in which computer program instructions are stored. When the computer program instructions are executed by a processor, the battery cover defect detection method provided by the first aspect of the present disclosure is executed.
[0036] The battery cover defect detection method, device, and storage medium provided by the embodiments of the present disclosure can achieve the following technical effects:
[0037] The defect detection method for the battery cover provided by the embodiment of the present disclosure automatically identifies its defects by analyzing the image data of the battery cover. This automated process greatly improves the detection speed. In the process of image-based defect recognition, all suspected defects are first identified, thereby avoiding the possibility of missed detection. Subsequently, an intersection operation is performed on the target area and the suspected defects to determine the candidate defects that may affect the quality of the battery cover, while ignoring those suspected defects that will not affect the quality of the battery cover at all, thereby reducing the number of defects to be processed subsequently and helping to improve recognition efficiency. After determining the candidate defects, by comparing each dimensional feature parameter of the candidate defects with the corresponding standard parameters, the real defects that will actually affect the quality of the battery cover are screened out, significantly reducing false detections and improving the accuracy of the battery cover defect detection results.
[0038] The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] One or more embodiments are exemplarily described by corresponding drawings. These exemplary descriptions and drawings do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a scale limitation. In addition,
[0040] Figure 1 is a schematic diagram of a battery cover defect detection system provided by an embodiment of the present disclosure;
[0041] Figure 2 is a schematic diagram of a battery cover defect detection method provided by an embodiment of the present disclosure;
[0042] Figure 3 is a schematic diagram of another battery cover defect detection method provided by an embodiment of the present disclosure;
[0043] Figure 4 is a schematic diagram of another battery cover defect detection method provided by an embodiment of the present disclosure;
[0044] Figure 5 is a schematic diagram of another battery cover defect detection method provided by an embodiment of the present disclosure;
[0045] Figure 6 is a schematic diagram of another battery cover defect detection method provided by an embodiment of the present disclosure;
[0046] Figure 7 is a structural diagram of a shooting device provided by an embodiment of the present disclosure;
[0047] Figure 8 Schematic diagram of a battery cover defect detection device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0048] In order to be able to understand the features and technical content of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The accompanying drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the sake of convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0049] In the description and claims of the embodiments of the present disclosure, as well as in the accompanying drawings, the terms "first," "second," and the like are used to distinguish similar items and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate to describe the embodiments of the present disclosure herein. In addition, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions.
[0050] Unless otherwise stated, the term "plurality" means two or more.
[0051] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.
[0052] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0053] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0054] The present disclosure provides a battery cover defect detection system. Figure 1 As shown, the battery cover defect detection system includes a battery cover defect detection device 100 and a camera 200, with the defect detection device 100 being communicatively connected to the camera 200. The camera 200 is used to capture an image of the battery cover and transmit the image to the battery cover defect detection device 100. The defect detection device 100 can identify defects in the battery cover based on the received image data, and record and output information about the actual defects in the battery cover.
[0055] In combination with the battery cover defect detection device (hereinafter referred to as the detection device) provided in the embodiment of the present disclosure, the embodiment of the present disclosure provides a battery cover defect detection method, Figure 2 As shown, the defect detection method for the battery cover includes the following steps:
[0056] S201, the detection device identifies the target area and suspected defects in the image containing the battery cover.
[0057] In the disclosed embodiments, the target area refers to an area on the battery cover that has certain surface quality requirements, such as areas that are critical for ensuring battery sealing, electrical connection reliability, and mechanical strength. Specifically, the target area can include at least one of the following: a sealing surface, a welding area, and the area surrounding the mounting hole.
[0058] In the embodiment of the present disclosure, if no suspected defect is identified, it indicates that the quality of the battery cover is qualified, and information indicating that the quality is qualified is directly output.
[0059] In the embodiment of the present disclosure, the defects in the battery cover include bubbles, cracks, scratches, pits, etc., and suspected defects refer to all potential defects preliminarily identified in the battery cover.
[0060] S202: The detection device performs an intersection operation on the target area and the suspected defect, determines the suspected defect located in the target area, and uses the suspected defect located in the target area as a candidate defect.
[0061] In the embodiment of the present disclosure, a suspected defect located in the target area may affect the quality of the battery cover, and this suspected defect is defined as a candidate defect. Other suspected defects will not affect the quality of the battery cover at all and can be ignored subsequently.
[0062] In the embodiment of the present disclosure, if no candidate defect is determined, it indicates that the quality of the battery cover is qualified, and information indicating that the quality is qualified is directly output.
[0063] S203 , the detection device compares each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a comparison result.
[0064] In the disclosed embodiments, during the initial defect identification process, dimensional characteristic parameters of the defect can be obtained. These dimensional characteristic parameters include multiple items, such as length, width, depth, and area. A standard parameter can be set for each dimensional characteristic parameter. When a dimensional characteristic parameter of a candidate defect exceeds its corresponding standard parameter, the risk of the candidate defect affecting the quality of the battery cover increases.
[0065] S204 , when the comparison result corresponding to the candidate defect meets the preset defect condition, the detection device determines the candidate defect as a real defect, records and outputs the information of the real defect of the battery cover.
[0066] By comparing each dimensional characteristic parameter of a candidate defect with the corresponding standard parameter, we determine whether the candidate defect will actually affect the quality of the battery cover. When the comparison result corresponding to a candidate defect meets the preset defect conditions, it indicates that the candidate defect will actually affect the quality of the battery cover. This candidate defect can be determined as a true defect, and the true defect information of the battery cover can be recorded and output. Candidate defects whose comparison results do not meet the preset defect conditions can be ignored.
[0067] In the embodiment of the present disclosure, the information of the real defects may include information indicating unqualified quality, as well as the number, location, type, etc. of the real defects.
[0068] In the embodiment of the present disclosure, when the comparison result corresponding to the candidate defect does not meet the preset defect condition, it indicates that the quality of the battery cover is qualified, and information indicating that the quality is qualified is directly output.
[0069] The defect detection method for the battery cover provided by the embodiment of the present disclosure automatically identifies its defects by analyzing the image data of the battery cover. This automated process greatly improves the detection speed. In the process of image-based defect recognition, all suspected defects are first identified, thereby avoiding the possibility of missed detection. Subsequently, an intersection operation is performed on the target area and the suspected defects to determine the candidate defects that may affect the quality of the battery cover, while ignoring those suspected defects that will not affect the quality of the battery cover at all, thereby reducing the number of defects to be processed subsequently and helping to improve recognition efficiency. After determining the candidate defects, by comparing each dimensional feature parameter of the candidate defects with the corresponding standard parameters, the real defects that will actually affect the quality of the battery cover are screened out, significantly reducing false detections and improving the accuracy of the battery cover defect detection results.
[0070] In some embodiments, identifying a target area and suspected defects in an image containing a battery cover includes: identifying position information of the battery cover in an initial image containing the battery cover; aligning the battery cover in the initial image based on the position information of the battery cover; cropping the initial image into a target image of a preset size, wherein the target image contains a complete battery cover; and identifying a target area and suspected defects in the target image containing the battery cover.
[0071] In the disclosed embodiment, a template matching algorithm is used to identify and determine the position of the battery cover in the initial image, and based on this position, the offset angle and distance of the battery cover relative to the standard position are calculated. Based on the calculated offset angle and distance, an affine transformation is applied to straighten the battery cover in the initial image so that the angle of the battery cover in the initial image is correctly aligned. The template matching algorithm is used again to accurately locate the position of the battery cover in the initial image based on the corrected angle. Based on the position of the battery cover in the initial image, the initial image is cropped along the edge of the battery cover to generate a target image with a fixed length and width that completely contains the battery cover.
[0072] In some embodiments, identifying a target area and suspected defects in an image containing a battery cover includes: inputting the image containing the battery cover into an image recognition model, and using the image recognition model to identify the target area and suspected defects.
[0073] The image recognition model is trained based on a first sample image of a battery cover containing defects and a second sample image of a battery cover containing no defects. The image recognition model can be a convolutional neural network (CNN), a You Only Look Once (YOLO) model, a residual network (ResNet) model, etc.
[0074] The number of first and second sample images can be determined based on actual design requirements. For example, the number of first and second sample images is 5,000. Data augmentation is performed on these sample images to improve the algorithm's generalization. These sample images are then divided into training and test sets according to a preset ratio. The defective and target areas are annotated in the second sample image in the training set. The image recognition model is trained and tested using the training and test sets, ultimately enabling it to learn to identify defective and target areas on battery covers.
[0075] Combine Figure 3 As shown, the embodiment of the present disclosure provides another method for detecting defects in a battery cover, and the method for detecting defects in a battery cover includes the following steps:
[0076] S301: The detection device identifies the position information of the battery cover in the initial image containing the battery cover.
[0077] S302: The detection device aligns the battery cover in the initial image based on the position information of the battery cover.
[0078] S303: The detection device crops the initial image into a target image of a preset size, wherein the target image includes a complete battery cover.
[0079] S304: The detection device inputs the target image including the battery cover into the image recognition model, and uses the image recognition model to identify the target area and suspected defects.
[0080] S305 , the detection device performs an intersection operation on the target area and the suspected defect, determines the suspected defect located in the target area, and uses the suspected defect located in the target area as a candidate defect.
[0081] S306 , the detection device compares each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a comparison result.
[0082] S307 , when the comparison result corresponding to the candidate defect meets the preset defect condition, the detection device determines the candidate defect as a real defect, records and outputs the information of the real defect of the battery cover.
[0083] In some implementations, an intersection operation is performed on the target area and the suspected defect to determine the suspected defect located in the target area, and the suspected defect located in the target area is used as a candidate defect, including: performing an intersection operation on the target area and the suspected defect to determine the suspected defect that has an intersection area with the target area, and using the determined suspected defect as a candidate defect.
[0084] By treating any suspected defect that overlaps with the target area as a candidate defect, it can be ensured that even defects that are partially located in the critical area will not be ignored, ensuring that all defects that may have a negative impact on the battery cover are evaluated and that no potential defects are missed. In addition, in actual applications, there may be certain uncertainties due to image processing, positioning errors, etc. The use of intersection operations can tolerate these errors to a certain extent, because as long as any part of the suspected defect is located in the target area, it will be considered, which enhances the reliability of the detection process. In addition, compared to the situation where it is necessary to accurately determine whether the suspected defect is completely located in the target area, the logic of the intersection operation is more direct and simple, which not only reduces the complexity of the algorithm implementation, but also reduces the probability of errors caused by overly complex algorithms.
[0085] Combine Figure 4As shown, the embodiment of the present disclosure provides another method for detecting defects in a battery cover, and the method for detecting defects in a battery cover includes the following steps:
[0086] In step S401 , the detection device identifies a target area and suspected defects in an image containing a battery cover.
[0087] In step S402 , the detection device performs an intersection operation on the target area and the suspected defect, determines the suspected defect having an intersection area with the target area, and uses the determined suspected defect as a candidate defect.
[0088] S403 , the detection device compares each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a comparison result.
[0089] S404: When the comparison result corresponding to the candidate defect meets the preset defect condition, the detection device determines the candidate defect as a real defect, records and outputs the information of the real defect of the battery cover.
[0090] In some embodiments, the comparison result includes a magnitude relationship between each dimension characteristic parameter and a corresponding standard parameter. Comparing each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain the comparison result includes: comparing each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a magnitude relationship between each dimension characteristic parameter and the corresponding standard parameter.
[0091] In some embodiments, when the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, including: when each size characteristic parameter of the candidate defect is greater than the corresponding standard parameter, the candidate defect is determined to be a real defect.
[0092] Combine Figure 5 As shown, the embodiment of the present disclosure provides another method for detecting defects in a battery cover, and the method for detecting defects in a battery cover includes the following steps:
[0093] S501: The detection device identifies a target area and suspected defects in an image containing a battery cover.
[0094] S502: The detection device performs an intersection operation on the target area and the suspected defect to determine the suspected defect located in the target area, and uses the suspected defect located in the target area as a candidate defect.
[0095] S503 , the detection device compares each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a size relationship between each dimension characteristic parameter and the corresponding standard parameter.
[0096] S504: When each dimension characteristic parameter of the candidate defect is greater than the corresponding standard parameter, the detection device determines the candidate defect as a real defect, records and outputs the information of the real defect of the battery cover.
[0097] In some embodiments, the comparison result includes a comprehensive ratio of all dimensional characteristic parameters to corresponding standard parameters. Comparing each dimensional characteristic parameter of the candidate defect with the corresponding standard parameter to obtain the comparison result includes: comparing each dimensional characteristic parameter of the candidate defect with the standard parameter corresponding to the dimensional characteristic parameter to obtain a parameter ratio, and obtaining a comprehensive ratio based on the parameter ratios corresponding to all dimensional characteristic parameters of the candidate defect.
[0098] In some embodiments, when the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, including: when the corresponding comprehensive ratio of the candidate defect is greater than the standard ratio, the candidate defect is determined to be a real defect.
[0099] The disclosed embodiment obtains a specific parameter ratio by accurately comparing each dimensional characteristic parameter (such as length, width, depth and area, etc.) of the candidate defect with its corresponding standard parameter. This method uses the parameter ratio to characterize the actual degree of deviation between the dimensional characteristic parameter and the standard parameter. The parameter ratio can more accurately judge the true impact of the candidate defect on the quality of the battery cover, ensuring that only those candidate defects that are indeed beyond the allowable range will be marked as true defects, thereby improving the accuracy of the judgment result. After obtaining the specific ratio of each dimensional characteristic parameter, a comprehensive ratio is further calculated as the basis for the final evaluation. The comprehensive ratio reflects the comprehensive performance of all dimensional characteristic parameters of the candidate defect. This not only makes the evaluation process more comprehensive and covers all important aspects that may affect the performance of the battery cover, but also ensures the consistency and objectivity of the evaluation criteria. Calculating the comprehensive ratio helps to comprehensively consider the parameter ratios of the various dimensional characteristic parameters of the candidate defect, which can effectively avoid the situation where the dimensional characteristic parameters of other potential problems are ignored due to excessive focus on a certain dimensional characteristic parameter, and reduces the omissions that may occur in the evaluation process. Therefore, through precise parameter ratio evaluation and comprehensive comprehensive ratio calculation, not only the accuracy of single dimensional characteristic parameter evaluation is improved, but also the objectivity and completeness of the overall evaluation are enhanced through comprehensive analysis of multi-dimensional dimensional characteristic parameters.
[0100] Combine Figure 6 As shown, the embodiment of the present disclosure provides another method for detecting defects in a battery cover, and the method for detecting defects in a battery cover includes the following steps:
[0101] S601: The detection device identifies the target area and suspected defects in the image containing the battery cover.
[0102] S602: The detection device performs an intersection operation on the target area and the suspected defect to determine the suspected defect located in the target area, and uses the suspected defect located in the target area as a candidate defect.
[0103] S603 , the detection device compares each dimension characteristic parameter of the candidate defect with the standard parameter corresponding to the dimension characteristic parameter to obtain a parameter ratio.
[0104] S604, the detection device obtains a comprehensive ratio based on the parameter ratios corresponding to all size characteristic parameters of the candidate defect.
[0105] S605: When the comprehensive ratio corresponding to the candidate defect is greater than the standard ratio, the detection device determines the candidate defect as a real defect, records and outputs the information of the real defect of the battery cover.
[0106] In some embodiments, a comprehensive ratio is obtained based on the parameter ratios corresponding to all size characteristic parameters of the candidate defect, including: comparing each parameter ratio corresponding to the candidate defect with a preset upper limit ratio; when all parameter ratios corresponding to the candidate defect are not greater than the upper limit ratio, calculating the comprehensive ratio based on all parameter ratios corresponding to the candidate defect; or, when at least one parameter ratio corresponding to the candidate defect is greater than the upper limit ratio, taking the largest parameter ratio as the comprehensive ratio.
[0107] In the embodiment of the present disclosure, the specific value of the upper limit ratio can be determined according to the actual process limitations and quality requirements. By setting the upper limit ratio, those candidate defects that seriously exceed the standard in a certain dimensional characteristic parameter can be quickly identified. If any parameter ratio exceeds the preset upper limit ratio, it means that the degree of deviation of the defect in this specific dimensional characteristic parameter is very significant, which may seriously affect the quality of the battery cover. At this time, the practice of directly using the maximum parameter ratio as the comprehensive ratio ensures that such extreme cases will not be ignored, thereby enhancing the sensitivity to abnormal conditions. The comprehensive ratio is further calculated only when all parameter ratios do not exceed the upper limit ratio. This method avoids unnecessary complex calculations, especially when processing large amounts of data, and can significantly improve processing speed and efficiency.
[0108] In some embodiments, when at least one parameter ratio corresponding to a candidate defect is greater than an upper limit ratio, the maximum parameter ratio is used as a comprehensive ratio, including: determining a weight coefficient for each parameter ratio corresponding to the candidate defect, and when the parameter ratio with the largest weight coefficient corresponding to the candidate defect is greater than the upper limit ratio, the parameter ratio with the largest weight coefficient is used as a comprehensive ratio.
[0109] By setting an upper limit ratio and combining it with the weight coefficients for each parameter ratio, candidate defects that significantly exceed standard parameters for important dimensional characteristic parameters can be quickly identified. If the parameter ratio with the largest weight coefficient exceeds the preset upper limit ratio, this indicates that the candidate defect deviates significantly from this important dimensional characteristic parameter, potentially seriously impacting the quality of the battery cover. In this case, directly using the parameter ratio with the largest weight coefficient as the overall ratio ensures that extreme cases are not overlooked, thereby enhancing sensitivity and responsiveness to abnormal situations.
[0110] Optionally, the type of the target region where the candidate defect is located may be determined, and the weight coefficient of each parameter ratio corresponding to the candidate defect may be determined according to the type of the target region.
[0111] Optionally, the type of the candidate defect and the type of the target region where the candidate defect is located may be determined, and a weight coefficient of each parameter ratio corresponding to the candidate defect may be determined based on the type of the candidate defect and the type of the target region where the candidate defect is located.
[0112] In some embodiments, calculating a comprehensive ratio based on all parameter ratios corresponding to the candidate defects includes calculating an average of all parameter ratios corresponding to the candidate defects and using the average as the comprehensive ratio. Obtaining the comprehensive ratio by averaging the parameter ratios of all dimensional feature parameters helps improve the balance and fairness of the evaluation results.
[0113] In some embodiments, the average value of all parameter ratios corresponding to the candidate defect is calculated, and the average value is used as the comprehensive ratio, including: determining the type of the target area where the candidate defect is located, and determining the weight coefficient of each parameter ratio corresponding to the candidate defect according to the type of the target area; based on each parameter ratio corresponding to the candidate defect and its weight coefficient, calculating the weighted average value of all parameter ratios corresponding to the candidate defect, and using the weighted average value as the comprehensive ratio.
[0114] As mentioned above, the types of target areas may include sealing surfaces, welding areas, and areas around mounting holes, etc. Different types of target areas have different sensitivities to the same dimensional characteristic parameter. For example, small cracks on the sealing surface may be more serious than in other areas. Therefore, the weight coefficient of the parameter ratio corresponding to each dimensional characteristic parameter of the candidate defect can be set according to the type of target area. Here, the higher the sensitivity of the target area to a certain dimensional characteristic parameter, the greater the weight coefficient of the parameter ratio corresponding to the dimensional characteristic parameter. Therefore, setting the weight coefficient based on the type of target area enables the evaluation process to more accurately reflect the actual impact of each dimensional characteristic parameter on the quality, thereby improving the accuracy of the evaluation results of whether the candidate defect is a real defect. By introducing the weight coefficient, the final comprehensive ratio is not just a simple average value, but a result that fully considers the importance of each dimensional characteristic parameter. The real defects that will actually affect the quality of the battery cover can be targeted and identified according to the type of target area.
[0115] In some embodiments, the type of the target area where the candidate defect is located is determined, and the weight coefficient of each parameter ratio corresponding to the candidate defect is determined based on the type of the target area, including: determining the type of the candidate defect and the type of the target area where the candidate defect is located; determining the weight coefficient of each parameter ratio corresponding to the candidate defect based on the type of the candidate defect and the type of the target area where the candidate defect is located.
[0116] As mentioned above, target area types can include sealing surfaces, weld areas, and areas around mounting holes. Different target areas have different sensitivities to the same dimensional characteristic parameter. For example, a small crack on a sealing surface may be more severe than in other areas. Therefore, a weight coefficient for the parameter ratio corresponding to each dimensional characteristic parameter of a candidate defect can be set based on the target area type. The higher the sensitivity of the target area to a particular dimensional characteristic parameter, the greater the weight coefficient for the parameter ratio corresponding to that dimensional characteristic parameter. Defect types include bubbles, cracks, scratches, and pits, and dimensional characteristic parameters include multiple factors such as length, width, depth, and area. The impact of the same dimensional characteristic parameter on quality varies for different types of candidate defects. For example, the depth of a pit may have a more severe impact on quality than other dimensional characteristic parameters. Therefore, a weight coefficient for the parameter ratio corresponding to each dimensional characteristic parameter of a candidate defect can be set based on the candidate defect type. The greater the impact of a candidate defect dimensional characteristic parameter on quality, the greater the weight coefficient for the parameter ratio corresponding to that dimensional characteristic parameter.
[0117] By combining the candidate defect type and target area type to set the weight coefficient, the evaluation process can more accurately reflect the actual impact of each dimensional characteristic parameter on quality, thereby improving the accuracy of the assessment results on whether the candidate defect is a true defect. By introducing the weight coefficient, the final comprehensive ratio is not just a simple average, but a result that fully considers the importance of each dimensional characteristic parameter. This allows for targeted identification of true defects that will truly affect the quality of the battery cover according to the target area type.
[0118] Combine Figure 7 As shown, the camera device 200 includes a device body 201, a moving mechanism 202, a camera module 203, and a flipping mechanism 204. The device body 201 includes a first end 2011 and a second end 2012 disposed opposite each other. The moving mechanism 202 is disposed on the device body 201 and is used to support the battery cover 300 and drive the battery cover 300 to move between the first end 2011 and the second end 2012 of the device body 201. The camera module 203 is disposed on the device body and is in communication with the defect detection device. It is used to capture an image of the battery cover 300 and transmit the image to the defect detection device 100. The flipping mechanism 204 is disposed on the device body 201, located at the second end 2012 of the device body 201, and is used to rotate and flip the battery cover 300.
[0119] In some embodiments, the barcode scanner 205 is disposed on the device body 201 , and the barcode scanner 205 is used to obtain identification information of the battery cover 300 and send the identification information to the defect detection device 100 .
[0120] Using the camera device 200 provided in the present disclosure, the step of inspecting the surface of the battery cover 300 includes placing the battery cover 300 on the moving mechanism 202, which drives the battery cover 300 to move between the first end 2011 and the second end 2012 of the device body 201. During this movement, the barcode scanner 205 scans identification information on a surface of the battery cover 300, the camera module 203 captures an image containing the battery cover 300, the barcode scanner 205 transmits the identification information to the defect detection device 100, and the camera module 203 transmits the image to the defect detection device 100.
[0121] The battery cover 300 moves to the flipping mechanism 204 at the second end 2012. The flipping mechanism 204 grips the battery cover 300 and rotates it to flip it over. After flipping, the moving mechanism 202 moves the battery cover 300 back from the second end 2012 of the device body 201 to the first end 2011. During this backward movement, the barcode scanner 205 scans the identification information on the other surface of the battery cover 300. The camera module 203 captures an image of the battery cover 300. The barcode scanner 205 transmits the identification information to the defect detection device 100, and the camera module 203 transmits the image to the defect detection device 100.
[0122] After receiving an image of the battery cover 300, the defect detection device 100 can execute the defect detection method of the above embodiment. After obtaining information about the actual defect of the battery cover 300, the defect detection device 100 binds and records the actual defect information with the corresponding identification information, and then outputs the information about the actual defect of the battery cover.
[0123] Combine Figure 8 As shown, the present disclosure provides a battery cover defect detection device 100 including a processor 101 and a memory 102. Optionally, the device 100 may further include a communication interface 103 and a bus 104. The processor 101, the communication interface 103, and the memory 102 may communicate with each other via the bus 104. The communication interface 103 may be used for information transmission. The processor 101 may call the logic instructions in the memory 102 to execute the battery cover defect detection method of the above embodiment.
[0124] In addition, the logic instructions in the memory 102 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0125] Memory 102, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 101 executes the program instructions / modules stored in memory 102 to perform functional applications and data processing, thereby implementing the battery cover defect detection method in the above-mentioned embodiment.
[0126] The memory 102 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Furthermore, the memory 102 may include high-speed random access memory and non-volatile memory.
[0127] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned battery cover defect detection method.
[0128] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transitory storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code. The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible variations. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terms used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more of the associated listings. In addition, when used in this application, the term "comprise" and its variations "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups of these. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method or apparatus comprising the element. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can be referred to the description of the method part.
[0129] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0130] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, and can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of the present disclosure may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0131] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operations of the systems, methods and computer program products according to the embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A battery cover defect detection method, characterized in that: include: Identifying target areas and suspected defects in an image containing a battery cover; Performing an intersection operation on the target area and the suspected defects to determine the suspected defects located in the target area, and taking the suspected defects located in the target area as candidate defects; Comparing each size characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a comparison result; When the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, and the information of the real defect of the battery cover is recorded and output.
2. The battery cover defect detection method according to claim 1, characterized in that: Identify target areas and suspected defects in an image containing a battery cover, including: Identifying position information of the battery cover in an initial image containing the battery cover; Based on the position information of the battery cover, the battery cover is straightened in the initial image; Cropping the initial image into a target image of a preset size, wherein the target image includes the complete battery cover; Target areas and suspected defects are identified in a target image containing a battery cover.
3. The battery cover defect detection method according to claim 1, characterized in that: Identify target areas and suspected defects in an image containing a battery cover, including: An image containing a battery cover is input into an image recognition model, and the target area and suspected defects are identified using the image recognition model, wherein the image recognition model is trained based on a first sample image of a battery cover containing defects and a second sample image of a battery cover not containing defects.
4. The battery cover defect detection method according to claim 1, characterized in that: Perform an intersection operation on the target area and the suspected defects to determine the suspected defects located in the target area. The suspected defects located in the target area are used as candidate defects, including: An intersection operation is performed on the target area and the suspected defect to determine the suspected defect that has an intersection area with the target area, and the determined suspected defect is used as a candidate defect.
5. The battery cover defect detection method according to claim 1, characterized in that: Comparing each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a comparison result, including: comparing each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a size relationship between each dimension characteristic parameter and the corresponding standard parameter; When the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, including: when each size characteristic parameter of the candidate defect is greater than the corresponding standard parameter, the candidate defect is determined to be a real defect.
6. The battery cover defect detection method according to claim 1, characterized in that: Comparing each dimension characteristic parameter of the candidate defect with the corresponding standard parameter to obtain a comparison result, including: comparing each dimension characteristic parameter of the candidate defect with the standard parameter corresponding to the dimension characteristic parameter to obtain a parameter ratio, and obtaining a comprehensive ratio based on the parameter ratios corresponding to all dimension characteristic parameters of the candidate defect; When the comparison result corresponding to the candidate defect meets the preset defect condition, the candidate defect is determined to be a real defect, including: when the corresponding comprehensive ratio of the candidate defect is greater than the standard ratio, the candidate defect is determined to be a real defect.
7. The battery cover defect detection method according to claim 6, characterized in that: A comprehensive ratio is obtained based on the parameter ratios corresponding to all size characteristic parameters of the candidate defect, including: Compare each parameter ratio corresponding to the candidate defect with a preset upper limit ratio; When all parameter ratios corresponding to the candidate defects are not greater than the upper limit ratio, a comprehensive ratio is calculated based on all parameter ratios corresponding to the candidate defects; Alternatively, when at least one parameter ratio corresponding to the candidate defect is greater than the upper limit ratio, the maximum parameter ratio is used as the comprehensive ratio.
8. The battery cover defect detection method according to claim 7, characterized in that: Calculating a comprehensive ratio based on all parameter ratios corresponding to the candidate defects includes: calculating an average value of all parameter ratios corresponding to the candidate defects, and using the average value as the comprehensive ratio.
9. The battery cover defect detection method according to claim 8, characterized in that: Calculate the average value of all parameter ratios corresponding to the candidate defect and use the average value as the comprehensive ratio, including: Determine the type of the target area where the candidate defect is located, and determine the weight coefficient of each parameter ratio corresponding to the candidate defect according to the type of the target area; Based on each parameter ratio corresponding to the candidate defect and its weight coefficient, the weighted average of all parameter ratios corresponding to the candidate defect is calculated, and the weighted average is used as the comprehensive ratio.
10. The battery cover defect detection method according to claim 9, characterized in that: Determine the type of the target area where the candidate defect is located, and determine the weight coefficient of each parameter ratio corresponding to the candidate defect based on the type of the target area, including: Determine the type of the candidate defect and the type of the target area where the candidate defect is located; The weight coefficient of each parameter ratio corresponding to the candidate defect is determined according to the type of the candidate defect and the type of the target area where the candidate defect is located.
11. The battery cover defect detection method according to any one of claims 1 to 10, characterized in that: Size characteristic parameters include length, width, depth and area.
12. A battery cover defect detection device, comprising a processor and a memory storing program instructions, characterized in that: The processor executes the battery cover defect detection method according to any one of claims 1 to 11.
13. A storage medium, characterized in that: The storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the battery cover defect detection method according to any one of claims 1 to 11 is executed.
Citation Information
Cited By
Insulated cable appearance detection method and system based on machine vision
CN121121317A
Liquid cooling joint defect evaluation method and system based on visual analysis
CN121724991A