Aluminum shell defect detection method, controller and storage medium

By using detection models and shielding models in aluminum shell defect detection, confidence and morphological similarity are calculated, and target defects are screened out, the problems of low detection efficiency and misidentification in the prior art are solved, and higher detection accuracy and pass-through rate are achieved.

CN119722586APending Publication Date: 2025-03-28SHENZHEN GREENING ARTIFICIAL INTELLIGENCE & ROBOTICS RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411705524.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the prior art, aluminum shell defect detection efficiency is low and easy to be misidentified, resulting in product inspection, reducing direct throughput, increasing production costs and capacity losses.

Method used

A method for detecting aluminum shell defects is proposed. By obtaining the defect area image and defect heat map of aluminum shell defects, using preset detection models and shielding models, the detection confidence, position confidence and morphological similarity are calculated, and the target defects are screened out, and the accuracy and efficiency of detection are improved.

Benefits of technology

It effectively improves the direct throughput rate of aluminum shell defect detection, reduces product inspection, and reduces production costs and capacity losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722586A_ABST
    Figure CN119722586A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an aluminum shell defect detection method, a controller and a storage medium. The method comprises the steps that a first aluminum shell defect area image and a defect thermodynamic diagram are acquired; inputting the first aluminum shell defect area image into a preset detection model, and outputting a detection confidence coefficient through the detection model; determining a first pixel coordinate of an aluminum shell defect in the first aluminum shell defect area image, and obtaining a position confidence coefficient according to the first pixel coordinate and the defect thermodynamic diagram; obtaining morphological similarity according to a pre-trained shielding model and the first aluminum shell defect area image; determining the confidence of a plurality of defects in the first aluminum shell defect area image according to the detection confidence, the position confidence and the form similarity, and screening out a target defect from the plurality of defects according to the confidence; according to the method, the target defect is screened out from the multiple defects according to the confidence obtained through calculation, so that the first pass yield of aluminum shell defect detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of defect detection, and in particular to a method, a controller, and a storage medium for detecting defects in an aluminum shell. Background Art

[0002] In related technologies, with the rapid development of the power battery industry, especially the increasing market share of square shell batteries, aluminum shells have gradually become the mainstream choice due to their high energy density and good heat dissipation performance. However, during the production process, aluminum shells may have scratches, dents, bulges, missing materials, flatness, dirt, size and other defects, which will directly affect the safety and performance of the battery. Traditional manual visual inspection methods are limited by the speed, accuracy, working environment, objectivity and reliability of the human eye, so they have low detection efficiency, are prone to misdetection and missed detection, and have inconsistent standards and poor stability. Therefore, the industry has begun to turn to machine vision inspection technology to improve the efficiency and accuracy of inspections.

[0003] However, some local minor defects or non-defects may also be misidentified by machine vision, causing a large number of products to fail inspection, thereby reducing the product pass rate; products that pass inspection require additional re-inspection processes, which consumes more manpower and time, increasing production costs; in order to process products that pass inspection, the production line may need to be paused or slowed down, which will lead to overall production capacity loss. Therefore, how to improve the pass rate of aluminum shell defect detection is the main problem currently facing the industry. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method for detecting aluminum shell defects, a controller, and a storage medium, aiming to improve the pass rate of aluminum shell defect detection.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting aluminum shell defects, the method comprising: Acquire a defect area image and a defect thermal map of the first aluminum shell; Inputting the first aluminum shell defect area image into a preset detection model, and outputting the detection confidence through the detection model; Determine a first pixel coordinate of an aluminum shell defect in the first aluminum shell defect region image, and obtain a position confidence according to the first pixel coordinate and the defect heat map; Obtaining morphological similarity based on the pre-trained shielding model and the first aluminum shell defect area image; The confidences of the multiple defects in the first aluminum shell defect area image are determined according to the detection confidence, the position confidence and the morphological similarity, and the target defect is screened out from the multiple defects according to the confidence.

