Image processing device, image processing method, and program

By generating a second mask based on a first mask and resolution for each convolutional layer, the image processing device reduces redundant mask generation, improving the efficiency of sparse neural networks by sharing masks across layers.

JP2024126912APending Publication Date: 2024-09-20NEC CORP

Patent Information

Application Number
JP2023035664
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-08
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing sparse neural networks generate overhead due to mask generation and regeneration for each convolutional layer, leading to inefficient execution speed and significant calculation overhead.

Method used

An image processing device that generates a second mask based on a first mask and resolution for each convolutional layer of a second convolutional neural network, distributing this mask across multiple layers to reduce redundant mask generation processes.

Benefits of technology

This approach reduces the overall calculation load in sparse neural networks by sharing masks across convolutional layers, thereby enhancing execution speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024126912000001
    Figure 2024126912000001
Patent Text Reader

Abstract

To reduce the amount of calculation required for a neural network.SOLUTION: The image processing device has a first mask generation unit that generates a first mask on the basis of a difference between a first frame image and a second frame image or a difference between a first output feature map output from a first convolution layer of a first convolutional neural network that processes a first frame image and a second output feature map output from a first convolution layer of a second convolutional neural network that processes a second frame image and a second mask generation unit that generates a second mask for each resolution on the basis of the resolution used in the first mask and the second convolution neural network's convolution layer, respectively, and a second mask distribution unit that distributes the second mask to the convolution layers of the second convolutional neural network on the basis of the resolution used in the convolution layers of the second convolutional neural network.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to an image processing device, an image processing method, and a program that use a neural network. [Background technology]

[0002] Models that recognize the behavior of objects from videos use neural networks (NNs) to perform processes such as object recognition, pose estimation, etc. However, neural networks require a huge amount of calculations, so it is inefficient to perform processes such as object recognition and pose estimation for each frame image.

[0003] Therefore, sparse neural networks have been proposed as a method to reduce the amount of calculations in neural networks. Sparse neural networks reduce the amount of calculations in the convolution layer by calculating only the difference between two consecutive frames (areas with differences: important areas). Specifically, in sparse neural networks, a mask is generated to hide areas other than the important areas (areas with no differences between frames: non-important areas) each time a calculation is performed in the convolution layer, and the generated mask is used to calculate only the important areas, thereby reducing the amount of calculations.

[0004] As related techniques, Non-Patent Documents 1 and 2 disclose activation sparse neural networks that use differentials. Non-Patent Document 1 discloses DeltaCNN (Convolutional Neural Networks) that masks input feature maps. Non-Patent Document 2 discloses Skip-Convolutions that masks output feature maps. [Prior art documents] [Non-patent literature]

[0005] [Non-Patent Document 1] Mathias Parger, Chengcheng Tang, Christopher D. Twigg, Cem Keskin, Robert Wang, Markus Steinberger, “DeltaCNN: End-to-End CNN Inference of Sparse Frame Differences in Videos”, Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2022, [online], Submitted on 8 Mar 2022, arXiv Computer Science > Computer Vision and Pattern Recognition, [Retrieved 2023-02-06], Internet<URL:https: / / arxiv.org / abs / 2203.03996> [Non-Patent Document 2] Amirhossein Habibian Davide Abati Taco S. Cohen Babak Ehteshami Bejnordi, “Skip-Convolutions for Efficient Video Processing”, Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2021, [online], Submitted on 23 Apr 2021, arXiv Computer Science > Computer Vision and Pattern Recognition, [Retrieved 2023-02-06], Internet<URL:https: / / arxiv.org / abs / 2104.11487> Summary of the Invention [Problem to be solved by the invention]

[0006] However, in the above-mentioned technology, since a mask is generated for each convolutional layer, overhead occurs due to the generation of the mask. That is, when regenerating a mask, differential processing, threshold processing, etc. are performed, which reduces the execution speed. Also, index calculation, etc. are required every time a mask is regenerated. Furthermore, since the mask is different for each convolutional layer, a process of recollecting important regions is required.

