Methods for constructing attention deficit detection models and methods for detecting attention deficits
By performing discrete cosine transform and convolution mapping in a neural network, an attention defect detection model is constructed, which solves the problem of low defect detection accuracy in complex industrial scenarios and achieves higher detection accuracy and adaptability to noise.
Patent Information
- Application Number
- CN202410237063.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2044-03-01
AI Technical Summary
Existing defect detection methods have low detection accuracy in complex industrial scenarios, especially poor adaptability to noise and variation, and deep learning models fail to make full use of location information.
By inputting the workpiece defect image into a neural network and performing discrete cosine transform to obtain a frequency domain feature map, a convolutional mapping and cascade operation are performed using a perceptual kernel group to construct an attention-based defect detection model, and attention weights are introduced to improve detection accuracy.
It improves the accuracy of defect detection and enhances the ability to adapt to complex backgrounds and noise by capturing multi-band global structural information of images.
Smart Images

Figure CN118261859B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method for constructing an attention deficit detection model and a method for detecting attention deficits. Background Technology
[0002] In industrial production, various noises and variations exist during the manufacturing process, leading to defects in the appearance of workpieces, such as pitting, wear, scratches, color differences, and cracks. Therefore, defect detection has become a key step in ensuring product quality.
[0003] Traditional defect detection methods are often hampered by noise and complex backgrounds, reducing detection accuracy. To address this issue, current technologies fall into two categories: first, using basic image processing algorithms to analyze the entire image; and second, employing deep learning models to learn image features for defect detection. However, traditional methods perform poorly in handling noise and variations in complex industrial scenarios, while deep learning models fail to fully utilize location information and struggle to obtain useful global information when faced with defect inputs of varying sizes.
[0004] In summary, there is a lack of methods in the existing technology to improve the accuracy of defect detection. Summary of the Invention
[0005] In view of this, it is necessary to provide a method for constructing an attention deficit detection model and a method for detecting attention deficits, so as to solve the problem of low accuracy of defect detection in the existing technology.
[0006] To address the above problems, this invention provides a method for constructing an attention deficit detection model, comprising:
[0007] The workpiece defect image is input into a preset neural network to obtain the feature map of the intermediate layer of the neural network;
[0008] The frequency domain of the feature map is obtained by performing a discrete cosine transform on the feature map.
[0009] The feature maps are subjected to several convolutional mappings and discrete cosine transforms in a pre-defined group of perceptual kernels to obtain several pairs of perceptual feature maps.
[0010] The intermediate feature map is obtained by concatenating the frequency domain and several pairs of perceptual feature maps.
[0011] The intermediate feature map is split into several tensors, and these tensors are input into the activation function to obtain the attention weights.
[0012] An attention defect detection model is constructed based on attention weights and feature maps.
[0013] In one possible implementation, performing a discrete cosine transform on the feature map to obtain the frequency domain of the feature map includes:
[0014] The feature map is subjected to discrete cosine transform in the horizontal and vertical directions to obtain the frequency domain of the feature map in the horizontal direction and the frequency domain of the feature map in the vertical direction.
[0015] In one possible implementation, the frequency domain expression of the feature map in the horizontal direction is:
[0016]
[0017] The frequency domain expression of the feature map in the vertical direction is:
[0018]
[0019] In the formula, The frequency domain feature map representing the horizontal direction of the feature map; The vertical frequency domain feature map represents the input feature map segmentation; i represents the i-th sequence segmented from the input feature map; h represents the h-th pixel in the horizontal direction; w represents the w-th pixel in the vertical direction; B represents the one-dimensional DCT frequency component corresponding to each pixel; n represents the number of feature map segments; X i H represents the feature map of the i-th segment; H represents the total horizontal length of the feature map; W represents the total vertical length of the feature map; 1DDCT represents the 1D discrete cosine transform.
[0020] In one possible implementation, the preset perceptual kernel group includes: a convolutional layer, a normalization layer, and an activation function.
[0021] In one possible implementation, the convolutional layer is a 1×1 convolutional kernel, the normalization layer is a BatchNorm normalization layer, and the activation function is the SiLU activation function.
[0022] In one possible implementation, the concatenation operation between the frequency domain and several pairs of perceptual feature maps to obtain an intermediate feature map includes:
[0023] The frequency domain and the several pairs of perceptual feature maps are concatenated to obtain an intermediate feature map in the horizontal direction and a feature map in the vertical direction.
[0024] In one possible implementation, the construction of the attention defect detection model based on attention weights and feature maps includes:
[0025] The attention weights are multiplied bitwise by the feature map to obtain the attention defect detection model.
[0026] On the other hand, the present invention also provides a method for detecting attention deficit, comprising:
[0027] Acquire defect images of the target workpiece;
[0028] The defect image of the target workpiece is input into the attention defect detection model, wherein the attention defect detection model is determined according to the attention defect detection model construction method described above.
[0029] The attention defect detection model outputs a defect image of the target workpiece after detection.
[0030] On the other hand, the present invention also provides an attention deficit detection model construction device, comprising:
[0031] The feature map acquisition module is used to input the workpiece defect image into a preset neural network to obtain the feature map of the intermediate layer of the neural network.
[0032] The frequency domain acquisition module is used to perform discrete cosine transform on the feature map to obtain the frequency domain of the feature map;
[0033] The perceptual feature map acquisition module is used to perform several convolution mappings and discrete cosine transforms on the feature maps in a preset perceptual kernel group to obtain several pairs of perceptual feature maps.
[0034] The intermediate feature map acquisition module is used to concatenate the frequency domain and several pairs of perceptual feature maps to obtain intermediate feature maps;
[0035] The attention weight acquisition module is used to split the intermediate feature map into several tensors and input these tensors into the activation function to obtain the attention weights.
[0036] The defect detection model building module is used to build an attention-based defect detection model based on attention weights and feature maps.
[0037] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein,
[0038] The memory is used to store programs;
[0039] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the attention deficit detection model construction method described in any of the above implementations.
[0040] The beneficial effects of this invention are as follows: This invention provides a method for constructing an attention defect detection model. First, the feature maps of the intermediate layers of a neural network are obtained and subjected to discrete cosine transform (DCT) to obtain the frequency domain of the feature maps. Then, the feature maps undergo several convolutional mappings and DCTs within a preset perceptual kernel group to obtain several pairs of perceptual feature maps. Further, the frequency domain and the several pairs of perceptual feature maps are concatenated to obtain intermediate feature maps. These intermediate feature maps are then split into several tensors, and these tensors are input into an activation function to obtain attention weights. Finally, an attention defect detection model is constructed based on the attention weights and the feature maps. This invention, by introducing DCT to convert the image to the frequency domain, better captures the multi-band global structural information in the image. By performing multiple DCTs on the feature maps and introducing an attention mechanism, the accuracy of defect detection is improved. Attached Figure Description
[0041] Figure 1 A flowchart illustrating an embodiment of the attention deficit detection model construction method provided by the present invention;
[0042] Figure 2 This is a schematic diagram of a specific embodiment of the attention deficit detection model construction method provided by the present invention;
[0043] Figure 3 This is a flowchart illustrating an embodiment of an attention deficit detection method provided by the present invention;
[0044] Figure 4 This is a schematic diagram of an embodiment of an attention deficit detection model construction device provided by the present invention;
[0045] Figure 5 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0046] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0047] Before demonstrating the embodiments, the following terms will be explained.
[0048] The Discrete Cosine Transform (DCT) is a commonly used signal processing technique widely applied in image compression, audio processing, and video coding. The principle of DCT is to decompose a signal into cosine functions of different frequencies, thereby achieving a frequency domain representation of the signal. Simply put, DCT decomposes a signal into cosine functions of different frequencies. This is because the cosine function is a fundamental periodic signal that can represent various complex signals. By performing a DCT on the signal, its frequency domain representation can be obtained, thus enabling signal compression and reconstruction. In the DCT, the signal is decomposed into a series of cosine functions of different frequencies. These cosine functions are arranged from low to high frequencies, and each cosine function represents the energy distribution of the signal at different frequencies. By quantizing and encoding the coefficients of these cosine functions, signal compression and transmission can be achieved.
[0049] This invention provides a method, apparatus, electronic device, and medium for constructing an attention deficit detection model, which will be described below.
[0050] Figure 1 This is a schematic flowchart of an embodiment of the attention deficit detection model construction method provided by the present invention, as shown below. Figure 1 As shown, a method for constructing an attention deficit detection model includes:
[0051] S101. Input the workpiece defect image into a preset neural network to obtain the feature map of the intermediate layer of the neural network;
[0052] S102. Perform discrete cosine transform on the feature map to obtain the frequency domain of the feature map;
[0053] S103. Perform several convolution mappings and discrete cosine transforms on the feature maps in a preset perceptual kernel group to obtain several pairs of perceptual feature maps.
[0054] S104. Concatenate the frequency domain and several pairs of sensory feature maps to obtain an intermediate feature map;
[0055] S105. Split the intermediate feature map into several tensors and input the tensors into the activation function to obtain attention weights;
[0056] S106. Construct an attention defect detection model based on attention weights and feature maps.
[0057] Compared with existing technologies, this embodiment provides a method for constructing an attention defect detection model. First, it acquires the feature maps of the intermediate layers of a neural network and performs discrete cosine transform (DCT) to obtain the frequency domain of the feature maps. Then, it performs several convolutional mappings and DCTs on the feature maps within a preset perceptual kernel group to obtain several pairs of perceptual feature maps. Next, it concatenates the frequency domain and the pairs of perceptual feature maps to obtain intermediate feature maps. These intermediate feature maps are then split into several tensors, and these tensors are input into an activation function to obtain attention weights. Finally, an attention defect detection model is constructed based on the attention weights and the feature maps. This invention, by introducing DCT to convert the image to the frequency domain, better captures the multi-band global structural information in the image. By performing multiple DCTs on the feature maps and introducing an attention mechanism, it improves the accuracy of defect detection.
[0058] In some embodiments of the present invention, performing a discrete cosine transform on the feature map to obtain the frequency domain of the feature map includes:
[0059] The feature map is subjected to discrete cosine transform in the horizontal and vertical directions to obtain the frequency domain of the feature map in the horizontal direction and the frequency domain of the feature map in the vertical direction.
[0060] In specific embodiments of the present invention, such as Figure 2 The diagram shown is a schematic representation of a specific embodiment of the attention deficit detection model construction method provided by the present invention. In step S102, the feature map is subjected to discrete cosine transform in the x and y directions respectively. Through DCT transformation, the frequency domain representation of each feature map in the x and y directions is obtained.
[0061] In some embodiments of the present invention, the frequency domain expression of the feature map in the horizontal direction is:
[0062]
[0063] The frequency domain expression of the feature map in the vertical direction is:
[0064]
[0065] In the formula, The frequency domain feature map representing the horizontal direction of the feature map; The vertical frequency domain feature map represents the input feature map segmentation; i represents the i-th sequence segmented from the input feature map; h represents the h-th pixel in the horizontal direction; w represents the w-th pixel in the vertical direction; B represents the one-dimensional DCT frequency component corresponding to each pixel; n represents the number of feature map segments; X iH represents the feature map of the i-th segment; H represents the total horizontal length of the feature map; W represents the total vertical length of the feature map; 1DDCT represents the 1D discrete cosine transform.
[0066] In a specific embodiment of the present invention, in step S102, the output of the DCT includes low-frequency and high-frequency components in the frequency domain. For the DCT output of each image block, frequency components of a specific frequency are extracted to obtain a pair of direction-aware feature maps. Specifically, firstly, the feature map X is divided into many parts along the channel dimension, denoted as [X]. 0 X 1 , ..., X n-1 ],in That is, X i The shape is C′×H×W, where n is the number of segments, C is the original number of channels, and C′ is the number of channels in each segment after division, which is an integer. `st` means to satisfy... For each part, a corresponding one-dimensional DCT frequency component B is assigned. The formula for the vertical direction is as follows:
[0067]
[0068] The formula for the horizontal direction is as follows:
[0069]
[0070] Where [u i υ i ] is X i The corresponding two-dimensional index of frequency components, and This is a compressed pair of orientation-aware feature maps. and The shape is C′×W.
[0071] In some embodiments of the present invention, the preset perceptual kernel group includes: a convolutional layer, a normalization layer, and an activation function.
[0072] In some embodiments of the present invention, the convolutional layer is a 1×1 convolutional kernel, the normalization layer is a BatchNorm normalization layer, and the activation function is the SiLU activation function.
[0073] In a specific embodiment of the present invention, a pre-defined receptive kernel group consists of three convolutional layers. Each convolutional layer contains a 1×1 convolutional kernel, BatchNorm normalization, and SiLU activation function. Through this receptive kernel group, the model introduces a larger receptive field to more comprehensively capture local and global contextual information of the image. The feature map with a higher receptive field obtained in this step is constructed in parallel with the feature map obtained in step 1 to construct a double gradient flow for diverse targets. The design of the double gradient flow enables the model to carry deeper semantic information in feature representation, providing richer basic information for subsequent feature fusion.
[0074] In some embodiments of the present invention, the step of cascading the plurality of paired perceptual feature maps based on the frequency domain to obtain intermediate feature maps includes:
[0075] The frequency domain and the several pairs of perceptual feature maps are concatenated to obtain an intermediate feature map in the horizontal direction and a feature map in the vertical direction.
[0076] In some embodiments of the present invention, the construction of the attention defect detection model based on attention weights and feature maps includes:
[0077] The attention weights are multiplied bitwise by the feature map to obtain the attention defect detection model.
[0078] In a specific embodiment of the present invention, in step S103, the feature map is subjected to three convolutional mappings and discrete cosine transforms in a preset perceptual kernel group to obtain three pairs of perceptual feature maps. In step S104, the frequency domain of the feature map obtained in step S102 and the three pairs of perceptual feature maps are concatenated in the spatial dimension using the concat operation, and then sent to a shared convolutional transform kernel. The h_swish nonlinear activation function δ is then applied to obtain an intermediate feature map with spatial information in both the horizontal and vertical directions, as expressed by the following formula:
[0079]
[0080] In a specific embodiment of the present invention, in step S105, the intermediate feature map is split into several tensors, and the several tensors are input into an activation function to obtain attention weights, including:
[0081] The intermediate feature map obtained in step S104 is split into two independent tensors f along the spatial dimension. h and f w ;
[0082] f h and f w Each is passed through a two-dimensional convolution kernel F h and F wPerform convolution while maintaining alignment with the number of input channels to obtain the convolution result;
[0083] The result of convolution using the Sigmoid nonlinear function σ yields two attention weights g. h and g w ;
[0084] The two attention weights are multiplied bitwise with the initial input feature map, thus completing the construction of the attention model. The resulting model formula is: Among them, y c This represents the final output feature map, x. c This represents the initial input feature map.
[0085] This invention also provides a detection method for an attention deficit detection model, combined with... Figure 3 Let's take a look. Figure 3 This is a flowchart illustrating an embodiment of an attention deficit detection method provided by the present invention, including steps S301 to S303, wherein:
[0086] S301. Obtain the defect image of the target workpiece;
[0087] S302. Input the defect image of the target workpiece into the attention defect detection model, wherein the attention defect detection model is determined by the attention defect detection model construction method described above;
[0088] S303, The attention defect detection model outputs the defect image of the target workpiece after detection.
[0089] To better implement the attention deficit detection model construction method in this embodiment of the invention, based on the existing attention deficit detection model construction method, correspondingly, as follows: Figure 4 As shown, this embodiment of the invention also provides an attention deficit detection model construction device. An attention deficit detection model construction device 400 includes:
[0090] The feature map acquisition module 401 is used to input the workpiece defect image into a preset neural network to obtain the feature map of the intermediate layer of the neural network.
[0091] The frequency domain acquisition module 402 is used to perform discrete cosine transform on the feature map to obtain the frequency domain of the feature map;
[0092] The perceptual feature map acquisition module 403 is used to perform several convolution mappings and discrete cosine transforms on the feature map in a preset perceptual kernel group to obtain several pairs of perceptual feature maps.
[0093] The intermediate feature map acquisition module 404 is used to concatenate the frequency domain and several pairs of perceptual feature maps to obtain an intermediate feature map.
[0094] The attention weight acquisition module 405 is used to split the intermediate feature map into several tensors and input the several tensors into the activation function to obtain the attention weights;
[0095] The defect detection model building module 406 is used to build an attention-based defect detection model based on attention weights and feature maps.
[0096] The attention deficit detection model construction device 400 provided in the above embodiments can realize the technical solution described in the above-described attention deficit detection model construction method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content of the above-described attention deficit detection model construction method embodiments, which will not be repeated here.
[0097] like Figure 5 As shown, the present invention also provides an electronic device 500. The electronic device 500 includes a processor 501, a memory 502, and a display 503. Figure 5 Only some components of the electronic device 500 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0098] In some embodiments, processor 501 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as an attention deficit detection model construction method in this invention.
[0099] In some embodiments, processor 501 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 501 may be local or remote. In some embodiments, processor 501 may be implemented on a cloud platform. In some embodiments, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, or any combination thereof.
[0100] In some embodiments, memory 502 may be an internal storage unit of electronic device 500, such as a hard disk or memory of electronic device 500. In other embodiments, memory 502 may also be an external storage device of electronic device 500, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 500.
[0101] Furthermore, the memory 502 may include both internal storage units of the electronic device 500 and external storage devices. The memory 502 is used to store application software and various types of data installed on the electronic device 500.
[0102] In some embodiments, display 503 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 503 is used to display information from electronic device 500 and to display a visual user interface. Components 501-503 of electronic device 500 communicate with each other via a system bus.
[0103] In one embodiment, when processor 501 executes an attention deficit detection model construction program stored in memory 502, the following steps can be implemented:
[0104] The workpiece defect image is input into a preset neural network to obtain the feature map of the intermediate layer of the neural network;
[0105] The frequency domain of the feature map is obtained by performing a discrete cosine transform on the feature map.
[0106] The feature maps are subjected to several convolutional mappings and discrete cosine transforms in a pre-defined group of perceptual kernels to obtain several pairs of perceptual feature maps.
[0107] The intermediate feature map is obtained by concatenating the frequency domain and several pairs of perceptual feature maps.
[0108] The intermediate feature map is split into several tensors, and these tensors are input into the activation function to obtain the attention weights.
[0109] An attention defect detection model is constructed based on attention weights and feature maps.
[0110] It should be understood that when the processor 501 executes an attention deficit detection model construction program in the memory 502, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.
[0111] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 500 mentioned. Electronic device 500 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 500 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0112] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0113] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing an attention deficit detection model, characterized in that, include: The workpiece defect image is input into a preset neural network to obtain the feature map of the intermediate layer of the neural network; The frequency domain of the feature map is obtained by performing a discrete cosine transform on the feature map. The feature maps are subjected to several convolutional mappings and discrete cosine transforms in a pre-defined group of perceptual kernels to obtain several pairs of perceptual feature maps. The intermediate feature map is obtained by concatenating the frequency domain and several pairs of perceptual feature maps. The intermediate feature map is split into several tensors, and these tensors are input into the activation function to obtain the attention weights. A model for detecting attention defects is constructed based on attention weights and feature maps; The frequency domain expression of the feature map in the horizontal direction is: The frequency domain expression of the feature map in the vertical direction is: In the formula, The frequency domain feature map representing the horizontal direction of the feature map; The frequency domain feature map represents the feature map in the vertical direction; i Indicates the segmentation of the input feature map. i A sequence; h Indicates the horizontal direction. h 1 pixel; w Indicates the vertical direction. w 1 pixel; B This represents the one-dimensional DCT frequency component corresponding to each pixel. n Indicates the number of feature map segments; Indicates the first i Each segment's feature map; H This represents the total horizontal length of the feature map; W It represents the total vertical length of the feature map; 1DDCT represents the 1D discrete cosine transform.
2. The method for constructing an attention deficit detection model according to claim 1, characterized in that, The step of performing a discrete cosine transform on the feature map to obtain the frequency domain of the feature map includes: The feature map is subjected to discrete cosine transform in the horizontal and vertical directions to obtain the frequency domain of the feature map in the horizontal direction and the frequency domain of the feature map in the vertical direction.
3. The method for constructing an attention deficit detection model according to claim 1, characterized in that, The preset perceptual kernel group includes: convolutional layers, normalization layers, and activation functions.
4. The method for constructing an attention deficit detection model according to claim 3, characterized in that, The convolutional layer has a 1×1 convolutional kernel, the normalization layer is a BatchNorm normalization layer, and the activation function is the SiLU activation function.
5. The method for constructing an attention deficit detection model according to claim 1, characterized in that, The step of concatenating the frequency domain and several pairs of perceptual feature maps to obtain intermediate feature maps includes: The frequency domain and the several pairs of sensory feature maps are concatenated to obtain an intermediate feature map in the horizontal direction and a feature map in the vertical direction.
6. The method for constructing an attention deficit detection model according to claim 1, characterized in that, The attention defect detection model constructed based on attention weights and feature maps includes: The attention weights are multiplied bitwise by the feature map to obtain the attention defect detection model.
7. A method for detecting attention deficit, characterized in that, include: Acquire defect images of the target workpiece; The defect image of the target workpiece is input into the attention defect detection model, wherein the attention defect detection model is determined by the attention defect detection model construction method according to any one of claims 1 to 6; The attention defect detection model outputs a defect image of the target workpiece after detection.
8. A device for constructing an attention deficit detection model, characterized in that, include: The feature map acquisition module is used to input the workpiece defect image into a preset neural network to obtain the feature map of the intermediate layer of the neural network; The frequency domain acquisition module is used to perform discrete cosine transform on the feature map to obtain the frequency domain of the feature map; The perceptual feature map acquisition module is used to perform several convolution mappings and discrete cosine transforms on the feature maps in a preset perceptual kernel group to obtain several pairs of perceptual feature maps. The intermediate feature map acquisition module is used to concatenate the frequency domain and several pairs of perceptual feature maps to obtain intermediate feature maps; The attention weight acquisition module is used to split the intermediate feature map into several tensors and input these tensors into the activation function to obtain the attention weights. The defect detection model building module is used to build an attention-based defect detection model based on attention weights and feature maps. The frequency domain expression of the feature map in the horizontal direction is: The frequency domain expression of the feature map in the vertical direction is: In the formula, The frequency domain feature map representing the horizontal direction of the feature map; The frequency domain feature map represents the feature map in the vertical direction; i Indicates the segmentation of the input feature map. i A sequence; h Indicates the horizontal direction. h 1 pixel; w Indicates the vertical direction. w 1 pixel; B This represents the one-dimensional DCT frequency component corresponding to each pixel. n Indicates the number of feature map segments; Indicates the first i Each segment's feature map; H This represents the total horizontal length of the feature map; W It represents the total vertical length of the feature map; 1DDCT represents the 1D discrete cosine transform.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the attention deficit detection model construction method according to any one of claims 1 to 6.
