Paper quality detection method and system

Through the multi-layer feature extraction and fusion strategy of the YOLOV8 model, the problem of inaccurate defect identification in paper quality inspection is solved, efficient and accurate paper defect detection is achieved, hardware costs are reduced and production efficiency is improved.

CN119625409BActive Publication Date: 2025-09-23HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411713794.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-09-23
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

Existing paper quality inspection methods rely on manual operations and simple image processing techniques, which make it difficult to accurately identify defects on the paper surface, especially when different types of defects have similar shapes, which are prone to misidentification. Traditional deep learning methods are also prone to losing detailed information during the feature extraction process, and defects with too large a scale difference are difficult to effectively identify.

Method used

Using the YOLO V8 model, the model implements feature extraction and defect detection for paper images through a shallow network feature extraction module, an adaptive weighted downsampling module, a reversible feature fusion module, and a deep network feature extraction module. The model divides the initial feature map into multiple feature regions, assigns weights, and then reversely propagates the feature map through the reversible feature fusion module. This combines deep and shallow network features to improve the accuracy and efficiency of defect detection.

Benefits of technology

It achieves rapid and accurate identification and classification of paper defects, improves the detection capability of small-sized and complex-shaped defects, reduces hardware investment and operating costs, reduces equipment downtime, and improves production efficiency and economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625409B_ABST
    Figure CN119625409B_ABST
Patent Text Reader

Abstract

The present invention provides a paper quality detection method and system, relating to the field of defect detection technology. A paper quality detection method based on the YOLOV8 model comprises: performing a feature extraction operation on a paper image to be tested using a shallow network feature extraction module to obtain an initial feature map; when a deep network feature extraction module performs a downsampling operation on the initial feature map, the initial feature map is divided into multiple feature regions, and a weight is assigned to each feature region using an adaptive weight downsampling module to generate a weighted feature map; a reversible feature fusion module is used to reversely transfer the weighted feature map to the shallow network feature extraction module to obtain a fused weighted feature map; and a deep network feature extraction module is used to determine defect information of the paper image to be tested based on the fused weighted feature map. The present invention can more accurately identify and classify defects on paper, achieving higher-precision and higher-efficiency paper defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of defect detection, and in particular to a paper quality detection method and system. Background Art

[0002] With the rapid development of industrial production, paper has become an indispensable material in daily life and industrial production. Its paper quality inspection is a vital link in industrial production, and paper defects need to be detected. Existing paper quality inspection methods mainly rely on manual operation and simple image processing technology.

[0003] Existing technologies, such as manual operations and simple image processing techniques, have limited ability to identify defects. Defects on paper surfaces vary widely in shape and size, making it difficult for traditional detection methods to capture the subtle differences in all defect types. Furthermore, traditional deep learning methods are prone to losing detailed information during feature extraction, especially when different types of defects have similar morphologies, leading to incorrect identification. Furthermore, due to limitations such as image resolution settings, traditional image processing techniques are also difficult to effectively identify defects with significantly different scales when detecting paper defects. Summary of the Invention

[0004] The problem solved by the present invention is how to improve the accuracy of paper quality detection.

[0005] To solve the above problems, the present invention provides a paper quality detection method and system.

[0006] In a first aspect, the present invention provides a paper quality detection method, which is based on the YOLOv8 model. The YOLOv8 model includes a shallow network feature extraction module, an adaptive weight downsampling module, a reversible feature fusion module, and a deep network feature extraction module. The method includes:

[0007] Performing feature extraction on the paper image to be tested according to the shallow network feature extraction module to obtain an initial feature map;

[0008] When the deep network feature extraction module performs a downsampling operation on the initial feature map, the initial feature map is divided into a plurality of feature regions, and a weight is assigned to each of the feature regions by the adaptive weight downsampling module, and then a weighted feature map is generated according to the weight of the feature regions;

[0009] The weighted feature map is reversely transferred to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map;

[0010] The deep network feature extraction module determines the defect information of the paper image to be tested according to the fused weighted feature map.

[0011] Optionally, performing a feature extraction operation on the paper image to be tested according to the shallow network feature extraction module to obtain an initial feature map includes:

[0012] Inputting the paper image to be tested into the YOLOV8 model, and sequentially performing feature extraction on the paper image to be tested through the multi-layer convolutional network of the shallow network feature extraction module;

[0013] The output feature map of the convolutional network in the previous layer of the deep network feature extraction module is used as the initial feature map.

[0014] Optionally, when the deep network feature extraction module performs a downsampling operation on the initial feature map, the initial feature map is divided into a plurality of feature regions, including:

[0015] When the deep network feature extraction module performs a downsampling operation on the initial feature map, determining a grid division specification according to the size data of the initial feature map;

[0016] The initial feature map is divided according to the division grid to obtain a plurality of feature regions.

[0017] Optionally, the adaptive weight downsampling module includes an average pooling layer and a splicing layer, and the adaptive weight downsampling module is used to divide the weights for each feature area, and then generates a weighted feature map according to the weights of the feature areas, including:

[0018] Through the average pooling layer, the index statistics of each feature area are performed to obtain the average value corresponding to the pixel value of each feature area;

[0019] Through the splicing layer, the feature regions are fused according to the average value of each feature region to obtain a fused feature map;

[0020] The fused feature map is weightedly fused through the attention mechanism in the adaptive weight downsampling module to obtain the weighted feature map.

