IP Library Granted Patent US 11,645,357
Granted Patent B2
US 11,645,357 · App. 16/649,306 · Granted May 9, 2023

Convolution operation method and apparatus, computer device, and computer-readable storage medium

Inventor: Yuan Zhang (Zhejiang, CN)
Assignee: Hangzhou Hikvision Digital Technology Co., Ltd.
G06F17/153G06F7/36G06F18/213G06F18/2163G06N3/08G06N20/10
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,645,357
App. No.
16/649,306
Granted
May 9, 2023
Kind
B2
Abstract

Embodiments of the present application provide a method, an apparatus, a computer device for convolution operation and a computer readable storage medium. The method includes: obtaining input data of a network layer in a convolutional neural work; extracting each time a plurality of data points from the input data according to a preset step size; mapping the plurality of data points extracted each time to the same position at different depth levels of three-dimensional data to obtain rearranged data; and performing convolution operation on the rearranged data with a convolution kernel of a preset size to obtain a convolution result. Through the present solution, the operation efficiency of the convolutional neural network can be improved.

Claims (44)

1. A method for convolution operation, performed by a computer device having a convolution kernel of a preset size, comprising:

obtaining input data of a network layer in a convolutional neural work, wherein the input data is three-dimensional data having a size represented as W×H×I, wherein I is a depth of the input data, and W×H is a data size at each depth level, wherein a size of a convolution kernel for the input data is larger than the preset size;

extracting each time a plurality of data points from the input data according to a preset step size;

mapping the plurality of data points extracted each time to the same position at different depth levels of three-dimensional data to obtain rearranged data such that a size of the input data at each depth level is reduced without changing original volume of the input data, wherein a depth of the rearranged data is larger than a depth of the input data, and a data size of the rearranged data at each depth level is smaller than the data size of the input data at each depth level; the data size of the rearranged data at each depth allows that convolution operation can be performed on the rearranged data by using the convolution kernel of the preset size; and

performing convolution operation on the rearranged data with the convolution kernel of the preset size to obtain a convolution result.

2. The method of claim 1 , wherein, before extracting each time a plurality of data points from the input data according to a preset step size, the method further comprises:

dividing the input data in a depth direction to obtain a plurality of slices;

the operation of extracting each time a plurality of data points from the input data according to a preset step size comprises:

for each slice, extracting each time data points from depth levels of the slice according to the preset step size, to obtain the plurality of data points;

the operation of mapping the plurality of data points extracted each time to the same position at different depth levels in three-dimensional data to obtain rearranged data comprises:

mapping the plurality of data points extracted each time from each slice to the same position at different depth levels in the three-dimensional data to respectively obtain to-be-merged data corresponding to each slice; and

arranging a plurality of to-be-merged data in the depth direction to obtain the rearranged data.

3. The method of claim 1 , wherein extracting each time a plurality of data points from the input data according to a preset step size comprises:

extracting each time, from each depth level of the input data, a plurality of data points according to the preset step size respectively;

the operation of mapping the plurality of data points extracted each time to the same position at different depth levels in three-dimensional data to obtain rearranged data comprises:

mapping the plurality of data points extracted each time from depth levels of the input data to the same position at different depth levels in the three-dimensional data to obtain a plurality of data to be merged; and

arranging a plurality of to-be-merged data in the depth direction to obtain the rearranged data.

4. The method of claim 1 , wherein, mapping the plurality of data points extracted each time to the same position at different depth levels of three-dimensional data to obtain rearranged data comprises:

arranging the plurality of data points extracted each time; and

storing the plurality of data points extracted each time, in an order as they are arranged, to the same position at different depth levels in the three-dimensional data to obtain the rearranged data.

5. An apparatus for convolution operation, the apparatus having a convolution kernel of a preset size, comprising:

an obtaining module, configure for obtaining input data of a network layer in a convolutional neural work, wherein the input data is three-dimensional data having a size represented as W×H×I, wherein I is a depth of the input data, and W×H is a data size at each depth level, wherein a size of a convolution kernel for the input data is larger than the preset size;

an extraction module, configured for extracting each time a plurality of data points from the input data according to a preset step size;

a mapping module, configured for mapping the plurality of data points extracted each time to the same position at different depth levels of three-dimensional data to obtain rearranged data such that a size of the input data at each depth level is reduced without changing original volume of the input data, wherein a depth of the rearranged data is larger than a depth of the input data, and a data size of the rearranged data at each depth level is smaller than the data size of the input data at each depth level; the data size of the rearranged data at each depth allows that convolution operation can be performed on the rearranged data by using the convolution kernel of the preset size; and

an operation module, configured for performing convolution operation on the rearranged data with the convolution kernel of the preset size to obtain a convolution result.

6. The apparatus of claim 5 , further comprising:

a division module, configured for dividing the input data in a depth direction to obtain a plurality of slices;

the extraction module is further configured for:

for each slice, extracting each time data points from depth levels of the slice according to the preset step size, to obtain the plurality of data points;

the mapping module is further configured for:

mapping the plurality of data points extracted each time from each slice to the same position at different depth levels in the three-dimensional data to respectively obtain to-be-merged data corresponding to each slice; and

arranging a plurality of to-be-merged data in the depth direction to obtain the rearranged data.

7. The apparatus of claim 5 , wherein the extraction module is further configured for:

extracting each time, from each depth level of the input data, a plurality of data points according to the preset step size respectively;

the mapping module is further configured for:

mapping the plurality of data points extracted each time from depth levels of the input data to the same position at different depth levels in the three-dimensional data to obtain a plurality of data to be merged; and

arranging a plurality of to-be-merged data in the depth direction to obtain the rearranged data.

8. The apparatus of claim 5 , wherein the extraction module is further configured for:

arranging the plurality of data points extracted each time; and

storing the plurality of data points extracted each time, in an order as they are arranged, to the same position at different depth levels in the three-dimensional data to obtain the rearranged data.

9. A non-transitory computer readable storage medium having executable codes stored thereon which, when executed, performs the method for convolution operation of claim 1 .

10. A computer device, comprising:

a non-transitory computer readable storage medium configured for storing executable codes; and

a processor configured for executing the executable code stored in the computer readable storage medium to perform the method for convolution operation of claim 1 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 20, 2020
From: ZHANG, YUAN
To: HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO., LTD.
Reel/Frame 052177/0132 →
Priority Claims (1)
CN 201710866060.5 · Sep 22, 2017 · national
Continuity (1)
Related Publication 20200265306A1 · Aug 20, 2020
Cited By (1)
US 12,462,528