Industrial product quality detection method, equipment and medium

By acquiring images in industrial product inspection and utilizing multi-level feature enhancement and multi-scale information fusion, the problem of insufficient small target detection capability and difficulty in balancing computational efficiency and complexity in existing technologies is solved. This enables real-time identification and sorting of defects, improving the automation level of the production line and the reliability of the system.

CN121582166APending Publication Date: 2026-02-27INSPUR YUNZHOU (SHANDONG) IND INTERNET CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202511684053.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing deep learning-based target detection methods suffer from insufficient ability to detect small targets and difficulty in balancing computational efficiency and complexity in industrial product defect detection, making them difficult to deploy effectively in industrial production lines with high real-time requirements.

Method used

By collecting product location data through sensor devices, image acquisition is triggered. Feature extraction and defect identification are performed using a pre-trained defect detection model. Combined with multi-level feature enhancement and multi-scale information fusion, sorting instructions are generated and sent to the sorting mechanism. A stable mapping between the image coordinate system and the physical coordinate system is established to achieve closed-loop quality control.

Benefits of technology

It improves the ability to identify subtle and complex defects, reduces computational complexity, enables real-time processing and sorting, and enhances the automation level of the production line and the reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582166A_ABST
    Figure CN121582166A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial product quality detection method and device and a medium, and relates to the field of industrial Internet of Things, and the method comprises the steps: collecting the position of a to-be-detected product on a production line through a sensor device, and judging whether the to-be-detected product enters an image collection station or not; if yes, triggering a quality detection signal, collecting surface image data of a to-be-detected product in the production line through camera equipment, and inputting the surface image data into a pre-trained defect detection model; performing feature extraction on the surface image data to obtain defect type features and corresponding defect position features, and generating a defect detection report; determining a defect image pixel coordinate in the surface image coordinate system, and converting the defect image pixel coordinate into a physical position coordinate of a production line coordinate system; and generating a sorting instruction, and issuing the sorting instruction to a sorting mechanism. Through deep integration of a defect detection algorithm and a production line control system, the link of manual intervention is effectively reduced, and the automation level of the production line is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial Internet of Things, in particular to an industrial product quality detection method, device and medium. BACKGROUND

[0002] On an industrial production line, surface defect detection is a core link of industrial product quality control. By analyzing product surface images, various types of defects such as scratches, pits, and stains are automatically identified. The defect detection result directly affects the quality control level of the production line and is widely used in many industrial fields such as metallurgy, electronics manufacturing, textiles, and automobile parts.

[0003] With the development of deep learning technology, target detection methods based on convolutional neural networks have become the mainstream technology path in this field, which can realize end-to-end identification and positioning of defects and significantly improve the automation level of detection.

[0004] However, the existing deep learning-based target detection method still has obvious limitations when dealing with industrial surface defects: on the one hand, due to the characteristics of small size, variable shape, and low contrast with the background of defect targets, the existing model is prone to lose key information of subtle defects in multiple feature extraction processes, resulting in insufficient detection capability for small targets; on the other hand, in order to balance detection speed and accuracy, the existing algorithm often has difficulty in balancing model complexity and computational efficiency, limiting its deployment and application in industrial production lines with high real-time requirements. SUMMARY

[0005] To solve the above problems, the present application provides an industrial product quality detection method, comprising: acquiring the product position of the product to be detected on the production line through a sensor device, and determining whether to enter an image acquisition station; If yes, a quality detection signal is triggered, the surface image data of the product to be detected on the production line is acquired through a camera device, and input into a pre-trained defect detection model; The defect detection model is used to extract features from the surface image data, obtain defect type features and corresponding defect position features, and generate a defect detection report; According to the defect position features, the defect image pixel coordinates in the surface image coordinate system are determined, and the defect image pixel coordinates are converted into physical position coordinates in the production line coordinate system; Based on the defect type features and the physical position coordinates, a sorting instruction is generated and sent to a sorting mechanism.

[0006] On the other hand, the present application also provides an industrial product quality detection device, comprising: at least one processor; and a memory in communication with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform an industrial product quality detection method as described in the above examples.

