Method, apparatus and computer readable storage medium for defect detection
Patent Information
- Application Number
- CN202280006731.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-08-30
AI Technical Summary
[0003]然而,在对产品进行检测的过程中,由于缺陷的位置敏感性,需要将卷积神经网络检测与逻辑后处理的方式相结合,检测效率较低,因此,亟需提升产品缺陷检测效率
Smart Images

Figure CN117957438B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus and computer-readable storage medium for defect detection. Background Technology
[0002] In modern industrial production, products may have certain defects due to factors such as processes and equipment. Therefore, it is necessary to use various methods to test the products, detect defects, and improve product yield.
[0003] However, during product inspection, due to the location sensitivity of defects, it is necessary to combine convolutional neural network detection with logical post-processing, which results in low detection efficiency. Therefore, it is urgent to improve the efficiency of product defect detection. Summary of the Invention
[0004] This application provides a method, apparatus, and computer-readable storage medium for defect detection, which can improve the sensitivity of the detection neural network to spatial location, thereby enhancing the detection accuracy of the detection neural network for some characteristic defect types and improving the accuracy of defect detection.
[0005] In a first aspect, a method for defect detection is provided, comprising: acquiring an image to be detected; acquiring a feature map of the image to be detected based on the image to be detected, wherein the feature map of the image to be detected includes a feature map of spatial location coordinate information; and performing defect detection on the image to be detected based on the feature map of the image to be detected.
[0006] In the technical solution of this application, by modifying the neural network structure for defect detection, feature maps containing spatial coordinate information are extracted simultaneously during the detection process. This makes the neural network for defect detection sensitive to spatial location, thereby improving the sensitivity of the detection neural network to spatial location, and thus enhancing the detection accuracy of the detection neural network for some specific defect types, thereby improving the accuracy of defect detection.
[0007] In some possible implementations, the feature map of the image to be detected further includes a feature map of image information. Obtaining the feature map of the image to be detected based on the image to be detected includes: obtaining the feature map of the image information based on the image to be detected; and generating a feature map of the spatial location coordinate information based on the feature map of the image information, wherein the dimension of the feature map of the spatial location coordinate information is the same as the dimension of the feature map of the image information.
[0008] The above implementation method first obtains the feature map of image information, and then obtains the feature map of spatial location coordinate information based on the feature map of image information, so that the two types of feature maps have the same dimension, which facilitates subsequent image processing and improves the accuracy of defect detection.
[0009] In some possible implementations, generating the feature map of the spatial location coordinate information based on the feature map of the image information includes: generating linear values corresponding to the spatial location coordinate information; generating a first coordinate network based on the linear values; and expanding the dimensions of the first coordinate network based on the feature map of the image information to generate the feature map of the spatial location coordinate information.
[0010] The above implementation generates a feature map of spatial location coordinate information by generating a coordinate network corresponding to the spatial location coordinate information. The location feature map is then stitched into the feature map of the image information. The combination of the two improves the sensitivity of spatial information and helps to improve the accuracy of defect detection.
[0011] In some possible implementations, the step of performing defect detection on the image to be detected based on the feature map of the image to be detected includes: performing defect detection on the image to be detected using a filter model based on the feature map of the image to be detected, wherein the filter model includes a filter for processing the feature map of the spatial location coordinate information.
[0012] In the above implementation method, corresponding filters are added to the feature map corresponding to the spatial location coordinate information in subsequent detection, thereby facilitating defect detection and improving the accuracy of defect detection.
[0013] In some possible implementations, the filter is the filter of the first convolutional layer.
[0014] In some possible implementations, the feature map of the spatial position coordinate information includes at least one of the x-axis direction coordinate information feature map, the y-axis direction coordinate information feature map, and the z-axis direction coordinate information feature map.
[0015] The above implementation provides multiple spatial sensitivity types by defining the feature map of spatial location coordinate information as a feature map of at least one of x, y, and z, which facilitates defect detection and improves the accuracy of defect detection.
[0016] In some possible implementations, the method is used for defect detection of tabs and / or electrodes.
[0017] The above-described embodiments can improve the production efficiency of power batteries when used for defect detection of tabs / plates in power batteries.
[0018] In some possible implementations, when the method is used for defect detection of the tab, the defect detection of the tab includes defect detection of the tab folding feature.
[0019] The above-described embodiments, due to the positional sensitivity of the tab folding feature, can improve the detection accuracy when used for folding defect detection.
[0020] In some possible implementations, obtaining the feature map of the image to be detected based on the image to be detected includes: inputting the image to be detected into a neural network; and extracting defect feature vectors and corresponding coordinate information features through the backbone network of the neural network to obtain the feature map of the image to be detected.
[0021] The above implementation method can improve the accuracy of defect detection by simultaneously extracting the feature vector of the defect and its corresponding coordinate features.
[0022] Secondly, a defect detection apparatus is provided, comprising: an acquisition unit for acquiring an image to be detected; a processing unit for acquiring a feature map of the image to be detected based on the image to be detected, wherein the feature map of the image to be detected includes a feature map of spatial position coordinate information; the processing unit is further configured to perform defect detection on the image to be detected based on the feature map of the image to be detected.
[0023] In the technical solution of this application, by modifying the neural network structure for defect detection, feature maps containing spatial coordinate information are extracted simultaneously during the detection process. This makes the neural network for defect detection sensitive to spatial location, thereby improving the sensitivity of the detection neural network to spatial location, and thus enhancing the detection accuracy of the detection neural network for some specific defect types, thereby improving the accuracy of defect detection.
[0024] In some possible implementations, the feature map of the image to be detected further includes a feature map of image information, and the processing unit is configured to: obtain the feature map of the image information based on the image to be detected; and generate a feature map of the spatial location coordinate information based on the feature map of the image information, wherein the dimension of the feature map of the spatial location coordinate information is the same as the dimension of the feature map of the image information.
[0025] The above implementation method first obtains the feature map of image information, and then obtains the feature map of spatial location coordinate information based on the feature map of image information, so that the two types of feature maps have the same dimension, which facilitates subsequent image processing and improves the accuracy of defect detection.
[0026] In some possible implementations, the processing unit is configured to: generate linear values corresponding to the spatial location coordinate information; generate a first coordinate network based on the linear values; and expand the dimensions of the first coordinate network based on the feature map of the image information to generate a feature map of the spatial location coordinate information.
[0027] The above implementation generates a feature map of spatial location coordinate information by generating a coordinate network corresponding to the spatial location coordinate information. The location feature map is then stitched into the feature map of the image information. The combination of the two improves the sensitivity of spatial information and helps to improve the accuracy of defect detection.
[0028] In some possible implementations, the processing unit is configured to: perform defect detection on the image to be detected using a filter model based on the feature map of the image to be detected, wherein the filter model includes filters for processing the feature map of the spatial location coordinate information.
[0029] In the above implementation method, corresponding filters are added to the feature map corresponding to the spatial location coordinate information in subsequent detection, thereby facilitating defect detection and improving the accuracy of defect detection.
[0030] In some possible implementations, the filter is the filter of the first convolutional layer.
[0031] In some possible implementations, the feature map of the spatial location coordinate information includes at least one of the x-axis direction coordinate information feature map, the y-axis direction coordinate information feature map, and the z-axis direction coordinate information feature map.
[0032] The above implementation provides multiple spatial sensitivity types by defining the feature map of spatial location coordinate information as a feature map of at least one of x, y, and z, which facilitates defect detection and improves the accuracy of defect detection.
[0033] In some possible implementations, the method is used for defect detection of tabs and / or electrodes.
[0034] The above-described embodiments can improve the production efficiency of power batteries when used for defect detection of tabs / plates in power batteries.
[0035] In some possible implementations, when the device is used for defect detection of the tab, the defect detection of the tab includes defect detection of the tab folding feature.
[0036] The above-described embodiments, due to the positional sensitivity of the tab folding feature, can improve the detection accuracy when used for folding defect detection.
[0037] In some possible implementations, the processing unit is used to: input the image to be detected into a neural network; and extract defect feature vectors and coordinate information features corresponding to the defect feature vectors through the backbone network of the neural network to obtain a feature map of the image to be detected.
[0038] The above implementation method can improve the accuracy of defect detection by simultaneously extracting the feature vector of the defect and its corresponding coordinate features.
[0039] Thirdly, a defect detection apparatus is provided, comprising a processor and a memory, the memory for storing a program, and the processor for calling and running the program from the memory to perform the defect detection method of the first aspect or any possible implementation thereof.
[0040] Fourthly, a computer-readable storage medium is provided, including a computer program that, when run on a computer, causes the computer to perform the defect detection method of the first aspect or any possible implementation thereof.
[0041] Fifthly, a computer program product comprising instructions, which, when executed by a computer, cause the computer to perform the defect detection method of the first aspect or any possible implementation thereof. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the drawings without creative effort.
[0043] Figure 1 This is a schematic diagram of the system architecture provided in this application;
[0044] Figure 2 This is an image to be inspected of the tabs of a power battery;
[0045] Figure 3 This is a schematic flowchart of a defect detection method disclosed in an embodiment of this application;
[0046] Figure 4 This is a schematic block diagram of a defect detection method disclosed in an embodiment of this application;
[0047] Figure 5 This is a schematic structural block diagram of a defect detection device disclosed in an embodiment of this application;
[0048] Figure 6 This is a schematic diagram of the hardware structure of a defect detection device disclosed in an embodiment of this application. Detailed Implementation
[0049] The embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The detailed description of the following embodiments and the accompanying drawings are used to illustrate the principles of this application by way of example, but should not be used to limit the scope of this application, that is, this application is not limited to the described embodiments.
[0050] The embodiments of this application are applicable to image processing systems, including but not limited to products based on infrared imaging. This defect detection system can be applied to various electronic devices equipped with defect detection devices, such as personal computers, computer workstations, smartphones, tablets, smart cameras, media consumption devices, wearable devices, set-top boxes, game consoles, augmented reality (AR) / virtual reality (VR) devices, in-vehicle terminals, etc. The embodiments disclosed in this application do not limit this application.
[0051] It should be understood that the specific examples in this document are only intended to help those skilled in the art better understand the embodiments of this application, and are not intended to limit the scope of the embodiments of this application.
[0052] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0053] It should also be understood that the various implementation methods described in this specification can be implemented individually or in combination, and the embodiments of this application are not limited in this respect.
[0054] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items.
[0055] To better understand the solutions of the embodiments of this application, the following will first combine... Figure 1 A brief introduction to the possible application scenarios of the embodiments of this application is provided.
[0056] like Figure 1 As shown, this application embodiment provides a system architecture 100. In Figure 1 In this embodiment, the data acquisition device 160 is used to acquire known defect sample images. For the defect detection method of this application, the known defect sample image may be a sample image containing one or more defects, wherein the type of defect in the sample image is known.
[0057] After acquiring known defect sample images, the data acquisition device 160 stores these known defect sample images in the database 130, and the training device 120 trains the target model / rule 101 based on the known defect sample images maintained in the database 130.
[0058] The aforementioned target model / rule 101 can be used to implement the defect detection method of this application embodiment. Specifically, the target model / rule 101 in this application embodiment can be a neural network. It should be noted that in practical applications, the known defect sample images maintained in the database 130 may not all originate from the data acquisition device 160; they may also be received from other devices. Furthermore, it should be noted that the training device 120 may not necessarily train the target model / rule 101 entirely based on the known defect sample images maintained in the database 130; it may also obtain known defect sample images from the cloud or other locations for model training. The above description should not be construed as limiting the embodiments of this application.
[0059] The target model / rule 101 trained using training device 120 can be applied to different systems or devices, such as... Figure 1 The execution device 110 shown can be a terminal, such as a mobile phone, tablet computer, or laptop computer, or it can be a server or cloud service. Figure 1 In this embodiment, the execution device 110 is configured with an input / output (I / O) interface 112 for data interaction with external devices. Users can input data to the I / O interface 112 through the client device 140. The input data may include the image to be detected input by the client device 140.
[0060] In some implementations, the client device 140 may be the same device as the execution device 110. For example, both the client device 140 and the execution device 110 may be terminal devices.
[0061] In other embodiments, the client device 140 may be a different device from the execution device 110. For example, the client device 140 may be a terminal device, while the execution device 110 may be a cloud device, a server, or other such device. The client device 140 may interact with the execution device 110 through a communication network of any communication mechanism / standard. The communication network may be a wide area network, a local area network, a point-to-point connection, or any combination thereof.
[0062] The calculation module 111 of the execution device 110 is used to process the input data (such as the image to be detected) received by the I / O interface 112. During the calculation and other related processing performed by the calculation module 111 of the execution device 110, the execution device 110 can call data, code, etc. in the data storage system 150 for corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing into the data storage system 150.
[0063] Finally, I / O interface 112 returns the processing results, such as the defect classification results obtained above, to customer device 140, thereby providing them to the user.
[0064] It is worth noting that the training device 120 can generate corresponding target models / rules 101 based on different training data for different objectives or tasks. The corresponding target models / rules 101 can be used to achieve the above objectives or complete the above tasks, thereby providing the user with the required results.
[0065] exist Figure 1 In the scenario shown, the user can manually provide input data, which can be done through the interface provided by I / O interface 112. Alternatively, the client device 140 can automatically send input data to I / O interface 112. If user authorization is required for the client device 140 to automatically send input data, the user can set the corresponding permissions in the client device 140. The user can view the output results of the execution device 110 on the client device 140, which can be presented in various forms such as display, sound, or animation. The client device 140 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130. Alternatively, data can be collected directly from the I / O interface 112 without going through the client device 140, using the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130.
[0066] It is worth noting that, Figure 1 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 1 In this context, the data storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 may also be placed within the execution device 110.
[0067] like Figure 1As shown, the target model / rule 101 is trained by the training device 120. In this embodiment of the application, the target model / rule 101 can be a neural network. Specifically, the neural network in this embodiment of the application can be a convolutional neural network (CNN), a region convolutional neural network (RCNN), or other types of neural networks, etc. This application does not make any specific limitations on this.
[0068] In the description of this application, it should be noted that, unless otherwise stated, "a plurality of" means two or more; the terms "upper," "lower," "left," "right," "inner," and "outer," etc., indicating orientation or positional relationships, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on this application. Furthermore, the terms "first," "second," and "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. "Vertical" is not vertical in the strict sense, but within the allowable tolerance range. "Parallel" is not parallel in the strict sense, but within the allowable tolerance range.
[0069] The directional terms used in the following description refer to the directions shown in the figures and are not intended to limit the specific structure of this application. It should also be noted in the description of this application that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0070] Power batteries can be used not only in primary power systems such as hydropower, wind power, thermal power, and solar power plants, but also in electric vehicles such as electric bicycles, electric motorcycles, and electric cars, as well as in military equipment and aerospace. As the application areas of power batteries continue to expand, their market demand is also increasing. During the production of power batteries, various defects may occur in multiple processes, such as anode die-cutting, cathode die-cutting, winding, and gravure printing. These require the application of vision technology for automatic detection, i.e., defect detection. Defect detection typically refers to the detection of surface defects in objects. Surface defect detection uses advanced machine vision inspection technology to detect defects such as spots, pits, scratches, color differences, and defects on the surface of workpieces.
[0071] However, due to factors such as workpiece manufacturing processes and their inherent structure, some defects exhibit a degree of location sensitivity. That is, for a similar structure shown in a photograph of a workpiece, it may be considered a defect in some locations but not in others, depending on the workpiece's position. For example, Figure 2 The image shown is an image of a tab of a power battery to be inspected. When it is necessary to detect folding defects in the tab, the local features of the folding defect need to be found in the image first, such as... Figure 2 As shown, there are two essentially identical local features 210 and 220. Local feature 210 is located at the tail of the image to be inspected, which is due to the manufacturing process of the tab and is a normal morphology. Local feature 220 is located in the middle of the image to be inspected, and the lines gradually disappear, indicating that a folding defect has occurred in the middle of the tab. Therefore, of the two essentially identical local features 210 and 220, one is a normal morphology and does not need to be detected, while the other is a defect and needs to be detected. In this case, the folding defect of the tab is location-sensitive. In addition, the defect type may be different in different locations.
[0072] Traditional detection methods require a combination of neural networks and logical post-processing techniques to achieve the required sensitivity to defect location, resulting in low detection efficiency. For example, because neural networks cannot learn the same local features repeatedly, they cannot determine where to detect defects and where not to. In such cases, the neural network may detect all defects, and then manual annotation of the defect morphology and logical post-processing are required, thus leading to low detection efficiency.
[0073] In view of this, embodiments of this application provide a defect detection method. By modifying the neural network structure for defect detection, feature maps containing spatial coordinate information are extracted simultaneously during the detection process, making the neural network for defect detection sensitive to spatial location. This improves the sensitivity of the detection neural network to spatial location, thereby enhancing the detection accuracy of the detection neural network for certain specific defect types and improving the overall accuracy of defect detection.
[0074] The defect detection method and apparatus provided in this application can be applied to defect detection of power batteries, but are not limited to that of other products in modern industrial manufacturing. The following is in conjunction with… Figure 3 and 4 The main process of the defect detection method according to the embodiments of this application is described.
[0075] Figure 3 A schematic flowchart of a defect detection method 300 according to an embodiment of this application is shown. The defect detection method 300 includes the following steps.
[0076] 310, Obtain the image to be detected.
[0077] In this embodiment, the image to be inspected is a photograph of the workpiece to be inspected. That is, when performing defect inspection on the workpiece, the workpiece can first be photographed to obtain an image to be inspected. For example, the tabs or electrodes of a power battery can be photographed to obtain an image of the tabs or electrodes to be inspected, thereby detecting defects in the tabs or electrodes. The tool used to take the image can be a charge-coupled device (CCD) camera, or it can be an image taken by other cameras or video cameras; this application does not limit the scope of the photograph.
[0078] It is worth noting that the production process of power batteries generally includes multiple production steps. When the power battery reaches the final step, a CCD camera can be used to photograph the power battery to form an image to be inspected. 320. Based on the image to be inspected, a feature map of the image to be inspected is obtained. The feature map of the image to be inspected includes a feature map containing spatial position coordinate information.
[0079] It is worth noting that, in this embodiment of the application, after acquiring the image to be detected, in order for the neural network to identify whether there are defects in the image to be detected and the location of the defects, the image to be detected needs to be processed. For example, feature extraction can be performed on the image to be detected to obtain a feature map of the image to be detected. The feature map also includes a feature map of spatial location coordinate information, so as to facilitate subsequent defect detection by combining the location of the defects.
[0080] 330. Based on the feature map of the image to be detected, perform defect detection on the image to be detected.
[0081] It is worth noting that, in this embodiment, after obtaining the feature map of the image to be detected, the feature map can be further processed. For example, the presence of a defect in the image can be determined based on whether the feature map includes features of the corresponding defect, thereby outputting the detection result. It is also worth noting that the above steps can all be operated by machines without manual intervention, saving manpower and improving production efficiency.
[0082] Therefore, the above method 300 extracts feature maps of spatial location coordinate information during defect detection, so that defect detection combined with spatial location coordinate information can improve the sensitivity of the detection neural network to spatial location, thereby improving the accuracy of defect detection.
[0083] In step 310 above, the image to be detected can be an image of the tab or electrode sheet, i.e., defect detection of the tab or electrode sheet. For example, method 300 above can be used to detect tab folding defects. It is worth noting that for tab folding defects, when similar folding features appear at the end of the tab image, it is not a defect and should not be detected; however, when it appears in the middle of the tab image, it is a defect and should be detected.
[0084] In step 320 above, the feature map of the image to be detected includes a feature map of spatial position coordinate information. Optionally, the feature map of spatial position coordinate information may include at least one of the following: a feature map of x-axis coordinate information, a feature map of y-axis coordinate information, and a feature map of z-axis coordinate information.
[0085] In step 320 above, the feature map of the image to be detected may further include a feature map of image information. Optionally, the feature map of image information may be point, line, surface features and / or color features, etc., in the image to be detected.
[0086] In this embodiment of the application, the method of obtaining the feature map of the image to be detected in step 320 can be as follows: First, obtain the feature map of the image information of the image to be detected, for example, extract point, line, and surface features from the image to be detected; then, generate the feature map of the spatial location coordinate information based on the feature map of the image information, wherein the feature map of the image information and the feature map of the spatial location coordinate information have the same dimension.
[0087] Optionally, the method for generating a feature map of spatial location coordinates based on the feature map of image information can be as follows: Generate linear values corresponding to the spatial location coordinates, such as linear values from -1 to 1 corresponding to the spatial location; generate a first coordinate network based on these linear values, which can be a one-dimensional or two-dimensional coordinate network; expand the dimension of the first coordinate network based on the feature map of image information to generate the feature map of spatial location coordinates, for example, by expanding the dimension of the first coordinate network to the same dimension as the acquired point / line / surface feature map, thus forming the feature map of spatial location coordinates, i.e., obtaining the location features. Subsequently, the point / line / surface features can be combined with the location features to obtain the input for the next convolutional layer.
[0088] In this embodiment, the method for obtaining the feature map of the image to be detected in step 320 can be as follows: inputting the image to be detected into a neural network; extracting defect feature vectors and corresponding coordinate information features through the backbone network of the neural network to obtain the feature map of the image to be detected. That is, it can be understood that the feature map of the image to be detected is obtained through feature extraction by a neural network, and the feature extraction of the neural network can simultaneously extract defect features and the coordinate features corresponding to the defects.
[0089] In step 330 above, based on the feature map of the image to be detected, the model for defect detection of the image to be detected can be obtained by training a neural network with effective defect samples.
[0090] In step 330 above, defect detection can be performed on the image to be detected using a filter model based on the feature map of the image to be detected. The filter model includes filters for processing the feature map of spatial location coordinate information. In other words, during the defect detection process, one or more filters corresponding to spatial location coordinate information are added.
[0091] Optionally, the filter can be the filter of the first convolutional layer. This means adding a channel for spatial location coordinate information to the input channels of the first convolutional layer, thereby matching it with the feature map of the image to be detected. Alternatively, the filter corresponding to the spatial location coordinate information can also be a filter from another convolutional layer, such as the i-th layer, where i is a positive integer greater than 0.
[0092] In this embodiment of the application, when the above method 300 is used for defect detection of the electrode tab, the output detection result may be the defective electrode tab number and the defect category.
[0093] To facilitate understanding of the above method 300, the following is combined with... Figure 4 The defect detection method provided in the embodiments of this application will be further described, namely... Figure 4 A schematic block diagram of a defect detection method 400 according to an embodiment of this application is shown.
[0094] It should be noted that, Figure 4 The steps are the same as those in method 300, and can be referred to the relevant description in method 300 above, which will not be repeated here.
[0095] like Figure 4As shown, firstly, after acquiring the image to be detected 410, feature extraction is performed on the image to be detected 410 to obtain feature map 421 of image information, feature map 422 of x-axis direction coordinate information, and feature map 423 of y-axis direction coordinate information. The size of feature map 421 of image information is (h, w, c), the size of feature map 422 of x-axis direction coordinate information is (h, w, 1), and the size of feature map 423 of y-axis direction coordinate information is (h, w, 1), where h represents the height of the feature map, w represents the width of the feature map, and c and 1 both represent the number of feature maps. Then, the feature map 421 of image information and feature map 422 of x-axis direction coordinate information are... 2. The feature map 420 is obtained by combining the y-axis coordinate information feature map 421 with the y-axis coordinate information feature map 423. The size of the feature map 420 is (h, w, c+2). In other words, a channel concatenation operation is performed after the c channels of the feature map 421 of the image information. The channel map of the x-axis coordinate information and the channel map of the y-axis coordinate information are concatenated to the c channel maps of the image information to obtain c+2 channel maps, i.e., feature map 420. Finally, defect detection is performed on the obtained feature map 420 to output the detection result 430. For example, the obtained feature map 420 can be input into the detector to perform defect detection and obtain the detection result 430 output by the detection neural network.
[0096] It is worth noting that more specific implementations of the above-described methods of acquiring the image to be detected 410, performing feature extraction to obtain the feature map 420, and performing defect detection to obtain / output the detection result 430 can be referred to steps 310, 320, and 330 in the above-described method 300, and will not be repeated here.
[0097] Optionally, in the embodiments of this application, in the method of combining the feature map of the image information and the feature map of the spatial position coordinate information, if only the spatial coordinate position information in the x-direction is needed, then one channel map of the x-axis coordinate information is stitched together; if only the spatial coordinate position information in the y-direction is needed, then one channel map of the y-axis coordinate information is stitched together; if both the spatial coordinate position information in the x-direction and the spatial coordinate position information in the y-direction are needed, then two channel maps of the x-axis coordinate information and two channel maps of the y-axis coordinate information are stitched together. After stitching one channel map, the size of the feature map 420 is (h, w, c+1); after stitching two channel maps, the size of the feature map 420 is (h, w, c+2); similarly, after stitching three channel maps, the size of the feature map 420 is (h, w, c+3). This application does not limit the number of channel maps stitched together.
[0098] It is worth noting that in this embodiment, when the feature map 420 is adapted and optimized to include spatial coordinate information feature maps, the corresponding detector also needs to modify its structure accordingly to adapt to the adapted and optimized feature map. For example, when the size of the adapted and optimized feature map changes from (h, w, c) to (h, w, c+2), the number of filters in the corresponding convolutional layer also needs to be increased by 2.
[0099] The method embodiments of this application have been described in detail above. The device embodiments of this application are described below. The device embodiments correspond to the method embodiments. Therefore, for any part not described in detail, please refer to the preceding method embodiments. The device can implement any possible implementation of the above methods.
[0100] Figure 5 A schematic block diagram of a defect detection apparatus 500 according to an embodiment of this application is shown. The apparatus 500 can perform the defect detection method described in the embodiments of this application; for example, the apparatus 500 can be the aforementioned execution device 110.
[0101] like Figure 5 As shown, the device includes:
[0102] The acquisition unit 520 is used to acquire the image to be detected.
[0103] The processing unit 520 is configured to acquire a feature map of the image to be detected based on the image to be detected, wherein the feature map of the image to be detected includes a feature map of spatial location coordinate information, and is also configured to perform defect detection on the image to be detected based on the feature map of the image to be detected.
[0104] For more detailed information on the functions of the aforementioned device 500, please refer to the relevant descriptions in the implementation of the above method; they will not be repeated here.
[0105] Figure 6 This is a schematic diagram of the hardware structure of the defect detection device according to an embodiment of this application. Figure 6 The defect detection device 600 shown includes a memory 601, a processor 602, a communication interface 603, and a bus 604. The memory 601, processor 602, and communication interface 603 are interconnected via the bus 604.
[0106] The memory 601 may be a read-only memory (ROM), a static storage device, or a random access memory (RAM). The memory 601 may store a program, and when the program stored in the memory 601 is executed by the processor 602, the processor 602 and the communication interface 603 are used to execute the various steps of the defect detection method of the embodiments of this application.
[0107] The processor 602 may be a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute relevant programs to achieve the functions required by the units in the defect detection apparatus of this application embodiment, or to execute the defect detection method of this application embodiment.
[0108] The processor 602 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the defect detection method in this embodiment can be accomplished through integrated logic circuits in the processor 602 or through software instructions.
[0109] The processor 602 described above can also be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented by the hardware processor, or implemented by a combination of hardware and software modules in the processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 601. The processor 602 reads the information in memory 601 and, in conjunction with its hardware, completes the functions required by the units included in the defect detection apparatus of the embodiments of this application, or executes the defect detection method of the embodiments of this application.
[0110] The communication interface 603 uses transceiver devices, such as, but not limited to, transceivers, to enable communication between the device 600 and other devices or communication networks. For example, traffic data from unknown devices can be obtained through the communication interface 603.
[0111] Bus 604 may include a pathway for transmitting information between various components of device 600 (e.g., memory 601, processor 602, communication interface 603).
[0112] It should be noted that although the above-described device 600 only shows a memory, processor, and communication interface, those skilled in the art should understand that in specific implementations, device 600 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that device 600 may also include hardware devices for implementing other additional functions. Moreover, those skilled in the art should understand that device 600 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 6 All the devices shown.
[0113] This application also provides a computer-readable storage medium storing program code for execution by a device, the program code including instructions for performing the steps in the above-described defect detection method.
[0114] This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the above-described defect detection method.
[0115] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0117] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0118] The terms used in this application are for describing embodiments only and are not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a” and “described” are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term “and / or” as used herein means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term “comprising” refers to the presence of stated features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.
[0119] The aspects, implementations, or features of the described embodiments can be used individually or in any combination. The aspects of the described embodiments can be implemented by software, hardware, or a combination of both. The described embodiments can also be embodied in a computer-readable medium storing computer-readable code, including instructions executable by at least one computing device. The computer-readable medium can be associated with any data storage device capable of storing data readable by a computer system. Examples of computer-readable media include read-only memory, random access memory, compact disc read-only memory (CD-ROM), hard disk drive (HDD), digital video disc (DVD), magnetic tape, and optical data storage devices. The computer-readable medium can also be distributed across a network-connected computer system, allowing the computer-readable code to be distributed for storage and execution.
[0120] The above technical description is illustrated with reference to the accompanying drawings, which form part of this application, and which show implementations according to the described embodiments. While these embodiments are described in sufficient detail to enable those skilled in the art to implement them, they are not limiting; thus, other embodiments can be used, and variations can be made without departing from the scope of the described embodiments. For example, the order of operations described in the flowcharts is not limiting, and the order of two or more operations illustrated and described in the flowcharts may be changed according to several embodiments. As another example, in several embodiments, one or more operations illustrated and described in the flowcharts are optional or can be deleted. Additionally, certain steps or functions may be added to the disclosed embodiments, or the order of two or more steps may be interchanged. All such variations are considered to be included in the disclosed embodiments and the claims.
[0121] Furthermore, terminology is used in the above technical description to provide a thorough understanding of the described embodiments. However, excessive detail is not required to implement the described embodiments. Therefore, the above description of the embodiments is presented for illustrative and descriptive purposes. The embodiments presented in the above description, as well as the examples disclosed according to these embodiments, are provided separately to add context and aid in understanding the described embodiments. The above specification is not intended to be exhaustive or to limit the described embodiments to the precise form of this application. Based on the above teachings, several modifications, choices of application, and variations are possible. In some cases, well-known processing steps have not been described in detail to avoid unnecessarily affecting the described embodiments. Although this application has been described with reference to preferred embodiments, various modifications can be made thereto and components can be replaced with equivalents without departing from the scope of this application. In particular, the various technical features mentioned in the various embodiments can be combined in any manner, provided there is no structural conflict. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for defect detection, characterized in that, include: Acquire the image to be detected; Based on the image to be detected, a feature map of the image to be detected is obtained, wherein the feature map of the image to be detected includes a feature map of spatial location coordinate information; Based on the feature map of the image to be detected, defect detection is performed on the image to be detected; The feature map of the image to be detected further includes a feature map of image information. Obtaining the feature map of the image to be detected based on the image to be detected includes: Based on the image to be detected, obtain the feature map of the image information; Based on the feature map of the image information, a feature map of the spatial location coordinate information is generated, wherein the dimension of the feature map of the spatial location coordinate information is the same as the dimension of the feature map of the image information. The step of generating the feature map of the spatial location coordinate information based on the feature map of the image information includes: Generate linear values corresponding to the spatial location coordinate information; Generate a first coordinate network based on the linear values; Based on the feature map of the image information, the dimensions of the first coordinate network are expanded to generate the feature map of the spatial location coordinate information; The method is used for defect detection of tabs and / or electrodes.
2. The method according to claim 1, characterized in that, The step of performing defect detection on the image to be detected based on the feature map of the image to be detected includes: Based on the feature map of the image to be detected, a filter model is used to detect defects in the image to be detected, wherein the filter model includes filters for processing the feature map of the spatial location coordinate information.
3. The method according to claim 2, characterized in that, The filter is the filter for the first convolutional layer.
4. The method according to claim 1, characterized in that, The feature map of the spatial location coordinate information includes at least one of the following: the feature map of the x-axis coordinate information, the feature map of the y-axis coordinate information, and the feature map of the z-axis coordinate information.
5. The method according to claim 1, characterized in that, When the method is used for defect detection of electrode tabs, the defect detection of electrode tabs includes defect detection of electrode tab folding features.
6. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining the feature map of the image to be detected based on the image to be detected includes: The image to be detected is input into the neural network; The backbone network of the neural network is used to extract defect feature vectors and corresponding coordinate information features to obtain the feature map of the image to be detected.
7. A defect detection device, characterized in that, include: The acquisition unit is used to acquire the image to be detected; The processing unit is configured to obtain a feature map of the image to be detected based on the image to be detected, wherein the feature map of the image to be detected includes a feature map of spatial location coordinate information. The processing unit is further configured to perform defect detection on the image to be detected based on the feature map of the image to be detected; The feature map of the image to be detected also includes a feature map of image information, and the processing unit is further configured to obtain the feature map of the image information based on the image to be detected; The processing unit is further configured to generate a feature map of the spatial location coordinate information based on the feature map of the image information, wherein the dimension of the feature map of the spatial location coordinate information is the same as the dimension of the feature map of the image information. The processing unit is also used to generate linear values corresponding to the spatial location coordinate information; The processing unit is further configured to generate a first coordinate network based on the linear value; The processing unit is further configured to expand the dimension of the first coordinate network based on the feature map of the image information, so as to generate the feature map of the spatial location coordinate information; The defect detection device is used for defect detection of tabs and / or electrodes.
8. A defect detection device, characterized in that, It includes a processor and a memory, the memory being used to store a program, and the processor being used to call and run the program from the memory to perform the defect detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Includes a computer program that, when run on a computer, causes the computer to perform the defect detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Target detection method and device, equipment and storage medium
CN113591840A