[0007] In addition, in the DeltaCNN of Non-Patent Document 1, the influence of the important region increases with each layer, so it is necessary to regenerate the important region after the convolution process. In addition, in the Skip-Convolutions of Non-Patent Document 2, the important region does not increase monotonically, but the mask is regenerated, which causes overhead.

[0008] One example of a goal of the present disclosure is to reduce the computational complexity of neural networks. [Means for solving the problem]

[0009] In order to achieve the above object, an image processing device according to one aspect of the present disclosure includes: a first mask generating unit that generates a first mask based on a difference between a first frame image and a second frame image, or a difference between a first output feature map output from a first convolutional layer of a first convolutional neural network that processes the first frame image and a second output feature map output from a first convolutional layer of a second convolutional neural network that processes the second frame image; a second mask generation unit that generates a second mask for each resolution based on the first mask and each resolution used in a convolution layer of the second convolutional neural network; a second mask distribution unit that distributes the second mask to a convolution layer of the second convolution neural network based on the resolution used in the convolution layer of the second convolution neural network; The present invention is characterized by having the following.

[0010] In order to achieve the above object, an image processing method according to one aspect of the present disclosure includes: The computer generating a first mask based on a difference between a first frame image and a second frame image, or a difference between a first output feature map output from a first convolutional layer of a first convolutional neural network that processes the first frame image and a second output feature map output from a first convolutional layer of a second convolutional neural network that processes the second frame image; generating a second mask for each of the resolutions based on the first mask and each of the resolutions used in the convolutional layer of the second convolutional neural network; Distributing the second mask to a convolutional layer of the second convolutional neural network based on the resolution utilized in the convolutional layer of the second convolutional neural network. It is characterized by:

[0011] Furthermore, in order to achieve the above object, a program according to one aspect of the present disclosure includes: On the computer, generating a first mask based on a difference between a first frame image and a second frame image, or a difference between a first output feature map output from a first convolutional layer of a first convolutional neural network that processes the first frame image and a second output feature map output from a first convolutional layer of a second convolutional neural network that processes the second frame image; generating a second mask for each resolution based on the first mask and each resolution used in a convolutional layer of the second convolutional neural network; Distributing the second mask to a convolutional layer of the second convolutional neural network based on the resolution utilized in the convolutional layer of the second convolutional neural network. It is characterized by: Effect of the Invention

[0012] As described above, according to the present disclosure, the amount of calculations in a neural network can be reduced. [Brief description of the drawings]

[0013] [Figure 1] FIG. 1 is a diagram for explaining the operation of a convolutional neural network (CNN). [Diagram 2] FIG. 2 is a diagram for explaining the operation of Sparse CNN (SCNN). [Diagram 3] FIG. 3 is a diagram illustrating an example of the image processing device 100. As shown in FIG. [Figure 4] FIG. 4 is a diagram for explaining an example of the image processing device 100a. [Diagram 5] FIG. 5 is a diagram showing an example of a system including the image processing device 100. As shown in FIG. [Figure 6] FIG. 6 is a diagram showing an example of a system including an image processing device 100a. [Figure 7] FIG. 7 is a diagram for explaining an example of the operation of the image processing device. [Figure 8] FIG. 8 is a diagram illustrating an example of a computer that realizes the image processing device according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] First, an overview will be given to facilitate understanding of the embodiments described below. Fig. 1 is a diagram for explaining the operation of a convolutional neural network (CNN), and Fig. 2 is a diagram for explaining the operation of a sparse CNN (SCNN).

[0015] - Explain behavior recognition processing using CNN. In the behavior recognition process using CNN shown in Fig. 1, each time a frame image is acquired, the acquired frame image is input into a model for behavior recognition process (processing including object recognition process, posture estimation process, etc.) to obtain the result of the behavior recognition process (inference result). In the example of Fig. 1, when a frame image 11 is acquired at time t1 and input into the CNN, convolution processes 21 to 2n are executed in sequence to obtain the result of the behavior recognition process for the frame image 11. Here, n is an integer of 2 or more.

[0016] Also, at time t2 (after time t1), a frame image 12 is acquired and input to the CNN, where convolution processes 21 to 2n are executed in sequence to obtain the result of behavior recognition processing from the frame image 12.

