Glass testing methods, apparatus, equipment and media
By acquiring and stitching panoramic and intensity images of glass, and extracting and fusing deep and shallow feature images, the problem of insufficient information in traditional glass inspection methods is solved, achieving higher inspection accuracy.
Patent Information
- Application Number
- CN202311283459.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-09-28
AI Technical Summary
Traditional glass testing methods are trained on planar graphs, which leads to insufficient information, resulting in inaccurate test results and a lack of practicality.
By acquiring panoramic and intensity images of the glass, stitching them together and extracting feature images, and then fusing them with deep and shallow feature images, the detection accuracy is improved by using a feature extraction network.
It improves the accuracy of glass inspection, enabling more precise detection of the presence, location, and potential breakage, spots, or inhomogeneities in glass, providing more reliable data support.
Smart Images

Figure CN117252845B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to glass detection methods, apparatus, devices, and media. Background Technology
[0002] Glass inspection is an examination to determine whether glass has defects such as breakage, spots, or unevenness. Traditional glass inspection methods are often trained and designed on simple two-dimensional diagrams. These diagrams contain limited information, and the glass pieces are relatively uniform and occupy a large area, resulting in inaccurate training results and poor practicality. Summary of the Invention
[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0004] The purpose of this application is to at least partially solve one of the technical problems existing in the related art. The embodiments of this application provide glass detection methods, apparatus, equipment and media, which can improve the accuracy of glass detection.
[0005] An embodiment of the first aspect of this application provides a glass testing method, comprising:
[0006] Acquire a panoramic image of the glass and a corresponding intensity image of the panoramic image of the glass, wherein the panoramic image of the glass is in color mode;
[0007] The panoramic glass image and the intensity image are stitched together to obtain a stitched image;
[0008] The first feature image is obtained by extracting features from the stitched image;
[0009] Extract deep feature images and shallow feature images from the first feature image;
[0010] The deep feature image and the shallow feature image are fused to obtain a fused feature image;
[0011] The detection result is obtained by performing detection based on the fused feature image.
[0012] According to certain embodiments of the first aspect of this application, stitching the panoramic glass image and the intensity image to obtain a stitched image includes:
[0013] The three-channel panoramic glass image and the three-channel intensity image are stitched together on the channel to obtain a six-channel stitched image.
[0014] According to certain embodiments of the first aspect of this application, the step of extracting features from the stitched image to obtain a first feature image includes:
[0015] A first feature image is obtained by extracting features from the stitched image using a feature extraction network;
[0016] The feature extraction network includes an encoder layer, a grouped convolutional layer, and an inverse bottleneck layer. The encoder layer is composed of multiple stacked convolutional layers and pooling layers.
[0017] According to certain embodiments of the first aspect of this application, the extraction of deep feature images and shallow feature images from the first feature image includes:
[0018] A shallow feature image is extracted from the first feature image using a convolution module with a small kernel size;
[0019] Shallow feature images are extracted from the first feature image using a convolution module with a large kernel size.
[0020] According to certain embodiments of the first aspect of this application, the feature extraction process of the convolution module for the input image is as follows:
[0021] The input image is processed sequentially through a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the first sub-processed image;
[0022] The first sub-processed image is processed sequentially through a 1xk convolutional layer, a kx1 deformable convolutional layer, a batch normalization layer, and an activation function layer to obtain the second sub-processed image.
[0023] The first sub-processed image is processed sequentially through a kx1 deformable convolutional layer, a 1xk convolutional layer, a batch normalization layer, and an activation function layer to obtain the third sub-processed image.
[0024] After the second sub-processed image and the third sub-processed image are concatenated, they are processed sequentially through a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the fourth sub-processed image.
[0025] The first sub-processed image and the fourth sub-processed image are stitched together to obtain the fifth sub-processed image;
[0026] The fifth sub-processed image is processed sequentially through a 1xk convolutional layer, a kx1 deformable convolutional layer, a batch normalization layer, and an activation function layer to obtain the sixth sub-processed image.
[0027] The fifth sub-processed image is processed sequentially through a kx1 deformable convolutional layer, a 1xk convolutional layer, a batch normalization layer, and an activation function layer to obtain the seventh sub-processed image.
[0028] After the sixth sub-processing image and the seventh sub-processing image are concatenated, they are processed sequentially through a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the eighth sub-processing image.
[0029] After the fifth sub-processing image and the eighth sub-processing image are concatenated, they are processed sequentially through a self-attention layer, a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the output feature image.
[0030] According to certain embodiments of the first aspect of this application, the k of a convolutional module with a small kernel size is smaller than the k of a convolutional module with a large kernel size.
[0031] According to certain embodiments of the first aspect of this application, fusing the deep feature image and the shallow feature image to obtain a fused feature image includes:
[0032] The deep feature image is convolved to obtain the first convolved image;
[0033] The shallow feature image is convolved to obtain the second convolved image;
[0034] The third convolutional image is obtained by concatenating the first convolutional image and the second convolutional image;
[0035] The third convolutional image is convolved to obtain a fused feature image.
[0036] According to a second aspect of this application, a glass inspection device includes:
[0037] An image input unit is used to acquire a panoramic glass image and a corresponding intensity image of the panoramic glass image, wherein the panoramic glass image is in color mode;
[0038] An image stitching unit is used to stitch the panoramic glass image and the intensity image together to obtain a stitched image.
[0039] The first feature extraction unit is used to extract features from the stitched image to obtain a first feature image;
[0040] The second feature extraction unit is used to extract deep feature images and shallow feature images from the first feature image;
[0041] A feature fusion unit is used to fuse the deep feature image and the shallow feature image to obtain a fused feature image;
[0042] An image detection unit is used to perform detection based on the fused feature image to obtain a detection result.
[0043] According to a third aspect of this application, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the glass detection method described above.
[0044] According to a fourth aspect of this application, a computer storage medium stores computer-executable instructions for performing the glass inspection method described above.
[0045] The above scheme has at least the following beneficial effects: It acquires a panoramic image of the glass and a corresponding intensity image of the panoramic image; it stitches the panoramic image and the intensity image together to obtain a stitched image; it extracts features from the stitched image to obtain a first feature image; it extracts deep and shallow feature images from the first feature image; it fuses the deep and shallow feature images to obtain a fused feature image; it performs detection based on the fused feature image to obtain the detection result; it comprehensively utilizes panoramic and intensity image methods to improve the accuracy of glass detection; it uses a feature extraction network to extract features and gradually extracts local and global high-level semantic features of the image to assist in inferring the semantic information of each pixel; and it further improves the accuracy of glass detection by fusing multi-layer feature information for comparative extraction. Attached Figure Description
[0046] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0047] Figure 1 This is a flowchart illustrating the steps of a glass testing method provided in an embodiment of this application;
[0048] Figure 2 This is a structural diagram of the feature extraction network;
[0049] Figure 3 This is a structural diagram of the fusion network;
[0050] Figure 4 This is a structural diagram of the glass inspection device provided in an embodiment of this application. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0053] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0054] An embodiment of this application provides a glass testing method.
[0055] Reference Figure 1 Glass testing methods include:
[0056] Step S100: Obtain the panoramic glass image and the intensity image of the corresponding panoramic glass image;
[0057] Step S200: Stitch the panoramic glass image and the intensity image together to obtain a stitched image;
[0058] Step S300: Extract features from the stitched image to obtain the first feature image;
[0059] Step S400: Extract deep feature images and shallow feature images from the first feature image;
[0060] Step S500: Fuse the deep feature image and the shallow feature image to obtain the fused feature image;
[0061] Step S600: Detection results are obtained by performing detection based on the fused feature image.
[0062] In step S100, multiple images are captured using a camera, and these images are stitched together to obtain a panoramic image. The glass panoramic image is a panoramic image that includes the glass object. The glass panoramic image is in color mode.
[0063] The glass panoramic image is converted into an intensity image using an algorithm. Alternatively, the same scene as the glass panoramic image can be photographed using specialized equipment for capturing intensity images to obtain the corresponding intensity image of the glass panoramic image.
[0064] For step S200, the glass panoramic image and intensity image are stitched together to obtain a stitched image, including: stitching the three-channel glass panoramic image and the three-channel intensity image on channels to obtain a six-channel stitched image.
[0065] By stitching together panoramic and intensity images of glass, a subsequent feature extraction network can combine the different features of the two images to extract more useful information.
[0066] Combining panoramic and intensity maps allows for more accurate detection of the presence and location of glass, as well as potential breakage, spots, or inhomogeneities. For example, the reflective properties of glass may not be obvious in a panoramic image but are clearly displayed in an intensity map; conversely, glass fractures or breakage may produce irregular light distributions in the intensity map. This combined approach significantly improves the accuracy of glass detection and provides more reliable data support for research and applications in related fields.
[0067] For step S300, extracting features from the stitched image to obtain the first feature image includes:
[0068] The first feature image is obtained by extracting features from the stitched image using a feature extraction network.
[0069] The feature extraction network includes an encoder layer, a grouped convolutional layer, and an inverse bottleneck layer. The encoder layer is composed of multiple convolutional layers and pooling layers stacked together.
[0070] The block ratio of each stage of the feature extraction network was adjusted to 1:1:3:1, and the final number of blocks was (3,3,9,3).
[0071] For image datasets, a 224x224 input size is typically used. Since the image size is very large for the network, it is usually downsampled to 56x56 using a convolution with a stride of 4 and a size of 4. Because the stride and size of this convolution are exactly the same, it is also an uncovered convolution, or a patched convolution. This part is the Stem layer, a downsampling layer located after the input. The Stem layer is also a convolution operation with a stride of 4 and a size of 4.
[0072] The feature extraction network introduces the idea of grouped convolution, replacing 3x3 convolution with 3x3 grouped convolution, that is, grouping channels and then performing convolution on the group as a unit; the computation speed of the model is improved by using grouped convolution.
[0073] The reverse bottleneck layer is a structure that is large in the middle and small at both ends, which can effectively prevent information loss.
[0074] The feature extraction network uses convolutional layers with 7x7 kernels.
[0075] It uses a GELU activation function layer, but with fewer activation functions, adding only one GELU activation function between two 1x1 convolutions.
[0076] Adding only a BN layer before the first 1x1 convolution helps simplify the structure of the feature extraction network.
[0077] For step S400, extracting deep feature images and shallow feature images from the first feature image includes:
[0078] Shallow feature images are extracted from the first feature image using a convolutional module with a small kernel size;
[0079] Shallow feature images are extracted from the first feature image using a convolutional module with a large kernel size.
[0080] Reference Figure 2 The feature extraction process of the convolution module on the input image is as follows:
[0081] The input image is processed sequentially through a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the first sub-processed image;
[0082] The first sub-processed image is processed sequentially through a 1xk convolutional layer, a kx1 deformable convolutional layer, a batch normalization layer, and an activation function layer to obtain the second sub-processed image;
[0083] The first sub-processed image is processed sequentially through a kx1 deformable convolutional layer, a 1xk convolutional layer, a batch normalization layer, and an activation function layer to obtain the third sub-processed image.
[0084] After concatenating the second and third sub-processed images, the images are processed sequentially through a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the fourth sub-processed image.
[0085] The first sub-processed image and the fourth sub-processed image are combined to obtain the fifth sub-processed image;
[0086] The fifth sub-processed image is processed sequentially through a 1xk convolutional layer, a kx1 deformable convolutional layer, a batch normalization layer, and an activation function layer to obtain the sixth sub-processed image;
[0087] The fifth sub-processed image is processed sequentially through a kx1 deformable convolutional layer, a 1xk convolutional layer, a batch normalization layer, and an activation function layer to obtain the seventh sub-processed image.
[0088] After concatenating the sixth and seventh sub-processed images, the images are processed sequentially through a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the eighth sub-processed image.
[0089] After concatenating the fifth and eighth sub-processed images, the images are processed sequentially through a self-attention layer, a 3x3 convolutional layer, a batch normalization layer, and an activation function layer to obtain the output feature image.
[0090] The k of a convolutional module with a small kernel size is less than the k of a convolutional module with a large kernel size.
[0091] Where conv represents a convolutional layer, DConv represents a deformable convolutional layer, k1 corresponds to k, BN represents a batch normalization layer, ReLU represents an activation function layer, and Attention represents a self-attention layer.
[0092] Because the horizontal boundary of the glass in the image is strongly deformed while the vertical boundary remains almost unchanged, more high-level semantics are embedded based on deep features, which can better locate the target object. Shallow features have a larger spatial size and retain richer and more detailed low-level information. Convolutional modules with small kernel size are used in the first two stages and convolutional modules with large kernel size are used in the last two stages.
[0093] Reference Figure 3 For step S500, a fused feature image is obtained by fusing deep feature images and shallow feature images through a fusion network, including:
[0094] The first convolutional image is obtained by convolving the deep feature image;
[0095] The shallow feature image is convolved to obtain the second convolutional image;
[0096] The third convolutional image is obtained by concatenating the first and second convolutional images.
[0097] Convolution is performed on the third convolutional image to obtain the fused feature image.
[0098] In this process, feature images of different sizes are first passed through a 1x1 convolutional layer, then concatenated with feature images of other sizes, and then passed through a 1x1 convolutional layer to achieve image fusion, resulting in a fused feature image.
[0099] Using feature extraction networks for feature extraction, and combining this with a feature pyramid to progressively extract local and global high-level semantic features of an image, can help infer the semantic information of each pixel. Furthermore, by fusing multi-layer feature information for comparative extraction, the accuracy of glass detection can be further improved, facilitating the rapid implementation of glass detection tasks.
[0100] In step S600, the decoder performs detection based on the fused feature image to obtain the detection result. The detection result indicates whether there are problems such as cracks in the glass.
[0101] Simply passing the output of one decoder to the next does not adequately balance these biases. The outputs of the first two decoders emphasize boundary details, which helps the model depict object outlines, while the outputs of the latter two decoders emphasize high-level semantics, which helps the model locate object regions for accurate inference.
[0102] First, the decoder uses the output of the previous stage as basic information and makes modifications based on it. Second, it obtains the feature maps generated by the feature extraction network at each stage as directly obtained feature information. Finally, it also uses the features obtained after processing by the feature extraction and fusion modules. This part of the feature information is cross-validated with the information generated by the feature extraction network to improve the accuracy of the network's prediction results.
[0103] An embodiment of this application provides a glass inspection device.
[0104] Reference Figure 4 The glass detection device includes: an image input unit 10, an image stitching unit 20, a first feature extraction unit 30, a second feature extraction unit 40, a feature fusion unit 50, and an image detection unit 60.
[0105] The image input unit 10 is used to acquire a panoramic glass image and a corresponding intensity image of the panoramic glass image; the image stitching unit 20 is used to stitch the panoramic glass image and the intensity image to obtain a stitched image; the first feature extraction unit 30 is used to extract features from the stitched image to obtain a first feature image; the second feature extraction unit 40 is used to extract deep feature images and shallow feature images from the first feature image; the feature fusion unit 50 is used to fuse the deep feature images and shallow feature images to obtain a fused feature image; and the image detection unit 60 is used to perform detection based on the fused feature image to obtain a detection result.
[0106] It is understood that the glass testing device provided in the embodiments of this application adopts the glass testing method as described above. Each unit of the glass testing device provided in the embodiments of this application corresponds to each step of the glass testing method. The glass testing device and the glass testing method both adopt the same technical means, solve the same technical problems, and have the same technical effects.
[0107] An embodiment of this application provides an electronic device. The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the glass detection method described above.
[0108] This electronic device can be any smart terminal, including computers.
[0109] In general, for the hardware structure of electronic devices, the processor can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, to execute relevant programs and implement the technical solutions provided in the embodiments of this application.
[0110] The memory can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory and is called and executed by the processor.
[0111] Input / output interfaces are used to implement information input and output.
[0112] The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0113] The bus transmits information between various components of a device, such as the processor, memory, input / output interfaces, and communication interfaces. The processor, memory, input / output interfaces, and communication interfaces communicate with each other within the device via the bus.
[0114] Embodiments of this application provide a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions for performing the glass inspection method described above.
[0115] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media 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 includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium. In the foregoing description of this specification, references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0116] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0117] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] 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 the units described above 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 between each other may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms. Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
[0121] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method of glass inspection, characterized by, The method comprises the following steps: obtaining a glass panoramic image and a corresponding intensity image of the glass panoramic image, wherein the glass panoramic image is in a color mode; stitching the glass panoramic image and the intensity image to obtain a stitched image; extracting features from the stitched image to obtain a first feature image; extracting a deep feature image and a shallow feature image from the first feature image; fusing the deep feature image and the shallow feature image to obtain a fused feature image; detecting according to the fused feature image to obtain a detection result; wherein the step of stitching the glass panoramic image and the intensity image to obtain a stitched image comprises: stitching the three-channel glass panoramic image and the three-channel intensity image in the channel to obtain a six-channel stitched image.
2. The method of claim 1, wherein, The step of extracting features from the stitched image to obtain a first feature image comprises: extracting features from the stitched image by a feature extraction network to obtain a first feature image; wherein the feature extraction network comprises an encoder layer, a grouped convolution layer and an inverse bottleneck layer, and the encoder layer is stacked by a plurality of convolution layers and pooling layers.
3. The method of claim 1, wherein the glass is a glass-ceramic. The step of extracting a deep feature image and a shallow feature image from the first feature image comprises: extracting a shallow feature image from the first feature image by a convolution module with a small kernel size; extracting a deep feature image from the first feature image by a convolution module with a large kernel size.
4. The method of claim 3, wherein the glass is a glass-ceramic. The feature extraction process of the convolution module on the input image is as follows: processing the input image through a 3x3 convolution layer, a batch normalization layer and an activation function layer in sequence to obtain a first sub-processing image; processing the first sub-processing image through a 1xk convolution layer, a kx1 deformable convolution layer, a batch normalization layer and an activation function layer in sequence to obtain a second sub-processing image; processing the first sub-processing image through a kx1 deformable convolution layer, a 1xk convolution layer, a batch normalization layer and an activation function layer in sequence to obtain a third sub-processing image; processing the second sub-processing image and the third sub-processing image in sequence through a 3x3 convolution layer, a batch normalization layer and an activation function layer after splicing to obtain a fourth sub-processing image; splicing the first sub-processing image and the fourth sub-processing image to obtain a fifth sub-processing image; processing the fifth sub-processing image through a 1xk convolution layer, a kx1 deformable convolution layer, a batch normalization layer and an activation function layer in sequence to obtain a sixth sub-processing image; processing the fifth sub-processing image through a kx1 deformable convolution layer, a 1xk convolution layer, a batch normalization layer and an activation function layer in sequence to obtain a seventh sub-processing image; processing the sixth sub-processing image and the seventh sub-processing image in sequence through a 3x3 convolution layer, a batch normalization layer and an activation function layer after splicing to obtain an eighth sub-processing image; processing the fifth sub-processing image and the eighth sub-processing image in sequence through a self-attention layer, a 3x3 convolution layer, a batch normalization layer and an activation function layer after splicing to obtain an output feature image.
5. The method of claim 4, wherein the glass is a glass-ceramic. The k of the convolution module with a small kernel size is smaller than the k of the convolution module with a large kernel size.
6. The method of claim 1, wherein the glass is a glass-ceramic. The step of fusing the deep feature image and the shallow feature image to obtain a fused feature image comprises: convolving the deep feature image to obtain a first convolution image; convolving the shallow feature image to obtain a second convolutional image; stitching the first convolutional image and the second convolutional image to obtain a third convolutional image; convolving the third convolutional image to obtain a fused feature image.
7. A glass inspection apparatus, characterized by, The method comprises the following steps: an image input unit configured to acquire a glass panoramic image and an intensity image corresponding to the glass panoramic image, the glass panoramic image being in a color mode; an image stitching unit configured to stitch the glass panoramic image and the intensity image to obtain a stitched image; a first feature extraction unit configured to extract features from the stitched image to obtain a first feature image; a second feature extraction unit configured to extract a deep feature image and a shallow feature image from the first feature image; a feature fusion unit configured to fuse the deep feature image and the shallow feature image to obtain a fused feature image; an image detection unit configured to perform detection based on the fused feature image to obtain a detection result. The method comprises the following steps: stitching the three-channel glass panoramic image and the three-channel intensity image in the channel to obtain a six-channel stitched image.
8. An electronic device, comprising: The method comprises the following steps: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the glass detection method according to any one of claims 1 to 6.
9. A computer storage medium, characterized in that The computer executable instructions are stored in the memory and used to execute the glass detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Target image detection method and device, electronic equipment and storage medium
CN115205547A
Image reflection removing method, and training method and device of image reflection removing model
CN116258633A