[0007] In another aspect, the present application also provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are configured to perform an industrial product quality detection method as described in the above examples.

[0008] The industrial product quality detection method provided by the present application can bring the following beneficial effects: By deeply integrating the defect detection algorithm with the production line control system, a closed-loop quality control process from perception, decision-making to execution is constructed, which can automatically complete the whole process of image acquisition, defect identification, coordinate mapping and sorting decision-making, effectively reducing the manual intervention link and improving the automation level of the production line. By establishing a stable mapping relationship between the image coordinate system and the physical coordinate system, the accuracy of the detection result and the execution mechanism is ensured, and real-time processing and diversion of defective products are realized.

[0009] By multi-level feature enhancement and multi-scale information fusion, the recognition ability of the model for typical defects in industrial scenes is improved, especially for subtle features and complex morphological defects. The optimized model significantly reduces the computational complexity while maintaining the detection performance, so that it can stably run on general industrial computing devices, reduces the system deployment cost, and provides a guarantee for long-term reliable application in complex industrial environments. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of this application and help to explain the illustrative embodiments of the present application and its specification, and do not constitute improper limitations to the present application. In the drawings: Figure 1 It is a flowchart of an industrial product quality detection method in the embodiments of the present application; Figure 2 It is an architecture diagram of a preset network structure in the embodiments of the present application; Figure 3 It is a schematic diagram of an industrial product quality detection device in the embodiments of the present application. DETAILED DESCRIPTION

[0011] In order to make the purposes, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described below in connection with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0012] The technical solutions provided by the embodiments of the present application will be described in detail below in connection with the drawings.

[0013] As shown in the drawings, the embodiments of the present application provide an industrial product quality detection method, comprising: Figure 1 S101, acquiring the product position of the product to be detected on the production line through a sensor device, and determining whether to enter an image acquisition station.

[0014] At a specific station of the production line conveyor belt, an image acquisition unit composed of a photoelectric sensor and an industrial camera is installed, and the output signal level from the photoelectric sensor is continuously monitored.

[0015] When the product moves to the sensor detection area upstream of the image acquisition station, it will block the light curtain, causing the sensor output signal to jump from high level to low level, and it is determined that the product is about to enter the image acquisition station.

[0016] After determining that the product enters, a high-precision, low-delay synchronization trigger pulse signal is generated. The signal is sent to two target devices, including an industrial camera and a programmable logic controller, through an industrial bus or a digital IO port.

[0017] After receiving the trigger pulse, the camera will interrupt its free running mode and complete an image acquisition within a preset extremely short exposure time. This mechanism ensures that the image is captured at the moment when the relative position of the product and the camera field of view is most stable, effectively avoiding image smearing caused by continuous movement of the conveyor belt; the programmable logic controller (PLC) uses this trigger signal as the start timestamp of the entire detection cycle to start the subsequent timing and control logic synchronized with the production line beat.

[0018] S102, if yes, trigger a quality detection signal, acquire the surface image data of the product to be detected on the production line through the camera device, and input to the pre-trained defect detection model.

[0019] When it is determined that the product has been positioned and the quality detection trigger signal has been generated, the industrial camera deployed directly above the image acquisition station is the camera device, which immediately executes a preset parameter acquisition cycle, exposes according to the preset exposure time, ensures the image clarity, and transmits the acquired raw image data to the processing device through a high-speed interface.​

[0020] After receiving the original image data, the processing device performs necessary preprocessing on it according to a preset procedure to optimize the subsequent model analysis effect. First, the image is converted to a standard color space required by the model; second, the image is scaled to a fixed input size specified by the model; and finally, the pixel values are normalized to a specific numerical range to accelerate model convergence and improve stability.

[0021] The preprocessed surface image data is input into the defect detection model. The pre-trained defect detection model has been deployed in the operation unit (GPU) of the processing device in advance. The model is a neural network trained based on a large-scale industrial defect dataset, and its network weights have been frozen, in a inference-ready state.

[0022] S103, by the defect detection model, feature extraction is performed on the surface image data to obtain defect type features and corresponding defect position features, and a defect detection report is generated.