[0021] Optionally, performing weighted fusion on the fused feature map through the attention mechanism in the adaptive weight downsampling module to obtain the weighted feature map includes:

[0022] Dividing the fused feature map into a plurality of non-overlapping sub-regions, wherein each sub-region corresponds to at least one feature map channel;

[0023] Determining an attention value of the sub-region through the feature map channel of the sub-region;

[0024] Determining a weight of the sub-region according to the attention value;

[0025] Weighted fusion is performed according to the weights of the sub-regions to obtain the weighted feature map.

[0026] Optionally, the weighted feature map is reversely transferred to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map, including:

[0027] Determining target sizes of the shallow network feature extraction module and the deep network feature extraction module;

[0028] Resizing the weighted feature map of the deep network feature extraction module and the initial feature map output by the shallow network feature extraction module to the target size by a reversible gradient method;

[0029] According to the weighted feature map and the shallow network feature map, the fused weighted feature map is obtained.

[0030] Optionally, obtaining the fused weighted feature map according to the weighted feature map and the shallow network feature map includes:

[0031] Spatially aligning the weighted feature map and the shallow network feature map through padding and cropping operations;

[0032] After the weighted feature map and the shallow network feature map are aligned, the weighted feature map and the shallow network feature map are stacked in the channel dimension to obtain an overlapping feature map;

[0033] The weighted feature map and the shallow network feature map are spliced ​​and fused according to the overlapping feature map to obtain the fused weighted feature map.

[0034] Optionally, determining the defect information of the paper image to be tested according to the fused weighted feature map includes:

[0035] Performing feature extraction on the fused weighted feature map through the deep network feature extraction module to obtain detail features of the paper image to be tested;

[0036] Performing target detection based on the detail features to determine whether the paper image to be tested has defect features;

[0037] When the paper to be tested has defect features, category prediction is performed according to the defect features to determine the defect information of the image of the paper to be tested.

[0038] Optionally, performing target detection based on the detail features to determine whether the image of the paper to be tested has defect features includes:

[0039] Generate a bounding box according to the coordinates of the detail features in the fused weighted feature map;

[0040] The features within the bounding box are predicted through the prediction network of the YOLOV8 model to determine whether the defect features exist.

[0041] In a second aspect, a paper quality detection system is provided. The system is applied to the YOLOv8 model. The YOLOv8 model includes a shallow network feature extraction module, an adaptive weight downsampling module, a reversible feature fusion module, and a deep network feature extraction module. The system includes:

[0042] Feature extraction unit: used for performing feature extraction operation on the paper image to be tested according to the shallow network feature extraction module to obtain an initial feature map;

[0043] An image generation unit is configured to divide the initial feature map into a plurality of feature regions when the deep network feature extraction module performs a downsampling operation on the initial feature map, assign weights to each of the feature regions through the adaptive weight downsampling module, and then generate a weighted feature map according to the weights of the feature regions;

[0044] Image fusion unit: used to reversely transfer the weighted feature map to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map;

[0045] Information processing unit: used to determine the defect information of the paper image to be tested according to the fused weighted feature map through the deep network feature extraction module.

[0046] The paper quality detection method and system of the present invention introduce the YOLOV8 model into paper defect detection, which can quickly and accurately extract the features of paper images; in the downsampling process, by dividing the initial feature map into multiple feature areas and assigning weights to each area, it is possible to better capture defect features of different scales. The adaptive weight mechanism of the present invention enables the model to dynamically adjust the focus according to the importance of the defect features, thereby improving the detection ability of smaller defects; the feature map of the deep network is reversely transferred to the shallow network through the reversible gradient method, thereby better retaining the detail information extracted from the original image, avoiding the problem of detail information loss in the feature extraction process of traditional deep learning models; finally, by fusing the feature maps of the deep and shallow networks, it is possible to more comprehensively capture the features of the defects, and further help to distinguish defects with similar morphology but belonging to different types. In summary, the present invention can more accurately identify and classify defects on paper, such as defects that are small in size, complex in shape, or difficult to identify against complex backgrounds. It also integrates features and detail information at different scales, enabling the model to have better generalization capabilities when processing various types of paper defects. At the same time, the high speed characteristics of the introduced YOLOV8 model enable the present invention to quickly process a large number of paper images, achieving higher-precision and higher-efficiency paper defect detection.

[0047] Furthermore, compared to existing methods of detecting paper defects through instrument scanning, which require expensive equipment and maintenance costs, this invention utilizes image processing technology and machine learning algorithms and can be implemented on standard computing devices, significantly reducing hardware investment and operating costs. It also rapidly processes large numbers of paper images, making it suitable for large-scale production applications. This reduces reliance on specialized instruments and reduces downtime due to equipment failure or maintenance, further improving production efficiency and economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of a paper quality detection method according to an embodiment of the present invention;

[0049] Figure 2 FIG. 4 is a structural block diagram of a paper quality detection system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0050] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0051] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0052] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0053] It should be noted that the modifications of "one" and "multiple" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0054] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0055] like Figure 1 As shown, the present invention provides a paper quality detection method, which is based on the YOLOV8 model. The YOLOV8 model includes a shallow network feature extraction module, an adaptive weight downsampling module, a reversible feature fusion module and a deep network feature extraction module.