[0017] However, since the behavior recognition process is performed for each frame image, the amount of calculation required is enormous, which is inefficient. For example, the posture estimation process alone requires more than 100 million product-sum operations for one frame image.

[0018] - Explain behavior recognition processing using SCNN. In the behavior recognition process using SCNN shown in FIG. 2, a frame image 11 is acquired at time t1, the acquired frame image 11 is input to a model, and convolution process 21 to convolution process 2n are executed in sequence.

[0019] Next, when frame image 12 is acquired at time t2 (a time after time t1), a difference between frame image 11 and frame image 12 is detected by mask generation processing 31, and a mask is generated based on the difference.

[0020] The difference is information that represents the difference in pixel values ​​of pixels at the same position between frame image 11 and frame image 12. The mask is information that represents parts that have changed between frame image 11 and frame image 12 (difference: important area) and parts that have not changed (non-important area). Note that the mask is applied to frame images from time t2 onwards and the output feature map of the convolution layer.

[0021] Next, the convolution process 21a applies the generated mask to the frame image 12 acquired at time t2, and executes the convolution process only on the important region. Note that for non-important regions, the processing result of the convolution process 21 is used, so the amount of calculation can be reduced. Thereafter, the convolution process 21a generates an output feature map of the first layer (information input to the convolution process 22a: input feature map of the second layer) using the processing results of the important region and the non-important region.

[0022] In addition, for the mask generation process 32 and the convolution process 22a to the mask generation process 3n and the convolution process 2na, the same processes as the mask generation process 31 and the convolution process 21a are sequentially executed. In addition, for the frame images acquired after time t2, the process is executed for each frame image as described above.

[0023] However, in SCNN, the masking process is performed for each convolutional layer for each frame image acquired after time t2, which is inefficient. Specifically, the masking process involves subtraction, thresholding, etc., which significantly degrades the execution speed.

[0024] In addition, index calculations are required each time the mask is regenerated. An index is an index of the spatial position of an important region ({(x1, y1), (x2, y2), …, (xn, yn)}). Xi is the x coordinate of the important region at the i-th pixel, and yi is the y coordinate of the important region at the i-th pixel. In index calculation, when multiplying the weight parameters and the important region, the index is referenced to select the correct weight parameters. Furthermore, since the mask is different for each convolutional layer, a process of recollecting the important regions is required. Therefore, even in SCNN, the amount of calculation is enormous, making it inefficient.

[0025] Through this process, the inventors discovered a problem that the above-mentioned methods cannot reduce the amount of calculations required for SCNN, and came up with a means for solving this problem.

[0026] That is, the inventor has derived a means to reduce the amount of calculation for mask processing. As a result, the amount of calculation for SCNN can be reduced.

[0027] Hereinafter, an embodiment will be described with reference to the drawings. In the drawings described below, elements having the same or corresponding functions are denoted by the same reference numerals, and repeated description thereof may be omitted.

[0028] (Embodiment) The configuration of an image processing device in an embodiment will be described with reference to Fig. 1. Fig. 3 is a diagram for explaining an example of an image processing device 100. Fig. 4 is a diagram for explaining an example of an image processing device 100a.

[0029] [Device configuration] The image processing devices 100 and 100a shown in Figures 3 and 4 are devices that can reduce the amount of calculation of a neural network. The image processing device 100 shown in Figure 3 has a first CNN 20 and an SCNN 40. The SCNN 40 has a mask processing unit 50 and a second CNN 20a. The image processing device 100a shown in Figure 4 has a first CNN 20 and an SCNN 40a. The SCNN 40a has a mask processing unit 50 and a second CNN 20b.

[0030] The image processing device 100 (the example shown in FIG. 3) will now be described. When the first CNN 20 acquires the frame image 11 at time t1, it sequentially executes convolution processes 21 to 2n and outputs an inference result for the frame image 11 (first frame image). Note that n is an integer equal to or greater than 2. Also, in the example of FIG. 3, only the convolution processes 21 to 2n are described, but in reality, the first CNN 20 also has layers such as a pooling layer.

[0031] The mask processing unit 50 has a first mask generation unit 51, a second mask generation unit 52, and a second mask distribution unit 53. As shown in Fig. 3, the first mask generation unit 51 generates a first mask based on the difference between a frame image 11 acquired at time t1 and a frame image 12 (second frame image) acquired at time t2.

