Method, system, device, processor and medium for realizing printing cap defect detection based on multi-dimensional adaptive fusion and parallel block perception

By using a deep convolutional neural network model with multidimensional adaptive fusion and parallel block perception, the accuracy and real-time performance issues of printed cover defect detection in complex environments are solved, achieving efficient and stable printing quality detection.

CN122289200APending Publication Date: 2026-06-26SHANGHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI UNIV
Filing Date
2026-03-30
Publication Date
2026-06-26

Smart Images

  • Figure CN122289200A_ABST
    Figure CN122289200A_ABST
Patent Text Reader

Abstract

This invention relates to a method for detecting defects in printed letter covers based on multidimensional adaptive fusion and parallel block perception, comprising the following steps: image preprocessing; extracting and fusing multi-scale feature information using a deep convolutional neural network model to obtain the main area of ​​the printed letter cover and several suspected defect areas; jointly screening the suspected defect areas to obtain the final defect area; and outputting the screened defect detection results in the form of visual annotation and structured data. The method, system, device, processor, and computer-readable storage medium of this invention for detecting defects in printed letter covers based on multidimensional adaptive fusion and parallel block perception have higher expressive power in multi-level feature modeling, effectively improving the detection accuracy and robustness of minute defects in printed letter covers, reducing computational overhead, meeting the application requirements of real-time detection in industrial production lines, and improving the overall operating efficiency of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition and processing, and more particularly to the field of bottle cap printing quality inspection. Specifically, it refers to a method, system, device, processor, and computer-readable storage medium for detecting defects in printed caps based on multidimensional adaptive fusion and parallel block perception. Background Technology

[0002] With the development of intelligent manufacturing and visual inspection technologies, the quality inspection of bottle cap printing plays a crucial role in the production of beverages, pharmaceuticals, and food. The printed text on bottle caps typically contains key information such as product batch numbers, production dates, and anti-counterfeiting codes, and its printing quality directly affects the product's traceability and appearance. However, on high-speed production lines, due to factors such as inkjet printer nozzle clogging, ink droplet diffusion, and conveyor vibration, various printing defects often appear in the printed cap images, including missing strokes, black spots, stains, and stroke overflow. These defects are often characterized by small area, complex shape, and color close to the background, making it difficult for traditional threshold-based segmentation or edge detection algorithms to accurately identify them.

[0003] Existing methods for detecting defects in printed lettering covers mainly rely on manual inspection or traditional algorithms based on simple image features. Manual inspection is inefficient, highly subjective, and easily affected by fatigue or changes in lighting, leading to missed or false detections. Traditional algorithms, on the other hand, typically require strict control over lighting, color, and shape, resulting in poor robustness and difficulty adapting to complex and changing production environments. Therefore, there is an urgent need for an intelligent detection method that can automatically learn the features of the printed lettering and adapt to changes in lighting and background to achieve high-precision, real-time detection of defects in printed lettering covers.

[0004] Deep convolutional neural networks (CNNs), as a deep learning-based image recognition model, possess powerful feature extraction and pattern recognition capabilities. By constructing multi-layer convolutional structures, the model can automatically learn salient features from a large number of training samples, achieving accurate localization and classification of defective regions. However, existing network structures still have the following problems when processing printed cap images: First, bottle cap defects are mostly small targets, which can easily lead to feature loss during deep feature extraction, affecting detection accuracy; second, complex backgrounds and printing textures can easily interfere with the network's feature learning, causing false detections; third, some models have high computational requirements, making it difficult to meet the needs of real-time detection on industrial production lines. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, system, device, processor and computer-readable storage medium for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception, which is efficient, stable and scalable.

[0006] To achieve the above objectives, the present invention provides a method, system, apparatus, processor, and computer-readable storage medium for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception, as follows: The method for detecting defects in printed letter covers based on multidimensional adaptive fusion and parallel block perception is characterized by the following steps: (1) The image of the printed cover to be detected is used as input. The input image is subjected to image preprocessing operations such as standardization, Gaussian filtering and histogram equalization to obtain the enhanced image of the printed cover. (2) Input the enhanced printed cover image into a deep convolutional neural network model, use the deep convolutional neural network model to extract and fuse multi-scale feature information, analyze the printing area in the printed cover image, and obtain the main area of ​​the printed cover and several suspected defect areas. (3) Based on the confidence threshold, the area threshold, and the geometric shape feature constraints, the suspected defect areas are jointly screened, the false defect areas are eliminated, and the final defect areas are obtained. (4) Output the filtered defect detection results. Output the defect detection results in the form of visual annotation and structured data. Use the defect detection results to carry out quality inspection and automated control of the printing cover production. The deep convolutional neural network model includes a feature extraction module, a feature fusion module, and a defect detection module. The output of the feature extraction module is connected to the feature fusion module, and the output of the feature fusion module is connected to the defect detection module. The feature extraction module consists of a backbone network composed of multiple sets of convolutional feature units. Each convolutional feature unit includes a convolutional layer, a normalization layer, an activation function layer, and a residual connection structure. The adaptive multidimensional fusion module is embedded in the convolutional feature units at the high semantic feature stage at the end of the backbone network. The feature fusion module includes convolutional layers, activation function layers, upsampling layers, downsampling layers, and multi-scale feature fusion units, which are used to integrate feature maps at different levels, taking into account both high-level semantic information and low-level texture information; the parallel block-aware fusion module is set between the adaptive multi-dimensional fusion module and the feature fusion module. The defect detection module includes a convolutional layer, an upsampling layer, and a multi-branch prediction head structure, which are used to perform target detection and pixel-level segmentation on the fused feature map; The adaptive multidimensional fusion module divides the input features into semantic subsets and texture subsets according to channels through an adaptive weighting mechanism of channel dimension and spatial dimension. It calculates weight vectors in channel dimension and spatial dimension respectively, and then fuses the semantic subsets and texture subsets after weighting. The fusion ratio of high-dimensional semantic features and low-dimensional texture features is dynamically adjusted according to the importance of feature semantics. The parallel block-aware fusion module includes several parallel block-aware convolutional branches, pointwise convolutional fusion units, and lightweight channel recalibration units. The block-aware convolutional branches extract local defect responses at different block scales or receptive domains. The pointwise convolutional fusion units realize cross-branch information aggregation. The lightweight channel recalibration unit adaptively calibrates the channel responses of the aggregated features.