[0056] Specifically, in this application, the shallow network feature extraction module is the front-end part of the YOLOV8 model, which is responsible for extracting preliminary features from the input paper image; wherein the preliminary features include basic visual information such as edges, corners, textures, etc., which provide basic data for subsequent defect detection. The shallow network feature extraction module contains multiple convolutional layers and pooling layers, which are used to capture local features in the image and gradually build a basic understanding of the image. The adaptive weight downsampling module is used to further process the features extracted from the shallow network, and dynamically adjust the weighted combination of feature maps of different scales through an adaptive weight mechanism to achieve comprehensive capture of defect features. The adaptive weight downsampling module uses the attention mechanism to automatically assign weights according to the importance of the features, so that the model can pay more attention to key feature information while suppressing noise and unimportant details. The reversible feature fusion module is the core of the YOLOV8 model. This module uses the reversible gradient method to reversely transfer the feature map information of the deep network to the shallow network to extract the corresponding defect detail information. Through the reverse transmission of information, the model can combine deep and shallow feature information to enhance the recognition ability of defect features, especially when dealing with defects with similar morphology but belonging to different types. The deep network feature extraction module is located at the back end of the YOLOV8 model and is responsible for extracting higher-level abstract features from the image. Abstract features include more complex patterns and parts of objects, which are crucial for identifying defects in paper images. The deep network gradually extracts and integrates information through multiple convolutional layers and pooling layers to form an in-depth understanding of the image. Through the joint work of the modules in the YOLOV8 model, the YOLOV8 model can not only quickly process a large number of paper images, but also accurately identify and classify defects. Through this multi-level, multi-scale feature extraction and fusion strategy, the YOLOV8 model achieves high-precision defect detection while ensuring high efficiency.

[0057] The method comprises:

[0058] The shallow network feature extraction module performs a feature extraction operation on the paper image to be tested to obtain an initial feature map.

[0059] Specifically, the shallow network feature extraction module in the YOLOV8 model is first used to perform feature extraction operations on the paper image to be tested. Among them, the YOLOV8 model, as an advanced target detection algorithm, can efficiently extract useful feature information from the image; by inputting the paper image to be tested into the shallow network feature extraction module of the YOLOV8 model, the multi-layer convolutional network of the shallow network feature extraction module will process the image in turn and finally output an initial feature map; and this initial feature map contains the preliminary features of potential defects in the image, providing a basis for subsequent defect detection.

[0060] When the deep network feature extraction module performs a downsampling operation on the initial feature map, the initial feature map is divided into multiple feature areas, and weights are assigned to each of the feature areas through the adaptive weight downsampling module, and then a weighted feature map is generated according to the weights of the feature areas.

[0061] Specifically, when the deep network feature extraction module of the YOLOV8 model downsamples the initial feature map, the initial feature map is divided into multiple feature regions, so as to more carefully analyze and identify the defect features in the image; through the adaptive weight downsampling module of the YOLOV8 model, each feature region is assigned a weight, which reflects the importance of the region in defect detection. Based on these weights, a weighted feature map is generated. This weighted feature map can more prominently display the key defect features in the image, thereby improving the accuracy of defect detection.

[0062] The weighted feature map is reversely transferred to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map.

[0063] Specifically, the weighted feature map of the deep network feature extraction module is reversely transferred to the shallow network feature extraction module through the reversible feature fusion module of the YOLOV8 model, which can effectively solve the problem of losing detail information in the feature extraction process of the deep learning model. The defect features extracted from the deep network can be fused with the original image detail information retained in the shallow network through the reversible feature fusion module to obtain a fused weighted feature map; it should be noted that this fused weighted feature map not only contains the high-level features extracted by the deep network, but also retains the original detail information in the shallow network, so that the model can more accurately identify and locate defects.

[0064] The deep network feature extraction module determines the defect information of the paper image to be tested according to the fused weighted feature map.

[0065] Specifically, the deep network feature extraction module of the YOLOV8 model is used to further extract features from the fused weighted feature map to obtain the detailed features of the paper image to be tested. Then, target detection is performed based on these detailed features, defect features are determined, and category prediction is performed to finally determine the defect information of the paper image to be tested.

[0066] For example, suppose there is an image of paper to be inspected, which may have some defects, such as holes, scratches, black spots, etc. First, this image is input into the YOLOV8 model. The YOLOV8 model extracts features from the image through a multi-layer convolutional network, identifies various features in the image, such as edges, textures, etc., and summarizes these feature information into an initial feature map; this initial feature map is like a marked "map" with all feature points that may be related to defects marked on it. Then, the initial feature map is downsampled, that is, the spatial size of the feature map is reduced, thereby reducing the amount of data for subsequent processing; in this process, the feature map is divided into multiple small areas, such as 16 small blocks. Next, the features of each small block are analyzed through the adaptive weight downsampling module, and a weight is assigned to each small block according to the feature strength of each small block; for example, if a small block contains obvious defect features, then it will be given a higher weight; and vice versa. Based on these weights, a weighted feature map is generated. The weighted feature map will pay more attention to areas that may contain defects. Then, the weighted feature map of the deep network feature extraction module is reversely transferred to the shallow network feature extraction module using the reversible gradient method. Suppose that in the deep network, an area that may be a hole is identified, but the precise outline of the hole is not clear enough. Using the reversible gradient method, more detailed information is extracted from the shallow network, such as the subtle features of the hole edge, and this information is fused into the feature map of the deep network. A fused weighted feature map is obtained. The fused weighted feature map contains both the high-level features of the deep network and the detailed information of the shallow network. Finally, the defect information of the paper image is determined based on the fused weighted feature map. The target detection network of the YOLOV8 model analyzes the fused feature map, identifies specific defect features, such as holes and scratches, and marks the locations of these defects on the image. Then, the model makes category predictions based on these features to determine which category each defect belongs to, such as "hole" or "scratch". Finally, an image marked with all defects and their categories is obtained, which is the detection result.