[0032] The second mask generation unit 52 generates a second mask for each resolution based on the first mask and each resolution used in the convolution layer of the second CNN 20a.

[0033] The second mask distribution unit 53 distributes the second mask to the convolutional layer of the second CNN 20a based on the resolution used in the convolutional layer of the second CNN 20a.

[0034] In the example of FIG. 3, the second CNN 20a applies a second mask, sequentially executes convolution processes 21a to 2na only on the important region, and outputs an inference result for the frame image 12 (second frame image). Note that n is an integer equal to or greater than 2. Also, in the example of FIG. 3, only the convolution processes 21a to 2na are described, but in reality, the second CNN 20a also has layers such as a pooling layer.

[0035] For frame images acquired after time t2, a second mask is generated using the currently acquired frame image and previously acquired frame images, and the processing is carried out as described above.

[0036] The image processing device 100a (the example in FIG. 4) will now be described. When the first CNN 20 acquires the frame image 11 at time t1, it sequentially executes convolution processes 21 to 2n and outputs an inference result for the frame image 11 (first frame image). Note that n is an integer equal to or greater than 2. Also, in the example of FIG. 4, only the convolution processes 21 to 2n are described, but in reality, the first CNN 20 also has a pooling layer and the like.

[0037] As shown in FIG. 4, the first mask generation unit 51 generates a first mask based on the difference between a first output feature map output from the first layer of the first CNN 20 corresponding to the frame image 11 and a second output feature map output from the first layer of the second CNN 20a corresponding to the frame image 12.

[0038] In the example of FIG. 4, the second CNN 20b first executes the convolution process 21 without applying the second mask. Then, the second mask is applied, and convolution processes 22a to 2na are sequentially executed only on the important region, and an inference result for the frame image 12 (second frame image) is output. Note that n is an integer equal to or greater than 2. Also, in the example of FIG. 4, only the convolution processes 21, 22a to 2na are described, but in reality, the second CNN 20b also has layers such as a pooling layer.

[0039] For frame images acquired after time t2, a second mask is generated using the currently acquired frame image and previously acquired frame images, and the processing is carried out as described above.

[0040] In this way, in the embodiment, the second mask is shared and used by multiple convolution layers, so that the mask generation process that was conventionally performed for each convolution layer can be reduced. In other words, the overhead caused by the mask generation process can be reduced. Therefore, the amount of calculation of SCNN can be reduced.

[0041] [System Configuration] The configuration of the image processing device in the embodiment will be described more specifically with reference to Figures 5 and 6. Figure 5 is a diagram showing an example of a system including an image processing device 100. Figure 6 is a diagram showing an example of a system including an image processing device 100a.

[0042] The system shown in Fig. 5 includes an image processing device 100 and a storage device 200. The image processing device 100 and the storage device 200 are connected via a network. The system shown in Fig. 6 includes an image processing device 100a and a storage device 200a. The image processing device 100a and the storage device 200a are connected via a network.

[0043] The network is a general network constructed using communication lines such as the Internet, a LAN (Local Area Network), a dedicated line, a telephone line, an in-house network, a mobile communication network, Bluetooth (registered trademark), and WiFi (Wireless Fidelity).

[0044] The image processing devices 100 and 100a are, for example, information processing devices such as a CPU (Central Processing Unit), a programmable device such as an FPGA (Field-Programmable Gate Array), a GPU (Graphics Processing Unit), or a circuit equipped with any one or more of these, a server computer, a personal computer, a mobile terminal, or the like.

[0045] The image processing device 100 includes a first CNN 20, a mask processing unit 50, and a second CNN 20a. The first CNN 20 and the second CNN 20a have already been described, so the description of the first CNN 20 and the second CNN 20a will be omitted.

[0046] The image processing device 100a also includes a first CNN 20, a mask processing unit 50, and a second CNN 20b. The first CNN 20 and the second CNN 20b have already been described, and therefore the description of the first CNN 20 and the second CNN 20b will be omitted.

[0047] The storage devices 200 and 200a are databases, server computers, circuits having memory, and the like.