[0007] Preferably, the image preprocessing operation in step (1) specifically includes the following steps: The input image is normalized using the mean normalization method, specifically as follows: Pixel values ​​are standardized using the following formula: in, These are the original pixel values. The average pixel value of the image. The standard deviation of the image pixels; Gaussian filtering is used to remove noise from the image, specifically as follows: The filtered output image is calculated using the following formula:

[0008] in, For the input image pixel values, The weights are Gaussian kernel weights. Standard deviation; Histogram equalization is used to enhance image contrast. A grayscale transformation function redistributes the image's grayscale values, expanding the concentrated grayscale regions to the full range. Specifically: Calculate the grayscale transformation function using the following formula:

[0009] in, This represents the total number of gray levels. represents the probability of the grayscale distribution.

[0010] Preferably, the deep convolutional neural network model includes an adaptive multidimensional fusion module and a parallel block-aware fusion module. The adaptive multidimensional fusion module is arranged at the high semantic feature stage at the end of the backbone network and is used to perform adaptive weighted fusion of channel and spatial joint on the high semantic features. The parallel block-aware fusion module is arranged after global multi-scale context convergence and before feature fusion stage and is used to perform block-level perception and channel recalibration on the converged features.

[0011] Preferably, the multi-branch prediction head structure of the defect detection module includes a detection branch and a segmentation branch. The detection branch is used to regress the bounding box position of the defect target and predict the category label. The segmentation branch is used to generate pixel-level mask maps of the printed area and the defect area. The multi-dimensional identification and precise localization of the printed cover defect are achieved through the joint output of detection and segmentation.

[0012] Preferably, the joint screening in step (3) specifically includes the following steps: By setting a confidence threshold to eliminate false detection areas with low confidence, and by using a region area threshold to remove noisy point-like false defect areas, and by combining the geometric morphological characteristics of the defects to judge, the real and representative defect areas are retained.

[0013] Preferably, the method further includes training a deep convolutional neural network model, specifically comprising the following steps: (1-1) Collect images of defects in the printed cover, and mark the printed cover area and defect area in the image using polygonal boxes; (1-2) Convert the format of the label file, and use the set of label files and labeled stamp defect images as stamp defect dataset, and divide it into training set, validation set and test set according to the proportion; (1-3) Construct a deep convolutional neural network model; (1-4) Input the defect dataset of the printed cover into the deep convolutional neural network model to perform training, and obtain the trained deep convolutional neural network model.

[0014] The system for detecting defects in printed letter covers based on multidimensional adaptive fusion and parallel block perception is characterized by the following: The image preprocessing module is used to receive the image of the printed cover to be detected, perform preprocessing operations such as standardization, Gaussian filtering and histogram equalization on the input image, and output the enhanced image of the printed cover. The deep convolutional neural network inference module is connected to the image preprocessing module. It has a built-in deep convolutional neural network model that includes an adaptive multidimensional fusion module and a parallel block perception fusion module. It is used to perform feature extraction and multi-scale fusion on the enhanced stamp cover image and output the main area of ​​the stamp cover and several suspected defect areas. The defect screening module, connected to the deep convolutional neural network inference module, is used to perform joint screening on suspected defect regions based on confidence threshold, region area threshold, and geometric morphological feature constraints, to eliminate false defect regions and obtain the final defect region. The result output module is connected to the defect screening module and is used to output the screened defect detection results in two forms: visual annotation and structured data.

[0015] The device for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception is characterized by the following features: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception.

[0016] The processor for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception is characterized in that the processor is configured to execute computer-executable instructions, which, when executed by the processor, implement the various steps of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception.

[0017] The main feature of this computer-readable storage medium is that it stores a computer program thereon, which can be executed by a processor to implement the various steps of the above-described method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception.

[0018] The present invention discloses a method, system, device, processor, and computer-readable storage medium for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception. Compared with existing global detection methods, the present invention has higher expressive power in multi-level feature modeling, effectively improving the detection accuracy and robustness of minute defects in printed letter covers. Furthermore, the lightweight network structure and efficient segmentation detection algorithm employed in the present invention reduce computational overhead, meeting the application requirements of real-time detection in industrial production lines and improving the overall operating efficiency of the system. Attached Figure Description

[0019] Figure 1 This is a system flowchart of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception according to the present invention.

[0020] Figure 2 This is a schematic diagram of the overall structure of the deep convolutional neural network for the method of detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception, as described in this invention.

[0021] Figure 3 This is a schematic diagram of the adaptive multidimensional fusion module structure of the deep convolutional neural network in the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception according to the present invention.

[0022] Figure 4 for Figure 3 A schematic diagram of the structure of the mid-dimensional adaptive selection fusion module.