[0067] The present invention introduces the YOLOV8 model into paper defect detection, which can quickly and accurately extract the features of paper images; in the downsampling process, by dividing the initial feature map into multiple feature areas and assigning weights to each area, it can better capture defect features of different scales. The adaptive weight mechanism of the present invention enables the model to dynamically adjust the focus according to the importance of the defect features, thereby improving the detection ability of smaller defects; the feature map of the deep network is reversely transferred to the shallow network through the reversible gradient method, thereby better retaining the detail information extracted from the original image, avoiding the problem of detail information loss in the feature extraction process of traditional deep learning models; finally, by fusing the feature maps of the deep and shallow networks, it is possible to more comprehensively capture the features of the defects, and further help to distinguish defects with similar morphology but belonging to different types. In summary, the present invention can more accurately identify and classify defects on paper, such as defects that are small in size, complex in shape, or difficult to identify against complex backgrounds. It also integrates features and detail information at different scales, enabling the model to have better generalization capabilities when processing various types of paper defects. At the same time, the high speed characteristics of the introduced YOLOV8 model enable the present invention to quickly process a large number of paper images, achieving higher-precision and higher-efficiency paper defect detection.

[0068] Furthermore, compared to existing methods of detecting paper defects through instrument scanning, which typically require expensive equipment and maintenance, this invention utilizes image processing technology and machine learning algorithms and can be implemented on standard computing devices, significantly reducing hardware investment and operating costs. Furthermore, it can rapidly process large numbers of paper images, making it suitable for large-scale production applications. This reduces reliance on specialized instruments and reduces downtime due to equipment failure or maintenance, further improving production efficiency and economic benefits.

[0069] Optionally, performing a feature extraction operation on the paper image to be tested according to the shallow network feature extraction module to obtain an initial feature map includes:

[0070] Inputting the paper image to be tested into the YOLOV8 model, and sequentially performing feature extraction on the paper image to be tested through the multi-layer convolutional network of the shallow network feature extraction module;

[0071] The output feature map of the convolutional network in the previous layer of the deep network feature extraction module is used as the initial feature map.

[0072] Specifically, the image of the paper to be tested is input into the YOLOV8 model, and the multi-layer convolutional network of the model's shallow network feature extraction module sequentially extracts features from the image; image features are extracted through multiple convolutional layers and downsampling layers. During this process, each layer of the convolutional network processes the image, extracts features at different levels, and passes this feature information to the next layer of the network; the model is able to gradually abstract high-level semantic information from low-level edge and texture information. Finally, the feature map output by the convolutional network of the YOLOV8 model in the previous layer of the downsampling network is selected as the initial feature map. This feature map contains rich feature information extracted from the original image, providing a basis for subsequent defect detection.

[0073] In this optional embodiment, the multi-layer convolutional network of the YOLOV8 model is used to extract rich feature information from the image of the paper to be tested, including feature information such as edges, textures, and shapes, and this feature information provides a solid foundation for subsequent defect detection. The YOLOV8 model extracts features layer by layer, from low-level simple features to high-level complex features, which helps the model better understand and identify defects in the image; and the multi-layer convolutional network of the YOLOV8 model can process image data in parallel, which speeds up feature extraction and improves the efficiency of the overall detection process. By selecting the output of the previous convolutional network of the downsampling network as the initial feature map, it is ensured that the feature map retains sufficient detail information while reducing its spatial size, which is especially important for detecting small-sized defects, thereby improving the accuracy of detection.

[0074] Optionally, when the deep network feature extraction module performs a downsampling operation on the initial feature map, the initial feature map is divided into a plurality of feature regions, including:

[0075] When the deep network feature extraction module performs a downsampling operation on the initial feature map, determining a grid division specification according to the size data of the initial feature map;

[0076] The initial feature map is divided according to the division grid to obtain a plurality of feature regions.

[0077] Specifically, first, based on the resolution of the feature map and the expected feature area size, according to the size data of the initial feature map, the appropriate grid division specification is determined, and then, according to the grid division specification, the initial feature map is divided into multiple small areas, wherein each small area is a feature area, and they together constitute a subdivision view of the entire feature map; in this embodiment, this division mode helps the model to analyze each part of the feature map more carefully, especially when detecting defects of different scales and complexities, it can improve the accuracy of detection. In this embodiment, by dividing the initial feature map into multiple feature areas, local defects on the paper can be captured more finely, especially when the defect size is small or distributed in different areas, thereby improving the accuracy of defect detection. Moreover, each feature area contains local feature information. This embodiment enables the model to better understand and analyze the characteristics of each local area, thereby more accurately identifying the location and type of defects. By subdividing the feature map, the model can adapt to defects of different sizes and shapes, improving the model's adaptability to diverse defects. Moreover, during the downsampling process of the feature map, the allocation of computing resources can be dynamically adjusted according to the importance of the feature area, which not only improves computing efficiency but also ensures that key areas receive sufficient computing resources. At the same time, the subdivided feature areas enable the model to better generalize to different paper types and defect types, improving the model's generalization ability in different application scenarios.