[0006] According to some embodiments of the present application, before obtaining the defect thermal map, the method further includes: Acquire the second pixel coordinates of the aluminum shell defect in a plurality of second aluminum shell defect region images where real defects are detected; The defect thermogram is determined according to each of the second pixel coordinates.

[0007] According to some embodiments of the present application, determining the defect heat map according to each of the second pixel coordinates includes: Projecting each of the second pixel coordinates onto the same empty image to obtain a defect distribution map; Determine the number of defects in each of the second pixel coordinate neighborhoods according to the defect distribution map; determining a thermal value according to the number of defects, and generating a first thermal map according to the thermal value; Gaussian filtering is performed on the first thermogram to obtain a defect thermogram.

[0008] According to some embodiments of the present application, the method further includes: When the target defect is screened out from the first aluminum shell defect area image, the defect heat map is updated and iterated.

[0009] According to some embodiments of the present application, obtaining the position confidence according to the first pixel coordinates and the defect heat map includes: Determine a third pixel coordinate corresponding to the first pixel coordinate from the defect thermodynamic map, and use a preset thermodynamic value corresponding to the third pixel coordinate as the thermodynamic value of the first pixel coordinate; The position confidence is obtained according to the thermal value of the first pixel coordinate.

[0010] According to some embodiments of the present application, obtaining the morphological similarity based on the pre-trained shielding model and the first aluminum shell defect area image includes: Inputting the first aluminum shell defect area image into a preset feature extraction network, and outputting a first defect feature through the feature extraction network; The morphological similarity is obtained according to the first defect feature and the pre-trained shielding model.

[0011] According to some embodiments of the present application, the method further includes: Acquire a first image of a defect area in a plurality of defect images; Extracting features from the first image using the preset feature extraction network to obtain second defect features; determining the shielding model according to the second defect characteristic; The second defect feature is a defect feature that needs to be shielded.

[0012] According to some embodiments of the present application, the confidence level is calculated by the following formula:

[0013] in, is the confidence level, is the first specific gravity coefficient, To obtain the detection confidence, is the second specific gravity coefficient, is the position confidence, is the third weighting coefficient, the detection confidence, the position confidence and the confidence are positively correlated, and the morphological similarity and the confidence are negatively correlated.

[0014] In a second aspect, an embodiment of the present application provides a controller, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the aluminum shell defect detection method of the first aspect mentioned above when running the computer program.

[0015] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the aluminum shell defect detection method as described in the first aspect above.

[0016] According to the technical solution of the embodiment of the present application, at least the following beneficial effects are achieved: the embodiment of the present application proposes a method for detecting aluminum shell defects, a controller, and a storage medium, the method comprising: obtaining a first aluminum shell defect area image and a defect heat map; secondly, inputting the first aluminum shell defect area image into a preset detection model, and outputting a detection confidence through the detection model; thirdly, determining a first pixel coordinate of the aluminum shell defect in the first aluminum shell defect area image, and obtaining a position confidence according to the first pixel coordinate and the defect heat map; then, obtaining a morphological similarity according to a pre-trained shielding model and the first aluminum shell defect area image; finally, determining the confidence of multiple defects in the first aluminum shell defect area image according to the detection confidence, the position confidence and the morphological similarity, and screening out a target defect from the multiple defects according to the confidence; since the embodiment of the present application can determine the confidence of multiple defects in the first aluminum shell defect area image by detection confidence, position confidence and morphological similarity, and screen out a target defect from the multiple defects according to the confidence, the pass rate of aluminum shell defect detection can be improved.

[0017] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0019] Figure 1 is a flow chart of a method for detecting aluminum shell defects provided by an embodiment of the present application; Figure 2 is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; Figure 3 is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; Figure 4 is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; Figure 5 is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; Figure 6 is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; Figure 7 is a flow chart of generating position confidence provided by an embodiment of the present application; Figure 8 is a flow chart of generating a defect heat map provided by an embodiment of the present application; Fig. 9 is a flow chart of generating morphological similarity provided by an embodiment of the present application; Fig.10 It is a schematic diagram of a controller for executing a method for detecting aluminum shell defects provided in one embodiment of the present application. DETAILED DESCRIPTION