[0023] Figure 5 This is a schematic diagram of the parallel block perception fusion module of the deep convolutional neural network in the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception according to the present invention.

[0024] Figure 6 This is a schematic diagram of the feature fusion module structure of the deep convolutional neural network in the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception according to the present invention. Detailed Implementation

[0025] To more clearly describe the technical content of the present invention, the following description is provided in conjunction with specific embodiments.

[0026] The present invention discloses a method for detecting defects in printed letter covers based on multidimensional adaptive fusion and parallel block perception, comprising the following steps: (1) The image of the printed cover to be detected is used as input. The input image is subjected to image preprocessing operations such as standardization, Gaussian filtering and histogram equalization to obtain the enhanced image of the printed cover. (2) Input the enhanced printed cover image into a deep convolutional neural network model, use the deep convolutional neural network model to extract and fuse multi-scale feature information, analyze the printing area in the printed cover image, and obtain the main area of ​​the printed cover and several suspected defect areas. (3) Based on the confidence threshold, the area threshold, and the geometric shape feature constraints, the suspected defect areas are jointly screened, the false defect areas are eliminated, and the final defect areas are obtained. (4) Output the filtered defect detection results. Output the defect detection results in the form of visual annotation and structured data. Use the defect detection results to carry out quality inspection and automated control of the printing cover production. The deep convolutional neural network model includes a feature extraction module, a feature fusion module, and a defect detection module. The output of the feature extraction module is connected to the feature fusion module, and the output of the feature fusion module is connected to the defect detection module. The feature extraction module consists of a backbone network composed of multiple sets of convolutional feature units. Each convolutional feature unit includes a convolutional layer, a normalization layer, an activation function layer, and a residual connection structure. The adaptive multidimensional fusion module is embedded in the convolutional feature units at the high semantic feature stage at the end of the backbone network. The feature fusion module includes convolutional layers, activation function layers, upsampling layers, downsampling layers, and multi-scale feature fusion units, which are used to integrate feature maps at different levels, taking into account both high-level semantic information and low-level texture information; the parallel block-aware fusion module is set between the adaptive multi-dimensional fusion module and the feature fusion module. The defect detection module includes a convolutional layer, an upsampling layer, and a multi-branch prediction head structure, which are used to perform target detection and pixel-level segmentation on the fused feature map; The adaptive multidimensional fusion module divides the input features into semantic subsets and texture subsets according to channels through an adaptive weighting mechanism of channel dimension and spatial dimension. It calculates weight vectors in channel dimension and spatial dimension respectively, and then fuses the semantic subsets and texture subsets after weighting. The fusion ratio of high-dimensional semantic features and low-dimensional texture features is dynamically adjusted according to the importance of feature semantics. The parallel block-aware fusion module includes several parallel block-aware convolutional branches, pointwise convolutional fusion units, and lightweight channel recalibration units. The block-aware convolutional branches extract local defect responses at different block scales or receptive domains. The pointwise convolutional fusion units realize cross-branch information aggregation. The lightweight channel recalibration unit adaptively calibrates the channel responses of the aggregated features.

[0027] In a preferred embodiment of the present invention, the image preprocessing operation in step (1) specifically includes the following steps: The input image is normalized using the mean normalization method, specifically as follows: Pixel values ​​are standardized using the following formula: in, These are the original pixel values. The average pixel value of the image. The standard deviation of the image pixels; Gaussian filtering is used to remove noise from the image, specifically as follows: The filtered output image is calculated using the following formula:

[0028] in, For the input image pixel values, The weights are Gaussian kernel weights. Standard deviation; Histogram equalization is used to enhance image contrast. A grayscale transformation function redistributes the image's grayscale values, expanding the concentrated grayscale regions to the full range. Specifically: Calculate the grayscale transformation function using the following formula:

[0029] in, This represents the total number of gray levels. represents the probability of the grayscale distribution.

[0030] In a preferred embodiment of the present invention, the parallel block-aware fusion module includes several parallel block-aware convolutional branches, a pointwise convolutional fusion unit, and a lightweight channel recalibration unit. The block-aware convolutional branches extract local defect responses at different block scales or receptive domains. The pointwise convolutional fusion unit realizes cross-branch information aggregation. The lightweight channel recalibration unit adaptively calibrates the channel responses of the aggregated features.

[0031] In a preferred embodiment of the present invention, the multi-branch prediction head structure of the defect detection module includes a detection branch and a segmentation branch. The detection branch is used to regress the bounding box position of the defect target and predict the category label. The segmentation branch is used to generate pixel-level mask maps of the printed area and the defect area. The multi-dimensional identification and precise positioning of the printed cover defect are achieved through the joint output of detection and segmentation.

[0032] As a preferred embodiment of the present invention, the joint screening in step (3) specifically includes the following steps: By setting a confidence threshold to eliminate false detection areas with low confidence, and by using a region area threshold to remove noisy point-like false defect areas, and by combining the geometric morphological characteristics of the defects to judge, the real and representative defect areas are retained.

[0033] In a preferred embodiment of the present invention, the method further includes training a deep convolutional neural network model, specifically comprising the following steps: (1-1) Collect images of defects in the printed cover, and mark the printed cover area and defect area in the image using polygonal boxes; (1-2) Convert the format of the label file, and use the set of label files and labeled stamp defect images as stamp defect dataset, and divide it into training set, validation set and test set according to the proportion; (1-3) Construct a deep convolutional neural network model; (1-4) Input the defect dataset of the printed cover into the deep convolutional neural network model to perform training, and obtain the trained deep convolutional neural network model.