[0078] In this optional embodiment, feature area division not only improves the accuracy and efficiency of paper quality detection, but also enhances the adaptability and generalization ability of the model for defects of different types and sizes, providing richer and more detailed feature information for subsequent defect identification and classification.

[0079] Optionally, the adaptive weight downsampling module includes an average pooling layer and a splicing layer, and the adaptive weight downsampling module is used to divide the weights for each feature area, and then generates a weighted feature map according to the weights of the feature areas, including:

[0080] Through the average pooling layer, the index statistics of each feature area are performed to obtain the average value corresponding to the pixel value of each feature area;

[0081] Through the splicing layer, the feature regions are fused according to the average value of each feature region to obtain a fused feature map;

[0082] The fused feature map is weightedly fused through the attention mechanism in the adaptive weight downsampling module to obtain the weighted feature map.

[0083] Specifically, the Average Pooling layer primarily reduces the spatial dimensionality of feature maps while preserving important feature information. By calculating the average value for each region, this layer reduces noise and redundant information in feature maps while maintaining the statistical properties of the features. In the Adaptive Weight Downsampling module, the Average Pooling layer calculates the average value for each region of the input feature map to generate a reduced-dimensional feature representation. This feature representation not only captures key information from the original feature map but also reduces the data size, facilitating subsequent processing. Average pooling is generally performed on the spatial dimension. For example, each 2x2 region can be pooled into a single value that is the average of all elements within that region. The Concatenation layer is used to combine feature maps of different scales or sources to enhance the model's feature representation capabilities. In the Adaptive Weight Downsampling module, the Concatenation layer concatenates the feature map processed by the Average Pooling layer with other feature maps (such as the original, unsampled feature map or feature maps from other layers). This concatenation operation not only increases the number of channels in the feature map but also enables the model to simultaneously consider feature information from different scales.

[0084] This embodiment enhances the representation of important information in the feature map by assigning weights to each feature region; the average pooling layer in the adaptive weight downsampling module performs index statistics on each feature region and calculates the feature average of each region. This feature average is used to reflect the overall feature strength of the region and provides a basis for subsequent weight allocation; then, based on these average values, all feature regions are fused to form a fused feature map; this fused feature map integrates the average features of each region and provides a comprehensive feature representation for further processing; finally, the adaptive weight downsampling module uses the attention mechanism to perform weighted fusion on the fused feature map, adjusts the influence of each region in the final feature map according to its weight importance, and generates a weighted feature map. This weighted feature map further highlights those areas that are more critical to defect detection, thereby improving the accuracy and efficiency of detection.

[0085] In this optional embodiment, by assigning weights to each feature region, the model can pay more attention to those areas that are more important for defect detection, enhancing the representation of these key features in the feature map; and, by highlighting important features through weighted feature maps, the model can more accurately identify the location and type of defects in subsequent defect detection. The weights of the feature regions are adjusted through the adaptive weight downsampling module, which optimizes the information distribution in the feature map and reduces the interference of noise and unimportant information; through the weighted fusion of the attention mechanism, the model can better adapt to different paper defect types and background conditions, improving the generalization ability of the model. The adaptive weight downsampling module of this embodiment not only improves the accuracy and efficiency of paper quality detection, but also enhances the generalization ability and robustness of the model for defects of different types and in complex backgrounds.

[0086] Optionally, performing weighted fusion on the fused feature map through the attention mechanism in the adaptive weight downsampling module to obtain the weighted feature map includes:

[0087] Dividing the fused feature map into a plurality of non-overlapping sub-regions, wherein each sub-region corresponds to at least one feature map channel;

[0088] Determining an attention value of the sub-region through the feature map channel of the sub-region;

[0089] Determining a weight of the sub-region according to the attention value;

[0090] Weighted fusion is performed according to the weights of the sub-regions to obtain the weighted feature map.

[0091] Specifically, the fused feature map is divided into multiple non-overlapping sub-regions, and each sub-region corresponds to at least one feature map channel of the fused feature map, allowing the model to process different parts of the feature map separately in order to analyze the image more carefully. Next, the model determines the attention value of each sub-region through the feature map channel corresponding to the sub-region, thereby evaluating its importance to the overall target. Then, based on the calculated attention value, the model assigns a weight to each sub-region. This weight reflects the relative importance of the sub-region in subsequent processing. Normalization methods such as the softmax function are usually used to ensure that the sum of the weights of all sub-regions is 1. Finally, based on the weight of each sub-region, the model performs weighted fusion of all sub-regions to generate a weighted feature map. The weighted feature map places more emphasis on those areas with high attention values, thereby providing more accurate feature information for defect detection.

[0092] In this optional embodiment, by dividing the fused feature map into multiple sub-regions and performing weighted fusion according to the attention value of each sub-region, the model can more accurately identify the characteristics of paper defects. The weighted feature map enhances the model's ability to locate the defect position by emphasizing the characteristics of important areas, which is beneficial to subsequent defect classification and processing; and through the attention mechanism, the model can focus on processing those areas with the most information, thereby improving the information density of the feature map and making the feature map more compact and efficient. In addition, the adaptive weight downsampling module allows the model to dynamically adjust the weights according to the actual feature distribution, so that the model can dynamically adapt to different defect types and paper conditions, improving the adaptability and flexibility of the model. This embodiment not only improves the accuracy and efficiency of paper quality detection, but also enhances the adaptability and robustness of the model to defects of different types and in complex backgrounds, providing early technical guarantees for achieving efficient and reliable paper quality detection.