[0048] The storage device 200 in Fig. 5 stores at least the learned parameters 60 of the first CNN 20 and the second CNN 20a, the first CNN structure information 70 representing the structure of the first CNN 20, and the second CNN structure information 80 representing the structure of the second CNN 20a. In the example in Fig. 5, the storage device 200 is provided outside the image processing device 100, but may be provided inside the image processing device 100. The storage device 200 may also be composed of multiple storage devices.

[0049] The storage device 200a in Fig. 6 stores at least the learned parameters 60a of the first CNN 20 and the second CNN 20b, the first CNN structure information 70a representing the structure of the first CNN 20, and the second CNN structure information 80a representing the structure of the second CNN 20b. In the example of Fig. 6, the storage device 200a is provided outside the image processing device 100a, but may be provided inside the image processing device 100a. The storage device 200a may also be composed of multiple storage devices.

[0050] The mask processing unit 50 has a first mask generation unit 51, a second mask generation unit 52, and a second mask distribution unit 53. The first mask generation unit 51 has a preprocessing unit 54, a difference processing unit 55, and a threshold processing unit 56.

[0051] The first mask generation unit 51 will now be described. The pre-processing unit 54 removes noise from the first frame image and the second frame image, or the first output feature map and the second output feature map.

[0052] In the case of the image processing device 100, the pre-processing unit 54 first acquires a first frame image and a second frame image. Next, the pre-processing unit 54 executes blurring processing on the first frame image and the second frame image using a smoothing filter.

[0053] In the case of the image processing device 100a, the pre-processing unit 54 first acquires a first output feature map and a second output feature map, and then performs blurring processing on the first output feature map and the second output feature map using a smoothing filter.

[0054] The smoothing filter is, for example, an averaging filter, a Gaussian filter, a median filter, a minimum value filter, etc. However, the blurring process is not limited to a process using a smoothing filter, and any process capable of removing noise may be used.

[0055] Next, the pre-processing unit 54 outputs the first frame image and the second frame image which have been subjected to the blurring process, or the first output feature map and the second output feature map which have been subjected to the blurring process, to the difference processing unit 55.

[0056] The difference processing unit 55 detects the difference between the first and second frame images that have been subjected to the blurring process. In the examples of FIGS. 3 and 5, first, the difference processing unit 55 acquires the first and second frame images that have been subjected to the blurring process. Next, the difference processing unit 55 detects the difference between the first and second frame images that have been subjected to the blurring process. Next, the difference processing unit 55 outputs the detected difference to the threshold processing unit 56.

[0057] The difference between the first and second frame images that have been blurred is information that represents the difference in pixel values ​​for each pixel at the same position in the first and second frame images that have been blurred (e.g., in the case of an absolute difference, an integer greater than or equal to 0).

[0058] Alternatively, the difference processing unit 55 detects a difference between the first output feature map and the second output feature map that have been subjected to the blurring process. In the examples of FIGS. 4 and 6, the difference processing unit 55 first acquires the first output feature map and the second output feature map that have been subjected to the blurring process. Next, the difference processing unit 55 detects a difference between the first output feature map and the second output feature map that have been subjected to the blurring process. Next, the difference processing unit 55 outputs the detected difference to the threshold processing unit 56.

[0059] The difference between the first output feature map and the second output feature map after the blurring process is information that represents the difference in pixel values ​​for each pixel at the same position in the first output feature map and the second output feature map after the blurring process (e.g., an integer greater than or equal to 0 in the case of an absolute difference).

[0060] The threshold processing unit 56 compares the detected difference with a preset threshold to determine whether or not the pixel has changed. Specifically, the threshold processing unit 56 first obtains the detected difference. Next, the threshold processing unit 56 determines whether or not the detected difference is equal to or greater than the threshold. Next, the threshold processing unit 56 generates a first mask in which pixels corresponding to differences equal to or greater than the threshold are defined as important regions and pixels corresponding to differences less than the threshold are defined as unimportant regions.

[0061] The second mask generation unit 52 will now be described. The second mask generation unit 52 generates a second mask for each resolution based on the first mask and the resolution used by the second CNN 20a or the second CNN 20b.