[0034] The present invention discloses a system for detecting defects in printed letter covers based on multidimensional adaptive fusion and parallel block perception, wherein the system comprises: The image preprocessing module is used to receive the image of the printed cover to be detected, perform preprocessing operations such as standardization, Gaussian filtering and histogram equalization on the input image, and output the enhanced image of the printed cover. The deep convolutional neural network inference module is connected to the image preprocessing module. It has a built-in deep convolutional neural network model that includes an adaptive multidimensional fusion module and a parallel block perception fusion module. It is used to perform feature extraction and multi-scale fusion on the enhanced stamp cover image and output the main area of ​​the stamp cover and several suspected defect areas. The defect screening module, connected to the deep convolutional neural network inference module, is used to perform joint screening on suspected defect regions based on confidence threshold, region area threshold, and geometric morphological feature constraints, to eliminate false defect regions and obtain the final defect region. The result output module is connected to the defect screening module and is used to output the screened defect detection results in two forms: visual annotation and structured data.

[0035] The present invention relates to a device for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception, wherein the device comprises: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception.

[0036] The processor of the present invention for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception is configured to execute computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the various steps of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception.

[0037] The computer-readable storage medium of the present invention stores a computer program that can be executed by a processor to implement the various steps of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception.

[0038] This invention discloses a defect detection method for printed bottle caps based on multidimensional adaptive fusion and parallel block perception. This method addresses common minor defects in bottle cap printing processes, such as missing strokes, black spots, and stains, by proposing a high-precision detection scheme that integrates block-level saliency modeling and channel recalibration.

[0039] This method introduces an adaptive fusion mechanism of multi-dimensional features in the feature extraction stage to effectively retain key information of minute defects. After global multi-scale context aggregation, a parallel block-aware fusion module is set up to improve the representation capability of minute defects through block-level saliency redistribution and channel recalibration. Thus, while ensuring detection accuracy, the model's lightweight and real-time performance are significantly improved, providing an efficient, stable, and scalable intelligent detection solution for industrial bottle cap printing quality inspection.

[0040] Specifically, firstly, a deep convolutional neural network is used to extract multi-scale features, and an adaptive multi-dimensional fusion module is introduced at the end of the backbone network in the high semantic feature stage to perform adaptive weighted fusion of channel and spatial joint high semantic features; at the same time, after global multi-scale context convergence, a parallel block-aware fusion module is added to perform block-level perception and channel recalibration on the converged features, thereby significantly improving the ability to identify and locate defects in small targets.

[0041] The purpose of this invention is to overcome the problems of low detection accuracy, insufficient ability to identify small target defects, and inability to meet the real-time inspection requirements of industrial applications in existing printed cover defect detection methods. This invention proposes a printed cover defect detection method based on multi-dimensional adaptive fusion and parallel block perception. By introducing an adaptive multi-dimensional fusion module and a parallel block perception fusion module, this invention significantly improves the detection accuracy and stability of various types of subtle defects, such as missing strokes, black spots, and stains, while maintaining a lightweight network. This method can automatically learn the structural and texture features of printed cover images, effectively distinguishing real defects from background noise, thereby achieving high-precision, real-time detection of printed cover defects and providing an efficient and reliable solution for industrial vision inspection systems.

[0042] The present invention provides a defect detection method for printed letter covers based on multidimensional adaptive fusion and parallel block perception, comprising the following steps: 1) Image preprocessing: The image of the printed cover to be detected is used as input. The image is subjected to image preprocessing operations such as standardization, Gaussian filtering, and histogram equalization to obtain an enhanced printed cover image, so as to improve the stability and robustness of subsequent detection. 2) Feature extraction and suspected defect identification: The enhanced printed cover image obtained in step 1) is input into a deep convolutional neural network model. The adaptive multidimensional fusion module and the parallel block perception fusion module in the network are used to extract and fuse multi-scale feature information. The printing area in the printed cover image is analyzed to obtain the main area of ​​the printed cover and several suspected defect areas. 3) Defect screening and optimization: Based on the confidence threshold, area threshold, and geometric shape feature constraints, the suspected defect areas obtained in step 2) are screened and optimized to obtain the final defect detection results; 4) Output and application of results: Output the defect detection results obtained in step 3), including defect location, category, and confidence information; the detection results are output in the form of image visualization annotation and structured data for subsequent quality inspection, production monitoring, and automation control.

[0043] The image preprocessing in step 1) includes standardization, noise removal, histogram equalization, contrast enhancement and other processing steps, which are used to improve the robustness of the model to interference from different lighting conditions, printing deviations, background noise and other factors, make the texture features of the input image clearer, and provide a more stable input for subsequent feature extraction.

[0044] In step 2), an adaptive multidimensional fusion module is introduced into the backbone structure of the deep convolutional neural network model. This module adaptively selects and fuses multi-scale features through an adaptive weighting mechanism of channel dimension and spatial dimension. By dividing and weighting high-dimensional semantic features and low-dimensional texture features into channels, the network can dynamically adjust the fusion ratio according to the importance of feature semantics. This enhances the feature representation ability while maintaining the network's lightweight nature, effectively improving the model's detection performance of small printing defects in complex backgrounds.

[0045] After global multi-scale context convergence, a parallel block-aware fusion module is set up before the feature fusion stage in step 2). This module adopts a multi-branch parallel structure and block-level saliency redistribution to perform block-level response modeling and channel response calibration for feature blocks of different scales. By allocating different receptive fields and weights among parallel branches, the network can simultaneously take into account fine-grained defect responses within blocks and global printing context constraints, thereby significantly improving the sensitivity to small target defects such as missing strokes and black dots.