[0093] Optionally, the weighted feature map is reversely transferred to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map, including:

[0094] Determining target sizes of the shallow network feature extraction module and the deep network feature extraction module;

[0095] Resizing the weighted feature map of the deep network feature extraction module and the initial feature map output by the shallow network feature extraction module to the target size by a reversible gradient method;

[0096] According to the weighted feature map and the shallow network feature map, the fused weighted feature map is obtained.

[0097] Specifically, the target sizes of the shallow network feature extraction module and the deep network feature extraction module are first determined to ensure that the weighted feature maps extracted from the deep network can match the feature maps of the shallow network in spatial size, thereby facilitating subsequent fusion operations. The target size is usually pre-set based on the network structure and feature extraction requirements. Then, the reversible gradient method is used to resize the weighted feature maps of the deep network feature extraction module to make them consistent with the size of the shallow network feature maps. Through upsampling and downsampling operations, the feature maps are aligned in the spatial dimension. Finally, the resized weighted feature maps of the deep network are fused with the feature maps of the shallow network to obtain the fused weighted feature maps. This fusion process integrates the high-level semantic information of the deep network and the detailed information of the shallow network, providing a more comprehensive feature representation for defect detection.

[0098] In this optional embodiment, the reversible gradient method is used to achieve effective fusion between the deep network feature extraction module and the shallow network feature extraction module. This fusion not only includes high-level semantic information, but also retains low-level detail information, providing a more comprehensive perspective for defect detection. In addition, the fused weighted feature map can more accurately capture the characteristics of paper defects, especially in terms of the detail features and contextual information of the defects, thereby improving the accuracy of defect detection. Through size adjustment and feature fusion, the representation of the feature map is optimized, making the feature map more consistent in spatial dimensions and reducing information loss due to size mismatch. The fused weighted feature map can better cope with different detection conditions, such as different lighting, background noise, etc., improving the robustness of the model in complex environments. It also combines the weighted feature maps of deep and shallow features, allowing the model to better generalize to different paper types and defect types, thereby improving the generalization ability of the model.

[0099] Optionally, obtaining the fused weighted feature map according to the weighted feature map and the shallow network feature map includes:

[0100] Spatially aligning the weighted feature map and the shallow network feature map through padding and cropping operations;

[0101] After the weighted feature map and the shallow network feature map are aligned, the weighted feature map and the shallow network feature map are stacked in the channel dimension to obtain an overlapping feature map;

[0102] The weighted feature map and the shallow network feature map are spliced ​​and fused according to the overlapping feature map to obtain the fused weighted feature map.

[0103] Specifically, precise spatial alignment of the weighted feature map and the shallow network feature map is achieved through padding and clipping operations. The padding operation is used to adjust the boundaries of the feature map to ensure that the two feature maps completely match in spatial size, and the clipping operation is used to remove redundant parts to ensure precise alignment of the feature maps. After the weighted feature map and the shallow network feature map are spatially aligned, they are stacked in the channel dimension to form an overlapping feature map. The stacking operation actually merges the channel information of the two feature maps so that the features at each position contain information from both the deep and shallow networks. Finally, based on the overlapping feature map, the information of the weighted feature map and the shallow network feature map is merged through splicing and fusion to form the final fused weighted feature map. This fusion process ensures that the information of the feature map in both spatial and channel dimensions is fully utilized, providing a richer and more accurate feature representation for subsequent defect detection.

[0104] In this optional embodiment, precise spatial alignment and channel stacking ensure that feature maps from different network layers are accurately matched during fusion, thereby improving the accuracy of feature fusion. Moreover, the fused weighted feature map integrates the high-level semantic information of the deep network and the detailed information of the shallow network, enhancing the richness of feature representation. At the same time, the fused feature map contains more information, and the model can more accurately identify and locate defects on paper, thereby improving the accuracy of defect detection. The weighted feature map that integrates deep and shallow features enables the model to better generalize to different paper types and defect types, thereby improving the generalization ability of the model. This embodiment achieves the effective fusion of weighted feature maps and shallow network feature maps through filling operations, clipping operations, and stacking and splicing fusion in the channel dimension, which not only improves the accuracy and efficiency of paper quality detection, but also enhances the adaptability and robustness of the model to defects of different types and complex backgrounds, providing strong technical support for efficient and reliable paper quality detection.

[0105] Optionally, determining the defect information of the paper image to be tested according to the fused weighted feature map includes:

[0106] Performing feature extraction on the fused weighted feature map through the deep network feature extraction module to obtain detail features of the paper image to be tested;

[0107] Performing target detection based on the detail features to determine whether the paper image to be tested has defect features;

[0108] When the paper to be tested has defect features, category prediction is performed according to the defect features to determine the defect information of the image of the paper to be tested.

[0109] Specifically, the model's convolutional layers and activation functions further extract detailed features from the paper image being tested. These features include the defect's local texture, shape, and contextual information. Based on these detailed features, the model then performs target detection, identifying defect features in the image. By analyzing the feature map, the model locates and determines the exact location and range of the defect. Finally, based on the detected defect features, the model performs category prediction to determine the specific defect type, such as holes, scratches, or black spots.