[0020] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0021] In the description of the present application, it should be understood that descriptions involving orientation, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0022] In the description of this application, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0023] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.

[0024] In some cases, with the rapid development of the power battery industry, especially the increasing market share of square shell batteries, aluminum shells have gradually become the mainstream choice due to their high energy density and good heat dissipation performance. However, during the production process, aluminum shells may have scratches, dents, protrusions, missing materials, flatness, dirt, size and other defects, which will directly affect the safety and performance of the battery. Traditional manual visual inspection methods are limited by the speed, accuracy, working environment, objectivity and reliability of the human eye, and have low detection efficiency, easy to misdetect and miss detection, and have inconsistent standards and poor stability. Therefore, the industry has begun to turn to machine vision inspection technology to improve the efficiency and accuracy of inspections.

[0025] However, some local minor defects or non-defects may also be misidentified by machine vision, causing a large number of products to fail inspection, thereby reducing the product pass rate; products that pass inspection require additional re-inspection processes, which consumes more manpower and time, increasing production costs; in order to process products that pass inspection, the production line may need to be paused or slowed down, which will lead to overall production capacity loss. Therefore, how to improve the pass rate of aluminum shell defect detection is the main problem currently facing the industry.

[0026] Based on the above situation, the present application proposes a method for detecting aluminum shell defects, a controller, and a storage medium, aiming to improve the pass rate of aluminum shell defect detection.

[0027] The following further describes various embodiments of the method for detecting aluminum shell defects of the present application in conjunction with the accompanying drawings.

[0028] like Figure 1 As shown, Figure 1 It is a flow chart of a method for detecting aluminum shell defects provided by an embodiment of the present application; the method for detecting aluminum shell defects may include but is not limited to step S110, step S120, step S130, step S140 and step S150.

[0029] Step S110, obtaining a defect area image and a defect thermal map of the first aluminum shell; Step S120, inputting the first aluminum shell defect area image into a preset detection model, and outputting the detection confidence through the detection model; Step S130, determining the first pixel coordinates of the aluminum shell defect in the first aluminum shell defect region image, and obtaining the position confidence according to the first pixel coordinates and the defect heat map; Step S140, obtaining morphological similarity based on the pre-trained shielding model and the first aluminum shell defect area image; Step S150: determining the confidence of multiple defects in the first aluminum shell defect area image according to the detection confidence, the position confidence and the morphological similarity, and screening out the target defect from the multiple defects according to the confidence.

[0030] In one embodiment, first, a first aluminum shell defect area image and a defect heat map are obtained; secondly, the first aluminum shell defect area image is input into a preset detection model, and the first aluminum shell defect area image is detected by the detection model to output a detection confidence; thirdly, the first pixel coordinates of the aluminum shell defect in the first aluminum shell defect area image are determined, and the position confidence is obtained according to the first pixel coordinates and the defect heat map; then, the morphological similarity is obtained by using a pre-trained shielding model and the first aluminum shell defect area image; finally, the confidence of multiple defects in the first aluminum shell defect area image is determined according to the obtained detection confidence, position confidence and morphological similarity, and the target defect is screened out from the multiple defects according to the confidence; therefore, the embodiment of the present application can improve the pass rate of aluminum shell defect detection.

[0031] It can be understood that the target defects refer to real defects, such as scratches, dents, protrusions, missing materials, flatness, dirt, size and other defects.

[0032] It can be understood that the embodiment of the present application determines the confidence of multiple defects in the first aluminum shell defect area image by obtaining detection confidence, position confidence and morphological similarity, and screens out the target defect from the multiple defects according to the confidence. Therefore, it can avoid the situation where the product fails to be inspected due to machine vision misidentification caused by non-defects, thereby improving the pass rate of aluminum shell defect detection.

[0033] It can be understood that the confidence can be calculated by the following formula: ,in, is the confidence level, is the first specific gravity coefficient, To obtain the detection confidence, is the second specific gravity coefficient, is the position confidence, is the third specific gravity coefficient.