[0046] In step 3), a joint screening strategy combining confidence threshold, area threshold, and geometric morphological feature constraints is employed to screen and optimize suspected defect areas. This strategy improves overall detection accuracy and system robustness by eliminating false defect areas with low confidence or excessively small areas and retaining true defect targets by combining geometric morphological feature judgment.

[0047] The detection result output in step 4) includes two forms: image visualization output and data interface output. The visualization output uses different colors to select different types of defect areas, while the data output transmits the structured information to the industrial inspection system to realize real-time monitoring and automated decision-making on the production line.

[0048] In specific embodiments of the present invention, refer to the appendix. Figure 1 The defect detection method for the printed cover of the present invention specifically includes the following steps: Step 1) Before inputting the stamp image into the deep convolutional neural network model, the original image needs to be preprocessed by standardization, Gaussian filtering, histogram equalization, etc., in order to improve the quality and feature consistency of the input image and provide more stable input data for subsequent defect detection. Furthermore, the image normalization used in step 1) maps the pixel values ​​of the input image to a uniform numerical range to eliminate the influence of brightness and exposure differences under different image acquisition conditions, thereby ensuring the stability of the gradient distribution during model training and improving the network convergence speed. The image normalization operation adopts the mean normalization method, and its calculation formula is as follows: ...(1) in, These are the original pixel values. and These represent the mean and standard deviation of the image, respectively.

[0049] Furthermore, the Gaussian filter used in step 1) is used to remove high-frequency noise from the surface of the printed cover. By performing a convolution operation with a Gaussian kernel, the image is smoothed out while preserving edge contours, removing interference from uneven lighting, dust, and acquisition noise. Its weight distribution function is: ...(2) The formula for calculating the filtered output image is: ... (3)

[0050] in, For the input image pixel values, The weights are Gaussian kernel weights. The standard deviation is denoted as . This filtering operation can effectively remove high-frequency noise and artifacts from the surface of the printed lettering cover, enhancing the smoothness and consistency of the printed lettering texture edges.

[0051] Furthermore, the histogram equalization used in step 1) is used to enhance the overall contrast of the image, and its grayscale transformation function is defined as: ... (4) in, This represents the total number of gray levels. This represents the grayscale distribution probability. By redistributing the grayscale values ​​of the image, the concentrated grayscale area is expanded to the full range, thereby improving the contrast between the printed text area and the background, and enhancing the recognizability of the printed strokes and defects.

[0052] Step 2) Use a deep convolutional neural network model to extract suspected defect regions from the enhanced image obtained in Step 1), resulting in the printed cover region and several suspected defect regions; The deep convolutional neural network model needs to be pre-trained. The steps for creating the training set and training are as follows: The first training step is to collect images of defects in the printed letter cover, and to annotate the images containing various defects. The printed letter cover area and the defect area in the image are annotated with polygonal boxes to form an annotated image of the printed letter cover defects. This annotation method can provide pixel-level supervision signals to the network, enabling the model to better learn the morphological features of defects inside the printed letter area. The annotation operation includes: after each image is annotated, a corresponding JSON format tag file is automatically generated; The second training step involves converting the label files to a new format and using the set of label files and the labeled stamp defect images as a stamp defect dataset. The stamp defect dataset includes a training set, a validation set, and a test set, which are divided according to a predetermined ratio. The label file format conversion operation includes converting the original label files from JSON format to TXT format to facilitate network training and data retrieval. In the converted TXT file, each line corresponds to a defect target, recording the defect category number and its corresponding polygon vertex coordinate sequence, i.e., the two-dimensional coordinate values ​​of each vertex. Each polygon is used to accurately describe the shape and boundary information of the defect region in the image. During training, the system can automatically generate a corresponding pixel-level mask based on the vertex coordinates of the polygon for segmentation branch supervision. Simultaneously, it calculates the minimum bounding rectangle of the polygon to provide the bounding box coordinates for the detection branch, thereby achieving joint training of detection and segmentation tasks. The dataset partitioning operation includes dividing the dataset into a training set, a validation set, and a test set in an 8:1:1 ratio. The training set is used for model parameter learning, the validation set for performance tuning and overfitting monitoring, and the test set for final detection and segmentation performance evaluation, ensuring the scientific nature of the model training process and the objectivity of the test results.

[0053] Training step three: Construct a deep convolutional neural network model; The deep convolutional neural network model includes: The feature extraction module consists of multiple sets of improved convolutional feature units. Each feature unit includes a convolutional layer, a normalization layer, an activation function layer, and a residual connection structure, used to extract multi-level feature information from the input stamp image. The adaptive multi-dimensional fusion module is located at the high semantic feature stage at the end of the backbone network. This module introduces an adaptive weighting mechanism in both the channel and spatial dimensions, dynamically adjusting the fusion ratio of high-dimensional semantic features and low-dimensional texture features according to the importance of different feature channels. The input features are divided into semantic and texture subsets by channel. The semantic subset carries defect category discrimination information, while the texture subset carries stroke edge and noise detail information. Weight vectors are calculated in both the channel and spatial dimensions, and the semantic and texture subsets are weighted before fusion, thereby achieving joint enhancement of the channels and spatial locations related to minor defects. This enhances the model's ability to identify subtle defects without increasing computational complexity.

