Information processing apparatus, information processing method, and computer program
The information processing device addresses the high processing load of attention mechanisms by detecting and deleting redundant mechanisms, enhancing processing speed and image quality in neural networks.
Patent Information
- Application Number
- JP2023067814
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-18
- Publication Date
- 2024-10-30
AI Technical Summary
The processing load of attention mechanisms in neural networks is high, leading to decreased processing speed when excessive attention processing is added, and existing methods to reduce this load are insufficient.
An information processing device that includes an image processing unit, a detection unit to identify redundant attention mechanisms, a deletion unit to remove them, and a learning unit to create a new neural network structure, thereby reducing processing load while maintaining image quality.
The device prevents a decrease in processing speed and improves image quality by effectively identifying and removing redundant attention mechanisms in neural networks, resulting in faster processing speeds.
Smart Images

Figure 2024154148000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an information processing device, an information processing method, and a computer program. [Background technology]
[0002] In recent years, methods using neural networks have been developed as image processing techniques to improve image quality. For example, high-quality image processing such as noise removal, blur removal, and super-resolution are realized using neural networks.
[0003] Also, for example, Non-Patent Document 1 proposes an attention mechanism as one of the elements that make up a neural network. The attention mechanism generates weights for features when they are input, and realizes attention processing that emphasizes important elements in the features by using the generated weights.
[0004] Introducing this attention mechanism into a neural network can improve the performance of various image processing tasks, and can also improve image quality in the high-quality image processing mentioned above. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2019-212206 A [Non-patent literature]
[0006] [Non-Patent Document 1] Frequency Attention Network: Blind Noise Removal for Real Images, Hongcheng Mo et al., 2020. [Non-Patent Document 2] Toward Convolutional Blind Denoising of Real Photographs, Shi Guo et al., 2019. [Non-Patent Document 3] Diversified Visual Attention Networks for Fine-Grained Object Classification,Bo Zhao.,2016. Summary of the Invention [Problem to be solved by the invention]
[0007] However, attention processing generally requires a large processing load, and putting too much of it into the network will slow down the processing speed.
[0008] On the other hand, in Patent Document 1, the weights of input features are generated by attention processing, and the calculation process for generating features with small weights is determined to be redundant, and this calculation process is reduced.
[0009] However, the processing in Patent Document 1 reduces the number of filters and the number of dimensions of the features, but does not reduce the series of processing steps of the features, so the processing load of the attention mechanism remains large.
[0010] SUMMARY OF THE PRESENT EMBODIMENTS Accordingly, an object of the present invention is to provide an information processing apparatus capable of preventing a decrease in processing speed and improving image quality. [Means for solving the problem]
[0011] In the information processing device, an image processing unit that performs image processing by inputting an image quality evaluation image into a first neural network incorporating an attention mechanism that performs image quality improvement image processing; a detection unit that detects a redundant attention mechanism by determining whether or not the weight of the attention process generated during the image processing is active; a deletion unit that deletes the redundant attention mechanisms detected by the detection unit from the first neural network to obtain a new second neural network; a learning unit that learns the second neural network; The present invention is characterized by comprising: Effect of the Invention
[0012] The present invention can provide an information processing device capable of preventing a decrease in processing speed and improving image quality. [Brief description of the drawings]
[0013] [Figure 1] 1 is a diagram illustrating an example of a hardware configuration of an information processing device 100 according to a first embodiment of the present invention. [Diagram 2] 1 is a functional block diagram showing an example of the configuration of an information processing device according to a first embodiment. [Diagram 3] 4A to 4C are flowcharts showing an example of the flow of an information processing method in the information processing device according to the first embodiment. [Figure 4] FIG. 2 is a functional block diagram showing an example of the configuration of a neural network according to the first embodiment. [Diagram 5] 1A and 1B are functional block diagrams for explaining attention processing according to the first embodiment. [Figure 6] FIG. 13 is a diagram for explaining activation determination of attention processing weights when a frequency chart is input. [Figure 7] FIG. 2 is a functional block diagram showing an example of the configuration of a newly acquired neural network according to the first embodiment. [Figure 8] FIG. 13 is a diagram for explaining activation determination of weights in attention processing using a character chart as input. [Figure 9] 13 is a diagram for explaining activation determination of weights in attention processing using a color chart as an input. FIG. [Figure 10] FIG. 13 is a functional block diagram showing an example of the configuration of a neural network according to a third embodiment. [Figure 11] FIG. 13 is a functional block diagram showing an example of the configuration of a newly acquired neural network according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] <Embodiment 1> Hereinafter, an embodiment of the present invention will be described with reference to the drawings. However, the present invention is not limited to the following embodiment. In each drawing, the same members or elements are given the same reference numerals, and duplicated descriptions are omitted or simplified.
[0015] 1 is a diagram showing an example of a hardware configuration of an information processing device 100 according to a first embodiment of the present invention. The information processing device 100 includes a CPU 101 as a computer, a memory 102 such as a RAM or a ROM, an input unit 103 such as a keyboard or a mouse, and a storage unit 104 as a storage medium for storing computer programs and the like.
[0016] The information processing device 100 also includes a display control unit 105 that generates display signals for displaying images on a liquid crystal display, an organic display, or the like, a communication unit 106 that communicates with the outside of the information processing device 100, and the like.
[0017] Fig. 2 is a functional block diagram showing a configuration example of an information processing device according to embodiment 1. Note that some of the functional blocks shown in Fig. 2 are realized by causing a CPU or the like as a computer (not shown) included in the information processing device to execute a computer program stored in a memory (not shown) as a storage medium.
[0018] However, a part or all of these may be realized by hardware, which may be a dedicated circuit (ASIC) or a processor (a reconfigurable processor, DSP), etc.
[0019] In addition, the functional blocks shown in Fig. 2 do not have to be built in the same housing, and may be configured by separate devices connected to each other via signal paths. The above explanation regarding Fig. 2 also applies to Figs. 4, 5, 7, 10, and 11.
[0020] The information processing device 100 shown in FIG. 2 includes a database unit 110, an image processing unit 111, a processing result storage unit 112, a detection unit 113, a deletion unit 114, a learning unit 115, and a model storage unit .
[0021] A neural network incorporating attention that has been trained in advance is stored in the model storage unit 116. The database unit 110 is a database that stores images for image quality evaluation and images for learning of image quality improvement processing.
[0022] The image processing unit 111 executes a predetermined image processing when an input image is given, using a neural network stored in the model storage unit 116. That is, the image processing unit 111 executes an image processing step in which an image quality evaluation image is input to a first neural network incorporating an attention mechanism that executes high image quality image processing, and image processing is performed. The processing result storage unit 112 stores the attention processing weights generated in the course of image processing executed by the image processing unit 111.
[0023] The detection unit 113 determines the activation of the weights generated by the attention mechanism, and detects redundant attention mechanisms from the attention of the neural network stored in the model storage unit 116. That is, the detection unit 113 detects redundant attention mechanisms by determining whether the weights of the attention processing generated during the image processing process are activated or not.
[0024] The deletion unit 114 deletes the redundant attention mechanisms detected by the detection unit 113 from the first neural network stored in the model storage unit 116, and acquires a new second neural network. The learning unit 115 learns the second neural network acquired by the deletion unit 114.
[0025] 3A to 3C are flowcharts showing an example of a flow of an information processing method in the information processing device according to embodiment 1. Note that the CPU 101 as a computer in the information processing device 100 executes a computer program stored in the storage unit 104, thereby sequentially performing the operations of the steps in the flowcharts of FIG.
[0026] Next, the detailed contents of the process of acquiring a neural network for high quality image processing incorporating an attention mechanism will be described with reference to the functional block diagram of FIG. 2 and the flowchart of FIG.
[0027] First, the process of detecting a redundant attention mechanism in step S301 in Fig. 3A will be described. In step S301, redundant attention is detected from a neural network that incorporates a previously trained attention mechanism stored in the model storage unit 116.
[0028] 3B shows a detailed process flow of step S301. In step S311, in order to detect redundant attention mechanisms, attention processing weights are first obtained using image quality evaluation images stored in the database unit 110. The process is repeated until attention processing weights for all image quality evaluation images in the database unit 110 are obtained.
[0029] The image quality evaluation images stored in the database unit 110 are images that allow evaluation of the points that are important in evaluating image quality. For example, in the image quality of the image processing result, if emphasis is placed on image sharpness, the clarity and reproducibility of edges and colors become important.
[0030] In such cases, the image quality assessment image for evaluating the sharpness and reproducibility of edges and colors uses a frequency chart that shows the fluctuations in frequency bands within the image, or a color chart in which areas are divided by color within the image.
[0031] In addition, for example, if the visibility of characters is to be emphasized, a character chart with characters on it is used, and if the visibility of a specific object, for example, the visibility of an automobile, is to be emphasized in terms of image quality, an image with an automobile on it is used.
[0032] In step S312, the image quality evaluation image stored in the database unit 110 is acquired as an input image to a network that performs image quality improvement processing. In step S313, the image processing unit 111 executes image quality improvement processing on the input image acquired in step S312, using a trained neural network with an attention mechanism that is stored in the model storage unit 116. Also, in step S313, a loop process is started.
[0033] The neural network according to this embodiment executes noise removal as high quality image processing using, for example, U-Net as described in Non-Patent Document 2. That is, Non-Patent Document 2 describes a Convolutional Neural Network (CNN) that realizes noise removal, and the CNN is composed of multiple convolution layers and activation layers.
[0034] In addition, in the network of Non-Patent Document 2, in order to realize high quality image processing such as noise removal and super-resolution, noise removal is performed using a network called U-Net having a U-shaped structure. In this embodiment, an example using the U-Net will be described.
[0035] Fig. 4 is a functional block diagram showing an example of the configuration of a neural network according to embodiment 1. The neural network according to this embodiment shown in Fig. 4 is divided into an encoder unit 401 that generates features while compressing an image, and a decoder unit 402 that restores the image from the compressed features.
[0036] That is, the first and second neural networks in the first embodiment have an encoder unit that generates a plurality of feature amounts and a decoder unit that restores the plurality of feature amounts as an image resulting from a desired image processing. More specifically, the first and second neural networks have an encoder unit that generates a plurality of feature amounts at a plurality of resolutions and a decoder unit that restores the plurality of feature amounts at a plurality of resolutions as an image resulting from a desired image processing.
[0037] First, the encoder unit 401 generates features with different resolutions and channels of the input image 411. The features compressed to the end by the encoder unit 401 are then deconvolved by the decoder unit 402, reducing the number of channels and increasing the resolution while restoring the features as an image.
[0038] Finally, a high quality image that has been subjected to image processing including a predetermined noise removal process can be obtained as a noise-removed image 413. That is, when a noisy image is input, the first and second neural networks output an image from which noise has been removed.
[0039] In this embodiment, a network configured as described above is used, but the structure is not important as long as the network achieves high image quality by generating features at multiple resolutions, and the position and number of attention mechanisms are not limited to this.
[0040] Details of the neural network according to this embodiment shown in Fig. 4 will be described below. For example, an input image 411 is acquired from an imaging device and input to the high-resolution feature encoder 403. The input image 411 is subjected to multiple convolution processes and activation processes (relu) in the high-resolution feature encoder 403 to generate high-resolution features 412.
[0041] The activation process relu (Rectified Linear Unit) is a process using a function such that when the input value is 0 or less, the output value is always 0, and when the input value is greater than 0, the output value is the same as the input value.
[0042] In this way, the network of this embodiment performs a process 421 of applying multiple convolutions and activation processing relu to a noisy input image 411 to generate high-resolution features. Furthermore, attention processing is performed on the generated features by an attention process 405 to generate features 412.
[0043] The low-resolution feature encoder 404A performs pooling on the feature 412 and performs multiple convolutions and activation processing relu to generate low-resolution features. Furthermore, attention processing 405A is performed on the features generated by the low-resolution feature encoder 404A.
[0044] The feature amount 412A that has been subjected to the attention process 405A is further reduced in resolution by pooling process in the low-resolution feature amount encoder unit 404B, and the feature amount is compressed. Also, the feature amount 412B is generated by performing the attention process 405B.
[0045] Thereafter, the low-resolution feature encoder 404C further reduces the resolution by pooling processing, compresses the features, and generates features 412C by performing attention processing 405C.
[0046] As described above, the low-resolution feature encoder 404 of this embodiment includes attention processes 405A to 405C at the end of a path for generating features. Note that the attention processes 405A to 405C are attention processes that weight the feature in the spatial direction or attention processes that weight the feature in the channel direction.
[0047] That is, the attention mechanism incorporated in the first neural network includes an attention mechanism that generates weights for the spatial direction of the input feature or an attention mechanism that generates weights for the channel direction of the input feature.
[0048] 5A and 5B are functional block diagrams for explaining the attention processing according to the first embodiment, and Fig. 5A is a diagram showing an example of the attention processing that weights in the spatial direction. If the size of the input feature 501 is a feature of height H, width W, and channel C, a feature of height H, width W, and channel 1 is generated by performing a convolution process 511 on the input feature 501 multiple times.
[0049] Then, a process 512 using a sigmoid function is applied to the generated feature amount to generate a spatial weight 513 having a value of 0 to 1. Furthermore, the generated weight 513 is multiplied by the input feature amount 501 to obtain a spatially weighted feature amount 515.
[0050] 5B is a diagram showing an example of attention processing that weights the channel direction. For an input feature 501, a feature 522 with height 1, width 1, and channel C is generated by global average pooling processing 521.
[0051] The generated features are further passed through a fully connected layer process 523 and a sigmoid function 524 is applied to generate channel-direction weights 525. The generated weights 525 are then multiplied by the input features 501 to obtain channel-direction weighted features 526. Note that in this embodiment, attention in the spatial direction is used.
[0052] Returning to the explanation of Figure 3, in step S314, all attention processing weights generated in the course of executing the image processing in step S313 are obtained, and the obtained attention processing weights are associated with the input image and stored in the processing result storage unit 112. The above processing is performed by loop processing for all image quality evaluation images in the database, and a set of image quality evaluation images and the attention processing weights for those images are stored in the processing result storage unit 112.
[0053] In step S315, the detection unit 113 uses the set of image quality evaluation images and attention processing weights stored in the processing result storage unit 112 to determine whether the attention processing weights are active or inactive for each attention mechanism.
[0054] An attention mechanism whose attention processing weight is determined to be inactive is deemed to be redundant, and the redundant attention mechanism is detected. Here, step S315 functions as a detection step for detecting a redundant attention mechanism by determining whether the attention processing weight generated during the image processing step is active or not.
[0055] In this embodiment, the statistics of the attention processing weight values are calculated, and it is determined whether the attention processing weights are active or not according to the statistics. Specifically, as a method for determining whether the attention processing weights are active or inactive, the variance value of the weights generated by the attention mechanism is used, and the variance value of the weights generated by the attention mechanism is calculated for each attention mechanism. If the calculated variance value is less than a predetermined threshold, it is determined to be inactive, and if it is more than that, it is determined to be active.
[0056] 6 is a diagram for explaining activation determination of attention processing weights when a frequency chart is input. An input image 601 is a frequency chart, which is one of the images for image quality assessment, and is given as an input to a neural network.
[0057] The attention processing weights of the attention mechanism built into the neural network are obtained when this input image 601 is given. That is, for example, the weights 602 of attention processing 405 and the weights 603 of attention processing 405A are obtained.
[0058] In this case, the weights 602 of the attention processing 405 are assumed to have substantially constant values for all elements, while the weights 603 of the attention processing 405A are assumed to increase as the frequency of the input image 601 decreases.
[0059] That is, even if the weight 602 of the attention process 405 is used, the feature is not weighted, so the attention mechanism that generates this weight can be judged as redundant. In this way, the weight of the attention process may or may not vary for each element depending on the input image. Therefore, in this embodiment, the variance value of the weight is calculated. Therefore, if the value varies depending on the element, the variance value becomes large, and if the variation is small, the variance value becomes small.
[0060] Then, for each attention mechanism, the activation / inactivation judgment results of the attention processing weights are tallied for all image quality evaluation images. In this embodiment, whether or not there is redundancy is judged by majority vote of activation / inactivation, and if the majority of the attention processing weights are inactive, the attention mechanism that generates the attention processing weights is judged to be redundant.
[0061] In other words, when one or more image quality evaluation images are given, attention mechanisms with a large number of inactive attention processing weights relative to active attention processing weights among the attention processing weights obtained for each attention mechanism are detected as redundant.
[0062] As another method for determining whether the attention processing weight is active and for detecting redundant attention mechanisms, the following method may be used. That is, for example, first, for each attention mechanism, the average value of the variance of the attention processing weight of all image quality evaluation images is calculated. Next, the attention processing weight that is the average value of the variance below a defined threshold value may be determined to be inactive, and thus determined to be a redundant attention mechanism.
[0063] In other words, the average value of the variance of attention processing weights obtained when one or more image quality evaluation images are given is calculated, and an attention mechanism that generates attention processing weights whose average value is below a predetermined threshold value can be detected as redundant.
[0064] In this way, in step S315, the activation of the attention weights is determined, and after detecting the redundant attention mechanism, the process proceeds to step S302. In step S302, the deletion unit 114 deletes the redundant attention mechanism detected in step S315 from the structure of the neural network stored in the model storage unit 116.
[0065] As a result, a new network structure is acquired, and the acquired new network structure is stored in the model storage unit 116. Here, step S302 functions as a deletion step in which the redundant attention mechanisms detected in the detection step are deleted from the first neural network, and a new second neural network is acquired.
[0066] Fig. 7 is a functional block diagram showing an example of the configuration of a newly acquired neural network according to the first embodiment, and shows an example of the structure of the neural network newly acquired as described above. In the neural network of Fig. 7, the attention process 405 determined to be redundant in the original neural network of Fig. 4 is deleted, and a feature 701 generated without executing the attention process 405 is propagated within the network.
[0067] Next, in step S303 in Fig. 3, the neural network of the new structure obtained in step S302 is trained. Here, step S303 functions as a training step for training a second neural network. Fig. 3(C) is a flowchart showing a detailed processing flow example of step S303.
[0068] In step S321, a loop process of learning the neural network is started. This process repeatedly updates parameters such as the weights and biases of the network. That is, at the start of learning, a neural network with initial parameter values is loaded, and thereafter, learning is repeatedly performed, updating the network parameters and storing them in the model storage unit 116. At this time, learning is repeated a predetermined number of times and then ends.
[0069] In step S322, the database unit 110 outputs the input image from the set consisting of the input image and the true-value image to the image processing unit 111, and outputs the true-value image to the learning unit 115. In this embodiment, in order to perform noise removal as the image processing, a clean image without noise is used as the true-value image. Also, a noise-added image to which noise has been added is used as the input image.
[0070] In step S323, the image processing unit 111 performs image processing by inputting the input image acquired in step S322 into a neural network, and acquires the result of the image processing. The acquired image processing result is output to the learning unit 115.
[0071] In step S325, the learning unit 115 calculates an error value using the true image acquired in step S322 and the image processing result acquired in step S323. In step S325, the neural network parameters are updated by the error backpropagation method using the error value calculated in step S324.
[0072] The neural network having the updated parameters is stored in the model storage unit 116. The above-mentioned processes from step S321 to step S325 are repeated in a loop to learn a neural network of a new structure for executing high quality image processing.
[0073] We have explained above how to determine whether the attention layer is active or inactive and to delete redundant attention layers based on, for example, the variance value of the weights generated by the attention mechanism. Note that the score used as an index to determine whether the attention layer is active or inactive is not limited to the variance value. Any index that can be used for a similar purpose is acceptable.
[0074] For example, standard deviation may be used as another index. Alternatively, indices such as skewness and kurtosis may be used as other indices for determining the degree of distribution, or a combination of these may be used as an index to achieve the purpose.
[0075] As described above, according to this embodiment, in a neural network that performs noise removal processing, redundant attention can be deleted, thereby obtaining a neural network with a faster processing speed.
[0076] <Variation 1> In the first embodiment, the activation / inactivation of the attention processing weights is determined using the variance value of the weights, etc. In the first modified example, another method of determining the activation / inactivation of the attention processing weights in the spatial direction when a frequency chart is used for the image quality evaluation set will be described with reference to FIG.
[0077] An input image 601, which is a frequency chart, is given as an input to a neural network capable of performing high quality image processing. This frequency chart has the characteristic that the frequency increases from the left end to the right end of the image. At this time, weights 602 of attention processing 405 and weights 603 of attention processing 405A incorporated in the neural network are obtained.
[0078] In the first modification, the weights of the attention processing obtained when the frequency chart is given as an input to the first neural network are divided into regions for each frequency band, and a representative value of the weights is calculated for each region. The representative value is the average or maximum value of the weights.
[0079] Next, the absolute difference between the representative values between adjacent regions is calculated. If the absolute difference between all adjacent regions is greater than a predetermined value (e.g., 0), the attention processing weight is determined to be active. If the difference is equal to or less than a predetermined threshold, the attention processing weight is determined to be inactive.
[0080] By using such a determination method, the weight 602 of the attention process 405 can be determined to be inactive because the weight value is constant regardless of the frequency band, and the weight 603 of the attention process 405A can be determined to be active because the weight value varies depending on the frequency band.
[0081] <Variation 2> In the second modification, a method for determining activation / inactivation of the weights of attention processing in spatial directions when a character chart is used in the image quality evaluation set will be described with reference to Fig. 8. Fig. 8 is a diagram for explaining activation determination of the weights of attention processing using a character chart as input.
[0082] In Fig. 8, an input image 801, which is a character chart, is given as input to a neural network capable of executing high-quality image processing. This character chart contains character parts and background other than the character parts in the image. At this time, weights 802 for attention processing 405 and weights 803 for attention processing 405A incorporated in the neural network are obtained. Here, the character chart is divided into character areas and background areas, and a representative weight value is calculated for each area.
[0083] In this case, a character detector, for example, is used to separate the character region from the background region. The representative value is the average or maximum value of the weights. Next, the absolute difference value of the representative values between the character region and the background region is calculated. If the absolute difference value is greater than 0, the attention processing weight is determined to be active.
[0084] When such a determination method is used, the weight 802 of the attention process 405 is determined to be inactive because there is no difference in the weight value between the character region and the background region. Also, the weight 803 of the attention process 405A is determined to be active because there is a difference in the weight value between the character region and the background region. Also, such a determination method can be realized by using an object detector that detects an object image containing a specific object instead of a character chart and a specific object.
[0085] That is, the attention processing weights acquired when a character chart or object image is given as input to a neural network are divided into a character or object region and a background region, and a representative value of the weights is calculated for each region. Also, the difference between the representative values of the weights in the character or object region and the background region is calculated, and if the difference is equal to or less than a predetermined threshold, the attention processing weights are determined to be inactive.
[0086] <Variation 3> In the third modification, a method for determining activation / inactivation of attention processing weights in spatial directions when a color chart is used in the image quality evaluation set will be described with reference to Fig. 9. Fig. 9 is a diagram for explaining activation determination of attention processing weights using a color chart as input. In Fig. 9, a color chart 901 is provided as an input image to a neural network capable of executing image quality improvement processing.
[0087] 9, a square color area and a background, each of which has a different color, are shown in the image. At this time, weights 902 for attention processing 405 and weights 903 for attention processing 405A incorporated in the neural network are obtained. Here, a representative value of the weights is calculated for each color area of the color chart.
[0088] That is, among the attention processing weights acquired when a color chart is given as an input to a neural network, regions are divided by color, and a representative value of the weights is calculated for each region.
[0089] Each color region can be separated by using the fact that the pixel values of the image are constant. Next, two samples are randomly taken from each color region to create pairs of color regions. The absolute difference between the representative values of the color regions in each pair is calculated.
[0090] In this case, if the majority of pairs of all color regions have absolute difference values greater than 0, the attention processing weights are determined to be active. If such a determination method is used, the attention processing weights 902 are determined to be inactive because there is no difference in the weight values for each color region.
[0091] In addition, the weight 903 of the attention process 405A is determined to be active because the weight value differs in each color region. In this way, the difference value of the representative value of the weight between the regions divided by color is calculated, and when the difference value is equal to or less than a predetermined threshold, the weight of the attention process is determined to be inactive.
[0092] As described above, the image quality evaluation image input to the first neural network may be of various types, including at least one of a frequency chart showing changes in frequency bands in an image, a character chart with characters written in an image, an object image showing a specific object to be improved in image quality, and a color chart with areas divided by color in the image.
[0093] <Modification 4> In the fourth modification, a method of deleting redundant attention mechanisms by taking into account the calculation cost of attention will be described. First, the processing speed of all attention processes when an input image is given to the neural network is measured.
[0094] Based on the results of measuring the processing speed, we determine the target value for when the attention mechanism is removed. For example, we set the target value to reduce the processing time of all attention processing by 20%. Next, when multiple image quality evaluation images are given, we detect redundant attention in order of the smallest average variance value of the attention weights.
[0095] In this case, if the neural network processing speed when the target attention mechanism is removed reaches a reduction in processing time of 20% (the target value) of the attention processing, the detection process of the redundant attention mechanism is terminated.
[0096] Then, the attention mechanism with the smallest average variance value of the attention weights detected up to that point is determined to be a redundant attention mechanism. In this way, it is possible to improve the processing speed while suppressing the decrease in accuracy caused by deleting attentions determined to be redundant. In this way, redundant attention mechanisms may be detected based on the statistics of the attention processing weights and the processing speed of the attention processing.
[0097] <Embodiment 2> In embodiment 1, redundant attention is removed from a noise removal network that incorporates attention, and a new noise removal network with faster processing speed is obtained.
[0098] In the second embodiment, an example is described in which redundant attention is deleted from a super-resolution network that performs super-resolution processing to convert a low-resolution image into a high-resolution image, and a new super-resolution network with a faster processing speed is acquired. That is, in the second embodiment, the first and second neural networks receive an input image and output a high-resolution image.
[0099] The functional block configuration of the image processing apparatus of this embodiment is similar to that of the first embodiment shown in Fig. 2. In this embodiment, a database unit 110 stores images for image quality evaluation, and low-resolution images and high-resolution images as learning images for image quality improvement processing. This embodiment is executed according to the same processing flow as the first embodiment. Processing in the second embodiment that differs from that in the first embodiment will be described in detail below.
[0100] In step S313, the neural network performs super-resolution processing using a model trained to perform super-resolution processing. When a low-resolution image is given as an input image to the neural network, a high-resolution image is output.
[0101] In step S322, a low-resolution image is acquired as an input image, and a high-resolution image is acquired as a true image. Using the acquired low-resolution image and high-resolution image, learning of a newly acquired neural network is performed in the subsequent processing.
[0102] By using this embodiment configured as described above, even in a neural network that performs super-resolution processing, it is possible to obtain a neural network with a faster processing speed by deleting redundant attention.
[0103] <Embodiment 3> In the first embodiment, the activation judgment of attention processing for one image quality evaluation item was described. In the third embodiment, an example is described in which activation judgment is performed using a plurality of different image quality evaluation images, thereby obtaining a neural network that removes redundant attention mechanisms while retaining effective attention mechanisms for a certain image quality evaluation item.
[0104] The configuration of the functional blocks of the image processing apparatus of this embodiment is similar to that of the first embodiment shown in Fig. 2, for example, and is executed according to the same processing flow as that of the first embodiment. Processing in the third embodiment that differs from that of the first embodiment will be described in detail below.
[0105] Fig. 10 is a functional block diagram showing an example of the configuration of a neural network according to the third embodiment. The neural network in Fig. 10 is composed of a plurality of encoder units such as encoder units 1001, 1002, and 1003, and a decoder unit 1004. When an input image 1005 is input, each of the encoder units 1001, 1002, and 1003 generates feature quantities 1001A, 1002A, and 1003A.
[0106] In the process of generating features 1001A, 1002A, and 1003A, attention processing is performed as in 1011, 1012, and 1013, and finally attention processing is performed to generate features. After that, the generated features are combined when input to a decoder unit 1004, and are processed by the decoder unit 1004 to output a high-quality image 1006 having the desired resolution and number of channels.
[0107] It is desirable for the neural network configured in this way to generate features with different properties for each encoder. For example, by using the method of Non-Patent Document 3, it is possible to generate features with different properties for each encoder by learning so that the weights of the attention process for each encoder are different.
[0108] Alternatively, features with different properties may be generated in each encoder unit by the following method: First, one of multiple encoder units is connected to the decoder unit and trained sufficiently to obtain the desired features.
[0109] For example, a neural network consisting of an encoder unit 1001 and a decoder unit 1004 is configured, and during learning, noise-added images of automobiles and clean, noise-free images are given to the network to learn. This allows the encoder unit 1001 to generate features specialized for automobile images.
[0110] Similarly, the encoder unit 1002 learns by providing a noise-added image of a character chart and a clean image without noise during learning, thereby generating features specialized for the character chart.
[0111] In this way, each encoder part is trained independently and thoroughly, and then the network structure is changed to that shown in Figure 10. By performing training again, it is possible to obtain a neural network that performs noise removal while each encoder part generates different features.
[0112] In addition, in this embodiment, a plurality of attention activity determinations are performed. For example, in this embodiment, the method of the first modification is used to perform attention activity determination using a frequency chart as an image quality evaluation image.
[0113] Also, using the method of variant 2, attention activity determination is performed using an image in which a character chart appears as an image quality evaluation image. Furthermore, attention activity determination is also performed using an image in which, for example, an automobile appears as a specific object image. In this way, activity determination is performed for multiple types of attention processing weights, and attention mechanisms that are determined to be inactive by any of the activity determination methods are detected as redundant attention mechanisms.
[0114] For example, when the weight of the attention process 1011 is determined to be inactive using any of the character chart, the specific object image, and the frequency chart, it is detected as a redundant attention mechanism.
[0115] Regarding the weight of the attention process 1012, if it is determined that the attention mechanism is active, for example, for the character chart, among the three attention activation determinations, it is determined that the attention mechanism is not redundant. Alternatively, if even one of them is determined to be active, it is determined that the attention mechanism is not redundant. Then, the detected redundant attention mechanism is deleted, and a new neural network structure is obtained.
[0116] An example of the structure of a neural network newly acquired in this way is shown in Fig. 11. Fig. 11 is a functional block diagram showing an example of the configuration of a neural network newly acquired according to the third embodiment. In the neural network of Fig. 11, a feature amount 1001B generated without executing the redundant attention process 1011 of the original neural network of Fig. 10 is propagated within the network. The new neural network acquired in the above manner is trained in the same manner as in the first embodiment.
[0117] In this way, in the third embodiment, activity determination was performed on a plurality of different image quality evaluation images. This makes it possible to obtain a neural network that performs attention processing only on features that are effective for at least one image quality evaluation item. It is then possible to obtain a neural network that suppresses a decrease in the speed of attention processing while improving image quality for image quality items that are desired to be emphasized.
[0118] Although the present invention has been described in detail based on the preferred embodiment, the present invention is not limited to the above embodiment, and various modifications are possible based on the spirit of the present invention, and are not excluded from the scope of the present invention. The above embodiment includes the following combinations.
[0119] (Configuration 1) An information processing device comprising: an image processing unit that performs image processing by inputting an image quality evaluation image into a first neural network incorporating an attention mechanism that performs high-quality image processing; a detection unit that detects redundant attention mechanisms by determining whether the attention processing weights generated during the image processing process are active or not; a deletion unit that deletes the redundant attention mechanisms detected by the detection unit from the first neural network to acquire a new second neural network; and a learning unit that learns the second neural network.
[0120] (Configuration 2) The information processing device according to configuration 1, wherein the detection unit calculates statistics of the weight value of the attention processing, and determines whether the weight of the attention processing is active or not based on the statistics.
[0121] (Configuration 3) The information processing device according to configuration 1 or 2, wherein the detection unit calculates a variance value of the weight of the attention processing, and determines that the attention processing is not active when the variance value is below a predetermined threshold.
[0122] (Configuration 4) An information processing device described in any one of configurations 1 to 3, characterized in that the detection unit detects as redundant an attention mechanism in which, among the attention processing weights acquired for each attention mechanism when one or more of the image quality evaluation images are given, a large number of inactive attention processing weights are greater than the active attention processing weights.
[0123] (Configuration 5) An information processing device described in any one of configurations 1 to 4, characterized in that the detection unit calculates an average value of the variance of attention processing weights acquired when one or more of the image quality evaluation images are given, and detects as redundant the attention mechanism that generates attention processing weights whose average value is below a predetermined threshold.
[0124] (Configuration 6) An information processing device according to any one of configurations 1 to 5, characterized in that the image quality evaluation image input to the first neural network includes at least one of a frequency chart showing changes in frequency bands in an image, a character chart having characters written in an image, an object image showing a specific object to be improved in image quality, and a color chart having areas divided by color in the image.
[0125] (Configuration 7) An information processing device described in any one of configurations 1 to 6, characterized in that the attention mechanism incorporated into the first neural network includes an attention mechanism that generates weights for spatial directions of input features.
[0126] (Configuration 8) An information processing device described in any one of configurations 1 to 7, characterized in that the attention mechanism incorporated into the first neural network includes an attention mechanism that generates weights for channel directions of input features.
[0127] (Configuration 9) An information processing device described in any one of configurations 1 to 8, characterized in that the detection unit divides the attention processing weights acquired when a frequency chart is provided as an input to the first neural network into regions for each frequency band, and calculates a representative value of the weights for each region.
[0128] (Configuration 10) The information processing device described in configuration 9, wherein the detection unit calculates the difference value of the representative value of the weight between areas divided by frequency band, and determines that the attention processing weight is inactive if the difference value is below a predetermined threshold.
[0129] (Configuration 11) An information processing device described in any one of configurations 1 to 10, characterized in that the detection unit divides the attention processing weights acquired when a character chart or object image is provided as input to a neural network into a character area or object area and a background area, and calculates a representative value of the weights for each of the areas.
[0130] (Configuration 12) The information processing device described in Configuration 11, characterized in that the detection unit calculates the difference value of the representative value of the weight between the character region or the object region and the background region, and determines that the attention processing weight is inactive when the difference value is below a predetermined threshold.
[0131] (Configuration 13) An information processing device described in any one of configurations 1 to 12, characterized in that the detection unit divides areas by color and calculates a representative value of the weighting for each area among the attention processing weightings acquired when a color chart is provided as input to a neural network.
[0132] (Configuration 14) An information processing device described in any one of configurations 1 to 13, wherein the detection unit calculates the difference value of the representative value of the weight between areas divided by color, and determines that the attention processing weight is inactive when the difference value is below a predetermined threshold value.
[0133] (Configuration 15) The information processing device according to any one of configurations 1 to 14, wherein the detection unit detects a redundant attention mechanism based on statistics of the weight of the attention process and a processing speed of the attention process.
[0134] (Configuration 16) An information processing device described in any one of configurations 1 to 15, characterized in that the first and second neural networks have an encoder unit that generates a plurality of features and a decoder unit that restores the plurality of features as an image resulting from a desired image processing execution.
[0135] (Configuration 17) An information processing device described in any one of configurations 1 to 16, characterized in that the first and second neural networks have an encoder unit that generates features at multiple resolutions, and a decoder unit that restores the features at multiple resolutions as an image resulting from a desired image processing operation.
[0136] (Configuration 18) An information processing device described in any one of configurations 1 to 17, characterized in that the detection unit performs activity judgment of the weights of multiple types of attention processing, and detects an attention mechanism that is judged to be inactive by any of the activity judgment methods as a redundant attention mechanism.
[0137] (Configuration 19) The information processing device according to any one of configurations 1 to 18, wherein the first and second neural networks, when receiving an image having noise, output an image from which noise has been removed.
[0138] (Configuration 20) The information processing device according to any one of configurations 1 to 19, wherein the first and second neural networks output a high-resolution image when an image is input.
[0139] (Method) An information processing method comprising: an image processing step of inputting an image quality evaluation image into a first neural network incorporating an attention mechanism that performs high-quality image processing to perform image processing; a detection step of detecting a redundant attention mechanism by determining whether the attention processing weight generated during the image processing step is active or not; a deletion step of deleting the redundant attention mechanism detected by the detection step from the first neural network to obtain a new second neural network; and a learning step of learning the second neural network.
[0140] (Program) A computer program for controlling each unit of the information processing device according to any one of configurations 1 to 20 by a computer.
[0141] In order to realize a part or all of the control in the above-mentioned embodiment, a computer program that realizes the functions of the above-mentioned embodiment may be supplied to an information processing device or the like via a network or various storage media. Then, a computer (or a CPU, MPU, or the like) in the information processing device or the like may read and execute the program. In this case, the program and the storage medium storing the program constitute the present invention. [Explanation of symbols]
[0142] 100: Information processing device 110: Database Department 111: Image processing unit 113: Detection unit 114: Deletion section 115: Learning Department 116: Model memory section 112: Processing result storage unit
Claims
1. an image processing unit that performs image processing by inputting an image quality evaluation image into a first neural network incorporating an attention mechanism that performs image quality improvement image processing; a detection unit that detects a redundant attention mechanism by determining whether or not the weight of the attention process generated during the image processing is active; a deletion unit that deletes the redundant attention mechanisms detected by the detection unit from the first neural network to obtain a new second neural network; a learning unit that learns the second neural network; An information processing device comprising:
2. The information processing apparatus according to claim 1 , wherein the detection unit calculates statistics of the weight value of the attention processing, and determines whether the weight of the attention processing is active or not based on the statistics.
3. The information processing apparatus according to claim 1 , wherein the detection unit calculates a variance value of the weight of the attention process, and determines that the attention process is not active when the variance value is equal to or smaller than a predetermined threshold value.
4. The information processing device described in claim 1, characterized in that the detection unit detects as redundant an attention mechanism in which, among the attention processing weights acquired for each attention mechanism when one or more of the image quality evaluation images are given, a large number of inactive attention processing weights are greater than the active attention processing weights.
5. The information processing device described in claim 1, characterized in that the detection unit calculates an average value of the variance of attention processing weights acquired when one or more of the image quality evaluation images are given, and detects as redundant the attention mechanism that generates attention processing weights whose average value is below a predetermined threshold.
6. The information processing device according to claim 1, characterized in that the image quality evaluation image input to the first neural network includes at least one of a frequency chart showing changes in frequency bands in an image, a character chart having characters written in an image, an object image showing a specific object to be improved in image quality, and a color chart having areas divided by color in the image.
7. 2 . The information processing apparatus according to claim 1 , wherein the attention mechanism incorporated in the first neural network includes an attention mechanism that generates weights for spatial directions of input features.
8. 2 . The information processing apparatus according to claim 1 , wherein the attention mechanism incorporated in the first neural network includes an attention mechanism that generates weights for channel directions of input features.
9. The information processing device according to claim 1, characterized in that the detection unit divides the attention processing weights acquired when a frequency chart is provided as an input to the first neural network into regions for each frequency band and calculates a representative value of the weights for each region.
10. The information processing device according to claim 9, characterized in that the detection unit calculates a difference value of the representative value of the weight between areas divided by frequency band, and determines that the attention processing weight is inactive if the difference value is equal to or less than a predetermined threshold.
11. The information processing device according to claim 1, characterized in that the detection unit divides the attention processing weights acquired when a character chart or an object image is provided as an input to a neural network into a character region or object region and a background region, and calculates a representative value of the weights for each of the regions.
12. The information processing device according to claim 11, characterized in that the detection unit calculates a difference value of the representative value of the weight between the character region or the object region and the background region, and determines that the attention processing weight is inactive when the difference value is equal to or less than a predetermined threshold.
13. The information processing device according to claim 1, characterized in that the detection unit divides areas by color and calculates a representative value of the weighting for each area from the attention processing weighting acquired when a color chart is provided as an input to a neural network.
14. The information processing device according to claim 1 , wherein the detection unit calculates a difference value of the representative value of the weight between the regions divided by color, and determines that the attention processing weight is inactive when the difference value is equal to or smaller than a predetermined threshold value.
15. 2 . The information processing apparatus according to claim 1 , wherein the detection unit detects a redundant attention mechanism based on a statistical amount of a weight of the attention process and a processing speed of the attention process.
16. 2. The information processing apparatus according to claim 1, wherein the first and second neural networks each have an encoder unit that generates a plurality of feature quantities and a decoder unit that restores the plurality of feature quantities as an image resulting from a desired image processing operation.
17. 2. The information processing device according to claim 1, wherein the first and second neural networks have an encoder unit that generates features at multiple resolutions, and a decoder unit that restores the features at multiple resolutions as an image resulting from a desired image processing operation.
18. The information processing device according to claim 1 , characterized in that the detection unit performs an activity determination of weights of multiple types of attention processing, and detects an attention mechanism that is determined to be inactive by any of the activity determination methods as a redundant attention mechanism.
19. 2. The information processing apparatus according to claim 1, wherein the first and second neural networks, when receiving a noisy image, output an image from which noise has been removed.
20. 2. The information processing apparatus according to claim 1, wherein the first and second neural networks receive an input image and output an image with a high resolution.
21. an image processing step of inputting an image quality evaluation image to a first neural network incorporating an attention mechanism for performing image quality improvement image processing, and performing image processing; a detection step of detecting a redundant attention mechanism by determining whether the attention processing weights generated during the image processing step are active; a deletion step of deleting the redundant attention mechanisms detected by the detection step from the first neural network to obtain a new second neural network; a training step of training the second neural network; 13. An information processing method comprising:
22. A computer program for controlling each unit of the information processing device according to any one of claims 1 to 20 by a computer.
Citation Information
Patent Citations
Neural network pruning device, information processor, neural network pruning method and program
JP2019212206A