[0023] After the preprocessed surface image data is fed into the pre-trained defect detection model, the model automatically performs hierarchical processing through its inherent forward propagation computation graph.

[0024] The pre-defined network structure of the model performs shallow-to-deep analysis on the input image through a series of consecutive convolution, pooling and non-linear activation operations. When the image data flows through the network, different initial feature maps corresponding to different hierarchical scales are output at different depths. The shallow feature map is derived from the early stage of the network, has a high spatial resolution, and retains rich texture, edge and other detail information, but has weak semantic understanding of defects. The deep feature map is derived from the later stage of the network, has a low spatial resolution, but the features at each position have a larger receptive field and contain stronger high-level semantic information.

[0025] It should be noted that the pre-defined network structure includes four CBS modules, four FMA modules, one MKP module and one SPPF module, as shown in FIG. 1. Figure 2 The CBS module includes a convolution layer with a kernel size of 3 and a stride of 2, a layer and an activation function, and the SPPF module represents the spatial pyramid pooling in YOLOv8.

[0026] The channel attention weight of the input feature map, the spatial attention weight of the input feature map, and the mixed attention weight calculated according to the channel attention weight and the spatial attention weight are calculated through the fine-grained mixed attention module (FMA) in the defect detection model, and the input feature map is reweighted.

[0027] The calculation formula of the fine-grained mixed attention module is: ,in, Indicates the input feature map, This represents the output feature map. Indicates channel attention weights. Represents spatial attention weights. express Normalization Represents the Hadamard product of matrices. Represents the ordinary product of matrices.

[0028] The formula for calculating the channel attention weights of the initial feature map is: ,in, Indicates the input feature map, Indicates the kernel size as convolutional layers, Indicates average pooling. express Activation function.

[0029] The formula for calculating the spatial attention weights of the initial feature map is: ,in, Indicates the input feature map, Indicates the kernel size as convolutional layers, Indicates batch normalization, express Activation function.

[0030] The Multi-Kernel Perception Module (MKP) differentially captures the feature representations of multi-scale defect targets through a set of convolutional kernels and models cross-scale spatial dependencies, thereby enhancing the ability to fuse contextual information with small target features. The MKP consists of two steps: computing the initial multi-scale feature maps and their weights, and reweighting the initial multi-scale feature maps.

[0031] The calculation formula for the multi-scale sensing module is as follows: ,in, This represents the output feature map. and They represent the first Feature maps at each scale and their corresponding weights This represents the Hadamard product of matrices.

[0032] The formula for calculating the multi-scale initial feature map is: ,in, For the input feature map, Indicates the kernel size as convolutional layers, Indicates the kernel size as a convolutional layer with a kernel size of wherein, is an input feature map, denotes a convolutional layer with a kernel size of denotes batch normalization, denotes an activation function, denotes a convolutional layer with a kernel size of denotes a channel split operation that splits a feature map into four equal parts along the channel dimension.

[0033] The defect-enhanced feature map is input into multiple parallel convolutional branches, and each branch uses a convolutional kernel with a different kernel size for processing. This is done to extract feature representations under different receptive fields from the same feature map, thereby capturing defect information from subtle traces to macroscopic regions, forming a multi-scale feature map group.

[0034] Each feature map in the multi-scale feature map group is fused. The fusion method can be a simple channel concatenation or a more complex weighted sum. Through fusion, the model can comprehensively utilize context information of different scales, and finally output context output features rich in multi-scale context.

[0035] The context output features are sent to the detection head of the model. The detection head is usually composed of two parallel branches. The classification branch is responsible for predicting the probability of the existence of each type of defect at each potential target location, i.e., the defect class. The regression branch is responsible for predicting the boundary box offset of each potential target, which is used to refine the position of the predefined anchor box, thereby determining the defect location information.

[0036] The original output of the detection head is post-processed, including applying a confidence threshold to filter low-confidence predictions, and using a non-maximum suppression algorithm to remove redundant overlapping boxes.

