CN106682736A - Image identification method and apparatus - Google Patents
Image identification method and apparatus Download PDFInfo
- Publication number
- CN106682736A CN106682736A CN201710034836.7A CN201710034836A CN106682736A CN 106682736 A CN106682736 A CN 106682736A CN 201710034836 A CN201710034836 A CN 201710034836A CN 106682736 A CN106682736 A CN 106682736A
- Authority
- CN
- China
- Prior art keywords
- convolutional
- convolution kernel
- group
- convolution
- convolutional neural
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Software Systems (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Image Analysis (AREA)
Abstract
本公开是关于一种图像识别方法及装置。方法包括:将待识别图像输入已训练的第一卷积神经网络,所述第一卷积神经网络包括P组卷积层,每一组卷积层包括两个卷积层,所述两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核;通过所述第一卷积神经网络的每一组卷积层对所述待识别图像进行特征提取,得到所述每一组卷积层的待提取特征;根据所述每一组卷积层的待提取特征确定所述待识别图像的识别结果。本公开提供的技术方案解决了相关技术中采用方形卷积核所导致的计算量大、计算成本高的问题。
The present disclosure relates to an image recognition method and device. The method includes: inputting the image to be recognized into a trained first convolutional neural network, the first convolutional neural network includes P groups of convolutional layers, each group of convolutional layers includes two convolutional layers, and the two The convolution kernels of the convolution layer are respectively the first convolution kernel with a size of 1*N and the second convolution kernel with a size of N*1; through each group of convolution layers of the first convolution neural network pair The image to be recognized is subjected to feature extraction to obtain the features to be extracted of each set of convolutional layers; the recognition result of the image to be recognized is determined according to the features to be extracted of each set of convolutional layers. The technical solution provided by the present disclosure solves the problems of large calculation amount and high calculation cost caused by adopting a square convolution kernel in the related art.
Description
技术领域technical field
本公开涉及卷积技术领域,尤其涉及一种图像识别方法及装置。The present disclosure relates to the field of convolution technology, in particular to an image recognition method and device.
背景技术Background technique
卷积神经网络(Convolutional Neural Network,CNN)是一种高效的图像识别方法。在CNN中,图像经过一系列的卷积层、激活层、池化层、全连接层的特征提取和处理,得到待识别图像的识别结果。相关技术中,卷积层的计算原理为使用一个方形卷积核以滑动窗口的形式在输入的矩形区域上滑动,每滑动到一个新的位置,就计算卷积核与该位置的值的乘积,方形卷积核的计算量是O(N2),计算量比较大,计算成本较高。Convolutional Neural Network (CNN) is an efficient image recognition method. In CNN, the image undergoes a series of feature extraction and processing of convolutional layers, activation layers, pooling layers, and fully connected layers to obtain the recognition result of the image to be recognized. In related technologies, the calculation principle of the convolution layer is to use a square convolution kernel to slide on the input rectangular area in the form of a sliding window, and calculate the product of the convolution kernel and the value of the position every time it slides to a new position , the calculation amount of the square convolution kernel is O(N 2 ), the calculation amount is relatively large, and the calculation cost is relatively high.
发明内容Contents of the invention
为克服相关技术中存在的问题,本公开实施例提供一种图像识别方法及装置,用以减小卷积的计算量,降低计算成本。In order to overcome the problems existing in the related technologies, the embodiments of the present disclosure provide an image recognition method and device, which are used to reduce the calculation amount of convolution and reduce the calculation cost.
根据本公开实施例的第一方面,提供一种图像识别方法,可包括:According to a first aspect of an embodiment of the present disclosure, an image recognition method is provided, which may include:
将待识别图像输入已训练的第一卷积神经网络,所述第一卷积神经网络包括P组卷积层,每一组卷积层包括两个卷积层,所述两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核;Input the image to be identified into the trained first convolutional neural network, the first convolutional neural network includes P groups of convolutional layers, each group of convolutional layers includes two convolutional layers, and the two convolutional layers The convolution kernels are the first convolution kernel with a size of 1*N and the second convolution kernel with a size of N*1;
通过所述第一卷积神经网络的每一组卷积层对所述待识别图像进行特征提取,得到所述每一组卷积层的待提取特征;Carrying out feature extraction on the image to be identified through each group of convolutional layers of the first convolutional neural network to obtain the features to be extracted of each group of convolutional layers;
根据所述每一组卷积层的待提取特征确定所述待识别图像的识别结果。The recognition result of the image to be recognized is determined according to the features to be extracted of each group of convolutional layers.
在一实施例中,方法还包括:In one embodiment, the method also includes:
将第二卷积神经网络中的每一个卷积层分解为所述两个卷积层,得到所述第一卷积神经网络,所述第二卷积神经网络中的每一个卷积层包括一个方形卷积核。Each convolutional layer in the second convolutional neural network is decomposed into the two convolutional layers to obtain the first convolutional neural network, and each convolutional layer in the second convolutional neural network includes A square convolution kernel.
在一实施例中,第二卷积神经网络中的每一个卷积层的卷积核为大小为N*N的方形卷积核,所述第二卷积神经网络包括P个卷积层;In one embodiment, the convolution kernel of each convolution layer in the second convolutional neural network is a square convolution kernel with a size of N*N, and the second convolutional neural network includes P convolutional layers;
所述将第二卷积神经网络中的每一个卷积层分解为所述两个卷积层,包括:The decomposing each convolutional layer in the second convolutional neural network into the two convolutional layers includes:
将所述第二卷积神经网络中每一个卷积层的大小为N*N的方形卷积核分解为大小为1*N的第一卷积核和大小为N*1的第二卷积核,所述第一卷积核与所述第二卷积核的乘积值为所述方形卷积核;Decomposing the square convolution kernel whose size is N*N in each convolutional layer in the second convolutional neural network into a first convolution kernel whose size is 1*N and a second convolution whose size is N*1 Kernel, the product value of the first convolution kernel and the second convolution kernel is the square convolution kernel;
使用所述第一卷积核和所述第二卷积核分别替换所述第二卷积神经网络中对应的卷积层的方形卷积核,得到所述第一卷积神经网络的一组卷积层。Use the first convolution kernel and the second convolution kernel to replace the square convolution kernels of the corresponding convolution layers in the second convolutional neural network to obtain a set of the first convolutional neural network convolutional layer.
在一实施例中,通过所述第一卷积神经网络的每一组卷积层对所述待识别图像进行特征提取,包括:In one embodiment, feature extraction is performed on the image to be recognized through each group of convolutional layers of the first convolutional neural network, including:
利用所述第一卷积神经网络的每一组卷积层中的一个卷积层对输入信息进行特征提取,得到每一组卷积层的待提取特征的中间值;Using a convolutional layer in each group of convolutional layers of the first convolutional neural network to perform feature extraction on the input information, to obtain an intermediate value of the features to be extracted in each group of convolutional layers;
将所述待提取特征的中间值输入所述每一组卷积层中的另一个卷积层进行特征提取,得到每一组卷积层的待提取特征。Inputting the intermediate value of the features to be extracted into another convolution layer in each set of convolution layers for feature extraction, to obtain the features to be extracted of each set of convolution layers.
根据本公开实施例的第二方面,提供一种图像识别装置,可包括:According to a second aspect of an embodiment of the present disclosure, an image recognition device is provided, which may include:
输入模块,被配置为将待识别图像输入已训练的第一卷积神经网络,所述第一卷积神经网络包括P组卷积层,每一组卷积层包括两个卷积层,所述两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核;The input module is configured to input the image to be recognized into the trained first convolutional neural network, the first convolutional neural network includes P groups of convolutional layers, and each group of convolutional layers includes two convolutional layers, so The convolution kernels of the two convolution layers are respectively a first convolution kernel with a size of 1*N and a second convolution kernel with a size of N*1;
特征提取模块,被配置为通过所述第一卷积神经网络的每一组卷积层对所述待识别图像进行特征提取,得到所述每一组卷积层的待提取特征;The feature extraction module is configured to perform feature extraction on the image to be recognized through each set of convolutional layers of the first convolutional neural network, and obtain the features to be extracted of each set of convolutional layers;
确定模块,被配置为根据所述每一组卷积层的待提取特征确定所述待识别图像的识别结果。The determining module is configured to determine the recognition result of the image to be recognized according to the features to be extracted of each set of convolutional layers.
在一实施例中,装置还包括:In one embodiment, the device further includes:
分解模块,被配置为将第二卷积神经网络中的每一个卷积层分解为所述两个卷积层,得到所述第一卷积神经网络,所述第二卷积神经网络中的每一个卷积层包括一个方形卷积核。The decomposition module is configured to decompose each convolutional layer in the second convolutional neural network into the two convolutional layers to obtain the first convolutional neural network and the second convolutional neural network. Each convolution layer includes a square convolution kernel.
在一实施例中,第二卷积神经网络中的每一个卷积层的卷积核为大小为N*N的方形卷积核,所述第二卷积神经网络包括P个卷积层;In one embodiment, the convolution kernel of each convolution layer in the second convolutional neural network is a square convolution kernel with a size of N*N, and the second convolutional neural network includes P convolutional layers;
所述分解模块包括:The decomposition modules include:
分解子模块,被配置为将所述第二卷积神经网络中每一个卷积层的大小为N*N的方形卷积核分解为大小为1*N的第一卷积核和大小为N*1的第二卷积核,所述第一卷积核与所述第二卷积核的乘积值为所述方形卷积核;The decomposition submodule is configured to decompose the square convolution kernel with a size of N*N of each convolution layer in the second convolutional neural network into a first convolution kernel with a size of 1*N and a size of N *1 second convolution kernel, the product value of the first convolution kernel and the second convolution kernel is the square convolution kernel;
确定子模块,被配置为使用所述第一卷积核和所述第二卷积核分别替换所述第二卷积神经网络中对应的卷积层的方形卷积核,得到所述第一卷积神经网络的一组卷积层。The determination submodule is configured to use the first convolution kernel and the second convolution kernel to respectively replace the square convolution kernels of the corresponding convolution layers in the second convolution neural network to obtain the first A set of convolutional layers for a convolutional neural network.
在一实施例中,特征提取模块包括:In one embodiment, the feature extraction module includes:
第一提取子模块,被配置为利用所述第一卷积神经网络的每一组卷积层中的一个卷积层对输入信息进行特征提取,得到每一组卷积层的待提取特征的中间值;The first extraction submodule is configured to use one convolutional layer in each group of convolutional layers of the first convolutional neural network to perform feature extraction on input information, and obtain the features to be extracted of each group of convolutional layers. Median;
第二提取子模块,被配置为将所述待提取特征的中间值输入所述每一组卷积层中的另一个卷积层进行特征提取,得到每一组卷积层的待提取特征。The second extraction sub-module is configured to input the intermediate value of the features to be extracted into another convolution layer in each set of convolution layers for feature extraction, and obtain the features to be extracted of each set of convolution layers.
根据本公开实施例的第三方面,提供一种图像识别装置,包括:According to a third aspect of an embodiment of the present disclosure, an image recognition device is provided, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
将待识别图像输入已训练的第一卷积神经网络,所述第一卷积神经网络包括P组卷积层,每一组卷积层包括两个卷积层,所述两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核;Input the image to be identified into the trained first convolutional neural network, the first convolutional neural network includes P groups of convolutional layers, each group of convolutional layers includes two convolutional layers, and the two convolutional layers The convolution kernels are the first convolution kernel with a size of 1*N and the second convolution kernel with a size of N*1;
通过所述第一卷积神经网络的每一组卷积层对所述待识别图像进行特征提取,得到所述每一组卷积层的待提取特征;Carrying out feature extraction on the image to be identified through each group of convolutional layers of the first convolutional neural network to obtain the features to be extracted of each group of convolutional layers;
根据所述每一组卷积层的待提取特征确定所述待识别图像的识别结果。The recognition result of the image to be recognized is determined according to the features to be extracted of each group of convolutional layers.
本公开的实施例提供的技术方案可以包括以下有益效果:第一卷积神经网络中每一组卷积层所包括的两个卷积层的卷积核为分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核,每一组卷积层的卷积核计算量为2*O(N),在卷积核比较大的情况下,本公开中每一组卷积层的计算量2*O(N)要远低于相关技术中的方形卷积核的计算量O(N2),解决了相关技术中采用方形卷积核所导致的计算量大、计算成本高的问题。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: the convolution kernels of the two convolution layers included in each group of convolution layers in the first convolution neural network are respectively 1*Nth A convolution kernel and a second convolution kernel with a size of N*1, the calculation amount of the convolution kernel of each group of convolution layers is 2*O(N), in the case of a relatively large convolution kernel, in this disclosure The calculation amount 2*O(N) of each group of convolutional layers is much lower than the calculation amount O(N 2 ) of the square convolution kernel in the related technology, which solves the calculation caused by the use of the square convolution kernel in the related technology The problem of large volume and high computational cost.
通过将第二卷积神经网络中的每一个卷积层的方形卷积核拆分为两个正交卷积核,即可得到第一卷积神经网络,由于两个正交卷积核的乘积即为对应的方形卷积核,因此,使用第一卷积神经网络中的每一组卷积层对待识别图像的特征提取效果与第二卷积神经网络中对应的的每一个卷积层的方性卷积核的特征提取效果相同,因此本公开实现了在卷积效果相同的基础上减小了卷积计算量,降低了计算成本。The first convolutional neural network can be obtained by splitting the square convolution kernel of each convolutional layer in the second convolutional neural network into two orthogonal convolutional kernels. Since the two orthogonal convolutional kernels The product is the corresponding square convolution kernel. Therefore, the feature extraction effect of the image to be recognized using each set of convolutional layers in the first convolutional neural network is the same as that of each corresponding convolutional layer in the second convolutional neural network. The feature extraction effects of the square convolution kernels are the same, so the present disclosure reduces the calculation amount of convolution and reduces the calculation cost on the basis of the same convolution effect.
通过直接将每一组卷积层中的一个卷积层的提取的第一特征图作为另一个卷积层的输入,可以实现每一组卷积层的特征提取效果与第二卷积神经网络中对应的一个卷积层的特征提取效果相同。By directly using the first feature map extracted by one convolutional layer in each set of convolutional layers as the input of another convolutional layer, the feature extraction effect of each set of convolutional layers can be compared with the second convolutional neural network The feature extraction effect of the corresponding one of the convolutional layers is the same.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
图1是根据一示例性实施例示出的图像识别方法的流程图。Fig. 1 is a flowchart of an image recognition method according to an exemplary embodiment.
图2是根据一示例性实施例一示出的通过第二卷积神经网络得到第一卷积神经网络的流程图。Fig. 2 is a flow chart of obtaining a first convolutional neural network through a second convolutional neural network according to a first exemplary embodiment.
图3A是根据一示例性实施例二示出的通过第一卷积神经网络的每一组卷积层对待识别图像进行特征提取的流程图。Fig. 3A is a flow chart of feature extraction of an image to be recognized through each group of convolutional layers of the first convolutional neural network according to a second exemplary embodiment.
图3B是根据一示例性实施例示出的使用第二卷积神经网络中一个方形卷积核对输入信息进行卷积的示意图。Fig. 3B is a schematic diagram showing convolution of input information by using a square convolution kernel in the second convolutional neural network according to an exemplary embodiment.
图3C是根据一示例性实施例示出的使用第一卷积神经网络中的对应图3B的方形卷积核的一个卷积核对输入信息进行卷积的示意图。Fig. 3C is a schematic diagram showing convolution of input information by using a convolution kernel corresponding to the square convolution kernel in Fig. 3B in the first convolutional neural network according to an exemplary embodiment.
图3D是根据一示例性实施例示出的使用第一卷积神经网络中的对应图3B的方形卷积核的另一个卷积核对图3C的输出信息进行卷积的示意图。Fig. 3D is a schematic diagram showing the convolution of the output information in Fig. 3C by using another convolution kernel corresponding to the square convolution kernel in Fig. 3B in the first convolutional neural network according to an exemplary embodiment.
图4是根据一示例性实施例示出的一种图像识别装置的框图。Fig. 4 is a block diagram of an image recognition device according to an exemplary embodiment.
图5是根据一示例性实施例示出的另一种图像识别装置的框图。Fig. 5 is a block diagram of another image recognition device according to an exemplary embodiment.
图6是根据一示例性实施例示出的一种适用于图像识别装置的框图。Fig. 6 is a block diagram showing an image recognition device according to an exemplary embodiment.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with aspects of the invention as recited in the appended claims.
图1是根据一示例性实施例示出的图像识别方法的流程图;该图像识别方法可以应用在电子设备(例如:智能手机、平板电脑、个人计算机)上,如图1所示,该图像识别方法包括以下步骤:Fig. 1 is the flow chart of the image recognition method shown according to an exemplary embodiment; The method includes the following steps:
在步骤101中,将待识别图像输入已训练的第一卷积神经网络,第一卷积神经网络包括P组卷积层,每一组卷积层包括两个卷积层,两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核。In step 101, input the image to be recognized into the trained first convolutional neural network, the first convolutional neural network includes P groups of convolutional layers, each group of convolutional layers includes two convolutional layers, and the two convolutional layers The convolution kernels of the layers are the first convolution kernel with a size of 1*N and the second convolution kernel with a size of N*1.
在一实施例中,第一卷积神经网络可通过对第二卷积神经网络进行处理得到,可通过对第二卷积神经网络中的每一个卷积层进行分解得到第一卷积神经网络,可参见图2所示实施例,这里先不详述。In one embodiment, the first convolutional neural network can be obtained by processing the second convolutional neural network, and the first convolutional neural network can be obtained by decomposing each convolutional layer in the second convolutional neural network , can refer to the embodiment shown in FIG. 2 , and will not be described in detail here.
在一实施例中,第一卷积神经网络中的卷积层成组出现,每一组卷积层的两个卷积层的卷积核为一个大小为1*N的第一卷积核和一个大小为N*1的第二卷积核。In one embodiment, the convolutional layers in the first convolutional neural network appear in groups, and the convolutional kernels of the two convolutional layers of each group of convolutional layers are a first convolutional kernel with a size of 1*N And a second convolution kernel of size N*1.
在一实施例中,第二卷积神经网络可以为根据相关技术中相关训练方法训练得到的卷积神经网络,卷积层中的卷积核为方形卷积核,即为N*N卷积核。In one embodiment, the second convolutional neural network can be a convolutional neural network trained according to relevant training methods in the related art, and the convolution kernel in the convolution layer is a square convolution kernel, which is N*N convolution nuclear.
在步骤102中,通过第一卷积神经网络的每一组卷积层对待识别图像进行特征提取,得到每一组卷积层的待提取特征。In step 102, feature extraction is performed on the image to be recognized through each set of convolutional layers of the first convolutional neural network to obtain features to be extracted for each set of convolutional layers.
在一实施例中,通过第一卷积神经网络的每一组卷积层对待识别图像进行特征提取的步骤可参见图3A所示实施例,这里先不详述。In one embodiment, the step of extracting features of the image to be recognized through each group of convolutional layers of the first convolutional neural network may refer to the embodiment shown in FIG. 3A , which will not be described in detail here.
在步骤103中,根据每一组卷积层的待提取特征确定待识别图像的识别结果。In step 103, the recognition result of the image to be recognized is determined according to the features to be extracted of each group of convolutional layers.
在一实施例中,可以根据相关技术中使用卷积神经网络的方式对每一组卷积层提取的待提取特征进行处理,得到识别结果,例如使用池化层、全连接层等对每一组卷积层的待提取特征进行处理得到识别结果,这里不再详述。In one embodiment, the features to be extracted by each group of convolutional layers can be processed according to the method of using a convolutional neural network in the related art to obtain a recognition result, for example, using a pooling layer, a fully connected layer, etc. for each The feature to be extracted of the group convolutional layer is processed to obtain the recognition result, which will not be described in detail here.
本实施例中,第一卷积神经网络中每一组卷积层所包括的两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核,每一组卷积层的卷积核计算量为2*O(N),在卷积核比较大的情况下,本公开中每一组卷积层的计算量2*O(N)要远低于相关技术中的方形卷积核的计算量O(N2),解决了相关技术中采用方形卷积核所导致的计算量大、计算成本高的问题。In this embodiment, the convolution kernels of the two convolution layers included in each group of convolution layers in the first convolutional neural network are the first convolution kernel with a size of 1*N and the first convolution kernel with a size of N*1. The second convolution kernel, the calculation amount of the convolution kernel of each group of convolution layers is 2*O(N), in the case of relatively large convolution kernels, the calculation amount of each group of convolution layers in this disclosure is 2* O(N) is much lower than the calculation amount O(N 2 ) of the square convolution kernel in the related art, which solves the problems of large calculation amount and high calculation cost caused by the use of the square convolution kernel in the related art.
在一实施例中,方法还包括:In one embodiment, the method also includes:
将第二卷积神经网络中的每一个卷积层分解为两个卷积层,得到第一卷积神经网络,第二卷积神经网络中的每一个卷积层包括一个方形卷积核。Each convolutional layer in the second convolutional neural network is decomposed into two convolutional layers to obtain the first convolutional neural network, and each convolutional layer in the second convolutional neural network includes a square convolutional kernel.
在一实施例中,第二卷积神经网络中的每一个卷积层的卷积核为大小为N*N的方形卷积核,第二卷积神经网络包括P个卷积层;In one embodiment, the convolution kernel of each convolution layer in the second convolutional neural network is a square convolution kernel with a size of N*N, and the second convolutional neural network includes P convolutional layers;
将第二卷积神经网络中的每一个卷积层分解为两个卷积层,包括:Decompose each convolutional layer in the second convolutional neural network into two convolutional layers, including:
将第二卷积神经网络中每一个卷积层的大小为N*N的方形卷积核分解为大小为1*N的第一卷积核和大小为N*1的第二卷积核,第一卷积核与第二卷积核的乘积值为方形卷积核;Decomposing the square convolution kernel whose size is N*N in each convolutional neural network in the second convolutional neural network into a first convolution kernel whose size is 1*N and a second convolution kernel whose size is N*1, The product value of the first convolution kernel and the second convolution kernel is a square convolution kernel;
使用第一卷积核和第二卷积核分别替换第二卷积神经网络中对应的卷积层的方形卷积核,得到第一卷积神经网络的一组卷积层。Using the first convolution kernel and the second convolution kernel to respectively replace the square convolution kernels of the corresponding convolution layers in the second convolution neural network to obtain a set of convolution layers of the first convolution neural network.
在一实施例中,通过第一卷积神经网络的每一组卷积层对待识别图像进行特征提取,包括:In one embodiment, each group of convolutional layers of the first convolutional neural network is used for feature extraction of the image to be recognized, including:
利用第一卷积神经网络的每一组卷积层中的一个卷积层对输入信息进行特征提取,得到每一组卷积层的待提取特征的中间值;Utilizing a convolutional layer in each group of convolutional layers of the first convolutional neural network to perform feature extraction on the input information, and obtain an intermediate value of features to be extracted in each group of convolutional layers;
将待提取特征的中间值输入每一组卷积层中的另一个卷积层进行特征提取,得到每一组卷积层的待提取特征。The intermediate value of the features to be extracted is input into another convolution layer in each set of convolution layers for feature extraction, and the features to be extracted of each set of convolution layers are obtained.
具体如何进行图像识别,请参考后续实施例。For details on how to perform image recognition, please refer to subsequent embodiments.
下面以一具体实施例来说明本公开实施例提供的技术方案。The technical solutions provided by the embodiments of the present disclosure are described below with a specific embodiment.
图2是根据一示例性实施例一示出的图像识别方法的流程图;本实施例利用本公开实施例提供的上述方法,以电子设备如何根据第二卷积神经网络的每一个卷积层分解为两个卷积层为例进行示例性说明,如图2所示,包括如下步骤:Fig. 2 is a flow chart of an image recognition method shown according to an exemplary embodiment 1; this embodiment utilizes the above-mentioned method provided by the embodiment of the present disclosure, and how the electronic device according to each convolutional layer of the second convolutional neural network It is decomposed into two convolutional layers as an example for illustration, as shown in Figure 2, including the following steps:
在步骤201中,将第二卷积神经网络中每一个卷积层的大小为N*N的方形卷积核分解为大小为1*N的第一卷积核和大小为N*1的第二卷积核,第一卷积核与第二卷积核的乘积值为方形卷积核。In step 201, the square convolution kernel whose size is N*N in each convolutional layer in the second convolutional neural network is decomposed into a first convolution kernel whose size is 1*N and a first convolution kernel whose size is N*1. Two convolution kernels, the product of the first convolution kernel and the second convolution kernel is a square convolution kernel.
在一实施例中,以方形卷积核为3*3卷积核为例进行举例说明如何分解卷积层。例如,方形卷积核为可以拆分为一个1*3的第一卷积核[110]和一个为3*1的第二卷积核在本实施例中,第一卷积核为行向量,第二卷积核为列向量。In one embodiment, how to decompose a convolution layer is illustrated by taking a square convolution kernel as an example of a 3*3 convolution kernel. For example, a square convolution kernel is Can be split into a 1*3 first convolution kernel [110] and a 3*1 second convolution kernel In this embodiment, the first convolution kernel is a row vector, and the second convolution kernel is a column vector.
在一实施例中,通过将每一个方形卷积核拆分为第一卷积核和第二卷积核,既而实现将一个卷积层拆分为一组卷积层。In an embodiment, by splitting each square convolution kernel into a first convolution kernel and a second convolution kernel, a convolution layer is split into a group of convolution layers.
在步骤202中,使用第一卷积核和第二卷积核分别替换第二卷积神经网络中对应的卷积层的方形卷积核,得到第一卷积神经网络的一组卷积层。In step 202, use the first convolution kernel and the second convolution kernel to respectively replace the square convolution kernels of the corresponding convolution layers in the second convolution neural network to obtain a set of convolution layers of the first convolution neural network .
本实施例中,通过将第二卷积神经网络中的每一个卷积层的方形卷积核拆分为两个正交卷积核,即可得到第一卷积神经网络,由于两个正交卷积核的乘积即为对应的方形卷积核,因此,使用第一卷积神经网络中的每一组卷积层对待识别图像的特征提取效果与第二卷积神经网络中对应的的每一个卷积层的方性卷积核的特征提取效果完全相同,因此本公开实现了在卷积效果相同的基础上减小了卷积计算量,降低了计算成本。In this embodiment, the first convolutional neural network can be obtained by splitting the square convolution kernel of each convolutional layer in the second convolutional neural network into two orthogonal convolutional kernels. The product of the intersecting convolution kernel is the corresponding square convolution kernel. Therefore, the feature extraction effect of the image to be recognized using each group of convolution layers in the first convolutional neural network is the same as that of the corresponding one in the second convolutional neural network. The feature extraction effects of the square convolution kernels of each convolution layer are exactly the same, so the present disclosure reduces the calculation amount of convolution and reduces the calculation cost on the basis of the same convolution effect.
图3A是根据一示例性实施例二示出的通过第一卷积神经网络的每一组卷积层对待识别图像进行特征提取的流程图,图3B是根据一示例性实施例示出的使用第二卷积神经网络中一个方形卷积核对输入信息进行卷积的示意图,图3C是根据一示例性实施例示出的使用第一卷积神经网络中的对应图3B的方形卷积核的一个卷积核对输入信息进行卷积的示意图,图3D是根据一示例性实施例示出的使用第一卷积神经网络中的对应图3B的方形卷积核的另一个卷积核对图3C的输出信息进行卷积的示意图;本实施例利用本公开实施例提供的上述方法,以电子设备如何通过每一组卷积层对待识别图像进行特征提取进行示例性说明,如图3A所示,包括如下步骤:Fig. 3A is a flow chart showing feature extraction of an image to be recognized through each group of convolutional layers of the first convolutional neural network according to a second exemplary embodiment; A schematic diagram of a square convolution kernel in the second convolutional neural network convoluting input information, FIG. 3C is a volume that uses the square convolution kernel corresponding to FIG. 3B in the first convolutional neural network shown according to an exemplary embodiment A schematic diagram of the convolution of the input information by the product kernel, and FIG. 3D is a schematic diagram of using another convolution kernel corresponding to the square convolution kernel of FIG. 3B in the first convolutional neural network to perform the output information of FIG. 3C according to an exemplary embodiment. Schematic diagram of convolution; this embodiment uses the above-mentioned method provided by the embodiment of the present disclosure to illustrate how an electronic device performs feature extraction of an image to be recognized through each set of convolution layers, as shown in FIG. 3A , including the following steps:
在步骤301中,利用第一卷积神经网络的每一组卷积层中的一个卷积层对输入信息进行特征提取,得到每一组卷积层的待提取特征的中间值。In step 301, feature extraction is performed on the input information by using one convolutional layer in each set of convolutional layers of the first convolutional neural network to obtain an intermediate value of features to be extracted in each set of convolutional layers.
在步骤302中,将待提取特征的中间值输入每一组卷积层中的另一个卷积层进行特征提取,得到每一组卷积层的待提取特征。In step 302, the intermediate value of the features to be extracted is input into another convolution layer in each set of convolution layers for feature extraction, and the features to be extracted of each set of convolution layers are obtained.
在一实施例中,参见图3B,这里以输入信息31为5*5的待识别图像31,通过第二卷积神经网络中源卷积核,即标号为36的方形卷积核进行特征提取得到标号为35的特征,第二卷积神经网络中方形卷积核36可以分解为第一卷积核32为[110],和第二卷积核34为 In one embodiment, referring to FIG. 3B, the image 31 to be recognized with the input information 31 being 5*5 is used for feature extraction through the source convolution kernel in the second convolutional neural network, that is, the square convolution kernel labeled 36 Obtaining the feature labeled 35, the square convolution kernel 36 in the second convolutional neural network can be decomposed into the first convolution kernel 32 as [110], and the second convolution kernel 34 as
在一实施例中,在步骤301中,参见图3C,将输入信息31输入第一卷积神经网络中的一组卷积层的一个卷积层,通过第一卷积核32进行卷积处理,得到该组卷积层的待提取特征的中间值,也即标号为33的特征;在步骤302中,参见图3D,通过将标号为33的特征输入第一卷积神经网络中的另一个卷积层,并使用第二卷积核34进行卷积处理,得到标号为35的特征。通过图3B-图3D可知,本公开使用一个1*N的卷积核和一个N*1的卷积核对待识别图像进行卷积的效果与相关技术中使用一个方形卷积核进行卷积的效果相同。In one embodiment, in step 301, referring to FIG. 3C , the input information 31 is input to a convolutional layer of a group of convolutional layers in the first convolutional neural network, and convolution processing is performed through the first convolutional kernel 32 , to obtain the intermediate value of the feature to be extracted of the group of convolutional layers, that is, the feature labeled 33; in step 302, referring to Figure 3D, by inputting the feature labeled 33 into another one of the first convolutional neural networks Convolution layer, and use the second convolution kernel 34 to perform convolution processing to obtain the feature labeled 35. It can be seen from Figure 3B-3D that the effect of using a 1*N convolution kernel and an N*1 convolution kernel to convolve the image to be recognized in this disclosure is the same as that of using a square convolution kernel for convolution in related technologies The effect is the same.
本实施例中,通过直接将每一组卷积层中的一个卷积层的提取的第一特征图作为另一个卷积层的输入,可以实现每一组卷积层的特征提取效果与第二卷积神经网络中对应的一个卷积层的特征提取效果完全相同。In this embodiment, by directly using the first feature map extracted by one convolutional layer in each group of convolutional layers as the input of another convolutional layer, the feature extraction effect of each group of convolutional layers can be compared with the first feature map. The feature extraction effect of the corresponding convolutional layer in the two convolutional neural networks is exactly the same.
与前述图像识别方法的实施例相对应,本公开还提供了图像识别装置及其所应用的电子设备的实施例。Corresponding to the foregoing embodiments of the image recognition method, the present disclosure also provides embodiments of an image recognition device and an electronic device to which it is applied.
图4是根据一示例性实施例示出的一种图像识别装置的框图,如图4所示,图像识别装置包括:Fig. 4 is a block diagram of an image recognition device according to an exemplary embodiment. As shown in Fig. 4, the image recognition device includes:
输入模块410,被配置为将待识别图像输入已训练的第一卷积神经网络,第一卷积神经网络包括P组卷积层,每一组卷积层包括两个卷积层,两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核;The input module 410 is configured to input the image to be recognized into the trained first convolutional neural network, the first convolutional neural network includes P groups of convolutional layers, and each group of convolutional layers includes two convolutional layers, two The convolution kernels of the convolution layer are the first convolution kernel with a size of 1*N and the second convolution kernel with a size of N*1;
特征提取模块420,被配置为通过第一卷积神经网络的每一组卷积层对待识别图像进行特征提取,得到每一组卷积层的待提取特征;The feature extraction module 420 is configured to perform feature extraction on the image to be recognized through each group of convolutional layers of the first convolutional neural network, and obtain the features to be extracted of each group of convolutional layers;
确定模块430,被配置为根据每一组卷积层的待提取特征确定待识别图像的识别结果。The determination module 430 is configured to determine the recognition result of the image to be recognized according to the features to be extracted of each group of convolutional layers.
图5是根据一示例性实施例示出的另一种图像识别装置的框图,如图5所示,在上述图4所示实施例的基础上,在一实施例中,装置还包括:Fig. 5 is a block diagram of another image recognition device according to an exemplary embodiment. As shown in Fig. 5, on the basis of the embodiment shown in Fig. 4 above, in one embodiment, the device further includes:
分解模块440,被配置为将第二卷积神经网络中的每一个卷积层分解为两个卷积层,得到第一卷积神经网络,第二卷积神经网络中的每一个卷积层包括一个方形卷积核。The decomposition module 440 is configured to decompose each convolutional layer in the second convolutional neural network into two convolutional layers to obtain the first convolutional neural network, and each convolutional layer in the second convolutional neural network Contains a square convolution kernel.
在一实施例中,第二卷积神经网络中的每一个卷积层的卷积核为大小为N*N的方形卷积核,第二卷积神经网络包括P个卷积层;In one embodiment, the convolution kernel of each convolution layer in the second convolutional neural network is a square convolution kernel with a size of N*N, and the second convolutional neural network includes P convolutional layers;
分解模块440包括:Decomposition module 440 includes:
分解子模块441,被配置为将第二卷积神经网络中每一个卷积层的大小为N*N的方形卷积核分解为大小为1*N的第一卷积核和大小为N*1的第二卷积核,第一卷积核与第二卷积核的乘积值为方形卷积核;The decomposition sub-module 441 is configured to decompose the square convolution kernel whose size is N*N in each convolutional neural network in the second convolutional neural network into a first convolution kernel whose size is 1*N and whose size is N* The second convolution kernel of 1, the product value of the first convolution kernel and the second convolution kernel is a square convolution kernel;
确定子模块442,被配置为使用第一卷积核和第二卷积核分别替换第二卷积神经网络中对应的卷积层的方形卷积核,得到第一卷积神经网络的一组卷积层。The determination sub-module 442 is configured to use the first convolution kernel and the second convolution kernel to respectively replace the square convolution kernels of the corresponding convolution layers in the second convolutional neural network to obtain a set of convolutional neural networks of the first convolutional neural network convolutional layer.
在一实施例中,特征提取模块420包括:In one embodiment, feature extraction module 420 includes:
第一提取子模块421,被配置为利用第一卷积神经网络的每一组卷积层中的一个卷积层对输入信息进行特征提取,得到每一组卷积层的待提取特征的中间值;The first extraction sub-module 421 is configured to use one convolutional layer in each group of convolutional layers of the first convolutional neural network to perform feature extraction on input information, and obtain the middle of the features to be extracted in each group of convolutional layers value;
第二提取子模块422,被配置为将将待提取特征的中间值输入每一组卷积层中的另一个卷积层进行特征提取,得到每一组卷积层的待提取特征。The second extraction sub-module 422 is configured to input the intermediate value of the features to be extracted into another convolution layer in each set of convolution layers for feature extraction, and obtain the features to be extracted of each set of convolution layers.
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and effects of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method for details, and will not be repeated here.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place , or can also be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. It can be understood and implemented by those skilled in the art without creative effort.
图6是根据一示例性实施例示出的一种适用于图像识别装置的框图。例如,装置600可以是电子设备,例如平板电脑、智能手机等。Fig. 6 is a block diagram showing an image recognition device according to an exemplary embodiment. For example, apparatus 600 may be an electronic device such as a tablet computer, a smartphone, or the like.
参照图6,装置600可以包括以下一个或多个组件:处理组件602,存储器604,电源组件606,多媒体组件608,音频组件610,输入/输出(I/O)的接口612,传感器组件614,以及通信组件616。6, device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616 .
处理组件602通常控制装置600的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件602可以包括一个或多个处理器620来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件602可以包括一个或多个模块,便于处理组件602和其他组件之间的交互。例如,处理部件602可以包括多媒体模块,以方便多媒体组件608和处理组件602之间的交互。The processing component 602 generally controls the overall operations of the device 600, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 602 may include one or more modules that facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602 .
存储器604被配置为存储各种类型的数据以支持在设备600的操作。这些数据的示例包括用于在装置600上操作的任何应用程序或方法的指令,消息,图片等。存储器604可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 604 is configured to store various types of data to support operations at the device 600 . Examples of such data include instructions, messages, pictures, etc. for any application or method operating on device 600 . The memory 604 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件606为装置600的各种组件提供电力。电力组件606可以包括电源管理系统,一个或多个电源,及其他与为装置600生成、管理和分配电力相关联的组件。The power supply component 606 provides power to various components of the device 600 . Power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 600 .
多媒体组件608包括在装置600和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件608包括一个前置摄像头和/或后置摄像头。当设备600处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or a swipe action, but also detect duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. When the device 600 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件610被配置为输出和/或输入音频信号。例如,音频组件610包括一个麦克风(MIC),当装置600处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器604或经由通信组件616发送。在一些实施例中,音频组件610还包括一个扬声器,用于输出音频信号。The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a microphone (MIC) configured to receive external audio signals when the device 600 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 604 or sent via communication component 616 . In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
I/O接口612为处理组件602和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 612 provides an interface between the processing component 602 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件614包括一个或多个传感器,用于为装置600提供各个方面的状态评估。例如,传感器组件614可以检测到设备600的打开/关闭状态,组件的相对定位,例如组件为装置600的显示器和小键盘,传感器组件614还可以检测装置600或装置600一个组件的位置改变,用户与装置600接触的存在或不存在,装置600方位或加速/减速和装置600的温度变化。传感器组件614可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件614还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件614还可以包括加速度传感器,陀螺仪传感器,磁传感器,距离感应器,压力传感器或温度传感器。Sensor assembly 614 includes one or more sensors for providing status assessments of various aspects of device 600 . For example, the sensor component 614 can detect the open/closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, the sensor component 614 can also detect a change in the position of the device 600 or a component of the device 600, the user Presence or absence of contact with device 600 , device 600 orientation or acceleration/deceleration and temperature change of device 600 . The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 614 may also include optical sensors, such as CMOS or CCD image sensors, for use in imaging applications. In some embodiments, the sensor component 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a distance sensor, a pressure sensor or a temperature sensor.
通信组件616被配置为便于装置600和其他设备之间有线或无线方式的通信。装置600可以接入基于通信标准的无线网络,如WIFI,2G或3G,或它们的组合。在一个示例性实施例中,通信部件616经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信部件616还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 616 is configured to facilitate wired or wireless communication between the apparatus 600 and other devices. The device 600 can access wireless networks based on communication standards, such as WIFI, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置600可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法,包括:In an exemplary embodiment, apparatus 600 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable Gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the method described above, including:
将待识别图像输入已训练的第一卷积神经网络,第一卷积神经网络包括P组卷积层,每一组卷积层包括两个卷积层,两个卷积层的卷积核分别为大小为1*N的第一卷积核和大小为N*1的第二卷积核;Input the image to be recognized into the trained first convolutional neural network, the first convolutional neural network includes P groups of convolutional layers, each group of convolutional layers includes two convolutional layers, and the convolution kernels of the two convolutional layers Respectively, the first convolution kernel with a size of 1*N and the second convolution kernel with a size of N*1;
通过第一卷积神经网络的每一组卷积层对待识别图像进行特征提取,得到每一组卷积层的待提取特征;Through each group of convolutional layers of the first convolutional neural network, feature extraction is performed on the image to be recognized, and the features to be extracted of each group of convolutional layers are obtained;
根据每一组卷积层的待提取特征确定待识别图像的识别结果。The recognition result of the image to be recognized is determined according to the features to be extracted of each group of convolutional layers.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器604,上述指令可由装置600的处理器620执行以完成上述方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 604 including instructions, which can be executed by the processor 620 of the device 600 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710034836.7A CN106682736A (en) | 2017-01-18 | 2017-01-18 | Image identification method and apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710034836.7A CN106682736A (en) | 2017-01-18 | 2017-01-18 | Image identification method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106682736A true CN106682736A (en) | 2017-05-17 |
Family
ID=58859233
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710034836.7A Pending CN106682736A (en) | 2017-01-18 | 2017-01-18 | Image identification method and apparatus |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106682736A (en) |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107943750A (en) * | 2017-11-14 | 2018-04-20 | 华南理工大学 | A kind of decomposition convolution method based on WGAN models |
| CN107944545A (en) * | 2017-11-10 | 2018-04-20 | 中国科学院计算技术研究所 | Computational methods and computing device applied to neutral net |
| CN107967459A (en) * | 2017-12-07 | 2018-04-27 | 北京小米移动软件有限公司 | convolution processing method, device and storage medium |
| CN109033940A (en) * | 2018-06-04 | 2018-12-18 | 上海依图网络科技有限公司 | A kind of image-recognizing method, calculates equipment and storage medium at device |
| CN109784186A (en) * | 2018-12-18 | 2019-05-21 | 深圳云天励飞技术有限公司 | A kind of pedestrian recognition methods, device, electronic equipment and computer readable storage medium again |
| WO2019105243A1 (en) * | 2017-11-28 | 2019-06-06 | 北京达佳互联信息技术有限公司 | Image processing method and device and terminal |
| CN109978137A (en) * | 2019-03-20 | 2019-07-05 | 厦门美图之家科技有限公司 | A kind of processing method of convolutional neural networks |
| CN110858323A (en) * | 2018-08-23 | 2020-03-03 | 北京京东金融科技控股有限公司 | Convolution-based image processing method, convolution-based image processing device, convolution-based image processing medium and electronic equipment |
| CN110880034A (en) * | 2018-09-06 | 2020-03-13 | 三星电子株式会社 | Computing device using convolutional neural network and method of operation thereof |
| CN111247527A (en) * | 2017-12-20 | 2020-06-05 | 华为技术有限公司 | Method and device for determining characteristic image in convolutional neural network model |
| US10699160B2 (en) | 2017-08-23 | 2020-06-30 | Samsung Electronics Co., Ltd. | Neural network method and apparatus |
| CN111798520A (en) * | 2020-09-08 | 2020-10-20 | 平安国际智慧城市科技股份有限公司 | Image processing method, device, equipment and medium based on convolutional neural network |
| CN109840584B (en) * | 2017-11-24 | 2023-04-18 | 腾讯科技(深圳)有限公司 | Image data classification method and device based on convolutional neural network model |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104408435A (en) * | 2014-12-05 | 2015-03-11 | 浙江大学 | Face identification method based on random pooling convolutional neural network |
| CN106156807A (en) * | 2015-04-02 | 2016-11-23 | 华中科技大学 | The training method of convolutional neural networks model and device |
| CN106326985A (en) * | 2016-08-18 | 2017-01-11 | 北京旷视科技有限公司 | Neural network training method and device and data processing method and device |
-
2017
- 2017-01-18 CN CN201710034836.7A patent/CN106682736A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104408435A (en) * | 2014-12-05 | 2015-03-11 | 浙江大学 | Face identification method based on random pooling convolutional neural network |
| CN106156807A (en) * | 2015-04-02 | 2016-11-23 | 华中科技大学 | The training method of convolutional neural networks model and device |
| CN106326985A (en) * | 2016-08-18 | 2017-01-11 | 北京旷视科技有限公司 | Neural network training method and device and data processing method and device |
Cited By (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10909418B2 (en) | 2017-08-23 | 2021-02-02 | Samsung Electronics Co., Ltd. | Neural network method and apparatus |
| US10699160B2 (en) | 2017-08-23 | 2020-06-30 | Samsung Electronics Co., Ltd. | Neural network method and apparatus |
| CN107944545A (en) * | 2017-11-10 | 2018-04-20 | 中国科学院计算技术研究所 | Computational methods and computing device applied to neutral net |
| CN107944545B (en) * | 2017-11-10 | 2020-07-31 | 中国科学院计算技术研究所 | Computing method and computing device applied to neural network |
| CN107943750A (en) * | 2017-11-14 | 2018-04-20 | 华南理工大学 | A kind of decomposition convolution method based on WGAN models |
| CN109840584B (en) * | 2017-11-24 | 2023-04-18 | 腾讯科技(深圳)有限公司 | Image data classification method and device based on convolutional neural network model |
| WO2019105243A1 (en) * | 2017-11-28 | 2019-06-06 | 北京达佳互联信息技术有限公司 | Image processing method and device and terminal |
| CN107967459B (en) * | 2017-12-07 | 2021-08-24 | 北京小米移动软件有限公司 | Convolution processing method, device and storage medium |
| CN107967459A (en) * | 2017-12-07 | 2018-04-27 | 北京小米移动软件有限公司 | convolution processing method, device and storage medium |
| CN111247527A (en) * | 2017-12-20 | 2020-06-05 | 华为技术有限公司 | Method and device for determining characteristic image in convolutional neural network model |
| CN111247527B (en) * | 2017-12-20 | 2023-08-22 | 华为技术有限公司 | Method and apparatus for determining feature images in a convolutional neural network model |
| CN109033940A (en) * | 2018-06-04 | 2018-12-18 | 上海依图网络科技有限公司 | A kind of image-recognizing method, calculates equipment and storage medium at device |
| CN110858323A (en) * | 2018-08-23 | 2020-03-03 | 北京京东金融科技控股有限公司 | Convolution-based image processing method, convolution-based image processing device, convolution-based image processing medium and electronic equipment |
| CN110880034A (en) * | 2018-09-06 | 2020-03-13 | 三星电子株式会社 | Computing device using convolutional neural network and method of operation thereof |
| CN109784186A (en) * | 2018-12-18 | 2019-05-21 | 深圳云天励飞技术有限公司 | A kind of pedestrian recognition methods, device, electronic equipment and computer readable storage medium again |
| CN109978137B (en) * | 2019-03-20 | 2021-03-16 | 厦门美图之家科技有限公司 | Processing method of convolutional neural network |
| CN109978137A (en) * | 2019-03-20 | 2019-07-05 | 厦门美图之家科技有限公司 | A kind of processing method of convolutional neural networks |
| CN111798520A (en) * | 2020-09-08 | 2020-10-20 | 平安国际智慧城市科技股份有限公司 | Image processing method, device, equipment and medium based on convolutional neural network |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106682736A (en) | Image identification method and apparatus | |
| CN103996186B (en) | Image cropping method and device | |
| CN107992848B (en) | Method and device for acquiring depth image and computer readable storage medium | |
| CN106530227A (en) | Image restoration method and device | |
| CN106407971A (en) | Text recognition method and device | |
| CN105809704A (en) | Method and device for identifying image definition | |
| US9959487B2 (en) | Method and device for adding font | |
| CN107967459B (en) | Convolution processing method, device and storage medium | |
| CN108062547B (en) | Character detection method and device | |
| CN113486830B (en) | Image processing method and device, electronic equipment and storage medium | |
| CN107341509B (en) | Training method, device and readable storage medium for convolutional neural network | |
| CN108108671A (en) | Description of product information acquisition method and device | |
| CN109635926B (en) | Attention feature acquisition method and device for neural network and storage medium | |
| CN106339695A (en) | Face similarity detection method, device and terminal | |
| JP2017510907A (en) | Method and apparatus for folding a photograph | |
| CN105094539B (en) | Reference information display methods and device | |
| CN113850275B (en) | Image processing method, device, electronic equipment and storage medium | |
| CN107748867A (en) | The detection method and device of destination object | |
| CN104850643B (en) | Image comparison method and device | |
| CN107885571A (en) | Show page control method and device | |
| CN106527886B (en) | Image display method and device | |
| CN105205093A (en) | Method and device for image processing in gallery | |
| CN104850592B (en) | The method and apparatus for generating model file | |
| CN108984628B (en) | Loss value obtaining method and device of content description generation model | |
| CN106775210A (en) | The method and apparatus that wallpaper is changed |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170517 |