[0034] It can be understood that the detection confidence, position confidence and confidence are positively correlated, and the morphological similarity and confidence are negatively correlated.

[0035] It can be understood that the first specific gravity coefficient, the second specific gravity coefficient and the third specific gravity coefficient mentioned above can be set according to actual conditions, and the embodiments of the present application do not specifically limit them.

[0036] It can be understood that the morphological similarity reflects the possibility that the aluminum shell defect in the first aluminum shell defect region image is not a real defect and needs to be shielded from the perspective of defect morphology.

[0037] It can be understood that the confidence of multiple defects in the first aluminum shell defect area image is determined by the obtained detection confidence, position confidence and morphological similarity. When the confidence is greater than or equal to the preset threshold, the defect is determined to be a real defect. When the confidence is less than the preset threshold, the defect is determined to be a non-real defect, that is, the defect may be caused by machine vision misrecognition caused by reflection or texture.

[0038] It is understandable that the preset threshold value may be 0.5 or 0.6, and may be set according to actual conditions, and the embodiments of the present application do not specifically limit it.

[0039] Exemplarily, the confidence of multiple defects in the first aluminum shell defect area image is determined by the obtained detection confidence, position confidence and morphological similarity. When the confidence is greater than or equal to 0.5, the defect is determined to be a real defect. When the confidence is less than 0.5, the defect is determined to be a non-real defect, that is, the defect may be caused by machine vision misrecognition caused by reflection or texture.

[0040] In addition, if Figure 2 As shown, Figure 2 This is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; before obtaining the defect heat map in the above step S110, it may include but is not limited to step S210 and step S220.

[0041] Step S210, obtaining second pixel coordinates of a plurality of second aluminum shell defect region images where real defects are detected; Step S220: determining a defect heat map according to each second pixel coordinate.

[0042] In one embodiment, from a plurality of products with real defects detected, a second aluminum shell defect region image of the product is obtained, and the second pixel coordinates of the second aluminum shell defect region image are determined, and then the defect heat map is determined by each second pixel coordinate. Therefore, the embodiment of the present application can determine the position confidence through the defect heat map to obtain the confidence of the defect, thereby obtaining the target defect.

[0043] In addition, if Figure 3 As shown, Figure 3 It is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; regarding the above-mentioned step S220, it may include but is not limited to step S310, step S320, step S330 and step S340.

[0044] Step S310, projecting each second pixel coordinate onto the same empty image to obtain a defect distribution map; Step S320, determining the number of defects in each second pixel coordinate neighborhood according to the defect distribution map; Step S330, determining a thermal value according to the number of defects, and generating a first thermal map according to the thermal value; Step S340: Perform Gaussian filtering on the first thermogram to obtain a defect thermogram.

[0045] In one embodiment, from a plurality of products with real defects detected, a second aluminum shell defect area image of the product is obtained, and the second pixel coordinates of the second aluminum shell defect area image are determined. Then, each second pixel coordinate is projected onto the same empty image to obtain a defect distribution map; then, the number of defects in the neighborhood of each second pixel coordinate is determined according to the defect distribution map, and the thermal value is determined according to the number of defects, thereby obtaining a first thermal map; finally, the first thermal map is Gaussian filtered to obtain a defect thermal map. Therefore, the embodiment of the present application can determine the position confidence through the defect thermal map to obtain the confidence of the defect, thereby obtaining the target defect.

[0046] It can be understood that the embodiment of the present application can make the obtained defect thermogram smooth by performing Gaussian filtering on the first thermogram.

[0047] In addition, in one embodiment, when the target defect is screened out from the first aluminum shell defect area image, the defect heat map is updated and iterated.

[0048] It is understandable that in the production process, the continuous influx of new products will also bring about the continuous influx of new defects. Therefore, after each product inspection is completed, the real defects screened out need to be included in the statistics of the defect heat map, and the defect heat map needs to be updated and iterated.