[0037] Specifically, the input context output feature map is logically divided into WxH uniform grid cells, and each grid cell is responsible for predicting the target in the center region of its receptive field. Based on clustering analysis of the size of the real defect boxes in the training data set, K prior boxes with different sizes and aspect ratios are predefined, and the prior boxes represent the most common defect shapes in the data set.

[0038] Each grid cell is fixedly associated with the same set of K predefined prior boxes. Specifically, for a grid cell with coordinates (i, j) on the feature map, the center positions of the K prior boxes associated with it are initialized as the center coordinates of the region corresponding to the grid cell in the original image.

[0039] ​The feature map is processed by a preset convolutional layer to generate a set of original prediction parameters for each prior box in each grid unit, including a boundary box offset, a defect confidence, and a defect class probability, wherein the boundary box offset includes four parameters (tx, ty, tw, th) for fine-tuning the position and size of the associated prior box; , , The defect confidence represents the confidence degree that there is any defect in the prior box, and the defect class probability represents the probability distribution of belonging to each specific class if there is a defect.

[0040] According to the predicted boundary box offset (tx, ty, tw, th), the accurate boundary box coordinates in the surface image coordinate system are calculated by a preset decoding formula, the decoded coordinates are restored from the feature map scale to the original input image scale, and a candidate detection box represented in the original image is obtained.

[0041] The final confidence score of each candidate detection box, that is, the product of the defect confidence and the maximum class probability, is calculated, and all candidate detection boxes with a score lower than the threshold are filtered out. For the remaining candidate detection boxes, a non-maximum suppression algorithm is respectively performed according to the class, the detection box with the highest score is retained, and the detection boxes of the same class with an intersection-over-union ratio higher than a preset threshold are suppressed. The screened detection box information is formatted into a structured detection result, including a defect class label, a confidence score, and accurate boundary box coordinates in the original surface image coordinate system.

[0042] S104, according to the defect position feature, determine the defect image pixel coordinates in the surface image coordinate system, and convert the defect image pixel coordinates into physical position coordinates in the production line coordinate system.

[0043] A standard calibration board (for example, a checkerboard calibration board) with known physical dimensions and accurate feature point patterns is placed flat on the production line conveyor belt and ensured to be located in the shooting field of view of the image acquisition station. The calibration board plane needs to be consistent with the product running plane.

[0044] The industrial camera is controlled to shoot the calibration board to obtain multiple calibration board images in different poses. Through an image processing algorithm, the image pixel coordinates of the feature points on the calibration board in each image are automatically detected and extracted.

[0045] Since the image acquisition process can be approximated as a perspective projection, the present application adopts a direct linear transformation or an improved algorithm thereof, combines the known feature point physical world coordinates and the extracted corresponding image pixel coordinates, and performs batch calculation. The optimal conversion relationship parameters are solved by an optimization algorithm such as the least squares method. These parameters are usually encapsulated in a homography matrix, which completely describes the projection transformation relationship from the two-dimensional image plane to the two-dimensional production line plane.

[0046] Based on the obtained conversion relationship parameters, a physical position coordinate conversion model is established in the processing device, and a defect image pixel coordinate is input into the physical position coordinate conversion model to obtain a physical position coordinate output by the physical position coordinate conversion model.

[0047] S105, based on the defect type feature and the physical position coordinate, a sorting instruction is generated, and the sorting instruction is issued to a sorting mechanism.

[0048] Based on the final defect category output by the defect detection module, real-time query and matching are performed in a preset quality standard library. The quality standard library is in the form of key-value pair or rule table, and clearly specifies the processing mode corresponding to different categories of defects. By looking up and matching, the sorting action type corresponding to the current defect and its related parameters are determined.

[0049] Based on the physical position coordinate of the defect, the actual physical size of the defect is calculated. For a rectangular bounding box, the size is the length and width; for irregular defects, the circumscribed rectangle or equivalent diameter can be calculated. The calculated physical size of the defect is compared with the size tolerance corresponding to the current sorting action type. The size tolerance is also pre-stored in the quality standard library.