[0110] In this optional embodiment, the YOLOV8 model's deep feature extraction and target detection capabilities enable precise identification and location of defects in paper images, improving the accuracy of defect detection. Furthermore, the fused weighted feature map provides the model with rich, detailed information, enabling it to identify a wider variety of more subtle defect features. In this embodiment, the YOLOV8 model performs feature extraction, target detection, and category prediction on the fused weighted feature map, improving not only the accuracy and efficiency of paper quality detection but also the model's adaptability and robustness to defects of varying types and in complex backgrounds.

[0111] Optionally, performing target detection based on the detail features to determine whether the image of the paper to be tested has defect features includes:

[0112] Generate a bounding box according to the coordinates of the detail features in the fused weighted feature map;

[0113] The features within the bounding box are predicted through the prediction network of the YOLOV8 model to determine whether the defect features exist.

[0114] Specifically, by identifying feature points related to the defect on the feature map and generating bounding boxes based on the coordinates of these points, the approximate area of ​​the defect is located, providing a clear range for further analysis. The prediction network of the YOLOV8 model is then used to predict the features within these bounding boxes to determine whether defect features exist. The prediction network of the YOLOV8 model identifies the presence of defects by analyzing the features within the bounding boxes and classifies them.

[0115] In this optional embodiment, by generating a bounding box on the fused weighted feature map, the model can accurately locate the position of the defect. The prediction network of the YOLOV8 model performs an in-depth analysis of the features within the bounding box, thereby improving the reliability of defect detection and reducing the possibility of false positives and missed positives. Moreover, by performing feature prediction directly within the bounding box, the model can quickly identify defects, thereby improving overall detection efficiency.

[0116] Second, combining Figure 2 As shown, the present invention provides a paper quality detection system, which is applied to the YOLOV8 model. The YOLOV8 model includes a shallow network feature extraction module, an adaptive weight downsampling module, a reversible feature fusion module and a deep network feature extraction module. The system includes:

[0117] Feature extraction unit: used for performing feature extraction operation on the paper image to be tested according to the shallow network feature extraction module to obtain an initial feature map;

[0118] An image generation unit is configured to divide the initial feature map into a plurality of feature regions when the deep network feature extraction module performs a downsampling operation on the initial feature map, assign weights to each of the feature regions through the adaptive weight downsampling module, and then generate a weighted feature map according to the weights of the feature regions;

[0119] Image fusion unit: used to reversely transfer the weighted feature map to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map;

[0120] Information processing unit: used to determine the defect information of the paper image to be tested according to the fused weighted feature map through the deep network feature extraction module.

[0121] The paper quality detection system of the present invention introduces the YOLOV8 model into paper defect detection, which can quickly and accurately extract the features of paper images; in the downsampling process, by dividing the initial feature map into multiple feature areas and assigning weights to each area, it can better capture defect features of different scales. The adaptive weight mechanism of the present invention enables the model to dynamically adjust the focus according to the importance of the defect features, thereby improving the detection ability of smaller defects; the feature map of the deep network is reversely transferred to the shallow network through the reversible gradient method, thereby better retaining the detail information extracted from the original image, avoiding the problem of detail information loss in the feature extraction process of traditional deep learning models; finally, by fusing the feature maps of the deep and shallow networks, it is possible to more comprehensively capture the features of the defects, and further help to distinguish defects with similar morphology but belonging to different types. In summary, the present invention can more accurately identify and classify defects on paper, such as defects that are small in size, complex in shape, or difficult to identify against complex backgrounds. It also integrates features and detail information at different scales, enabling the model to have better generalization capabilities when processing various types of paper defects. At the same time, the high speed characteristics of the introduced YOLOV8 model enable the present invention to quickly process a large number of paper images, achieving higher-precision and higher-efficiency paper defect detection.

[0122] Furthermore, compared to existing methods of detecting paper defects through instrument scanning, which typically require expensive equipment and maintenance, this invention utilizes image processing technology and machine learning algorithms and can be implemented on standard computing devices, significantly reducing hardware investment and operating costs. Furthermore, it can rapidly process large numbers of paper images, making it suitable for large-scale production applications. This reduces reliance on specialized instruments and reduces downtime due to equipment failure or maintenance, further improving production efficiency and economic benefits.

[0123] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.

Claims

1. A paper quality detection method, characterized in that: The method is based on the YOLOV8 model, which includes a shallow network feature extraction module, an adaptive weight downsampling module, a reversible feature fusion module, and a deep network feature extraction module. The method includes: Performing feature extraction on the paper image to be tested according to the shallow network feature extraction module to obtain an initial feature map; When the deep network feature extraction module performs a downsampling operation on the initial feature map, the initial feature map is divided into a plurality of feature regions, and a weight is assigned to each of the feature regions by the adaptive weight downsampling module, and then a weighted feature map is generated according to the weight of the feature regions; The adaptive weight downsampling module includes an average pooling layer and a splicing layer. The adaptive weight downsampling module is used to divide the weights for each feature area, and then a weighted feature map is generated according to the weights of the feature areas, including: Through the average pooling layer, the index statistics of each feature area are performed to obtain the average value corresponding to the pixel value of each feature area; Through the splicing layer, the feature regions are fused according to the average value of each feature region to obtain a fused feature map; Performing weighted fusion on the fused feature map through the attention mechanism in the adaptive weight downsampling module to obtain the weighted feature map; Specifically, the method includes: dividing the fused feature map to obtain a plurality of non-overlapping sub-regions, wherein each sub-region corresponds to at least one feature map channel; Determining an attention value of the sub-region through the feature map channel of the sub-region; Determining a weight of the sub-region according to the attention value; Perform weighted fusion according to the weights of the sub-regions to obtain the weighted feature map; The weighted feature map is reversely transferred to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map; Specifically comprising: determining target sizes of the shallow network feature extraction module and the deep network feature extraction module; Resizing the weighted feature map of the deep network feature extraction module and the initial feature map output by the shallow network feature extraction module to the target size by a reversible gradient method; Obtaining the fused weighted feature map according to the weighted feature map and the shallow network feature map; Specifically, the method includes: spatially aligning the weighted feature map and the shallow network feature map through padding and clipping operations; After the weighted feature map and the shallow network feature map are aligned, the weighted feature map and the shallow network feature map are stacked in the channel dimension to obtain an overlapping feature map; According to the overlapping feature map, the weighted feature map and the shallow network feature map are spliced ​​and fused to obtain the fused weighted feature map; The deep network feature extraction module determines the defect information of the paper image to be tested according to the fused weighted feature map.