[0049] In addition, if Figure 4 As shown, Figure 4 It is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; regarding the above-mentioned step S130 of obtaining position confidence according to the first pixel coordinates and the defect heat map, it may include but is not limited to step S410 and step S420.

[0050] Step S410, determining a third pixel coordinate corresponding to the first pixel coordinate from the defect thermodynamic map, and using a preset thermodynamic value corresponding to the third pixel coordinate as the thermodynamic value of the first pixel coordinate; Step S420: Obtain position confidence according to the thermal value of the first pixel coordinate.

[0051] In one embodiment, after determining the first pixel coordinate of the aluminum shell defect in the first aluminum shell defect area image, the third pixel coordinate corresponding to the first pixel coordinate can be obtained from the defect thermal map, and the preset thermal value corresponding to the third pixel coordinate is used as the thermal value of the first pixel coordinate, thereby obtaining the position confidence based on the thermal value of the first pixel coordinate.

[0052] It can be understood that the numerical value of the thermal value of the first pixel coordinate is the numerical value of the position confidence.

[0053] In addition, if Figure 5 As shown, Figure 5 It is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; regarding the above-mentioned step S140, it may include but is not limited to step S510 and step S520.

[0054] Step S510, inputting the first aluminum shell defect area image into a preset feature extraction network, and outputting the first defect feature through the feature extraction network; Step S520: obtaining morphological similarity according to the first defect feature and the pre-trained shielding model.

[0055] In one embodiment, after a new defect is detected, the detection frame is used to cut out the defect area image to obtain a first aluminum shell defect area image, and a preset feature extraction network is used to extract defect features from the first aluminum shell defect area image to obtain a first defect feature. Then, the cosine similarity is calculated based on the first defect feature and the defect feature in the pre-trained shielding model to obtain the morphological similarity.

[0056] It can be understood that the morphological similarity reflects the possibility that the aluminum shell defect in the first aluminum shell defect region image is not a real defect and needs to be shielded from the perspective of defect morphology.

[0057] In addition, if Figure 6 As shown, Figure 6 It is a flow chart of a method for detecting aluminum shell defects provided by another embodiment of the present application; the method for detecting aluminum shell defects may also include but is not limited to step S610, step S620 and step S630.

[0058] Step S610, obtaining a first image of a defect area in a plurality of defect images; Step S620: extracting features from the first image using a preset feature extraction network to obtain second defect features; Step S630: determine a shielding model according to the second defect feature.

[0059] In one embodiment, multiple defect images are obtained, and images of defect areas are cut out to obtain a first image. A preset feature extraction network is used to extract features from the first image to obtain second defect features, and each of the obtained second defect features is used as a shielding model.

[0060] It can be understood that the above-mentioned multiple defect images can be 18, 19, 20 or 21, and the embodiments of the present application do not specifically limit it.

[0061] Exemplarily, 20 defect images are obtained, and images of defective areas are cut out to obtain a first image, and features of the first image are extracted using a preset feature extraction network to obtain second defect features, and each second defect feature obtained is used as a shielding model.

[0062] It can be understood that the second defect feature is a defect feature that needs to be shielded.

[0063] Based on the above-mentioned methods for detecting aluminum shell defects in various embodiments, overall embodiments of the methods for detecting aluminum shell defects of the present application are respectively proposed below.

[0064] 1. Generate location confidence based on defect heat map like Figure 7 As shown, Figure 7 This is a flowchart of generating position confidence provided by an embodiment of the present application.

[0065] (1) Generate defect heat map based on historical data The defects generated during the production of aluminum shells are often caused by the production process. Although there is a certain degree of randomness, when the amount of data reaches a certain scale, statistics tend to have certain rules, and the location of the defect is one of them.

[0066] like Figure 8 As shown, Figure 8 This is a flowchart for generating a defect heat map provided by an embodiment of the present application.

[0067] In this scheme, we collect the pixel coordinates of the defects detected in each product and project them into the same empty image. Then we get the distribution map of all defects. Each pixel determines its thermal value according to the number of defects in its neighborhood to generate the first thermal map. In order to make the thermal map smoother, we perform Gaussian filtering on it to obtain the defect thermal map.