[0050] Based on the matching and comparison results, the final sorting instruction is generated. For example, if the defect category matching result is “immediate rejection” and the defect size exceeds the tolerance, a rejection instruction is generated; if the defect category matching result is “record and alarm” or the defect size does not exceed the tolerance, an alarm record instruction is generated.

[0051] The generated sorting instruction is sent in real time to the programmable logic controller of the production line through an industrial communication protocol (such as TCP / IP, Modbus TCP or PROFINET). The PLC synchronizes this instruction with the real-time position signal of the product from the encoder, ensuring that the corresponding sorting mechanism (such as a pneumatic nozzle, a mechanical arm or a push rod) executes the specified action at the precise moment.

[0052] By deeply integrating the defect detection algorithm with the production line control system, a closed-loop quality control process from perception, decision-making to execution is constructed, which can automatically complete the whole process of image acquisition, defect identification, coordinate mapping and sorting decision-making, effectively reducing the manual intervention link and improving the automation level of the production line. By establishing a stable mapping relationship between the image coordinate system and the physical coordinate system, the accuracy of the detection result and the execution mechanism is ensured, and real-time processing and diversion of defective products are realized.

[0053] Through multi-level feature enhancement and multi-scale information fusion, the recognition ability of the model for typical defects in industrial scenes is improved, especially for defects with fine features and complex morphology. The optimized model significantly reduces the computational complexity while maintaining the detection performance, enabling stable operation on general industrial computing devices, reducing system deployment costs, and providing a guarantee for long-term reliable application in complex industrial environments.

[0054] As shown in Figure 3 The embodiments of the present application also provide an industrial product quality detection device, which comprises: at least one processor; and a memory in communication connection with the at least one processor; wherein The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the industrial product quality detection method according to any one of the preceding embodiments.

[0055] The embodiments of the present application also provide a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are configured to perform the industrial product quality detection method according to any one of the preceding embodiments.

[0056] Each of the embodiments of the present application adopts a progressive description manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment mainly describes the difference from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple, and the related parts can be referred to the part of the method embodiment.

[0057] The device and medium provided by the embodiments of the present application are one-to-one corresponding to the method, so the device and medium also have the similar beneficial technical effects as the method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device and medium will not be described here.

[0058] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0059] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0060] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0061] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0062] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0063] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) 620b. The memory can also include non-volatile memory, such as read only memory (ROM) 620a. The memory can be a memory cache, a buffer, a RAM, or other types of memory. The memory is an example of computer readable media.

[0064] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0065] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0066] The above only describes the embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A method for quality testing of industrial products, characterized in that, include: The sensor device collects the product position of the product to be inspected on the production line to determine whether it has entered the image acquisition station. If so, a quality inspection signal is triggered, and surface image data of the product to be inspected in the production line is collected by the camera equipment and input into the pre-trained defect detection model; The defect detection model is used to extract features from the surface image data to obtain defect type features and corresponding defect location features, and a defect detection report is generated. Based on the defect location characteristics, determine the defect image pixel coordinates in the surface image coordinate system, and convert the defect image pixel coordinates into physical location coordinates in the production line coordinate system; Based on the defect type characteristics and the physical location coordinates, a sorting instruction is generated and sent to the sorting mechanism.

2. The industrial product quality testing method according to claim 1, characterized in that, The step of extracting features from the surface image data using the defect detection model to obtain defect type features and corresponding defect location features, and generating a defect detection report, specifically includes: Using the defect detection model, based on a predefined network structure, multi-level feature extraction is performed on the surface image data to obtain initial feature maps corresponding to different scale levels; the initial feature maps include shallow feature maps and deep feature maps; Calculate the hybrid attention weights corresponding to the initial feature maps at different scales, and based on the hybrid attention weights, re-weight and fuse the features in the initial feature maps to obtain the enhanced feature maps; The enhanced feature maps are filtered to extract the defective enhanced feature maps with defective features. The defective enhanced feature maps are then convolved in parallel using convolution kernels of different kernel scales to obtain a multi-scale feature map group. The feature maps in the multi-scale feature map group are then fused to obtain the context output features. Based on the context output features, the defect category and corresponding location information are determined, and defect detection results are generated.