[0054] After global multi-scale context aggregation, a parallel block-aware fusion module is set up to perceive feature blocks of different scales through a multi-branch parallel structure. This module can realize block-level saliency redistribution and channel recalibration among multi-scale features, enhance the separability and localization stability of small defect responses, thereby improving the model's comprehensive perception ability of complex printed textures and subtle defect features, and effectively improving the model's detection robustness in complex printing backgrounds and small target defect scenarios.

[0055] The feature fusion module, including convolutional layers, activation function layers, upsampling layers, and downsampling layers, is used to integrate feature maps from different levels to take into account both high-level semantic information and low-level texture information.

[0056] The defect detection module, comprising convolutional layers, upsampling layers, and a prediction head structure, performs target detection and pixel-level segmentation on the multi-scale fused feature map output by the feature fusion module. The detection branch regresses the bounding box position of the defect target and predicts its category label, while the segmentation branch generates pixel-level mask maps for the corresponding defect and printed areas. Through the joint output of multi-scale detection and segmentation, the system can accurately locate and classify various printed cover defects. Post-processing, incorporating confidence thresholds, area thresholds, and geometric feature constraints, yields the final high-precision detection results.

[0057] Training step four involves inputting the aforementioned stamp cover defect dataset into the constructed deep convolutional neural network model for training, thereby obtaining the trained deep convolutional neural network model.

[0058] Step 3) Based on a preset threshold, the suspected defective areas of the printed cover extracted by the deep convolutional neural network model are filtered to obtain the filtered defective areas; Furthermore, in step 3), a joint screening strategy combining confidence threshold, region area threshold, and geometric morphological feature constraints is employed to accurately screen and optimize suspected defect areas in the printed cover image. Specifically, a confidence threshold is set to eliminate false positives with low confidence, a region area threshold is used to remove noisy point-like regions, and the geometric morphological features of the defects are combined to retain true and representative defect areas, thereby improving the accuracy and robustness of the model's detection results.

[0059] Step 4) Output the detection results for the defect areas selected in Step 3), including defect location, category, and confidence level information; Furthermore, in step 4), the system outputs the detection results in a visually labeled and structured data format. Different types of defect areas are visually displayed in the printed cover image using different colored boxes or masks. Simultaneously, the system outputs the defect location information, category number, and confidence score in data format. The output results can be synchronously transmitted to an industrial quality inspection system or embedded terminal, enabling real-time monitoring and automated judgment of production line defects, providing data support for subsequent quality traceability and statistical analysis.

[0060] See attached document Figure 2 The present invention provides a defect detection method for printed cover based on multidimensional adaptive fusion and parallel block perception, the specific implementation of which is as follows: Step 1), take the image of the printed cover to be detected as input. The input image is an RGB three-channel color image with a uniform image size. The input image undergoes preprocessing operations such as standardization, Gaussian filtering, and histogram equalization to reduce noise interference and enhance the contrast of the printed characters, resulting in an enhanced image of the printed character cover. This preprocessed image serves as the input to a deep convolutional neural network model. Step 2) Utilize the feature extraction module to perform multi-scale feature extraction on the input printed cover image. This module consists of multiple sets of convolutional units, each including a convolutional layer, a normalization layer, an activation function layer, and a residual connection structure, used to extract semantic and texture features of the printed area layer by layer. Specifically, the convolutional units at the high semantic feature stage at the backbone end embed features as shown in the attached diagram. Figure 3 The adaptive multidimensional fusion module shown introduces an adaptive weighting mechanism in the channel and spatial dimensions to dynamically fuse features at different scales, thereby enhancing the correlation and representational ability between multi-level features.

[0061] Several components as shown in the appendix are arranged inside the adaptive multidimensional fusion module. Figure 4The dimensional adaptive selection fusion module shown here calculates weights on the feature channel dimension and performs weighted selection to adaptively adjust the importance of features. Through weighted integration and nonlinear mapping of low-level, mid-level, and high-level features, the model can dynamically balance the contributions of high-dimensional semantic features and low-dimensional detail features, thereby enhancing the completeness and accuracy of feature representation and improving the detection sensitivity of minor defects such as missing strokes and ink stains.

[0062] Furthermore, after high semantic features are output at the end of the backbone network, they first enter the global multi-scale context aggregation module for multi-scale aggregation to obtain aggregated features; then the aggregated features are input as shown in the attached figure. Figure 5 The parallel block-aware fusion module shown performs block-level saliency redistribution and channel recalibration, outputting enhanced features. These enhanced features are then fed into a multi-level feature fusion module and a prediction output module. The parallel block-aware fusion module includes several parallel block-aware convolutional branches, pointwise convolutional fusion units, and lightweight channel recalibration units. The block-aware convolutional branches extract local defect responses at different block scales or receptive domains, pointwise convolutions aggregate cross-branch information, and the lightweight channel recalibration unit adaptively calibrates the channel responses of the aggregated features. This module utilizes a multi-branch parallel structure to model block-level responses of feature blocks at different scales and adaptively calibrates the channel responses through lightweight channel recalibration, thereby improving the saliency and localization stability of small defects in complex backgrounds. Step 3), input the multi-layer feature map output by the feature extraction module into the attached... Figure 6 The feature fusion module shown performs multi-scale feature fusion. This module includes convolutional layers, activation function layers, upsampling layers, and downsampling layers to integrate features from different levels. Specifically, deep feature maps are upsampled and then concatenated with mid-level feature maps, subsequently combined with shallow feature maps, and after convolution and normalization, the final multi-scale fused feature map is obtained, providing input for subsequent defect detection. The feature fusion result is input into the defect detection module for multi-scale target detection and pixel-level segmentation. The detection module consists of convolutional layers, upsampling layers, and a multi-branch prediction head, outputting detection results at multiple scales. The detection branch outputs the bounding box coordinates and category labels for each defect, while the segmentation branch outputs pixel-level mask maps of the printed area. Through the joint output of detection and segmentation, the model can simultaneously obtain the spatial location, category type, and region mask information of the defect, achieving multi-dimensional recognition and precise localization of defects in the printed cover.