[0068] During the production process, the continuous influx of new products will also bring about the continuous influx of new defects. Therefore, after each product inspection is completed, its defects need to be included in the statistics of the defect heat map, and the defect heat map needs to be continuously updated and iterated.

[0069] (2) Generate position confidence After a new defect is detected, its pixel coordinates are projected into the current defect heat map, and its corresponding heat value is its position confidence. This parameter reflects the possibility that the defect is a real defect from the perspective of the defect location.

[0070] 2. Generate morphological similarity based on small batch masked samples like Fig. 9 As shown, Fig. 9 This is a flowchart for generating morphological similarity provided by an embodiment of the present application.

[0071] (1) Generate shielding model Since the defects are usually caused by reflection or texture, their shapes are often similar and batch-specific. When we find that a part of the product has been inspected during the production process, we need to respond quickly to block subsequent defects of the same type.

[0072] In this scheme, we collect a small batch of about 20 defect images, cut out the images of the defect area, and use the feature extraction network to generate the defect features that need to be masked as the masking model.

[0073] (2) Calculate morphological similarity After a new defect is detected, we use the detection box to cut out the defect area image, use the same feature extraction network to extract the defect features, and calculate the cosine similarity with the features of the shielding model to obtain its morphological similarity. This parameter reflects the possibility that the defect is not a real defect and needs to be shielded from the perspective of defect morphology.

[0074] 3. Generate detection confidence After a new defect is detected, the image of the defect area is input into the preset detection model, and the detection confidence is output through the detection model.

[0075] 4. Feature fusion based on detection confidence, position confidence, and morphological similarity According to a certain weight distribution, the detection confidence, position confidence, and morphological similarity of the detection model are integrated, and the obtained score is used as the confidence that the defect is a true defect. Here, the detection confidence, position confidence and final confidence are positively correlated, and the morphological similarity and the final confidence are negatively correlated.

[0076] The confidence level can be calculated using the following formula: ,in, is the confidence level, is the first specific gravity coefficient, To obtain the detection confidence, is the second specific gravity coefficient, is the position confidence, is the third specific gravity coefficient.

[0077] Based on the above-mentioned methods for detecting aluminum shell defects in various embodiments, various embodiments of the controller and computer-readable storage medium of the present application are respectively proposed below.

[0078] like Fig.10 As shown, Fig.10 700 is a schematic diagram of a controller for executing a method for detecting aluminum shell defects provided by an embodiment of the present application. The controller 700 implemented in the present application includes: a processor 710, a memory 720, and a computer program stored in the memory 720 and executable on the processor 710, wherein: Fig.10 In the figure, a processor 710 and a memory 720 are taken as an example.

[0079] The processor 710 and the memory 720 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0080] The memory 720, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 720 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 720 optionally includes a memory 720 remotely arranged relative to the processor 710, and these remote memories 720 can be connected to the controller 700 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0081] Those skilled in the art will understand that Fig.10 The device structure shown in the figure does not constitute a limitation on the controller 700, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0082] exist Fig.10 In the controller 700 shown, the processor 710 can be used to call the control program stored in the memory 720, so as to implement the above-mentioned aluminum shell defect detection method. Specifically, the non-transient software program and instructions required to implement the aluminum shell defect detection method of the above-mentioned embodiment are stored in the memory 720, and when executed by the processor 710, the aluminum shell defect detection method of the above-mentioned embodiment is executed.

[0083] It is worth noting that since the controller 700 of the embodiment of the present application can execute the aluminum shell defect detection method of any of the above-mentioned embodiments, the specific implementation manner and technical effects of the controller 700 of the embodiment of the present application can refer to the specific implementation manner and technical effects of the aluminum shell defect detection method of any of the above-mentioned embodiments.

[0084] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to execute the above-mentioned aluminum shell defect detection method. Figures 1 to 6 The method steps in .