[0062] Specifically, first, the second mask generation unit 52 acquires the resolution of each of the input feature maps used in the second CNN 20a or the second CNN 20b. The resolution is information that indicates the height, width, etc. of the input feature map. The resolution is acquired from the second CNN structure information 80 or 80a, etc.

[0063] Next, the second mask generation unit 52 performs a pooling process on the first mask based on the height and width of each of the obtained resolutions to generate a plurality of second masks corresponding to the resolutions. For the pooling process, for example, maximum pooling, average pooling, etc. are used.

[0064] (Modification) In a modified example, the second mask generation unit 52 generates the second mask based on the changed resolution every time the resolution of the convolution layer changes. That is, instead of generating the second mask for each resolution at once, the second mask may be generated based on the changed resolution every time the resolution changes.

[0065] The second mask distributor 53 will now be described. The second mask distribution unit 53 distributes the second mask to the convolution processes 21a to 2na of the second CNN 20a or the convolution processes 22a to 2na of the second CNN 20b based on the resolution.

[0066] [Device operation] Next, the operation of the image processing device in the embodiment will be described with reference to FIG. 7. FIG. 7 is a diagram for explaining an example of the operation of the image processing device. In the following description, the diagram will be referred to as appropriate. Also, in the embodiment, an image processing method is implemented by operating the image processing device. Therefore, the description of the image processing method in the embodiment will be replaced with the following description of the operation of the image processing device.

[0067] 7, when the image processing device 100 or 100a acquires a frame image (step A1: Yes), it performs preprocessing on the frame image. Here, the preprocessing is, for example, frame extraction, resizing, color conversion, image extraction, rotation, etc. (step A2). When the image processing device 100 or 100a has not acquired a frame image (step A1: No), it waits for the frame image to be input.

[0068] Next, in the image processing device 100 or 100a, if the acquired frame image is the first frame image (step A3: Yes), the first CNN 20 executes processing (step A4).

[0069] Furthermore, if the acquired frame image of the image processing device 100 or 100a is the second frame image (step A3: No), the first mask generation unit 51 generates a first mask based on the difference between the first frame image and the second frame image (step A5).

[0070] Specifically, in step A5, first, the pre-processing unit 54 removes noise from the first frame image and the second frame image, or the first output feature map and the second output feature map.

[0071] In the case of the image processing device 100, the pre-processing unit 54 first acquires a first frame image and a second frame image. Next, in step A5, the pre-processing unit 54 performs blurring processing on the first frame image and the second frame image using a smoothing filter. Next, in step A5, the pre-processing unit 54 outputs the first frame image and the second frame image that have been subjected to the blurring processing to the difference processing unit 55.

[0072] In the case of the image processing device 100a, the pre-processing unit 54 first acquires a first output feature map and a second output feature map. Next, in step A5, the pre-processing unit 54 performs blurring processing on the first output feature map and the second output feature map using a smoothing filter. Next, in step A5, the pre-processing unit 54 outputs the first output feature map and the second output feature map that have been subjected to the blurring processing to the difference processing unit 55.

[0073] Next, in step A5, the difference processor 55 detects the difference between the first and second frame images that have been subjected to the blurring process.

[0074] In the case of the image processing device 100, the difference processing unit 55 first acquires the first and second frame images that have been subjected to the blurring process. Next, the difference processing unit 55 detects the difference between the first and second frame images that have been subjected to the blurring process. Next, the difference processing unit 55 outputs the detected difference to the threshold processing unit 56.

[0075] In the case of the image processing device 100a, the difference processing unit 55 first acquires the first output feature map and the second output feature map that have been subjected to the blurring process. Next, the difference processing unit 55 detects the difference between the first output feature map and the second output feature map that have been subjected to the blurring process. Next, the difference processing unit 55 outputs the detected difference to the threshold processing unit 56.

[0076] Next, in step A5, the threshold processing section 56 compares the detected difference with a preset threshold value to determine whether or not the pixel has changed.

[0077] Specifically, the threshold processing unit 56 first obtains the detected difference. 6 determines whether the detected difference is equal to or greater than a threshold value. Next, threshold processing unit 56 generates a first mask in which pixels corresponding to differences equal to or greater than the threshold value are designated as important regions and pixels corresponding to differences less than the threshold value are designated as unimportant regions.