[0063] Step 4) The results output by the detection module are jointly filtered according to confidence threshold, area threshold, and geometric features to remove low-confidence and atypical areas, retaining the true defect targets. The final detection results are output in a visually labeled and structured data format. Different defect types are visually displayed on the image with different colored boxes or mask areas. At the same time, a structured data file is generated to record the defect location, category, and confidence information. The detection results can be uploaded to an industrial quality inspection system to realize real-time detection, defect alarm, and automated classification judgment on the production line. The left image is the original input image of the printed cover, and the right image is the visual detection result output by the model. Different colored mask areas correspond to different types of defect categories, intuitively demonstrating the model's recognition, location, and classification effect on printed cover defects.

[0064] This invention presents a defect detection method for printed letter covers based on multidimensional adaptive fusion and parallel block perception. By introducing an adaptive multidimensional fusion module and a parallel block perception fusion module, it achieves high-precision identification and localization of minute defects on the surface of printed letter covers. While maintaining a lightweight network structure and high inference efficiency, this method significantly improves the model's ability to detect small target defects and complex printing backgrounds, meeting the application requirements of low latency and high reliability in industrial production lines.

[0065] This invention constructs an intelligent visual inspection system that balances accuracy and speed through the coordinated optimization of feature extraction, feature fusion, and defect detection modules. It can be widely applied to bottle cap printing quality inspection scenarios in industries such as beverages, pharmaceuticals, and food. This method effectively reduces reliance on manual inspection, minimizes false positives and false negatives, and improves the automation level and overall inspection efficiency of the production line.

[0066] Compared with existing technologies, this invention has significant improvements in both network structure design and detection performance, specifically in the following aspects: 1) This invention introduces an adaptive multidimensional fusion module into the high-level convolution of the backbone network. Through adaptive weighted fusion of multidimensional features, it realizes the dynamic integration of high-dimensional semantic features and low-dimensional detail features. Preferably, the model’s ability to identify subtle printing defects is effectively improved by dividing semantic and texture channels and combining the joint adaptive weighting of channel dimension and spatial dimension. 2) Before proceeding to multi-level feature fusion, this invention first aggregates the backbone output at multiple scales through a global multi-scale context aggregation module. A parallel block-aware fusion module is then placed after this aggregation module to perform block-level saliency redistribution and channel recalibration on the aggregated context features, significantly enhancing the model's robustness to detection under complex lighting, printing offsets, background noise, and other interference. The parallel block-aware fusion module is not used to replace the backbone's basic convolutional feature units, but rather to perform post-enhancement on the globally aggregated features. 3) This invention uses a multi-threshold screening and morphological constraint strategy to jointly screen the detection results based on confidence level and geometric features, thereby reducing false detections and missed detections and improving the accuracy and stability of defect detection. 4) The present invention adopts a lightweight structural design, which maintains high detection accuracy while having low computational complexity. It is suitable for quantitative deployment on embedded platforms such as RK3588, realizing millisecond-level real-time inference and meeting the real-time detection needs of industrial production lines.

[0067] For the specific implementation scheme of this embodiment, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0068] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0069] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.

[0070] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0071] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0072] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The corresponding program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0073] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0074] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0075] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0076] The present invention discloses a method, system, device, processor, and computer-readable storage medium for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception. Compared with existing global detection methods, the present invention has higher expressive power in multi-level feature modeling, effectively improving the detection accuracy and robustness of minute defects in printed letter covers. Furthermore, the lightweight network structure and efficient segmentation detection algorithm employed in the present invention reduce computational overhead, meeting the application requirements of real-time detection in industrial production lines and improving the overall operating efficiency of the system.

[0077] In this specification, the invention has been described with reference to specific embodiments thereof. However, it will be apparent that various modifications and variations can be made without departing from the spirit and scope of the invention. Therefore, the specification and drawings should be considered illustrative rather than restrictive.

Claims

1. A method for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception, characterized in that, The method includes the following steps: (1) The image of the printed cover to be detected is used as input. The input image is subjected to image preprocessing operations such as standardization, Gaussian filtering and histogram equalization to obtain the enhanced image of the printed cover. (2) Input the enhanced printed cover image into a deep convolutional neural network model, use the deep convolutional neural network model to extract and fuse multi-scale feature information, analyze the printing area in the printed cover image, and obtain the main area of ​​the printed cover and several suspected defect areas. (3) Based on the confidence threshold, the area threshold, and the geometric shape feature constraints, the suspected defect areas are jointly screened, the false defect areas are eliminated, and the final defect areas are obtained. (4) Output the defect detection results after screening. Output the defect detection results in the form of visual annotation and structured data. Use the defect detection results to carry out quality inspection and automated control of the printing cover production.