[0085] It is worth noting that since the computer-readable storage medium of the embodiment of the present application can execute the aluminum shell defect detection method of any of the above-mentioned embodiments, the specific implementation manner and technical effects of the computer-readable storage medium of the embodiment of the present application can refer to the specific implementation manner and technical effects of the aluminum shell defect detection method of any of the above-mentioned embodiments.

[0086] It will be appreciated by those skilled in the art that all or some of the steps and systems in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0087] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0088] In several embodiments provided in the present application, it should be understood that the disclosed systems, apparatuses and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of apparatuses or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed 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 according to actual needs to achieve the purpose of the scheme of this embodiment.

[0089] It should also be understood that the various implementations provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0090] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions under the shared conditions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A method for detecting aluminum shell defects, characterized in that: The method comprises: Acquire a defect area image and a defect thermal map of the first aluminum shell; Inputting the first aluminum shell defect area image into a preset detection model, and outputting the detection confidence through the detection model; Determine a first pixel coordinate of an aluminum shell defect in the first aluminum shell defect region image, and obtain a position confidence according to the first pixel coordinate and the defect heat map; Obtaining morphological similarity based on the pre-trained shielding model and the first aluminum shell defect area image; The confidences of the multiple defects in the first aluminum shell defect area image are determined according to the detection confidence, the position confidence and the morphological similarity, and the target defect is screened out from the multiple defects according to the confidence.

2. The method for detecting aluminum shell defects according to claim 1, characterized in that: Before obtaining the defect thermal map, the method further includes: Acquire the second pixel coordinates of the aluminum shell defect in a plurality of second aluminum shell defect region images where real defects are detected; The defect thermogram is determined according to each of the second pixel coordinates.

3. The method for detecting aluminum shell defects according to claim 2, characterized in that: The step of determining the defect heat map according to each of the second pixel coordinates includes: Projecting each of the second pixel coordinates onto the same empty image to obtain a defect distribution map; Determine the number of defects in each of the second pixel coordinate neighborhoods according to the defect distribution map; determining a thermal value according to the number of defects, and generating a first thermal map according to the thermal value; Gaussian filtering is performed on the first thermogram to obtain a defect thermogram.

4. The method for detecting aluminum shell defects according to claim 1, characterized in that: The method further comprises: When the target defect is screened out from the first aluminum shell defect area image, the defect heat map is updated and iterated.

5. The method for detecting aluminum shell defects according to claim 1, characterized in that: The obtaining of position confidence according to the first pixel coordinates and the defect heat map includes: Determine a third pixel coordinate corresponding to the first pixel coordinate from the defect thermodynamic map, and use a preset thermodynamic value corresponding to the third pixel coordinate as the thermodynamic value of the first pixel coordinate; The position confidence is obtained according to the thermal value of the first pixel coordinate.

6. The method for detecting aluminum shell defects according to claim 1, characterized in that: The obtaining of morphological similarity based on the pre-trained shielding model and the first aluminum shell defect area image includes: Inputting the first aluminum shell defect area image into a preset feature extraction network, and outputting a first defect feature through the feature extraction network; The morphological similarity is obtained according to the first defect feature and the pre-trained shielding model.

7. A method for detecting aluminum shell defects according to claim 6, characterized in that: The method further comprises: Acquire a first image of a defect area in a plurality of defect images; Extracting features from the first image using the preset feature extraction network to obtain second defect features; determining the shielding model according to the second defect characteristic; The second defect feature is a defect feature that needs to be shielded.

8. The method for detecting aluminum shell defects according to claim 1, characterized in that: The confidence level is calculated by the following formula: in, is the confidence level, is the first specific gravity coefficient, To obtain the detection confidence, is the second specific gravity coefficient, is the position confidence, is the third weighting coefficient, the detection confidence, the position confidence and the confidence are positively correlated, and the morphological similarity and the confidence are negatively correlated.

9. A controller, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for detecting aluminum shell defects as claimed in any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the aluminum shell defect detection method as described in any one of claims 1 to 8.