2. The paper quality detection method according to claim 1, characterized in that: The shallow network feature extraction module performs a feature extraction operation on the paper image to be tested to obtain an initial feature map, including: Inputting the paper image to be tested into the YOLOV8 model, and sequentially performing feature extraction on the paper image to be tested through the multi-layer convolutional network of the shallow network feature extraction module; The output feature map of the convolutional network in the previous layer of the deep network feature extraction module is used as the initial feature map.

3. The paper quality detection method according to claim 1, characterized in that: When the deep network feature extraction module performs a downsampling operation on the initial feature map, the initial feature map is divided into a plurality of feature regions, including: When the deep network feature extraction module performs a downsampling operation on the initial feature map, determining a grid division specification according to the size data of the initial feature map; The initial feature map is divided according to the division grid to obtain a plurality of feature regions.

4. The paper quality detection method according to claim 1, characterized in that: The determining the defect information of the paper image to be tested according to the fused weighted feature map includes: Performing feature extraction on the fused weighted feature map through the deep network feature extraction module to obtain detail features of the paper image to be tested; Performing target detection based on the detail features to determine whether the paper image to be tested has defect features; When the paper to be tested has defect features, category prediction is performed according to the defect features to determine the defect information of the image of the paper to be tested.

5. The paper quality detection method according to claim 4, characterized in that: The performing target detection based on the detail features to determine whether the image of the paper to be tested has defect features includes: Generate a bounding box according to the coordinates of the detail features in the fused weighted feature map; The features within the bounding box are predicted through the prediction network of the YOLOV8 model to determine whether the defect features exist.

6. A paper quality detection system, characterized in that: The system is applied to the YOLOV8 model, which includes a shallow network feature extraction module, an adaptive weight downsampling module, a reversible feature fusion module, and a deep network feature extraction module. The system includes: Feature extraction unit: used for performing feature extraction operation on the paper image to be tested according to the shallow network feature extraction module to obtain an initial feature map; An image generation unit is configured to divide the initial feature map into multiple feature regions when the deep network feature extraction module performs a downsampling operation on the initial feature map, and assign weights to each feature region through the adaptive weight downsampling module, and then generate a weighted feature map based on the weights of the feature regions; the adaptive weight downsampling module includes an average pooling layer and a splicing layer, and the adaptive weight downsampling module assigns weights to each feature region, and then generates a weighted feature map based on the weights of the feature regions, including: Through the average pooling layer, the index statistics of each feature area are performed to obtain the average value corresponding to the pixel value of each feature area; Through the splicing layer, the feature regions are fused according to the average value of each feature region to obtain a fused feature map; Performing weighted fusion on the fused feature map through the attention mechanism in the adaptive weight downsampling module to obtain the weighted feature map; Specifically, the method includes: dividing the fused feature map to obtain a plurality of non-overlapping sub-regions, wherein each sub-region corresponds to at least one feature map channel; Determining an attention value of the sub-region through the feature map channel of the sub-region; Determining a weight of the sub-region according to the attention value; Perform weighted fusion according to the weights of the sub-regions to obtain the weighted feature map; Image fusion unit: used to reversely transfer the weighted feature map to the shallow network feature extraction module through the reversible feature fusion module to obtain a fused weighted feature map; Specifically comprising: determining target sizes of the shallow network feature extraction module and the deep network feature extraction module; Resizing the weighted feature map of the deep network feature extraction module and the initial feature map output by the shallow network feature extraction module to the target size by a reversible gradient method; Obtaining the fused weighted feature map according to the weighted feature map and the shallow network feature map; Specifically, the method includes: spatially aligning the weighted feature map and the shallow network feature map through padding and clipping operations; After the weighted feature map and the shallow network feature map are aligned, the weighted feature map and the shallow network feature map are stacked in the channel dimension to obtain an overlapping feature map; According to the overlapping feature map, the weighted feature map and the shallow network feature map are spliced ​​and fused to obtain the fused weighted feature map; Information processing unit: used to determine the defect information of the paper image to be tested according to the fused weighted feature map through the deep network feature extraction module.

Citation Information

Patent Citations

  • Target detection method and system based on multi-scale fusion feature extraction

    CN116740516A

  • Rapid insulator defect detection method and system based on YOLO-MID

    CN117437204A