2. The method for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception according to claim 1, characterized in that, The image preprocessing operation in step (1) includes the following steps: The input image is normalized using the mean normalization method, specifically as follows: Pixel values ​​are standardized using the following formula: in, These are the original pixel values. The average pixel value of the image. The standard deviation of the image pixels; Gaussian filtering is used to remove noise from the image, specifically as follows: The filtered output image is calculated using the following formula: in, For the input image pixel values, The weights are Gaussian kernel weights. Standard deviation; Histogram equalization is used to enhance image contrast. A grayscale transformation function redistributes the image's grayscale values, expanding the concentrated grayscale regions to the full range. Specifically: Calculate the grayscale transformation function using the following formula: in, This represents the total number of gray levels. represents the probability of the grayscale distribution.

3. The method for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception according to claim 1, characterized in that, The deep convolutional neural network model includes an adaptive multidimensional fusion module and a parallel block-aware fusion module. The adaptive multidimensional fusion module is located at the high semantic feature stage at the end of the backbone network and is used to perform adaptive weighted fusion of channel and spatial joint on the high semantic features. The parallel block-aware fusion module is located after global multi-scale context convergence and before the feature fusion stage and is used to perform block-level perception and channel recalibration on the converged features. The deep convolutional neural network model includes a feature extraction module, a feature fusion module, and a defect detection module. The output of the feature extraction module is connected to the feature fusion module, and the output of the feature fusion module is connected to the defect detection module. The feature extraction module consists of a backbone network composed of multiple sets of convolutional feature units. Each convolutional feature unit includes a convolutional layer, a normalization layer, an activation function layer, and a residual connection structure. The adaptive multidimensional fusion module is embedded in the convolutional feature units at the high semantic feature stage at the end of the backbone network. The feature fusion module includes convolutional layers, activation function layers, upsampling layers, downsampling layers, and multi-scale feature fusion units, which are used to integrate feature maps at different levels, taking into account both high-level semantic information and low-level texture information; the parallel block-aware fusion module is set between the adaptive multi-dimensional fusion module and the feature fusion module. The defect detection module includes a convolutional layer, an upsampling layer, and a multi-branch prediction head structure, which are used to perform target detection and pixel-level segmentation on the fused feature map; The adaptive multidimensional fusion module divides the input features into semantic subsets and texture subsets according to channels through an adaptive weighting mechanism of channel dimension and spatial dimension. It calculates weight vectors in channel dimension and spatial dimension respectively, and then fuses the semantic subsets and texture subsets after weighting. The fusion ratio of high-dimensional semantic features and low-dimensional texture features is dynamically adjusted according to the importance of feature semantics. The parallel block-aware fusion module includes several parallel block-aware convolutional branches, pointwise convolutional fusion units, and lightweight channel recalibration units. The block-aware convolutional branches extract local defect responses at different block scales or receptive domains. The pointwise convolutional fusion units realize cross-branch information aggregation. The lightweight channel recalibration unit adaptively calibrates the channel responses of the aggregated features.

4. The method for detecting defects in printed covers based on multi-dimensional adaptive fusion and parallel block perception according to claim 1, characterized in that, The multi-branch prediction head structure of the defect detection module includes a detection branch and a segmentation branch. The detection branch is used to regress the bounding box position of the defect target and predict the category label. The segmentation branch is used to generate pixel-level mask maps of the printed area and the defect area. The multi-dimensional identification and accurate localization of the printed cover defect are achieved through the joint output of detection and segmentation.

5. The method for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception according to claim 1, characterized in that, The joint screening in step (3) includes the following steps: By setting a confidence threshold to eliminate false detection areas with low confidence, and by using a region area threshold to remove noisy point-like false defect areas, and by combining the geometric morphological characteristics of the defects to judge, the real and representative defect areas are retained.

6. The method for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception according to claim 1, characterized in that, The method also includes training a deep convolutional neural network model, specifically comprising the following steps: (1-1) Collect images of defects in the printed cover, and mark the printed cover area and defect area in the image using polygonal boxes; (1-2) Convert the format of the label file, and use the set of label files and labeled stamp defect images as stamp defect dataset, and divide it into training set, validation set and test set according to the proportion; (1-3) Construct a deep convolutional neural network model; (1-4) Input the defect dataset of the printed cover into the deep convolutional neural network model to perform training, and obtain the trained deep convolutional neural network model.

7. A system for detecting defects in printed letter covers based on multidimensional adaptive fusion and parallel block perception, implementing the method of claim 1, characterized in that, The system includes: The image preprocessing module is used to receive the image of the printed cover to be detected, perform preprocessing operations such as standardization, Gaussian filtering and histogram equalization on the input image, and output the enhanced image of the printed cover. The deep convolutional neural network inference module is connected to the image preprocessing module. It has a built-in deep convolutional neural network model that includes an adaptive multidimensional fusion module and a parallel block perception fusion module. It is used to perform feature extraction and multi-scale fusion on the enhanced stamp cover image and output the main area of ​​the stamp cover and several suspected defect areas. The defect screening module, connected to the deep convolutional neural network inference module, is used to perform joint screening on suspected defect regions based on confidence threshold, region area threshold, and geometric morphological feature constraints, to eliminate false defect regions and obtain the final defect region. The result output module is connected to the defect screening module and is used to output the screened defect detection results in two forms: visual annotation and structured data.

8. A device for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception, characterized in that, The device includes: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the steps of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception as described in any one of claims 1 to 6.

9. A processor for detecting defects in printed letter covers based on multi-dimensional adaptive fusion and parallel block perception, characterized in that, The processor is configured to execute computer-executable instructions, which, when executed by the processor, implement each step of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, It stores a computer program that can be executed by a processor to implement the various steps of the method for detecting defects in printed covers based on multidimensional adaptive fusion and parallel block perception as described in any one of claims 1 to 6.