[0078] Next, the second mask generation unit 52 generates a second mask for each resolution based on the first mask and each resolution used in the convolution layer of the second CNN 20a (step A6).

[0079] Specifically, in step A6, the second mask generating unit 52 first obtains the resolution of each of the input feature maps used in the second CNN 20a or the second CNN 20b.

[0080] Next, in step A6, the second mask generation unit 52 performs a pooling process on the first mask based on the height and width of each of the acquired resolutions, to generate a plurality of second masks corresponding to the resolutions.

[0081] Next, the second mask distribution unit 53 distributes the second mask to the convolution layer of the second CNN 20a based on the resolution used in the convolution layer of the second CNN 20a (step A7).

[0082] Specifically, in step A7, the second mask distribution unit 53 distributes the second mask to the convolution processes 21a to 2na of the second CNN 20a or the convolution processes 22a to 2na of the second CNN 20b based on the resolution.

[0083] Next, in the image processing device 100 or 100a, the second CNN 20a executes the process in the case of the image processing device 100, and the second CNN 20b executes the process in the case of the image processing device 100a (step A8).

[0084] In this manner, the image processing device 100 or 100a repeatedly executes the processes from steps A1 to A8.

[0085] [Effects of the embodiment] As described above, according to the embodiment, the second mask is shared and used by multiple convolution layers, so that the mask generation process that was conventionally performed for each convolution layer can be reduced. In other words, the overhead caused by the mask generation process can be reduced. Therefore, the amount of calculation of SCNN can be reduced.

[0086] [program] The program in the embodiment may be a program that causes a computer to execute steps A1 to A8 shown in Fig. 7. By installing and executing this program in a computer, the image processing device and image processing method in the embodiment can be realized. In this case, the processor of the computer functions as the first CNN 20, the mask processing unit 50 (first mask generation unit 51 (preprocessing unit 54, difference processing unit 55, threshold processing unit 56), second mask generation unit 52, second mask distribution unit 53, second CNN 20a), and the second CNN 20a or 20b to perform processing.

[0087] The program in the embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as either the first CNN 20, the mask processing unit 50 (the first mask generating unit 51 (the preprocessing unit 54, the difference processing unit 55, the threshold processing unit 56), the second mask generating unit 52, the second mask distributing unit 53, the second CNN 20a), or the second CNN 20a or 20b.

[0088] [Physical configuration] Here, a computer that realizes an image processing device by executing a program in the embodiment will be described with reference to Fig. 8. Fig. 8 is a diagram for explaining an example of a computer that realizes an image processing device in the embodiment.

[0089] 8, the computer 110 includes a CPU 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader / writer 116, and a communication interface 117. These components are connected to each other via a bus 121 so as to be able to communicate data with each other. Note that the computer 110 may include a GPU or an FPGA in addition to the CPU 111 or instead of the CPU 111.

[0090] The CPU 111 loads a program in the embodiment, which is composed of a group of codes and is stored in the storage device 113, into the main memory 112, and executes each code in a predetermined order to perform various calculations. The main memory 112 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory).

[0091] Moreover, the program in the embodiment is provided in a state stored in a computer-readable recording medium 120. Note that the program in the embodiment may be distributed on the Internet connected via the communication interface 117.

[0092] Specific examples of the storage device 113 include a hard disk drive and a semiconductor storage device such as a flash memory. The input interface 114 mediates data transmission between the CPU 111 and input devices 118 such as a keyboard and a mouse. The display controller 115 is connected to a display device 119 and controls the display on the display device 119.

[0093] Data reader / writer 116 mediates data transmission between CPU 111 and recording medium 120, reads programs from recording medium 120, and writes processing results in computer 110 to recording medium 120. Communication interface 117 mediates data transmission between CPU 111 and other computers.

[0094] Specific examples of recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash (registered trademark)) and SD (Secure Digital), magnetic recording media such as a flexible disk, or optical recording media such as a CD-ROM (Compact Disk Read Only Memory).