3. The industrial product quality testing method according to claim 2, characterized in that, The step of calculating the hybrid attention weights corresponding to the initial feature maps at different scales, and then re-weighting and fusing the features in the initial feature maps based on the hybrid attention weights to obtain the enhanced feature maps, specifically includes: Based on the initial feature map, calculate the channel attention weight map and the spatial attention weight map; The channel attention weight map and the spatial attention weight map are fused to generate a hybrid attention weight map; The hybrid attention weight map and the initial feature map are multiplied element-wise, and the multiplication result is added element-wise to the initial feature map to output the enhanced feature map.

4. The industrial product quality testing method according to claim 2, characterized in that, The defect enhancement feature map is convolved in parallel using convolution kernels of different scales to obtain a multi-scale feature map group. The feature maps in the multi-scale feature map group are then fused to obtain the context output feature, specifically including: By using convolution kernels of different sizes, the defect enhancement feature maps are processed in parallel to obtain a multi-scale feature map group; Calculate the adaptive weights corresponding to each feature map in the multi-scale feature map group; Based on the adaptive weights, the feature maps are weighted and summed to obtain the context output features.

5. The industrial product quality testing method according to claim 2, characterized in that, The step of determining the defect category and corresponding location information based on the context output features specifically includes: The context output features are divided into several grid cells, and each grid cell is associated with a predefined prior box. The prediction convolutional layer generates the original prediction parameters corresponding to the predefined prior boxes; the original prediction parameters include the bounding box offset, defect confidence, and defect category probability. Based on the bounding box offset, the predefined prior box is mapped to the surface image coordinate system to obtain the candidate detection box; Based on the defect confidence level and the defect category probability, the candidate detection boxes are filtered, and the final defect category, as well as the corresponding defect confidence level and defect location information, are output.

6. The industrial product quality testing method according to claim 5, characterized in that, The step of filtering the candidate detection boxes based on the defect confidence level and the defect category probability specifically includes: Based on the defect confidence level and the defect category probability, the final confidence score of the candidate detection box is calculated; Candidate detection boxes with a final confidence score lower than a preset confidence threshold are filtered out to obtain the remaining candidate detection boxes, which are then classified based on the defect category. Calculate the cross-union ratio (CUR) among the remaining candidate detection boxes in the same defect category, and filter out the remaining candidate detection boxes whose CUR is higher than a preset overlap threshold; The detection box with the highest final confidence score among the remaining candidate detection boxes after filtering is determined as the final detection box.

7. The industrial product quality testing method according to claim 5, characterized in that, The step of generating sorting instructions based on the defect type characteristics and the physical location coordinates specifically includes: Based on the final defect category, a matching process is performed in a preset quality standard library to determine the corresponding sorting action type. Based on the physical location coordinates, the physical size of the defect is calculated, and the physical size of the defect is compared with the size tolerance corresponding to the sorting action type. Based on the comparison results, a sorting instruction is generated to trigger the sorting mechanism to perform the sorting action.

8. The industrial product quality testing method according to claim 1, characterized in that, The step of converting the pixel coordinates of the defect image into physical location coordinates in the production line coordinate system specifically includes: Obtain the transformation relationship parameters between the surface image coordinate system and the production line coordinate system; Based on the transformation relationship parameters, a physical location coordinate transformation model is established; The pixel coordinates of the defect image are input into the physical location coordinate transformation model to obtain the physical location coordinates output by the physical location coordinate transformation model.

9. An industrial product quality testing device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform an industrial product quality inspection method as described in any one of claims 1 to 8.

10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are configured to execute an industrial product quality testing method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Neodymium iron boron small defect detection method and system based on multi-scale attention

    CN118351053A

  • PCB surface defect detection model construction method and device, and PCB surface defect detection method and device

    CN118570154A

  • Industrial defect real-time detection and positioning method, system and device and medium

    CN118967627A

  • Toxic plant euphorbia fischeriana identification and spatial positioning method based on improved YOLOv8

    CN119625526A

  • Industrial product surface defect positioning detection and attribution method

    CN119722631A