[0095] In addition, the image processing device 100, 100a in the embodiment can be realized by using hardware corresponding to each part, for example, electronic circuit, instead of a computer with a program installed. Furthermore, the image processing device 100, 100a may be realized in part by a program and the remaining part by hardware. In the embodiment, the computer is not limited to the computer shown in FIG. 8.

[0096] Although the invention has been described above with reference to the embodiments, the invention is not limited to the above-described embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the invention within the scope of the invention. [Industrial Applicability]

[0097] According to the above description, the amount of calculation required for a convolutional neural network can be reduced, and the present invention is useful in fields where a convolutional neural network is required. [Explanation of symbols]

[0098] 20 First CNN 21, 22, 2n convolution processing 20a, 20b Second CNN 21a, 22a, 2na Convolution processing 40, 40a SCNN 50 Mask processing section 51 First mask generator 52 Second mask generator 53 Second Mask Distribution Section 54 Pretreatment section 55 Differential Processing Unit 56 Threshold processing section 100, 100a Image processing device 200, 200a storage device 110 Computer 111 CPU 112 Main memory 113 Storage device 114 Input Interface 115 Display Controller 116 Data Reader / Writer 117 Communication Interface 118 Input Devices 119 Display device 120 Recording media 121 Bus

Claims

1. a first mask generating means for generating a first mask based on a difference between a first frame image and a second frame image, or a difference between a first output feature map output from a first convolutional layer of a first convolutional neural network that processes the first frame image and a second output feature map output from a first convolutional layer of a second convolutional neural network that processes the second frame image; A second mask generating means for generating a second mask for each resolution based on the first mask and each resolution used in a convolutional layer of the second convolutional neural network; a second mask distribution means for distributing the second mask to a convolutional layer of the second convolutional neural network based on the resolution used in the convolutional layer of the second convolutional neural network; An image processing device comprising:

2. The second mask generating means performs a pooling process on the first mask to generate the second mask. The image processing device according to claim 1 .

3. The second mask generation means generates the second mask based on the changed resolution every time the resolution of the convolution layer is changed. The image processing device according to claim 1 .

4. The image processing device further includes a pre-processing unit for performing a blurring process on the first frame image and the second frame image, or the first output feature map and the second output feature map, to remove noise. The image processing device according to claim 1 .

5. The computer a first mask generating step of generating a first mask based on a difference between a first frame image and a second frame image, or a difference between a first output feature map output from a first convolutional layer of a first convolutional neural network that processes the first frame image and a second output feature map output from a first convolutional layer of a second convolutional neural network that processes the second frame image; a second mask generation step of generating a second mask for each of the resolutions based on the first mask and each of the resolutions used in the convolutional layer of the second convolutional neural network; a second mask distribution step of distributing the second mask to a convolutional layer of the second convolutional neural network based on the resolution used in the convolutional layer of the second convolutional neural network; An image processing method that performs

6. On the computer, a first mask generating step of generating a first mask based on a difference between a first frame image and a second frame image, or a difference between a first output feature map output from a first convolutional layer of a first convolutional neural network that processes the first frame image and a second output feature map output from a first convolutional layer of a second convolutional neural network that processes the second frame image; a second mask generation step of generating a second mask for each of the resolutions based on the first mask and each of the resolutions used in the convolutional layer of the second convolutional neural network; a second mask distribution step of distributing the second mask to a convolutional layer of the second convolutional neural network based on the resolution used in the convolutional layer of the second convolutional neural network; A program that executes the following.

7. The second mask generating step performs a pooling process on the first mask to generate the second mask. The program according to claim 6.

8. The second mask generating step generates the second mask based on the changed resolution every time the resolution of the convolution layer is changed. The program according to claim 6.

9. The computer includes: Further, a pre-processing step is executed to perform a blurring process on the first frame image and the second frame image, or the first output feature map and the second output feature map, thereby removing noise. The program according to claim 6.

Citation Information

Patent Citations

  • Inference engine acceleration for video analytics in computing environments

    US20200074318A1

  • Forward propagation device, learning device, information processing system, processing method, and non-transitory computer-readable medium having program stored thereon

    WO2023026404A1

Cited By

  • Work recognition device, work recognition method, and program

    WO2025177829A1