WO2015074428A1 - 神经网络***、基于神经网络***的图像解析方法和装置 - Google Patents

神经网络***、基于神经网络***的图像解析方法和装置 Download PDF

Info

Publication number
WO2015074428A1
WO2015074428A1 PCT/CN2014/081975 CN2014081975W WO2015074428A1 WO 2015074428 A1 WO2015074428 A1 WO 2015074428A1 CN 2014081975 W CN2014081975 W CN 2014081975W WO 2015074428 A1 WO2015074428 A1 WO 2015074428A1
Authority
WO
WIPO (PCT)
Prior art keywords
occlusion
layer
network
sub
image
Prior art date
Application number
PCT/CN2014/081975
Other languages
English (en)
French (fr)
Inventor
罗平
王晓刚
梁炎
刘健庄
汤晓鸥
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015074428A1 publication Critical patent/WO2015074428A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition

Definitions

  • the present invention relates to data communication technologies, and in particular, to a neural network system, an image analysis method and apparatus based on a neural network system. Background technique
  • Pedestrian goal analysis is the decomposition of a pedestrian image into areas with specific semantics, such as hair, torso, arms, legs, and so on. After the pedestrian goal is analyzed, it can be conveniently used for a variety of pedestrian target analysis and understanding tasks such as pedestrian pose estimation and behavior analysis. It has important application value in image and video search, video surveillance and other methods. Pedestrian goal analysis is very challenging, not only because pedestrians have great changes in appearance, posture, shape, etc., but also pedestrian images captured in real-life environments such as video surveillance often have large occlusions and clutter. background. At present, the existing pedestrian target analysis methods can be generally divided into two categories: template matching method and Bayesian inference method.
  • the template matching method is to pre-establish a template library of each part of the human body, and collect several samples for each part.
  • a template library of each part of the human body, and collect several samples for each part.
  • Bayesian inference method is to use the labeled training image.
  • learn the shape model is an MSBM, which can determine the probability of the class label of each pixel on the image.
  • learn the apparent model The apparent model is for everyone.
  • the parameter statistics of the body part under the mixed Gaussian model can determine the probability of a certain human body part appearing under an apparent condition.
  • the shape model and the apparent model are combined to obtain a joint model to determine the image, shape, appearance, and class label. The joint probability between the four.
  • the invention provides a neural network system and an image analysis method and device based on a neural network system, which can solve the analysis problem when the target object is occluded, so that the analysis result is more accurate.
  • a first aspect of the present invention provides an image analysis method based on a neural network system, including: the neural network system acquires a first visual feature vector X of a target object, where the neural network system includes an occlusion estimation sub-network and an occlusion complement.
  • Network, decomposition subnetwork
  • the occlusion estimation sub-network determines an occlusion mark vector ⁇ of the occluded portion of the target object according to the first visual feature X vector of the target object, and the components of the occlusion mark vector ⁇ have a value greater than 0 and less than 1;
  • the occlusion complement sub-network determines a third visual feature vector ⁇ of the target object according to the first visual feature vector X and the occlusion mark vector, and the third visual feature vector is after the occlusion portion is completed a visual feature vector of the target object;
  • the decomposing sub-network determines a class label image of each part of the target object according to the third visual feature vector, and combines the class label images of the parts to obtain an analysis result of the target object.
  • the occlusion estimation sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer Connect in sequence;
  • the occlusion estimation sub-network determines, according to the first visual feature vector X, an occlusion mark vector of the occluded portion of the target object, including:
  • the occlusion estimation sub-network uses the first visual feature vector X as an input parameter of an input layer of the occlusion estimation sub-network, and calculates the occlusion mark vector according to the following formulas (1) and (2).
  • formula (1) is a mapping function between the input layer and the hidden layer of the occlusion estimation sub-network
  • formula (2) is a mapping function between the hidden layer and the output layer of the occlusion estimation sub-network
  • W ' is the weight matrix between the input layer and the hidden layer of the occlusion estimation subnetwork
  • b is the weight matrix between the input layer and the hidden layer of the occlusion estimation subnetwork
  • W ⁇ is a nonlinear activation function
  • W is between the hidden layer and the output layer of the occlusion estimation sub-network a weight matrix, which is an offset between the hidden layer and the output layer of the occlusion estimation subnetwork
  • the occlusion complement sub-network is a five-layer network, including: an input layer, three hidden layers, and an output layer, where the three hidden layers respectively a first hidden layer, a second hidden layer, and a third hidden layer, wherein the input layer, the first hidden layer, the second hidden layer, the third hidden layer, and the output layer are sequentially connected;
  • the occlusion complementing sub-network determines a third visual feature vector ⁇ of the target object according to the first visual feature vector X and the occlusion mark vector, including:
  • the occlusion complement sub-network multiplies the occlusion mark vector by the first visual feature vector X component by component to obtain an occlusion feature vector ⁇ * ⁇ .
  • the occlusion mark vector ⁇ is the same as the dimension of the first visual feature vector X;
  • the occlusion complement sub-network occludes the occlusion feature vector ⁇ * ⁇ .
  • the third visual feature vector is calculated according to the following formulas (3), (4), (5), and (6)
  • equation (3) is the mapping function between the input layer and the first hidden layer of the occlusion complement subnetwork
  • equation (4) Completing a mapping function between the first hidden layer and the second hidden layer of the occlusion network
  • formula (5) is a second hidden layer and a third hidden layer of the occlusion complementing sub-network a mapping function between the third implicit layer and the output layer of the occlusion complement sub-network, the input layer and the first hidden layer of the occlusion complement sub-network a weight matrix between the input layer and the first hidden layer of the occlusion complement sub-network, the first hidden layer and the second hidden layer of the occlusion complement sub-network Weight between a matrix, the offset between the first hidden layer and the second hidden layer of the occlusion complement sub-network, between the second hidden layer and the third hidden layer of the occlusion complement sub-network a weight matrix, where
  • the decomposed sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are sequentially Connection
  • the decomposing sub-network uses the third visual feature vector as an input parameter of an input layer of the decomposed sub-network, and determines a class-like image of each part of the target object according to the following formulas (7) and (8): ⁇ p ⁇ W h x + b h ) ( 7 )
  • the formula (7) is a mapping function between the input layer and the hidden layer of the decomposed subnetwork
  • the formula (8) is a mapping function between the hidden layer and the output layer of the decomposed subnetwork.
  • a weight matrix between the input layer and the hidden layer of the decomposed sub-network, an offset between the input layer and the hidden layer of the decomposed sub-network, and a class label image indicating the first part of the target object a weight matrix between the hidden layer and the output layer of the decomposed sub-network corresponding to the label image of the first part, indicating an implicit layer of the decomposed sub-network corresponding to the label image of the first part
  • the various types of target images are combined to obtain an analysis result of the target object.
  • the occlusion estimation sub-network determines, according to a first visual feature X vector of the target object, an occlusion mark vector of the occluded portion of the target object, including:
  • the occlusion estimation sub-network downsamples the first visual feature X vector to obtain a second visual special Solving a vector x d , and determining an occlusion mark vector of the occluded portion of the target object according to the first visual feature vector, wherein a dimension of the second visual feature vector is smaller than the first visual feature X
  • the occlusion mark is the same as the dimension of the second visual feature to: tx d .
  • the occlusion complementing sub-network roots according to the first visual feature and the occlusion mark determining a third eigenvector vector of the target object, including:
  • the occlusion complement sub-network determines a third visual feature vector of the target object from the occlusion mark to: x ° according to the second visual feature.
  • a second aspect of the present invention provides an image analysis method based on a neural network system, including: acquiring training samples corresponding to each sub-network of the neural network system, where the neural network system includes an occlusion estimation sub-network and an occlusion complement sub-network Decomposing the sub-network, the training samples corresponding to the sub-networks respectively include an I-sub image, and I takes a positive integer greater than one;
  • parameters of the sub-networks include A weight matrix and an offset between two interconnected layers in each subnetwork.
  • the occlusion estimation sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer Connect in sequence;
  • Pre-training the occlusion estimation sub-network according to the training samples corresponding to each sub-network including:
  • Extracting a visual feature vector of each image in the training sample corresponding to the occlusion estimation sub-network, and obtaining a feature vector set ⁇ ⁇ , ⁇ of each image in the training sample, where the column vector X represents a visual of the second image Characteristic vector, l ⁇ i ⁇ I;
  • Is the output of the input layer of the occlusion estimation subnetwork, II is the Frobenius norm.
  • the occlusion complement sub-network is a five-layer network, including: an input layer, three hidden layers, and an output layer, where the three hidden layers are respectively a first hidden layer, a second hidden layer, and a third hidden layer, wherein the input layer, the first hidden layer, the second hidden layer, the third hidden layer, and the output layer are sequentially connected;
  • Pre-training the occlusion-compensating sub-network according to the training samples corresponding to the sub-networks including:
  • Determining an input layer and a first hidden layer of the occlusion complement sub-network according to the set of visual feature vectors when the images in the training samples corresponding to the occlusion complement sub-network are occluded and the set of visual feature vectors when the occlusion is not occluded Determining a weight matrix and an offset between the weights, determining a weight matrix and a bias between the first hidden layer and the second hidden layer of the occlusion complement sub-network, and determining a second hiddenness of the occlusion complement sub-network Determining a weight matrix and an offset ⁇ between the layer and the third hidden layer, determining a weight matrix 'and a bias between the third hidden layer and the output layer of the occlusion complement subnetwork, where f is Transpose matrix, w is the transposed matrix.
  • the image of the visual feature vector when the image in the training sample corresponding to the occlusion complement sub-network is occluded and the visual feature without the occlusion a vector set determines an input layer and a portion of the occlusion complement subnetwork Determining a weight matrix between the first hidden layer and the second hidden layer of the occlusion complement sub-network and an offset ⁇ , determining a weighting matrix between the first hidden layer and the second hidden layer Determining a weight matrix and an offset between the second hidden layer and the third hidden layer, determining a weight matrix W and an offset between the third hidden layer and the output layer of the occlusion complement sub-network, including:
  • ⁇ ⁇ is the mth of the standard deviation vector ⁇ when the occlusion portion of each image in the training sample corresponding to the occlusion complement sub-network is used as noise
  • the component is the mth component of the eigenvector ⁇ ⁇ , h; the nth component of h c , representing the weight of the connection ⁇ and , the term '; the nth component of the representation, the mth component;
  • the second RBM energy is minimized by a contrast diffusion method to obtain the weight matrix W, the offset ⁇ and ";
  • the gradient descent method is used to minimize the error between the sums, and the adjusted W, W b Cl , u Cl , and M 0 are obtained.
  • the decomposed sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are This connection;
  • the pre-training the decomposed sub-network according to the training samples corresponding to each sub-network includes:
  • a label image indicating a first portion of the target object ⁇ indicating an offset between an implicit layer and an output layer of the decomposed sub-network corresponding to the label image of the first portion, indicating the a weight matrix between the hidden layer and the output layer of the decomposed subnetwork corresponding to the partial class image;
  • Occlusion estimation sub-network occlusion complement sub-network
  • decomposed sub-network for pre-training After describing the parameters of each subnet, it also includes:
  • the stochastic gradient descent method is used to solve the optimal solution of the loss function E, and the adjusted weight matrix and offset of the neural network system are determined.
  • the method for solving the optimal weight of the loss function E by using a stochastic gradient down method, and determining the adjusted weight matrix of the neural network system includes:
  • the actual class image, y represents the class image of the image output by the neural network system.
  • the backward projection error of the layer/layer diag(. represents a diagonal matrix operation, which is a weight matrix of the upper layer, which is a backward projection error of the upper layer.
  • the backward projection error of the Zth layer e ' f ⁇ Q , where
  • a third aspect of the present invention provides a neural network system, including:
  • An occlusion estimation sub-network configured to determine, according to the first visual feature " ⁇ vector of the acquired target object, an occlusion mark vector of the occluded portion of the target object, where the value of each component of the occlusion mark vector is greater than 0 and less than 1
  • the first visual feature vector is a visual feature vector of the target object when there is occlusion;
  • An occlusion complement sub-network configured to determine, according to the first visual feature vector X and the occlusion mark vector, a third visual feature vector of the target object, where the third visual feature vector is an object without occlusion The visual feature vector of the thing;
  • a decomposing sub-network configured to determine a class label image of each part of the target object according to the third visual feature vector, and combine the class label images of the parts to obtain an analysis result of the target object.
  • the occlusion estimation sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer Connect in sequence;
  • the occlusion estimation sub-network is specifically used to:
  • the first visual feature vector X is used as an input parameter of an input layer of the occlusion estimation sub-network, and the occlusion mark vector ⁇ is calculated according to formulas (1) and (2).
  • the occlusion complement sub-network is a five-layer network, including: an input layer, three hidden layers, and an output layer, where the three hidden layers are respectively a first hidden layer, a second hidden layer, and a third hidden layer, wherein the input layer, the first hidden layer, the second hidden layer, the third hidden layer, and the output layer are sequentially connected;
  • mapping function between the input layer and the first hidden layer of the occlusion complement subnetwork is a formula
  • the weight matrix between the input layer and the first hidden layer of the occlusion complement subnetwork is the offset between the input layer and the first hidden layer of the occlusion complement subnetwork ;
  • mapping function between the first hidden layer and the second hidden layer of the occlusion complement sub-network is the formula (4):
  • Z2 p(W ⁇ z 1 + b ⁇ ) ' where, the occlusion is complemented a weight matrix between the first hidden layer and the second hidden layer of the all sub-network, which is an offset between the first hidden layer and the second hidden layer of the occlusion complement sub-network;
  • mapping function between the second hidden layer and the third hidden layer of the occlusion complement sub-network is formula (5): z c z » is the second hidden layer of the occlusion complement sub-network and the a weight matrix between the three hidden layers, where ⁇ is an offset between the second hidden layer and the third hidden layer of the occlusion complementing subnetwork;
  • mapping function between the third hidden layer and the output layer of the occlusion complement subnetwork is a formula
  • x ⁇ p(W ⁇ Z3 + u ⁇ , W is a weight matrix between the third hidden layer and the output layer of the occlusion complement subnetwork, and is the occlusion complement subnetwork
  • W is the transposed matrix
  • f is the transposed matrix
  • W ⁇ ax ⁇ x is a nonlinear activation function
  • the occlusion estimation sub-network is specifically used to:
  • the multiplication result is ⁇ * ⁇ .
  • the third visual feature vector is calculated according to the formulas (3), (4), (5), and (6) as parameters of the input layer of the occlusion complement subnetwork.
  • the decomposed sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are This connection;
  • mapping function between the input layer of the decomposed subnetwork and the hidden layer is the formula (7):
  • z p(W ⁇ x + b' ⁇ , which is the input layer and the hidden layer of the decomposed subnetwork a matrix of weights between the hidden layer and the output layer of the decomposed subnetwork;
  • the decomposing sub-network is specifically configured to: use the third visual feature vector as an input parameter of an input layer of the decomposed sub-network, and determine a class label of each part of the target object according to formulas (7) and (8) An image, which combines the various types of target images to obtain an analysis result of the target object.
  • the occlusion estimation sub-network is specifically configured to:
  • the occlusion complement sub-network is specifically used to:
  • a fourth aspect of the present invention provides an image analysis apparatus based on a neural network system, including: an acquisition module, configured to acquire training samples corresponding to each sub-network of the neural network system, where the neural network system includes an occlusion estimation sub-network, The occlusion complements the sub-network and the decomposed sub-network, and the training samples corresponding to the sub-networks respectively include an I-sub-image, and I takes a positive integer greater than 1.
  • the training module is configured to respectively perform training samples corresponding to the sub-networks.
  • the occlusion estimation sub-network, the occlusion complement sub-network, and the decomposed sub-network perform pre-training to obtain parameters of the sub-networks, where parameters of each sub-network include two interconnected layers in the sub-networks Weight matrix and offset.
  • the occlusion estimation sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer Connect in sequence;
  • the training module is specifically configured to: extract a training sample corresponding to the occlusion estimation sub-network a visual feature vector of each image, obtaining a feature vector set of each image in the training sample
  • the occlusion complement sub-network is a five-layer network, including: an input layer, three hidden layers, and an output layer, where the three hidden layers are respectively a first hidden layer, a second hidden layer, and a third hidden layer, wherein the input layer, the first hidden layer, the second hidden layer, the third hidden layer, and the output layer are sequentially connected;
  • the training module is specifically configured to: extract a visual feature vector set when each image in the training sample corresponding to the occlusion complement sub-network is unoccluded, where each image in the training sample corresponding to the occlusion complement sub-network is Object of occlusion;
  • the set of visual feature vectors in the absence of occlusion determines a weight matrix and an offset between the input layer and the first hidden layer of the occlusion complement sub-network, and determines a first hidden layer and a portion of the occlusion complement sub-network Weight matrix and offset ⁇ between two hidden layers
  • the occlusion complements the weight matrix and the offset between the second hidden layer and the third hidden layer of the sub-network, and determines the weight between the third hidden layer and the output layer of the occlusion complement sub-network Matrix W and offset M where W is the transposed matrix and is the transposed matrix.
  • the training module is specifically used to:
  • T m is the mth component of the standard deviation vector when the occlusion portion of each image in the training sample corresponding to the occlusion complement sub-network is used as noise, and is the mth component of the feature vector, h: 'is W
  • the nth component of :, ist denotes the weight of the connection ⁇ and
  • b: ' is the nth component of b c ', the mth component of the representation;
  • the first RBM energy is minimized by a contrast diffusion method, and the weight matrix, the offset V and the mouth are obtained;
  • the second RBM energy is minimized by the contrast diffusion method to obtain the weight matrix W, the offset ⁇ and "; the transposed matrix of the weight matrix w and ⁇ is obtained, and the sum is obtained.
  • the training module is further configured to: reconstruct a visual feature vector set in a case where each image in the training sample is unoccluded according to the following formula
  • the decomposed sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are This connection;
  • Extracting, by extracting, a part of the image of each part of the image in the training sample corresponding to the decomposed sub-network, the output of a visual feature vector in the feature vector set ⁇ at the input layer of the decomposed sub-network ⁇ + W), ⁇ Indicates the number of class-label images, and the value of ⁇ is a positive integer of i ⁇ M, and will be mapped to different class-label images according to the following mapping function:
  • the label image indicating the first part of the target object indicates an offset between the hidden layer and the output layer of the decomposed sub-network corresponding to the label image of the first part, indicating the first part a weight matrix between the hidden layer and the output layer of the decomposed subnetwork corresponding to the class label image;
  • r be the set of class-like images on which all visual feature vectors are mapped on the decomposed sub-network, and minimize the error between r and F to obtain w'i, .
  • I a visual feature vector set of each image in the occlusion estimation sub-network training sample
  • X represents a visual feature vector of the second sub-image
  • F ⁇ is a manually determined class-collected image set of each image in the training sample
  • r ⁇ y
  • is a set of a class image of each image in the training sample output by the neural network system, which is the first image output by the neural network system Class-like images
  • W and b are the neural networks a set of weighting matrices and offsets for the system;
  • the stochastic gradient descent method is used to solve the optimal solution of the loss function E, and the adjusted weight matrix and offset of the neural network system are determined.
  • the parameter adjustment module is specifically configured to:
  • the layer/layer has an sigmoid function operation
  • the backward projection error of the layer/layer Wherein, diag(. represents a diagonal matrix operation, which is a weight matrix of the upper layer, which is a backward projection error of the upper layer.
  • diag(. represents a diagonal matrix operation, which is a weight matrix of the upper layer, which is a backward projection error of the upper layer.
  • the neural network system and the image analysis method and device based on the neural network system provided by the embodiment of the present invention acquire the first visual feature vector X of the target object through the neural network system, and then determine the target according to the first visual feature X vector of the target object.
  • the occlusion mark vector ⁇ of the occluded portion of the object determines the third visual feature vector ⁇ of the target object according to the first visual feature vector X and the occlusion mark vector ⁇ , and the third visual feature vector ⁇ is the visual feature of the target object after the occlusion portion is completed Vector, finally, determining the class label of each part of the target object according to the third visual feature vector
  • the image, combining the class image of each part to obtain the analysis result of the target object can solve the image analysis problem when the target object has occlusion, and can accurately estimate the target object with the occlusion part.
  • FIG. 1 is a flow chart of an embodiment of an image analysis method based on a neural network system
  • FIG. 2 is a schematic diagram of an analysis result of an unoccluded target pedestrian
  • FIG. 3 is a schematic diagram of an analysis result of an occlusion target pedestrian
  • FIG. 5 is a flow chart of an embodiment of a training method for a neural network system according to the present invention
  • FIG. 6 is a schematic diagram of a target pedestrian occlusion setting when a pre-training occlusion complements a sub-network
  • FIG. 7 is a neural network system of the present invention
  • FIG. 8 is a schematic structural diagram of an embodiment of an image analysis apparatus based on a neural network system according to the present invention
  • FIG. 9 is a schematic structural view of still another embodiment of an image analysis apparatus based on a neural network system according to the present invention.
  • FIG. 10 is a schematic structural diagram of still another embodiment of a neural network system according to the present invention
  • FIG. 11 is a schematic structural diagram of still another embodiment of an image analysis apparatus based on a neural network system according to the present invention. detailed description
  • FIG. 1 is a flow chart of an embodiment of an image analysis method based on a neural network system according to the present invention. As shown in FIG. 1, the method in this embodiment may include:
  • Step 101 The neural network system acquires a first visual feature vector of the target object.
  • the neural network system mainly includes an occlusion estimation sub-network, an occlusion complement sub-network, and an decomposition sub-network.
  • the occlusion estimation sub-network is mainly used to estimate which parts of the target object are occluded
  • the occlusion complement sub-network is mainly used for synthesis.
  • the visual feature vector of the occluded portion, the decomposition sub-network is mainly used to map the complemented visual feature vector to the class image of each part of the target object.
  • a target object in the target image is parsed.
  • an image includes a pedestrian and some background, a target object. It refers to the pedestrian in this image.
  • the target thing can also be a cat, a dog, an airplane, a car, etc. in an image.
  • the neural network system can extract the first visual feature vector of the target object in the target image by using the direction gradient value square map HOG, SIFT, Gabor, LBP, and of course, the first visual feature vector of the target object can be extracted by other existing methods.
  • the invention is not limited thereto.
  • Step 102 The occlusion estimation sub-network determines the occlusion mark vector of the occluded part of the target object according to the first visual feature X vector of the target object.
  • the value of each component of the occlusion mark vector is greater than 0 and less than 1.
  • the occlusion estimation sub-network is mainly used to estimate which parts of the target object are occluded.
  • the occlusion estimation sub-network as a neural network system may include an input layer, multiple hidden layers and an output layer, and the number of hidden layers is not Make restrictions.
  • the occlusion estimation sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are sequentially connected, that is, the input layer and the hidden layer. With layer connections, the hidden layer is connected to the output layer.
  • Each layer includes a plurality of units, and the units of the adjacent layers are interconnected, and the connections are given weights, and the weights are obtained by pre-training the neural network system.
  • the occlusion estimation sub-network determines the occlusion mark vector of the occlusion portion of the target object according to the first visual feature vector X, specifically: first, the occlusion estimation sub-network uses the first visual feature vector X as an input parameter of the input layer of the occlusion estimation sub-network, Then, calculate the occlusion mark vector according to the following formulas (1) and (2) ⁇
  • formula (1) is the mapping function between the input layer and the hidden layer of the occlusion estimation sub-network
  • equation (2) is the mapping function between the hidden layer and the output layer of the occlusion estimation sub-network, which is the occlusion estimation.
  • the weight matrix between the input layer and the hidden layer of the sub-network is the offset between the input layer and the hidden layer of the occlusion estimation sub-network, W ⁇ x) is a nonlinear activation function, and W is an occlusion estimation sub-network
  • the occlusion mark vector is for the first visual feature vector " ⁇ , which is simply which component of the first visual feature vector ⁇ is occluded, and each component of the occlusion mark vector ⁇ is between 0 and 1. The closer to 0, the more likely this component is to be occluded, and the closer to 1 the more likely this component is unoccluded.
  • the target object of the input image may be occluded or unoccluded.
  • the estimated occlusion mark vector component is closer to 1.
  • Step 103 The occlusion complement sub-network determines a third visual feature vector ⁇ of the target object according to the first visual feature vector X and the occlusion mark vector, and the third visual feature vector is a visual feature vector that complements the target object after the occlusion portion.
  • the occlusion complement sub-network is mainly used to synthesize the visual feature vector of the occluded part.
  • the occlusion complement sub-network as a neural network system may include an input layer, multiple hidden layers and an output layer, and the number of hidden layers There are no restrictions.
  • the occlusion estimation sub-network is a five-layer network, including: one input layer, three hidden layers, and one output layer, and the three hidden layers are the first hidden layer and the second hidden layer respectively.
  • the inclusion layer, the third hidden layer, the input layer, the first hidden layer, the second hidden layer, the third hidden layer and the output layer are sequentially connected.
  • Each layer consists of multiple units, and the units of the adjacent layers are interconnected and given weights. The weights are obtained by pre-training the neural network system.
  • Complement occlusion is determined according to a first sub-network visual feature vector X and vector shield third visual marking target eigenvector ⁇ things, specifically as follows: First, the shutter shielding the completion sub-network by the first token vector ⁇ visual feature vector ⁇ The components are multiplied to obtain the occlusion feature vector ⁇ * ⁇ . , wherein the occlusion mark vector is the same as the dimension of the first visual feature vector X; then, the occlusion complete subnet The network will occlude the feature vector X*X.
  • the occlusion complement subnetwork according to the following formulas (3), (4), and (5) visual features to x c .
  • equation (3) is the occlusion complement subnetwork
  • the firing function, the formula (5) is the mapping function between the second hidden layer and the third hidden layer of the occlusion complement subnetwork, and the formula (6) is the third hidden layer and the output layer of the occlusion complement subnetwork.
  • the mapping function between the input layer and the first hidden layer of the occlusion sub-network is occlusion, and the offset between the input layer and the first hidden layer of the occlusion sub-network is occluded.
  • the occlusion feature vector ⁇ * ⁇ is obtained by multiplying the first visual feature vector and the occlusion mark vector by components. Then, through the occlusion complementing sub-network, the visual features of the occluded portion are synthesized, and the third visual feature vector is obtained after the occlusion portion is complemented.
  • Step 104 The decomposed sub-network determines a class image of each part of the target object according to the third visual feature vector, and combines the class image of each part to obtain an analysis result of the target object.
  • the decomposed sub-network is mainly used to map the complementary visual feature vector to the class image of each part of the target object, and the decomposed sub-network as a neural network system may include an input layer, multiple hidden layers and an output layer.
  • the number of hidden layers is not limited.
  • the decomposed sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, and the input layer, the hidden layer, and the output layer are sequentially connected.
  • Each layer includes a plurality of units, and the units of the adjacent layers are interconnected, and the connections are given weights, and the weights are obtained by pre-training the neural network system.
  • the decomposed sub-network determines the class image of each part of the target object according to the third visual feature vector, and combines the class image of each part to obtain the parsing result of the target object, specifically: First, the decomposed subnetwork uses the third visual feature vector ⁇ as Decompose the input parameters of the input layer of the sub-network, and determine the class image of each part of the target object according to the following formulas (7) and (8): z ⁇ p ⁇ W x c + b ) ( 7 )
  • equation (7) is the mapping function between the input layer and the hidden layer of the decomposition subnetwork
  • equation (8) is the mapping function between the hidden layer and the output layer of the decomposition subnetwork, which is the input of the decomposition subnetwork.
  • the weight matrix between the layer and the hidden layer is the offset between the input layer and the hidden layer of the decomposition subnetwork.
  • the target object is decomposed into M different parts, each part corresponding to a class label image, indicating the class image of the first part of the target object, indicating the hidden layer and the output layer of the decomposed subnetwork corresponding to the class image of the first part
  • a weight matrix between the hidden layer and the output layer of the decomposition subnetwork corresponding to the class image of the first part, p(x) max(0, x) is a nonlinear activation function
  • the third visual feature vector is obtained after the occlusion portion is obtained in step 103, and the class image of each part of the target object is obtained, and then the various types of target images are combined to obtain the target object. result.
  • FIG. 2 is a schematic diagram of the analysis result of the unobstructed target pedestrian
  • FIG. 3 is a schematic diagram of the analysis result of the occlusion target pedestrian.
  • the image in the first row of FIG. 2 represents the image actually captured in the real environment, and the second row represents the analysis of the embodiment.
  • the third line represents the actual standard image of the manual calibration; the image of the first line in Figure 3 represents the actual captured image in the real environment, the target pedestrians in these images are partially obscured,
  • the two rows represent the results of the target pedestrians parsed in this embodiment, and the third row represents the manually labeled real class logo images.
  • the method provided in this embodiment acquires the first visual feature vector X of the target object through the neural network system, and then determines the occlusion mark vector of the occluded portion of the target object according to the first visual feature X vector of the target object, according to the first vision.
  • Feature Vector X and Occlusion Marker Vector ⁇ OK The third visual feature vector ⁇ of the target object, the third visual feature vector is a visual feature vector of the target object after the occlusion portion is completed, and finally, the class image of each part of the target object is determined according to the third visual feature vector ⁇
  • the classification image of the part obtains the analysis result of the target object, which can solve the image analysis problem when the target object has occlusion, and can accurately estimate the target object with the occlusion part.
  • the neural network system may further downsample the first visual feature vector X.
  • the main purpose of downsampling is to reduce the amount of data, so as to improve the processing speed of the neural network system.
  • the occlusion estimation sub-network downsamples the first visual feature X vector to obtain a second visual feature vector, and determines an occlusion mark vector of the occlusion portion of the target object according to the first visual feature vector, where the second visual feature vector The dimension is smaller than the first visual feature X, and the occlusion mark vector ⁇ is the same as the dimension of the second visual feature vector x d .
  • the occlusion complement sub-network determines the third visual feature vector of the target object according to the first visual feature vector " ⁇ " and the occlusion mark vector, specifically: the occlusion complement sub-network according to the second visual feature vector ⁇ and the occlusion mark vector
  • the third visual feature vector of the target object is determined.
  • the specific implementation manner can be referred to the description in the first embodiment, and details are not described herein. As shown in FIG. 4, FIG. 4, FIG.
  • FIG. 4 is a schematic diagram of the process of parsing the target pedestrian with occlusion, first inputting The image extracts the target pedestrian first visual feature vector X, and then downsamples the first visual feature vector X to obtain the second visual feature vector ⁇ , and determines the occlusion mark vector of the occluded portion of the target pedestrian according to the first visual feature vector X.
  • the occlusion complement sub-network multiplies the occlusion mark vector ⁇ by the first visual feature vector X by component to obtain an occlusion feature vector ⁇ * ⁇ .
  • the occlusion complement sub-network occludes the feature vector ⁇ * ⁇ as an occlusion complement.
  • the quantity determining image y of each part of the target object is determined, as shown in the figure, to determine the hair type target image of the target pedestrian according to the third visual feature vector ⁇ , indicating the upper body standard image of the target pedestrian, 3 ⁇ 4 indicates
  • the target figure of the target pedestrian is determined, and after all the target images of the target pedestrian are determined, the classification image of each part is combined in a certain manner to obtain the analysis result of the target pedestrian.
  • FIG. 5 is an implementation method of the neural network system of the present invention.
  • the method in this embodiment may include: Step 201: Obtain a training sample corresponding to each sub-network of the neural network system. Before the pre-training of the neural network system, the training samples corresponding to the sub-networks of the neural network system of the neural network system are first acquired.
  • the neural network system mainly includes three sub-networks, which are respectively occlusion meter networks and occlusions.
  • each word network corresponds to one training sample; and training each sub-network according to the training samples corresponding to each sub-network during training, the training samples of each ⁇ network are different, and each sub-network corresponds to
  • the training samples respectively include I sub-images, and I takes a positive integer greater than one.
  • Step 202 Perform pre-training on the occlusion estimation sub-network, the occlusion complement sub-network, and the decomposed sub-network according to the training samples corresponding to each sub-network, and obtain parameters of each sub-network, where the parameters of each sub-network include each other in each sub-network.
  • the weight matrix and offset between the two layers of the connection are the parameters of each sub-network.
  • the occlusion estimation sub-network, the occlusion complement sub-network, and the decomposed sub-network are pre-trained according to the training samples corresponding to each sub-network, and the parameters of each sub-network are obtained.
  • the training process of each sub-network will be specifically described below:
  • the occlusion estimation sub-network is pre-trained to illustrate that the estimator sub-network is a three-layer network.
  • the occlusion estimation sub-network includes: an input layer, an implicit layer, an output layer, an input layer, an implicit layer, and an output layer. Connect in order. It should be clear that the number of layers of the occlusion estimation sub-network can be more, and the present invention is not limited thereto.
  • the occlusion estimation sub-network has several layers, and can be trained according to the method provided in this embodiment. In this embodiment, only The occlusion estimation sub-network is described as an example.
  • the occlusion estimation sub-network is pre-trained according to the training samples corresponding to each sub-network, including:
  • the training samples corresponding to the occlusion estimation sub-network include 1 sub-images, the I sub-image mainly includes two types of images, the first type is an image in which the target object is occluded, and the second type is an image in which the target object is not occluded.
  • the occlusion portion of each image may be determined manually, and the occlusion mark vector set of each image occlusion portion in the training sample corresponding to the occlusion estimation sub-network is obtained.
  • Is the output of the input layer of the occlusion estimation subnetwork, ⁇ 3, III is the Frobenius norm, ⁇ . — T(WH 0 ')
  • Method 1 It can be solved based on the least squares dictionary learning method, and the following two formulas can be solved iteratively:
  • the pre-training of the occlusion complement sub-network is introduced.
  • the occlusion complement sub-network is taken as an example.
  • the occlusion complement sub-network includes: input layer, three hidden layers and output layers, and three hidden layers. The first hidden layer, the second hidden layer, the third hidden layer, the input layer, the first hidden layer, and the second hidden The containing layer, the third hidden layer, and the output layer are sequentially connected. It should be clear that the number of layers of the occlusion complement sub-network can be more, and the present invention is not limited thereto.
  • the occlusion complement sub-network has several layers, and can be trained according to the method provided in this embodiment. In this embodiment, the occlusion complement sub-network is taken as an example.
  • the pre-training of the occlusion complement sub-network according to the training samples corresponding to each sub-network may include the following steps:
  • each image in the training sample corresponding to the occlusion complement sub-network is an unobstructed target object, and an unoccluded image captured in a real environment may be used.
  • the second set of visual feature vectors is set when each image in the training sample corresponding to the occlusion complement sub-network is set with occlusion
  • Each image in the training sample corresponding to the occlusion complement sub-network is an unobstructed target object.
  • the visual feature vector set VS when each image is set with occlusion in the training sample corresponding to the occlusion complement sub-network can be artificially applied to the real environment.
  • the unobstructed image captured in the artificial simulation of the occlusion part Figure 6 is the schematic diagram of the target pedestrian occlusion setting when the pre-training occlusion complements the sub-network.
  • the target object is the target pedestrian, and the human being sets the proper image for each image.
  • the black part of the figure indicates the occlusion part of the image setting.
  • the 40 parts of the target pedestrian are blocked, and the 40 occlusion modes of the target pedestrian are simulated.
  • the third layer determines the input layer and the first hidden layer of the occlusion complement sub-network according to the visual feature vector set when each image in the training sample corresponding to the occlusion complement sub-network has occlusion and the visual feature vector set when the occlusion is not occluded Determining the weight matrix and offset between the first hidden layer and the second hidden layer of the occlusion complement sub-network, determining the second hidden layer and the third of the occlusion complement sub-network The weight matrix w and the offset ⁇ between the hidden layers determine the weight matrix f and the offset between the third hidden layer and the output layer of the occlusion complement sub-network, where f is the transposed matrix of ⁇ , The transposed matrix of w.
  • x m is a whole blocking complement training samples in the sub-network corresponding to the respective shutter portions of the image as a standard deviation of the noise vector at the m-th component, ⁇ ;
  • ⁇ ⁇ feature vector is the m-th component, h ;;
  • V The nth component,tician denotes the weight of the connection and 1 ⁇ , is the eleventh component of ⁇ ', and represents the mth component of ⁇ ;
  • the first RBM energy is minimized by the contrast diffusion method, and the weight matrix W offset and u c ' are obtained;
  • the qth component, u c represents the pth component of ⁇ ;
  • the second RBM energy is minimized by the contrast diffusion method, and the weight matrix W, the offset ⁇ and
  • the gradient descent method is used to minimize the error between ⁇ and , and the adjusted w , W b " , and " are obtained .
  • the adjusted W , W bu V and " ⁇ ' are used as the final parameters of the occlusion complement subnetwork.
  • the decomposition sub-network is used as an example for the three-layer network.
  • the decomposed sub-network includes: an input layer, an implicit layer, and an output layer.
  • the input layer, the hidden layer, and the output layer are connection.
  • the number of layers of the decomposed sub-network can be more, and the present invention is not limited thereto.
  • the method can be trained according to the method provided in this embodiment. In this embodiment, only the decomposer is used.
  • the hidden layer of the decomposition sub-network corresponds to the M weight matrix ⁇ W ⁇ ⁇ , i denotes the class image
  • the number of , a positive integer with i ⁇ M, will be mapped to a different class image according to the following mapping function:
  • the class label image indicating the first part of the target object indicates the offset between the hidden layer and the output layer of the decomposed sub-network corresponding to the category image of the first part, and indicates the corresponding image of the part of the target image Decompose the weight matrix between the hidden layer and the output layer of the sub-network, and manually calibrate the class image of each part of each image
  • r be the set of the standard image that the visual feature vector is mapped onto the decomposition subnetwork, and minimize the error between r and F to obtain w'i, w;
  • the pre-training of the occlusion estimation sub-network, the occlusion complement sub-network, and the decomposed sub-network is performed independently, and there is no sequential order during training.
  • the performance of the whole neural network system is improved.
  • the parameters of each sub-network are adjusted as a whole.
  • the parameter adjustment includes the following steps: First, construct the loss function E, and minimize the following loss function E:
  • E(Hb)
  • X representing the visual feature vector of the second image
  • F ⁇ is manually determined
  • the set of the standard image of each image in the training sample is a manually determined image of the first image of the image
  • r ⁇ y
  • is the set of the standard image of each image in the output training sample of the neural network system, is a neural network
  • the class image of the image, the image output, and W and b are the set of weight matrix and offset of the neural network system;
  • the stochastic gradient descent method is used to solve the optimal solution of the loss function E, and the adjusted weight matrix and offset of the neural network system are determined.
  • the stochastic gradient descent method is used to solve the optimal solution of the loss function E, and the adjusted weight matrix of the neural network system is determined, which is specifically as follows:
  • denotes the number of layers of the neural network system, / e ⁇ l,...L ⁇ , denotes the number of iterations, ⁇ denotes the rate of change when the gradient falls, £ is the learning rate, ⁇ is the derivative, ⁇ -W is The backward projection error of the first layer is the product between the output and the previous layer.
  • the backward projection error ⁇ has three different calculation methods.
  • y represents the actual class image of an image
  • y represents the class image of the image output by the neural network system. If the layer has an S-type function operation, the backward projection error of the z-th layer
  • agO represents the diagonal matrix operation, which is the weight matrix of the previous layer, which is the upper layer Projection error.
  • FIG. 7 is a schematic structural diagram of an embodiment of a neural network system according to the present invention.
  • the neural network system of this embodiment may include: an occlusion estimation sub-network 31, an occlusion complement sub-network 32, and an decomposition sub-network 33.
  • the occlusion estimation sub-network 31 is configured to determine, according to the first visual feature ⁇ vector of the acquired target object, an occlusion mark vector of the occluded portion of the target object, where the value of each component of the occlusion mark vector is greater than 0 and less than 1,
  • a visual feature vector is a visual feature vector of the target object when there is occlusion;
  • the occlusion complement sub-network 32 is configured to determine a third visual feature vector ⁇ of the target object according to the first visual feature vector X and the occlusion mark vector ⁇ , and the third visual feature vector ⁇ is a visual feature vector of the target object without occlusion;
  • the decomposing sub-network 33 is configured to determine a class image of each part of the target object according to the third visual feature vector, and combine the class image of each part to obtain an analysis result of the target object.
  • the network of the occlusion estimation unit 31 is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are sequentially connected;
  • W is the input layer and the hidden layer of the occlusion estimation sub-network 31.
  • is the offset between the input layer and the hidden layer of the occlusion estimation sub-network 31,
  • mapping function between the hidden layer and the output layer of the occlusion estimation subnetwork 31 is the formula (2):
  • W is a weight matrix between the hidden layer and the output layer of the occlusion estimation sub-network 31, which is a bias between the hidden layer and the output layer of the occlusion estimation sub-network 31.
  • the occlusion estimation sub-network 31 is specifically used for:
  • the first visual feature vector X is used as an input parameter of the input layer of the occlusion complement sub-network 31, and the occlusion mark vector is calculated according to the formulas (1) and (2).
  • the occlusion complement sub-network 31 is a five-layer network, including: an input layer, three hidden layers, and an output layer, wherein the three hidden layers are a first hidden layer, a second hidden layer, and a third The hidden layer, the input layer, the first hidden layer, the second hidden layer, the third hidden layer and the output layer are sequentially connected;
  • Zl p(WHx*x°) + b ⁇ , where is the weight matrix between the input layer and the first hidden layer of the occlusion complement sub-network 32, which is the input layer and the first of the occlusion complement sub-network 32 Offset between hidden layers;
  • the mapping function between the first hidden layer and the second hidden layer of the occlusion complement sub-network 32 is the formula (4): z ⁇ piW ⁇ z ⁇ b ⁇ ), where W is the occlusion complement sub-network 32 a weight matrix between the first hidden layer and the second hidden layer is an offset between the first hidden layer and the second hidden layer of the occlusion complement sub-network 32;
  • the occlusion complement subnetwork 32 is specifically used to:
  • the third visual feature vector is calculated according to the equations (3), (4), (5), and (6).
  • the decomposed sub-network 33 is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are connected;
  • the mapping function between the input layer and the hidden layer of the decomposition subnetwork 33 is Equation (7): z -p(W"x c +b") , which is between the input layer and the hidden layer of the decomposition subnetwork 33.
  • the weight matrix, ⁇ is the offset between the hidden layer and the output layer of the decomposition subnetwork 33;
  • the decomposing sub-network 33 is specifically configured to: use the third visual feature vector ⁇ as an input parameter of the input layer of the decomposed sub-network, and determine a class-like image of each part of the target object according to formulas (7) and (8), The images are combined and the result of the analysis of the target object is obtained.
  • the occlusion estimation sub-network 31 is specifically configured to: downsample the first visual feature X vector, obtain a second visual feature vector, and determine an occlusion mark vector of the occluded portion of the target object according to the first visual feature vector.
  • the dimension of the second visual feature vector is smaller than the first visual feature X, and the occlusion mark vector is the same as the dimension of the second visual feature vector x d ;
  • the occlusion complement sub-network 32 is specifically configured to: according to the second visual feature vector and the occlusion The marker vector determines the third visual feature vector of the target object.
  • the neural network system provided by this embodiment may be used to implement the technical solution provided by the method embodiment shown in FIG. 1.
  • the specific implementation manner and technical effects are similar, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of an embodiment of an image analysis apparatus based on a neural network system according to the present invention.
  • the image analysis apparatus based on the neural network system provided by the embodiment includes: an acquisition module 41 and a training module 42.
  • the obtaining module 41 is configured to acquire training samples corresponding to each sub-network of the neural network system, where the neural network system includes an occlusion estimation sub-network, an occlusion complement sub-network, and an decomposition sub-network.
  • the training samples corresponding to the sub-networks respectively include an I-sub-image, and I takes a positive integer greater than 1.
  • the training module 42 is configured to separately estimate the sub-network, the occlusion complement sub-network, and the decomposer according to the training samples corresponding to each sub-network.
  • the network performs pre-training to obtain parameters of each sub-network, and the parameters of each sub-network include a weight matrix and an offset between two layers connected to each sub-network.
  • the occlusion estimation sub-network may be a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are sequentially connected, and the training module 42 is specifically configured to: extract the occlusion estimator
  • the occlusion portions of each image are respectively determined, and the occlusion mark vector set ⁇ ⁇ of each image occlusion portion in the training sample corresponding to the occlusion estimation sub-network is obtained, where the column vector represents the visual feature vector X of the second image, and the corresponding occlusion mark Vector
  • the training module 42 specifically determines w by the following means. , b. ', w and first, order
  • the occlusion complement sub-network is a five-layer network, including: an input layer, three hidden layers, and an output layer, wherein the three hidden layers are a first hidden layer, a second hidden layer, and a third The hidden layer, the input layer, the first hidden layer, the second hidden layer, the third hidden layer and the output layer are connected in sequence; the training module 42 is specifically configured to:
  • the training module 42 obtains the weight matrix w W offset ⁇ , ", V and M C ' by:
  • x m is the mth component of the standard deviation vector when the occlusion portion of each image in the training sample corresponding to the occlusion complement sub-network is used as noise, ⁇ ; is the mth component of the feature vector, i ⁇ is the n components, representing the weight of the connection sum, the nth component of the representation, the mth component;
  • the first RBM energy is minimized by the contrast diffusion method, and the weight matrix, the offset and the u c ' are obtained;
  • the qth component, u c represents the pth component of ⁇ ;
  • the second RBM energy is minimized by the contrast diffusion method, and the weight matrix W, the offset ⁇ and
  • the training module is further configured to: reconstruct each of the training samples according to the following formula: Visual feature vector set without image occlusion
  • V c p(W c ''p(W ⁇ 'p(W ⁇ p(W c 'V c + b c ' ) + b c + u c u c ') .
  • the decomposed sub-network may be a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are connected.
  • the training module 42 is specifically configured to: _ take a visual feature vector set of each image in the training sample corresponding to the decomposition sub-network
  • the class label image indicating the first part of the target object indicates the offset between the hidden layer and the output layer of the decomposed sub-network corresponding to the category image of the first part, and the label image corresponding to the first part corresponds to: Decoding the weight matrix between the hidden layer and the output layer of the subnetwork;
  • FIG. 9 is a schematic structural diagram of still another embodiment of an image analysis apparatus based on a neural network system according to the present invention. As shown in FIG. 9, the apparatus of this embodiment is further included in the apparatus structure shown in FIG. : Parameter adjustment module 43.
  • the parameter adjustment module 43 is used to construct the loss function E, and minimize the loss function E:
  • the set of the standard image of each image in the sample is a manually determined image of the first image of the image
  • a class-like image of the output of the first image, W and b are a set of weighting matrices and offsets of the neural network system;
  • the stochastic gradient descent method is used to solve the optimal solution of the loss function E, and the adjusted weight matrix and offset of the neural network system are determined.
  • the parameter adjustment module 43 is specifically configured to: obtain pre-training to obtain a weight matrix of each sub-network, and perform iteration according to the following formula:
  • Post / layer to the upper layer and the projection error is output ⁇ / - between 1 product.
  • the backward projection error of the neural network system has the following three forms:
  • the backward projection error e L diag (y - y) diag(l - y) of the last layer of the neural network system, where diag ( ⁇ ) indicates the pair diagonal matrix calculation, y represents an actual image of a standard image class, y represents Classmark neural network image output system.
  • the Z-th layer has an S-type function operation
  • the image analysis apparatus based on the neural network system provided in this embodiment may be used to implement the technical solution provided by the method embodiment shown in FIG. 5.
  • the specific implementation manner and the technical effects are similar, and details are not described herein.
  • the neural network system 500 of this embodiment includes: a processor 51 and a memory 52.
  • the processor and the memory are connected by a bus, and the memory 52 is stored.
  • Execution of instructions when the neural network system 500 is running, the processor 51 communicates with the memory 52, and the processor 51 executes the instructions such that the neural network system 500 performs the neural network system based image analysis method provided by the present invention.
  • the occlusion estimation sub-network, the occlusion complement sub-network, and the decomposition sub-network of the neural network system can all be implemented by the processor 51, and the functions of the respective sub-networks are performed by the processor 51.
  • the processor 51 controls the occlusion estimation sub-network to determine an occlusion mark vector of the occluded part of the target object according to the first visual feature " ⁇ vector of the acquired target object, and occlude the mark vector
  • the value of each component is greater than 0 and less than 1, and the first visual feature vector is a visual feature vector of the target object when there is occlusion;
  • the processor 51 controls the occlusion complement sub-network to determine a third visual feature vector of the target object according to the first visual feature vector X and the occlusion mark vector ⁇ , and the third visual feature vector ⁇ is a visual feature vector of the target object when there is no occlusion.
  • the processor 51 controls the decomposition sub-network to determine the class image of each part of the target object according to the third visual feature vector, and combines the class image of each part to obtain the analysis result of the target object.
  • the occlusion estimation sub-network may be a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are sequentially connected; the input layer and the hidden layer of the occlusion estimation sub-network
  • the weight matrix is the offset between the hidden layer and the output layer of the occlusion estimation subnetwork.
  • (x) l/(l + eX p(-x) is an sigmoid function, and the return value is greater than 0 and less than 1;
  • the processor 51 specifically controls the occlusion estimation sub-network to use the first visual feature vector X as an input parameter of the input layer of the occlusion estimation sub-network, and calculates the occlusion mark vector according to the formulas (1) and (2).
  • the occlusion complement sub-network is a five-layer network, including: an input layer, three hidden layers, and an output layer, wherein the three hidden layers are a first hidden layer, a second hidden layer, and a third The hidden layer, the input layer, the first hidden layer, the second hidden layer, the third hidden layer and the output layer are sequentially connected;
  • the weight matrix between the layer and the output layer is the offset between the third hidden layer and the output layer of the occlusion complement subnetwork, w is the transposed matrix, W is the transposed matrix, W ax ⁇ x) a nonlinear activation function;
  • the processor 51 specifically controls the occlusion estimation sub-network to multiply the result as x*x.
  • the third visual feature vector ⁇ is calculated according to the formulas (3), (4), (5), and (6).
  • the decomposed sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are connected; and between the input layer and the hidden layer of the decomposed sub-network
  • the offset between the hidden layer and the output layer of the decomposition subnetwork is equation (8):
  • y i T(W ⁇ Z + b ⁇ ) , where, to decompose the offset between the hidden layer and the output layer of the sub-network, y! represents the class image of the first part of the target object, indicating the decomposition of the sub-network
  • Linear activation function, (x) l/(l + exp(-x) is a sigmoid function, the return value is greater than 0 and less than 1;
  • the processor 51 is specifically configured to control the decomposition sub-network to use the third visual feature vector as an input parameter of the input layer of the decomposed sub-network, and determine the class image of each part of the target object according to formulas (7) and (8), and The combination of the target images results in the analysis of the target object.
  • the processor 51 is specifically configured to control the occlusion estimation sub-network: downsample the first visual feature X vector, obtain a second visual feature vector, and determine an occlusion mark of the occluded portion of the target object according to the first visual feature vector.
  • Vector ⁇ the dimension of the second visual feature vector is smaller than the first visual feature X, and the occlusion mark vector is the same as the dimension of the second visual feature vector ⁇ ; and the occlusion complement sub-network is controlled according to the second visual feature vector ⁇ and the occlusion mark vector
  • a third visual feature vector ⁇ of the target object is determined.
  • the neural network system of this embodiment can be used to perform the technique of the method embodiment shown in FIG.
  • the scheme, which implements the original:! S and the technical effects are similar, and will not be described here.
  • FIG. 11 is a schematic structural diagram of still another embodiment of an image analysis apparatus based on a neural network system according to the present invention.
  • the image analysis apparatus 600 based on the neural network system of the present embodiment includes: a processor 61 and a memory 62, and the processor 61 and the memory 62 pass through the bus.
  • the memory 62 stores execution instructions, when the image analysis apparatus 600 based on the neural network system operates, the processor 61 communicates with the memory 62, and the processor 61 executes the instructions so that the image analysis apparatus 600 based on the neural network system performs the present invention.
  • the processor 61 is specifically configured to perform the following operations:
  • the neural network system includes an occlusion estimation sub-network, an occlusion complement sub-network, and an decomposition sub-network, and the training samples corresponding to each sub-network respectively include 1 sub-image, and I takes greater than 1 Positive integer
  • the occlusion estimation sub-network, the occlusion complement sub-network, and the decomposed sub-network are pre-trained according to the training samples corresponding to each sub-network, and the parameters of each sub-network are obtained, and the parameters of each sub-network include two layers connected to each sub-network.
  • the occlusion estimation sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, and the input layer, the hidden layer, and the output layer are sequentially connected.
  • the processor 61 pre-trains the occlusion estimation sub-network according to the training samples corresponding to each sub-network, specifically:
  • Extracting a visual feature vector of each image in the training sample corresponding to the occlusion estimation sub-network, and obtaining a feature vector set ⁇ ⁇ ⁇ , ⁇ of each image in the training sample, where the column vector X represents a visual feature vector of the second image, 1 ⁇ ⁇ /;
  • Is the output of the input layer of the occlusion estimation subnetwork, ⁇ 3 , II is the Frobenius norm.
  • the occlusion complement sub-network is a five-layer network, including: an input layer, three hidden layers, and an output layer, wherein the three hidden layers are a first hidden layer, a second hidden layer, and a third The hidden layer, the input layer, the first hidden layer, the second hidden layer, the third hidden layer and the output layer are sequentially connected; the processor 61 pre-trains the occlusion complement sub-network according to the training samples corresponding to each sub-network , Specifically:
  • the matrix and the offset ⁇ determine the weight matrix and the offset between the first hidden layer and the second hidden layer of the occlusion complement sub-network, and determine the second hidden layer and the third implicit of the occlusion complement sub-network
  • the weight matrix and the offset ⁇ between the layers determine the weight matrix w and the offset M between the third hidden layer and the output layer of the occlusion complement subnetwork, where w is the transposed matrix, and is transposed matrix.
  • the processor 61 determines the input layer and the first hidden layer of the occlusion complement sub-network according to the visual feature vector set in which each image in the training sample corresponding to the occlusion complement sub-network has occlusion and the visual feature vector set in the case of no occlusion. Determining the weight matrix between the first hidden layer and the second hidden layer of the occlusion complement sub-network and the offset ⁇ , determining the second implicit of the occlusion complement sub-network The weight matrix and the offset ⁇ between the layer and the third hidden layer determine the weight matrix and offset between the third hidden layer and the output layer of the occlusion complement sub-network, specifically:
  • W ⁇ +b be the output of the input layer of the occlusion complement subnetwork
  • ⁇ ⁇ is the mth component of the standard deviation vector ⁇ when the occlusion portion of each image in the training sample corresponding to the occlusion complement sub-network is used as noise, ⁇ ; is the mth component of the eigenvector ⁇ ,, h: 'is the n-th component: "indicates that the connection ⁇ ; and H:' weights for the n-th component, represented by the m-th component;
  • the second RBM energy is minimized by the contrast diffusion method, and the weight matrix W, the offset ⁇ and " ;
  • the processor 61 After determining the weight matrix W W offset , " , b ⁇ , the processor 61 is also used to: reconstruct the visual feature vector set in the case where the images in the training sample are unoccluded according to the following formula
  • the gradient descent method is used to minimize the error between ⁇ and the adjusted w and w b
  • the decomposed sub-network is a three-layer network, including: an input layer, an implicit layer, and an output layer, where the input layer, the hidden layer, and the output layer are connected;
  • the processor 61 pre-trains the decomposed sub-network according to the training samples corresponding to each sub-network, specifically:
  • the class label image indicating the first part of the target object indicates the offset between the hidden layer and the output layer of the decomposed sub-network corresponding to the category image of the first part, and indicates the corresponding image of the part of the target image Decomposing a weight matrix between the hidden layer and the output layer of the subnetwork;
  • the processor 61 pre-trains the occlusion estimation sub-network, the occlusion complement sub-network, and the decomposed sub-network according to the training samples, and obtains parameters of each sub-network, and is further used for:
  • the stochastic gradient descent method is used to solve the optimal solution of the loss function E, and the adjusted weight matrix and offset of the neural network system are determined.
  • Post / layer to the upper layer and the projection error is output ⁇ / - between 1 product.
  • the backward projection error of the neural network system in this embodiment has three forms, a neural network system.
  • the backward projection error e L diag(y - y)diag(l - y) of the last layer, which represents the diagonal matrix operation, y represents the actual class image of an image, and y represents the neural network system The class image of the output image.
  • the first layer has an sigmoid function operation
  • the device of this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 5, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the above-described method embodiments; and the foregoing storage medium includes: various media that can store program codes, such as ROM, RAM, disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Other Investigation Or Analysis Of Materials By Electrical Means (AREA)

Abstract

本发明实施例提供一种神经网络***、基于神经网络***的图像解析方法和装置,包括:所述神经网络***获取目标事物的第一视觉特征向量x,所述神经网络***的遮挡估计子网络根据目标事物的第一视觉特征x向量确定所述目标事物被遮挡部分的遮挡标记向量xo,所述遮挡补全子网络根据所述第一视觉特征向量x与所述遮挡标记向量xo确定补全所述遮挡部分后所述目标事物的第三视觉特征向量xc,所述分解子网络根据所述第三视觉特征向量xc确定所述目标事物的各部位的类标图像,组合所述各部位的类标图像得到所述目标事物的解析结果。上述方法能够解决目标事物被遮挡时的图像解析问题,即使目标事物被遮挡了,也能够准确的得到目标事物的解析结果。

Description

神经网络***、 基于神经网络***的图像解析方法和装置 技术领域
本发明涉及数据通讯技术, 尤其涉及一种神经网络***、 基于神经网 络***的图像解析方法和装置。 背景技术
行人目标解析, 就是将一幅行人图像分解成具有特定语义的区域, 例如 头发、 躯干、 手臂、 腿等。 行人目标进行解析后, 可以方便用于行人姿势估 计、 行为分析等多种行人目标分析与理解任务, 在图像与视频搜索、 视频监 控等方法都有重要的应用价值。 行人目标解析问题具有很大的挑战性, 不仅 由于行人在表观、 姿势、 形状等方面具有很大的变化, 而且在视频监控等真 实环境下拍摄到的行人图像经常存在大的遮挡和杂乱的背景。 目前已有的行人目标解析方法一般可以分为两类: 模板匹配法和贝叶斯 推断法。 模板匹配法是通过预先建立一个人体各部位的模板库, 每个部位收 集若干样本, 当输入一幅输入的行人图像进行解析时, 首先, 利用现有的图 像分割算法进行分割, 得到一组超像素, 作为备选的人体各部位区域, 然后, 将备选区域与模板库中的若干样本进行匹配, 将最有可能是某部位的备选区 域排在前面, 最后, 在一些约束条件下对最有可能的备选区域进行组合, 约 束条件包括上半身部位必须出现在下半身上面等, 利用层次化的表观模型对 以上组合进行排序, 选出最佳组合, 作为行人目标解析结果。 模板匹配法缺 点是过度依赖模板, 分解的区域边界不准确, 而且没有考虑目标被遮挡情况。 贝叶斯推断法是利用标注好的训练图像, 首先, 学习形状模型, 形状模型是 一个 MSBM, 可以确定图像上每个像素的类标的概率, 然后, 学习表观模型, 表观模型是每个人体部位在混合高斯模型下的参数统计, 可以确定某个人体 部位在某表观下出现的概率,最后将形状模型与表观模型组合得到联合模型, 确定出图像、 形状、 表观、 类标四者之间的联合概率。 当给定测试图像, 利 用联合模型, 通过图像、 形状和表观来推断类标, 贝叶斯推断法的缺点是对 杂乱的背景、 复杂的姿势和许多种类的衣服类型敏感, 推断过程速度慢, 没 有考虑遮挡情况。 通过上述可知, 现有的行人目标解析方法都没有考虑行人目标被遮挡的 情况, 如果行人目标被遮挡, 利用现有的方法进行解析, 会导致解析结果不 准确。
发明内容
本发明提供一种神经网络***、基于神经网络***的图像解析方法和 装置, 能够解决目标事物被遮挡时的解析问题, 使得解析结果更加准确。
本发明第一方面提供一种基于神经网络***的图像解析方法, 包括: 所述神经网络***获取目标事物的第一视觉特征向量 X, 所述神经网 络***包括遮挡估计子网络、 遮挡补全子网络、 分解子网络;
所述遮挡估计子网络根据目标事物的第一视觉特征 X向量确定所述目 标事物被遮挡部分的遮挡标记向量 ^, 所述遮挡标记向量 ^的各分量的取 值为大于 0小于 1 ;
所述遮挡补全子网络根据所述第一视觉特征向量 X与所述遮挡标记向 量 确定所述目标事物的第三视觉特征向量 ^, 所述第三视觉特征向量 为补全所述遮挡部分后所述目标事物的视觉特征向量;
所述分解子网络根据所述第三视觉特征向量 确定所述目标事物的 各部位的类标图像, 组合所述各部位的类标图像得到所述目标事物的解析 结果。
在本发明第一方面的第一种可能的实现方式中, 所述遮挡估计子网络 为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输 出层依次连接;
所述遮挡估计子网络根据所述第一视觉特征向量 X确定所述目标事物 被遮挡部分的遮挡标记向量 , 包括:
所述遮挡估计子网络将所述第一视觉特征向量 X作为所述遮挡估计子 网络的输入层的输入参数, 根据以下公式 (1 ) 和 (2 ) 计算所述遮挡标记 向量 ^
= p{W°' x + b°' ) ( 1 )
x° = r(W + ) ( 2 ) 其中, 公式 (1) 为所述遮挡估计子网络的输入层与隐含层之间的映 射函数, 公式 (2) 为所述遮挡估计子网络的的隐含层与输出层之间的映 射函数, W '为所述遮挡估计子网络的输入层与隐含层之间的权重矩阵, b。、 为所述遮挡估计子网络的输入层与隐含层之间的偏置, W ^^^ )为非 线性激活函数, W 是所述遮挡估计子网络的隐含层与输出层之间的权重 矩阵, 是所述遮挡估计子网络的隐含层与输出层之间的偏置,
(x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1。
在本发明第一方面的第二种可能的实现方式中, 所述遮挡补全子网络 为五层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个隐含层分别 为第一隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一隐含层、 第 二隐含层、 第三隐含层和输出层依次连接;
所述遮挡补全子网络根据所述第一视觉特征向量 X与所述遮挡标记向 量 确定所述目标事物的第三视觉特征向量 ^, 包括:
所述遮挡补全子网络将所述遮挡标记向量 与所述第一视觉特征向 量 X逐分量相乘, 得到遮挡特征向量 χ*χ。, 其中, 所述遮挡标记向量 ^与 所述第一视觉特征向量 X的维度相同;
所述遮挡补全子网络将所述遮挡特征向量 χ*χ。作为所述遮挡补全子 网络的输入层的参数, 根据以下公式 (3) 、 (4) 、 (5) 、 (6) 计算所 述第三视觉特征向量
Zl = p(Wc'(x*x°) + bc') (3)
z2 = p{Wc'Zl + bc') (4)
Z3 = 7(WC2' z2 +M ¾) (5)
xc = p Wc'' z3 +uc') (6) 其中, 公式 (3) 为所述遮挡补全子网络的输入层与第一隐含层之间 映射函数, 公式 (4) 为所述遮挡补全子网络的第一隐含层与第二隐含层 之间的映射函数, 公式 (5) 为所述遮挡补全子网络的第二隐含层与第三 隐含层之间的映射函数, 公式 (6) 为所述遮挡补全子网络的第三隐含层 与输出层之间的映射函数, 为所述遮挡补全子网络的输入层与第一隐含 层之间的权重矩阵, 为所述遮挡补全子网络的输入层与第一隐含层之间 的偏置, 为所述遮挡补全子网络的第一隐含层与第二隐含层之间的权重 矩阵, 为所述遮挡补全子网络的第一隐含层与第二隐含层之间的偏置, 为所述遮挡补全子网络的第二隐含层与第三隐含层之间的权重矩阵, ^为所述遮挡补全子网络的第二隐含层与第三隐含层之间的偏置, W 为 所述遮挡补全子网络的第三隐含层与输出层之间的权重矩阵, 为所述遮 挡补全子网络的第三隐含层与输出层之间的偏置, W 是 的转置矩阵, 是 W 的转置矩阵, /Hx) = max(0, x)为非线性激活函数。
在本发明第一方面的第三种可能的实现方式中, 所述分解子网络为三 层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出层 依次连接;
所述分解子网络根据所述第三视觉特征向量 确定所述目标事物的各 部位的类标图像, 组合所述各部位的类标图像得到所述目标事物的解析结 果, 包括:
所述分解子网络将所述第三视觉特征向量 作为所述分解子网络的输 入层的输入参数, 根据以下公式 (7 ) 和 (8 ) 确定所述目标事物的各部位 的类标图像: z ^ p{Wh x + bh ) ( 7 )
Figure imgf000006_0001
其中, 公式 (7 ) 为所述分解子网络的输入层和隐含层之间的映射函 数,公式(8 )为所述分解子网络的隐含层和输出层之间的映射函数, 为 所述分解子网络的输入层和隐含层之间的权重矩阵, 为所述分解子网络 的输入层和隐含层之间的偏置, 表示所述目标事物的第 部分的类标图 像, 表示所述第 部分的类标图像对应的所述分解子网络的隐含层和输 出层之间的权重矩阵, 表示所述第 ,·部分的类标图像对应的所述分解子 网络的隐含层和输出层之间的偏置, x) = m«x(0, x)为非线性激活函数, (x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1 ;
将所述各类标图像组合起来, 得到所述目标事物的解析结果。
在本发明第一方面的第四种可能的实现方式中, 所述遮挡估计子网络根 据目标事物的第一视觉特征 X向量确定所述目标事物被遮挡部分的遮挡标记 向量 , 包括:
所述遮挡估计子网络对所述第一视觉特征 X向量降采样,得到第二视觉特 征向量 xd, 并根据所述第一视觉特征向量确定所述所述目标事物被遮挡部分 的遮挡标记向量 , 其中, 听述第二视觉特征向量 的维度小于所述第一视 觉特征 X, 所述遮挡标记向』 与述第二视觉特征向: t xd的维度相同。
所述遮挡补全子网络根 I据所述第一视觉特征向 与所述遮挡标记向: 确定所述目标事物的第三 觉特征向量 ^, 包括:
所述遮挡补全子网络根据所述第二视觉特征向 与所述遮挡标记向: x°确定所述目标事物的第三视觉特征向量 。
本发明第二方面提供一种基于神经网络***的图像解析方法, 包括: 获取所述神经网络***的各子网络对应的训练样本, 所述神经网络系 统包括遮挡估计子网络、 遮挡补全子网络、 分解子网络, 所述各子网络对 应的训练样本分别包括 I副图像, I取大于 1的正整数;
根据所述各子网络对应的训练样本分别对所述遮挡估计子网络、遮挡 补全子网络、 分解子网络进行预训练, 得到所述各子网络的参数, 所述各 子网络的参数包括所述各子网络中相互连接的两层之间的权重矩阵和偏 置。
在本发明第二方面的第一种可能的实现方式中, 所述遮挡估计子网络 为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输 出层依次连接;
所述根据各子网络对应的训练样本对所述遮挡估计子网络进行预训 练, 包括:
提取所述遮挡估计子网络对应的训练样本中各图像的视觉特征向量, 得到所述训练样本中各图像的特征向量集合 Χ = {χ, }, 其中, 列向量 X,表示 第 副图像的视觉特征向量, l≤i≤I ;
分别确定所述各图像的遮挡部分, 获取所述遮挡估计子网络对应的训 练样本中各图像遮挡部分的遮挡标记向量集合 ^ = {^},其中,列向量 表 示第 副图像的视觉特征向量 X,对应的遮挡标记向量;
根据所述各图像遮挡标记向量集合 ^^ { }和各图像的特征向量集合 Χ = {χ, }确定所述遮挡估计子网络的输入层和隐含层之间的权重矩阵 W。《和 偏置 , 以及确定所述遮挡估计子网络的隐含层与输出层之间的权重矩阵 W 禾口偏置 b。 。 在本发明第二方面的第二种可能的实现方式中, 所述根据所述各图像 遮挡标记向量集 ^^ { }和各图像的特征向量集 X = {X,}确定所述遮挡估计 子网络的输入层与隐含层之间的权重矩阵 W。和偏置 ^, 以及确定所述遮 挡估计子网络的隐含层与输出层之间的权重矩阵 W 和平偏置 b 包括: 令 W。'x; + b0' = W0'^, 其中, 。' = [W1 ,b。i ], xt = [X:,b0' ], χ,.表示第 i畐 lj图像的 视觉特征向量, [X]'表示转置运算;
2/ϊ,。' +b°2 =W°2l, 其中, A.0' = 7(W°' .), W°2 = [W° b°2], h°l =[h°' ,l]; ^^argminm n2 X" -T(W¾H0' )|L2,得到所述 W。'、 b°、、 W 禾 t ,其中, 。、 ={ '} 求角军 W ,W II
是遮挡估计子网络的输入层的输出, II是 Frobenius范数。
在本发明第二方面的第三种可能的实现方式中, 所述遮挡补全子网络为 五层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个隐含层分别为第 一隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一隐含层、 第二隐含 层、 第三隐含层和输出层依次连接;
所述根据所述各子网络对应的训练样本对所述遮挡补全子网络进行预训 练, 包括:
提取所述遮挡补全子网络对应的训练样本中各图像无遮挡时的视觉特征 向量集合 , 其中, 所述遮挡补全子网络对应的训练样本中各图像是无遮挡 的目标事物;
提取所述遮挡补全子网络对应的训练样本中各图像设置有遮挡时的视觉 特征向量集合 ;
根据所述遮挡补全子网络对应的训练样本中各图像有遮挡时的视觉特征 向量集合^和无遮挡时的视觉特征向量集合 确定所述遮挡补全子网络的输 入层与第一隐含层之间的权重矩阵 和偏置 , 确定所述遮挡补全子网络的 第一隐含层与第二隐含层之间的权重矩阵 和偏置 ,确定所述遮挡补全子 网络的第二隐含层与第三隐含层之间的权重矩阵 和偏置^, 确定所述遮 挡补全子网络的第三隐含层与输出层之间的权重矩阵 '和偏置 ,其中, f 是 的转置矩阵, w 是 的转置矩阵。
在本发明第二方面的第四种可能的实现方式中, 所述根据所述遮挡补全 子网络对应的训练样本中各图像有遮挡时的视觉特征向量集合 ^和无遮挡的 情况下视觉特征向量集合 确定所述遮挡补全子网络的输入层与第 之间的权重矩阵 和偏置 V, 确定所述遮挡补全子网络的第一隐含层与第二 隐含层之间的权重矩阵^ 和偏置 ^,确定所述遮挡补全子网络的第二隐含层 与第三隐含层之间的权重矩阵 和偏置^, 确定所述遮挡补全子网络的第 三隐含层与输出层之间的权重矩阵 W 和偏置 , 包括:
令/^ = W +b 为所述遮挡补全子网络的输入层的输出, 是特征向量 集合^中的一个向量, 最小化以下第一受限玻尔兹曼机 RBM能量:
\ 2
E(V, hCl ) - X "- bc - , 其中, σΜ是将所述遮挡补全子网络对应的训练样本中各图像的遮挡部分 作为噪声时的标准差向量 σ的第 m个分量, 是特征向量 Ϋε的第 m个分量, h;为 hc、的第 n个分量, 表示连接 ~ 和 的权重, }';为 的第 n个分量, 表示 的第 m个分量;
采用对比度扩散法对所述第一 RBM能量最小化, 得到所述权重矩阵 、 偏置 禾口 MCl
将所述遮挡补全子网络的输入层的输出作为所述第一隐含层的输入, 令 所述第一隐含层的输出为 ^ (W- ^ +bV, 最小化以下第二受限波尔兹曼机 RBM能量:
„ (hc' - uC2 )2 „ „hc'
2 p.q
2<yp p.q
其中, ;;是 = 7(^^' + 1^ )的第 p个分量, '为/ ^的第 p个分量, 为 h 的第 q个分量, H表示连接 和!^的权重, 为!^的第 q个分量, uc表示^ 的第 p个分量;
采用对比度扩散法对所述第二 RBM能量最小化,得到所述权重矩阵 W 、 偏置 ^和" ;
求所述权重矩阵 nwf的转置矩阵, 得到 和 W
在本发明第二方面的第五种可能的实现方式中, 所述根据所述有遮挡的 情况下视觉特征向量集合 和无遮挡的情况下视觉特征向量集合 确定所述 遮挡补全子网络的输入层与第一隐含层之间的权重矩阵 和偏置 V, 确定所 述遮挡补全子网络的第一隐含层与第二隐含层之间的权重矩阵 W 和偏置 ^, 确定所述遮挡补全子网络的第二隐含层与第三隐含层之间的权重矩阵 W 和 偏置^, 确定所述遮挡补全子网络的第三隐含层与输出层之间的权重矩阵 ίΤι'和偏置 之后, 包括:
根据以下公式重新构建所述训练样本中各图像无遮挡的情况下视觉特征 向量集合
Vc ^ p(Wc' 'p(WC2'p(WC2p(Wc'Vc + bc' ) + bC2 ) + uC2 )uc' ) ;
采用梯度下降法最小化所述 ^和 之间的误差, 得到调整后的 W 、 W bCl、 uCl、 禾口 M 0
在本发明第二方面的第六种可能的实现方式中, 所述分解子网络为三层 网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出层依此 连接;
所述根据各子网络对应的所述训练样本对所述分解子网络进行预训练, 包括:
提取所述分解子网络对应的训练样本中各图像的视觉特征向量集合 ^= {^} , 其中, 所述分解子网络对应的的训练样本是无遮挡时的目标事物; 提取所述分解子网络对应的训练样本中各图像的各部位类标图像集合 = { )
令 为特征向量集合 中的一个视觉特征向量 在所述分解子网络的输 入层的输出 /^ = ^ +i i), ,·表示类标图像的个数, ,·的取值为 i≤ M的正 整数, , 将 V按照以下映射函数映射为不同的类标图像:
Figure imgf000010_0001
其中, 表示所述目标事物的第个部位的类标图像, ^表示所述第 部分 的类标图像对应的所述分解子网络的隐含层和输出层之间的偏置, 表示所 述第 部分的类标图像对应的所述分解子网络的隐含层和输出层之间的权重 矩阵;
令 r为 中所有视^特征向量在所述分解子网络上映射成的类标图像的 集合, 最小化所述 r和 F之间的误差, 得到 w'i、
结合本发明第二方面以及第二方面的第一种至第六种可能的实现方式, 在本发明第二方面的第七种可能的实现方式中, 所述根据所述训练样本分别 对所述遮挡估计子网络、 遮挡补全子网络、 分解子网络进行预训练, 得到所 述各子网络的参数之后, 还包括:
构建损失函数 E, 最小化所述损失函数 E:
E(X;WM =
Figure imgf000011_0001
其中, χ={χ,}是遮挡估计子网络训练样本中各图像的 视觉特征向量集, X,表示第 副图像的视觉特征向量, F = }是人工确定的所 述训练样本中各图像的类标图像集合, ^;是人工确定的第 幅图像的类标图 像, r = {y,}是所述神经网络***的输出所述训练样本中各图像的类标图像集, 是所述神经网络***输出的第幅 图像的类标图像, W和 b是所述神经网络 ***的权重矩阵和偏置的集合;
采用随机梯度下降法求解所述损失函数 E的最优解,确定所述神经网 络***的调整后的权重矩阵和偏置。
在本发明第二方面的第八种可能的实现方式中, 所述采用随机梯度下 降法求解所述损失函数 E的最优解,确定所述神经网络***的调整后的权 重矩阵, 包括:
将预训练得到所述各子网络的权重矩阵, 按照以下公式进行迭代: Δ.+1 =0.9·Δ, -O.OOl-f-W , W' ^W1 +Α .+1 ,
J+l 1 1 ^ ' +l 1 1+1 其中, Ζ表示所述神经网络系 统的层数, /e{l,...L}, 表示迭代次数, Δ表示梯度下降时的变化率, £是 学习率, ^是导数, ^ = /^( '是第 层的后向投影误差^与上一层是输 出/ -1之间的乘积。 在本发明第二方面的第九种可能的实现方式中, 所述神经网络***的 最后一层的后向投影误差 =^^( -3 ^¾^(1-} , 其中 ί¾¾(·)表示取对角矩 阵运算, y表示一幅图像的实际的类标图像, y表示所述神经网络***输 出的所述图像的类标图像。
在本发明第二方面的第十种可能的实现方式中, 如果第 层有 s型函 数运算, 则第 /层的后向投影误差
Figure imgf000011_0002
, 其中, diag(. 表示取对角矩阵运算, 是上一层的权重矩阵, 是上一层的后向投影 误差。 在本发明第二方面的第十一种可能的实现方式中, 如果第 层有 /^x max^x)运算, 则第 Z层的后向投影误差 e' =f 〉Q, 其中,
=[wV-1+b']i, [.],.表示一个向量的第 ,·个分量。 本发明第三方面提供一种神经网络***, 包括:
遮挡估计子网络, 用于根据获取到的目标事物的第一视觉特征"^向量 确定所述目标事物被遮挡部分的遮挡标记向量 , 所述遮挡标记向量 的 各分量的取值为大于 0小于 1, 所述第一视觉特征向量为有遮挡时所述目 标事物的视觉特征向量;
遮挡补全子网络, 用于根据所述第一视觉特征向量 X与所述遮挡标记 向量 确定所述目标事物的第三视觉特征向量 ^, 所述第三视觉特征向量 为无遮挡时所述目标事物的视觉特征向量;
分解子网络, 用于根据所述第三视觉特征向量 确定所述目标事物的 各部位的类标图像, 组合所述各部位的类标图像得到所述目标事物的解析 结果。
在本发明第三方面的第一种可能的实现方式中, 所述遮挡估计子网络 为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输 出层依次连接;
所述遮挡估计子网络的输入层和隐含层之间的映射函数为公式 (1 ) : h。、 = 。、 x + b^) , 其中 W为所述遮挡估计子网络的输入层和隐含层之间的 权重矩阵, ^为所述遮挡估计子网络的输入层与隐含层之间的偏置, 7(X) = mor(0,X)为非线性激活函数;
所述遮挡估计子网络的隐含层和输出层之间的映射函数为公式 (2) : x" =T{W^h^ +b°-) , W。是所述遮挡估计子网络的隐含层与输出层之间的权重 矩阵, 是所述遮挡估计子网络的隐含层与输出层之间的偏置,
(x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1;
所述遮挡估计子网络具体用于:
将所述第一视觉特征向量 X作为所述遮挡估计子网络的输入层的输入 参数, 根据公式 (1 ) 和 (2) 计算所述遮挡标记向量 ^。
在本发明第三方面的第二种可能的实现方式中, 所述遮挡补全子网络 为五层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个隐含层分别 为第一隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一隐含层、 第 二隐含层、 第三隐含层和输出层依次连接;
所述遮挡补全子网络的输入层与第一隐含层之间映射函数为公式
(3) : Ζι =
Figure imgf000013_0001
, 其中, ίΤ'为所述遮挡补全子网络的输入层与 第一隐含层之间的权重矩阵, 为所述遮挡补全子网络的输入层与第一隐 含层之间的偏置;
所述遮挡补全子网络的第一隐含层与第二隐含层之间的映射函数为 公式 (4) : Z2 =p(W^z1 +b^) ' 其中, 为所述遮挡补全子网络的第一隐含 层与第二隐含层之间的权重矩阵, 为所述遮挡补全子网络的第一隐含层 与第二隐含层之间的偏置;
所述遮挡补全子网络的第二隐含层与第三隐含层之间的映射函数为 公式 (5) : zc z» 为所述遮挡补全子网络的第二隐含层与 第三隐含层之间的权重矩阵, ^为所述遮挡补全子网络的第二隐含层与第 三隐含层之间的偏置;
所述遮挡补全子网络的第三隐含层与输出层之间的映射函数为公式
(6) : x^ =p(W^ Z3 + u^ , W 为所述遮挡补全子网络的第三隐含层与输出 层之间的权重矩阵, 为所述遮挡补全子网络的第三隐含层与输出层之间 的偏置, W 是 的转置矩阵, f是 的转置矩阵, W^ax^x)为非线 性激活函数;
所述遮挡估计子网络具体用于:
将所述相乘结果为 χ*χ。作为所述遮挡补全子网络的输入层的参数, 根 据公式 (3) 、 (4) 、 (5) 、 (6) 计算所述第三视觉特征向量 。
在本发明第三方面的第三种可能的实现方式中, 所述分解子网络为三 层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出层 以此连接;
所述分解子网络的输入层和所述隐含层之间的映射函数为公式 (7) : z =p(W^x +b'^ , 为所述分解子网络的输入层和隐含层之间的权重矩阵, 为所述分解子网络的隐含层和输出层之间的偏置;
所述分解子网络的隐含层和输出层之间的映射函数为公式 (8) : ),;=^ z +b^) , 其中, 为所述分解子网络的隐含层和输出层之间的偏 置, 表示所述目标事物的第 部分的类标图像, 表示所述分解子网络 的隐含层和输出层之间的第 部分的类标图像的权重矩阵, b 表示所述分 解子网络的隐含层和输出层之间的第 部分的类标图像的偏置,
p(x) = max(0, x)为非线性激活函数, (x) = l/(l + exp(-x)是 S型函数, 返回值大 于 0小于 1 ;
所述分解子网络具体用于: 将所述第三视觉特征向量 作为所述分解 子网络的输入层的输入参数, 根据公式 (7 ) 和 (8 ) 确定所述目标事物的 各部位的类标图像, 将所述各类标图像组合起来, 得带所述目标事物的解 析结果。
在本发明第三方面的第四种可能的实现方式中, 所述遮挡估计子网络 具体用于:
对所述第一视觉特征 X向量降采样, 得到第二视觉特征向量 xd, 并根 据所述第一视觉特征向量确定所述所述目标事物被遮挡部分的遮挡标记 向量 , 所述第二视觉特征向量 ^的维度小于所述第一视觉特征 X, 所述 遮挡标记向量 与述第二视觉特征向量 的维度相同;
所述遮挡补全子网络具体用于:
根据所述第二视觉特征向量 xd与所述遮挡标记向量 ^确定所述目标事 物的第三视觉特征向量 。
本发明第四方面提供一种基于神经网络***的图像解析装置, 包括: 获取模块, 用于获取所述神经网络***的各子网络对应的训练样本, 所述神经网络***包括遮挡估计子网络、 遮挡补全子网络、 分解子网络, 所述各子网络对应的训练样本分别包括 I副图像, I取大于 1的正整数; 训练模块, 用于根据所述各子网络对应的训练样本分别对所述遮挡估 计子网络、 遮挡补全子网络、 分解子网络进行预训练, 得到所述各子网络 的参数, 所述各子网络的参数包括所述各子网络中相互连接的两层之间的 权重矩阵和偏置。
在本发明第四方面的第一种可能的实现方式中, 所述遮挡估计子网络 为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输 出层依次连接;
所述训练模块具体用于: 提取所述遮挡估计子网络对应的训练样本中 各图像的视觉特征向量, 得到所述训练样本中各图像的特征向量集合
Χ ={χ,}, 其中, 列向量 X,表示第 副图像的视觉特征向量, 1≤ ≤/;
分别确定所述各图像的遮挡部分, 获取所述遮挡估计子网络对应的训 练样本中各图像遮挡部分的遮挡标记向量集合^ ^ί ΐ,其中,列向量 表 示第 ,·副图像的视觉特征向量 X,对应的遮挡标记向量;
根据所述各图像遮挡标记向量集合 ^^{ }和各图像的特征向量集合 Χ ={χ,}确定所述遮挡估计子网络的输入层和隐含层之间的权重矩阵 W。《和 偏置 ^, 以及确定所述遮挡估计子网络的隐含层与输出层之间的权重矩阵 W 禾口偏置 b。
在本发明第四方面的第二种可能的实现方式中, 所述训练模块具体用 令 + b0' =W°' . , 其中, W"1 = [W° b°' ], . = [X:,b0' ], ,.表示第 副图像的 视觉特征向量, [χ]'表示转置运算;
2/i,。' +b°2 ^W°2h , 其中, = W°lxt), W°2 = [W° b°^ 1]';
Figure imgf000015_0001
数。 在本发明第四方面的第三种可能的实现方式中, 所述遮挡补全子网络 为五层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个隐含层分别 为第一隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一隐含层、 第 二隐含层、 第三隐含层和输出层依次连接;
所述训练模块具体用于: 提取所述遮挡补全子网络对应的训练样本中各 图像无遮挡时的视觉特征向量集合 , 其中, 所述遮挡补全子网络对应的训 练样本中各图像是无遮挡的目标事物;
提取所述遮挡补全子网络对应的训练样本中各图像设置有遮挡时的视觉 特征向量集合 ; 根据所述遮挡补全子网络对应的训练样本中各图像有遮挡时的视觉 特征向量集合^和无遮挡时的视觉特征向量集合 确定所述遮挡补全子 网络的输入层与第一隐含层之间的权重矩阵 和偏置 ,确定所述遮挡补 全子网络的第一隐含层与第二隐含层之间的权重矩阵 和偏置 ^, 确定 所述遮挡补全子网络的第二隐含层与第三隐含层之间的权重矩阵 和偏 置^, 确定所述遮挡补全子网络的第三隐含层与输出层之间的权重矩阵 W 和偏置 M 其中, W 是 的转置矩阵, 是 的转置矩阵。
在本发明第四方面的第四种可能的实现方式中, 所述训练模块具体用 于:
令/^ = W + b 为所述遮挡补全子网络的输入层的输出, Ϋε是特征向量 集合 中的一个向量, 最小化以下第一受限玻尔兹曼机 RBM能量:
E(vc, hc' ) = "― hc - ,
2
其中, Tm是将所述遮挡补全子网络对应的训练样本中各图像的遮挡部分 作为噪声时的标准差向量的第 m个分量, 是特征向量 的第 m个分量, h:' 为 W、的第 n个分量, :„表示连接 ~ 和 的权重, b:'为 bc'的第 n个分量, 表 示 的第 m个分量;
采用对比度扩散法对所述第一 RBM能量最小化, 得到所述权重矩阵 、 偏置 V禾口 ;
将所述遮挡补全子网络的输入层的输出作为所述第一隐含层的输入, 令 所述第一隐含层的输出为 =Pnn 、, 最小化以下第二受限波尔兹曼机 RBM能量:
Figure imgf000016_0001
其中, ;;是 = 7(^^' + 1^ )的第 p个分量, '为/ ^的第 P个分量, 为 h 的第 q个分量, H表示连接 和!^的权重, 为!^的第 q个分量, uc表示^ 的第 p个分量;
采用对比度扩散法对所述第二 RBM能量最小化,得到所述权重矩阵 W 、 偏置 ^和" ; 求所述权重矩阵 w 和 ^的转置矩阵, 得到 和 。
在本发明第四方面的第五种可能的实现方式中, 所述训练模块还用于: 根据以下公式重新构建所述训练样本中各图像无遮挡的情况下视觉特征 向量集合
Vc ^ p(WCl 'p(WC2'p(WC2p(Wc'Vc + bCl ) + bC2 ) + uC2 )uCl ) ; 采用梯度下降法最小化所述 ^和 之间的误差, 得到调整后的 w 、 WC'、 b 、 UC2、 V禾口 M q。 在本发明第四方面的第六种可能的实现方式中, 所述分解子网络为三 层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出层 依此连接;
所述训练模块具体用于: 提取所述分解子网络对应的训练样本中各图像 的视觉特征向量集合 ^ = {^}, 其中, 所述分解子网络对应的的训练样本是无 遮挡时的目标事物;
提取所述分解子网络对应的训练样本中各图像的各部位类标图像集合 令 为特征向量集合^中的一个视觉特征向量 在所述分解子网络的输 入层的输出 = ^ +W), ,·表示类标图像的个数, ,·的取值为 i≤ M的正 整数, , 将 按照以下映射函数映射为不同的类标图像:
Figure imgf000017_0002
其中, 表示所述目标事物的第个部位的类标图像, 表示所述第 部分 的类标图像对应的所述分解子网络的隐含层和输出层之间的偏置, 表示所 述第 部分的类标图像对应的所述分解子网络的隐含层和输出层之间的权重 矩阵;
令 r为 中所有视觉特征向量在所述分解子网络上映射成的类标图 像的集合, 最小化所述 r和 F之间的误差, 得到 w'i、 。 结合本发明第四方面以及第四方面的第一种至第六种可能的实现方 式, 在本发明第四方面的第七种可能的实现方式中, 还包括:
参数调整模块, 用于构建损失函数 E, 最小化所述损失函数 E:
E(X ;W,b) {χ, }
Figure imgf000017_0001
是遮挡估计子网络训练样本中各图像的 视觉特征向量集, X,表示第 副图像的视觉特征向量, F = }是人工确定的所 述训练样本中各图像的类标图像集合, ^:是人工确定的第 幅图像的类标图 像, r = {y,}是所述神经网络***的输出所述训练样本中各图像的类标图像集, 是所述神经网络***输出的第幅 图像的类标图像, W和 b是所述神经网络 ***的权重矩阵和偏置的集合;
采用随机梯度下降法求解所述损失函数 E的最优解,确定所述神经网 络***的调整后的权重矩阵和偏置。
在本发明第四方面的第八种可能的实现方式中, 所述参数调整模块具 体用于:
将预训练得到所述各子网络的权重矩阵, 按照以下公式进行迭代: △ =0.9.△, -0.001. £.W/_£.^, W' ^W'+AM , 其中, Z表示所述神经网络系 统的层数, /e{l,...L}, 表示迭代次数, Δ表示梯度下降时的变化率, £是 学习率, ^是导数, ^ = /^ (^是第 层的后向投影误差^与上一层是输 出/ -1之间的乘积。 在本发明第四方面的第九种可能的实现方式中, 所述神经网络***的 最后一层的后向投影误差 eL = diag(y- y)diag(l- y), 其中 diag (·)表示取对角矩 阵运算, y表示一幅图像的实际的类标图像, y表示所述神经网络***输 出的所述图像的类标图像。
在本发明第四方面的第十种可能的实现方式中, 如果第 /层有 S型函 数运算, 则第 /层的后向投影误差
Figure imgf000018_0001
, 其中, diag(. 表示取对角矩阵运算, 是上一层的权重矩阵, 是上一层的后向投影 误差。 在本发明第四方面的第十一种可能的实现方式中, 如果第 层有
/^x max^x)运算, 则第 Z层的后向投影误差 〉Q, 其中,
Figure imgf000018_0002
, <0
δ[ = [w'h'-^ b'],., [.],表示一个向量的第 个分量。
本发明实施例提供的神经网络***、 基于神经网络***的图像解析方 法和装置, 通过神经网络***获取目标事物的第一视觉特征向量 X, 然后, 根据目标事物的第一视觉特征 X向量确定目标事物被遮挡部分的遮挡标记 向量 ^, 根据第一视觉特征向量 X与遮挡标记向量 ^确定目标事物的第三 视觉特征向量 ^, 第三视觉特征向量 ^为补全遮挡部分后目标事物的视觉 特征向量, 最后, 根据第三视觉特征向量 确定目标事物的各部位的类标 图像, 组合各部位的类标图像得到目标事物的解析结果, 可以解决目标事 物有遮挡时的图像解析问题, 能够准确的估计出有遮挡部分的目标事物。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 图 1为本发明基于神经网络***的图像解析方法一个实施例的流程图; 图 2为无遮挡目标行人的解析结果示意图; 图 3为有遮挡目标行人的解析结果示意图; 图 4为处理有遮挡的目标行人解析过程示意图; 图 5为本发明神经网络***的训练方法一个实施例的流程图; 图 6为预训练遮挡补全子网络时目标行人遮挡设置示意图; 图 7为本发明神经网络***一个实施例例的结构示意图; 图 8 为本发明基于神经网络***的图像解析装置一实施例的结构示意 图;
图 9为本发明基于神经网络***的图像解析装置又一实施例的结构示意 图;
图 10为本发明神经网络***又一实施例的结构示意图; 图 11 为本发明基于神经网络***的图像解析装置还一实施例结构示意 图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述, 显然,所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明基于神经网络***的图像解析方法一个实施例的流程 图, 如图 1所示, 本实施例的方法可以包括:
歩骤 101、 神经网络***获取目标事物的第一视觉特征向量 χ。
本实施例中, 神经网络***主要包括遮挡估计子网络、 遮挡补全子网 络、 分解子网络, 遮挡估计子网络主要用于估计目标事物有哪些部分被遮 挡, 遮挡补全子网络主要用于合成被遮挡部分的视觉特征向量, 分解子网 络主要用于将补全的视觉特征向量映射为该目标事物各部分的类标图像。 需要说明的是, 本发明各实施例中, 在对一幅目标图像进行解析时, 是对 目标图像中的一个目标事物进行解析, 举例来说, 一幅图像中包括行人和 一些背景, 目标事物就是指这幅图像中的行人, 目标事物还可以是一幅图 像中的猫、 狗、 飞机、 轿车等等。
神经网络***可通过方向梯度值方图 HOG、 SIFT 、 Gabor、 LBP提 取目标图像中的目标事物的第一视觉特征向量, 当然还可以通过其他现有 的方法提取目标事物的第一视觉特征向量, 本发明并不对此进行限制。
歩骤 102、遮挡估计子网络根据目标事物的第一视觉特征 X向量确定目 标事物被遮挡部分的遮挡标记向量 ^, 遮挡标记向量 的各分量的取值为 大于 0小于 1。
遮挡估计子网络主要用于估计目标事物有哪些部分被遮挡, 遮挡估计 子网络作为一个神经网络***, 可以包括一个输入层、 多个隐含层和一个 输出层, 隐含层的个数并不做限制。 在一种可行的实现方式中, 遮挡估计 子网络为三层网络, 包括: 一个输入层、 一个隐含层和一个输出层, 输入 层、 隐含层和输出层依次连接, 即输入层与隐含层连接, 隐含层与输出层 连接。 每层包括多个单元, 相邻层的单元之间是互相连接的, 并赋予这些 连接以权重, 权重是通过对神经网络***进行预训练得到的。
遮挡估计子网络根据第一视觉特征向量 X确定目标事物被遮挡部分的 遮挡标记向量 , 具体为: 首先, 遮挡估计子网络将第一视觉特征向量 X作 为遮挡估计子网络的输入层的输入参数, 然后, 根据以下公式(1 )和(2 ) 计算遮挡标记向量 ^
= p{W0l x + b0> ) ( 1 ) , x° = ( 。Ί) ( 2 )
其中, 公式 (1 ) 为遮挡估计子网络的输入层与隐含层之间的映射函 数,公式(2 )为遮挡估计子网络的的隐含层与输出层之间的映射函数, 为遮挡估计子网络的输入层与隐含层之间的权重矩阵, 为遮挡估计子网 络的输入层与隐含层之间的偏置, W ^^ x)为非线性激活函数, W 是 遮挡估计子网络的隐含层与输出层之间的权重矩阵, 是遮挡估计子网络 的隐含层与输出层之间的偏置, (x) = l/(l + eXp(-x)是 S型函数, 返回值大于 0小于 1。
遮挡标记向量 是针对第一视觉特征向量 "^来说的, 简单说就是第一视 觉特征向量 ^中的哪些分量被遮挡了,遮挡标记向量 ^的每个分量取值在 0 和 1之间, 越接近 0说明此分量越可能被遮挡, 越接近 1说明此分量越可 能无遮挡。
需要说明的是, 本实施例中, 输入图像的目标事物可以是有遮挡, 也 可以是无遮挡的, 当目标事物无遮挡时, 估计出的遮挡标记向量 的分量 更接近于 1。
歩骤 103、遮挡补全子网络根据第一视觉特征向量 X与遮挡标记向量 确定目标事物的第三视觉特征向量 ^, 第三视觉特征向量 ^为补全遮挡部 分后目标事物的视觉特征向量。
遮挡补全子网络主要用于合成被遮挡部分的视觉特征向量, 遮挡补全 子网络作为一个神经网络***, 可以包括一个输入层、 多个隐含层和一个 输出层, 隐含层的个数并不做限制。 在一种可行的实现方式中, 遮挡估计 子网络为五层网络, 包括: 一个输入层、 三个隐含层和一个输出层, 三个 隐含层分别为第一隐含层、 第二隐含层、 第三隐含层, 输入层、 第一隐含 层、 第二隐含层、 第三隐含层和输出层依次连接。 每层包括多个单元, 相 邻层的单元之间是互相连接的, 并赋予这些连接以权重, 权重是通过对神 经网络***进行预训练得到的。
遮挡补全子网络根据第一视觉特征向量 X与遮挡标记向量 确定目标 事物的第三视觉特征向量 ^, 具体为: 首先, 遮挡补全子网络将遮挡标记 向量 Χ与第一视觉特征向量 χ逐分量相乘, 得到遮挡特征向量 χ * χ。, 其中, 遮挡标记向量 与第一视觉特征向量 X的维度相同; 然后, 遮挡补全子网 络将遮挡特征向量 X*X。作为遮挡补全子网络的输入层的参数, 根据以下公 式 (3) 、 (4) 、 (5) 视觉特征向 xc .
Z, = 7(WC'( * 。) + V) (3)
z2 = p(WC2 Zl + bC2) (4)
Z3 = 7(WC2 Z2 +M ¾) (5)
xc = p(Wc'' z3 +uc') (6)
其中, 公式 (3) 为遮挡补全子网络
函数, 公式 (4) 为遮挡补全子网络的第
Figure imgf000022_0001
射函数, 公式 (5) 为遮挡补全子网络的第二隐含层与第三隐含层之间的 映射函数, 公式 (6) 为遮挡补全子网络的第三隐含层与输出层之间的映 射函数, 为遮挡补全子网络的输入层与第一隐含层之间的权重矩阵, 为遮挡补全子网络的输入层与第一隐含层之间的偏置, 为遮挡补全子网 络的第一隐含层与第二隐含层之间的权重矩阵, 为遮挡补全子网络的第 一隐含层与第二隐含层之间的偏置, w 为遮挡补全子网络的第二隐含层与第 三隐含层之间的权重矩阵, ^为遮挡补全子网络的第二隐含层与第三隐含层 之间的偏置, W 为遮挡补全子网络的第三隐含层与输出层之间的权重矩 阵, 为遮挡补全子网络的第三隐含层与输出层之间的偏置, W 是 的 转置矩阵, f是 的转置矩阵, /^)= x(0,x)为非线性激活函数。
本歩骤中, 通过将第一视觉特征向量与遮挡标记向量 逐分量相乘 后, 得到遮挡特征向量 χ*χ。, 然后经过遮挡补全子网络, 合成被遮挡部分 的视觉特征, 得到补全遮挡部分后第三视觉特征向量。
歩骤 104、 分解子网络根据第三视觉特征向量 ^确定目标事物的各部 位的类标图像, 组合各部位的类标图像得到目标事物的解析结果。
分解子网络主要用于将补全的视觉特征向量映射为该目标事物各部 分的类标图像,分解子网络作为一个神经网络***,可以包括一个输入层、 多个隐含层和一个输出层, 隐含层的个数并不做限制。 在一种可行的实现 方式中, 分解子网络为三层网络, 包括: 输入层、 隐含层和输出层, 输入 层、 隐含层和输出层依次连接。 每层包括多个单元, 相邻层的单元之间是 互相连接的, 并赋予这些连接以权重, 权重是通过对神经网络***进行预 训练得到的。 分解子网络根据第三视觉特征向量 确定目标事物的各部位的类标图 像, 组合各部位的类标图像得到目标事物的解析结果, 具体为: 首先, 分 解子网络将第三视觉特征向量 ^作为分解子网络的输入层的输入参数, 根 据以下公式 (7 ) 和 (8 ) 确定目标事物的各部位的类标图像: z ^ p{W xc + b ) ( 7 )
Figure imgf000023_0001
其中, 公式 (7 ) 为分解子网络的输入层和隐含层之间的映射函数, 公式 (8 ) 为分解子网络的隐含层和输出层之间的映射函数, 为分解子 网络的输入层和隐含层之间的权重矩阵, 为分解子网络的输入层和隐含 层之间的偏置。 将目标事物分解为 M个不同的部位, 每个部分对应一个 类标图像, 表示目标事物的第 部分的类标图像, 表示第 部分的类标 图像对应的分解子网络的隐含层和输出层之间的权重矩阵, 表示第 部 分的类标图像对应的分解子网络的隐含层和输出层之间的偏置, p(x) = max(0, x)为非线性激活函数, (x) = l/(l + exp(-x)是 S型函数, 返回值大 于 0小于 1。
本歩骤中, 将歩骤 103中得到补全遮挡部分后第三视觉特征向量进行 分解, 得到目标事物各部分的类标图像, 然后将各类标图像组合起来, 接 得到了目标事物的解析结果。
需要说明的是, 本实施例提供的方法, 不仅适用于没有遮挡的目标事 物的解析, 也适用于没有遮挡的目标事物的解析, 能够获得准确的标解目 标事物的解析结果, 并且对遮挡、 杂乱背景、 复杂的姿势变化和衣服类型 等具有鲁棒性。 图 2为无遮挡目标行人的解析结果示意图, 图 3为有遮挡 目标行人的解析结果示意图, 图 2中第一行的图像表示现实环境中实际拍 摄到的图像, 第二行表示本实施例解析出的目标行人的结果, 第三行表示 手工标定的真实类标图像; 图 3中第一行的图像表示现实环境中实际拍摄 到的图像, 这些图像中的目标行人都被部分遮挡了, 第二行表示本实施例 解析出的目标行人的结果, 第三行表示手工标定的真实类标图像。
本实施例提供的方法, 通过神经网络***获取目标事物的第一视觉特 征向量 X, 然后, 根据目标事物的第一视觉特征 X向量确定目标事物被遮挡 部分的遮挡标记向量 ^, 根据第一视觉特征向量 X与遮挡标记向量 ^确定 目标事物的第三视觉特征向量 ^, 第三视觉特征向量 为补全遮挡部分后 目标事物的视觉特征向量, 最后, 根据第三视觉特征向量 ^确定目标事物 的各部位的类标图像, 组合各部位的类标图像得到目标事物的解析结果, 可以解决目标事物有遮挡时的图像解析问题, 能够准确的估计出有遮挡部 分的目标事物。
需要说明的是, 在本实施的一种实现方式中, 神经网络***在获取到第 一视觉特征向量 X后, 还可以对第一视觉特征向量 X降采样。 降采样的主要目 的是减少数据量, 从而达到提高神经网络***处理速度的目的。 具体地, 遮 挡估计子网络对第一视觉特征 X向量降采样, 得到第二视觉特征向量 , 并根 据第一视觉特征向量确定目标事物被遮挡部分的遮挡标记向量 , 其中, 第 二视觉特征向量 的维度小于第一视觉特征 X,遮挡标记向量 ^与述第二视觉 特征向量 xd的维度相同。
相应地,遮挡补全子网络根据第一视觉特征向量 "^与遮挡标记向量 确定 目标事物的第三视觉特征向量 ^, 具体为: 遮挡补全子网络根据第二视觉特 征向量 ^与遮挡标记向量 确定目标事物的第三视觉特征向量 。 具体实现 方式可参照实施例一的中描述, 这里不再赘述。 如图 4所示, 图 4为处理有 遮挡的目标行人解析过程示意图, 首先对输入的图像提取目标行人第一视觉 特征向量 X,然后对第一视觉特征向量 X进行降采样得到第二视觉特征向量 ^, 同时根据第一视觉特征向量 X确定目标行人的被遮挡部分的遮挡标记向量 ^, 遮挡补全子网络将遮挡标记向量 ^与第一视觉特征向量 X逐分量相乘,得到遮 挡特征向量 χ * χ。, 遮挡补全子网络将遮挡特征向量 χ * χ。作为遮挡补全子网络 的输入层的参数, 得到特征向量 , 分解子网络根据第三视觉特征向量 确 定目标事物的各部位的类标图像 y,, 如图中所示, 为根据第三视觉特征向量 ^确定目标行人的头发类标图像, 表示该目标行人的上身类标图像, )¾表 示该目标行人的下身类标图像, 当确定出目标行人的所有类标图像后, 将各 部位的类标图像按照一定的方式组合得到该目标行人的解析结果。
在执行实施例一所示的基于神经网络***的图像解析方法之前, 还需 要对该神经网络***进行预训练, 得到神经网络***的一些参数, 图 5为 本发明神经网络***的训练方法一个实施例的流程图, 如图 5所示, 本实 施例的方法可以包括: 歩骤 201、 获取神经网络***的各子网络对应的训练样本。 在对神经网络***进行预训练之前, 首先要获取神经网络***神经网 络***的各子网络对应的训练样本, 本实施例中, 神经网络***主要包括 三个子网络, 分别为遮挡 计子网络、 遮挡补全子网络、 分解子网络, 每 个字网络对应一个训练样; , 在训练时分别根据各子网络对应的训练样本 对各子网络进行训练, 各¥网络的训练样本不同, 各子网络对应的训练样 本分别包括 I副图像, I取大于 1的正整数。
歩骤 202、 根据各子网络对应的训练样本分别对遮挡估计子网络、 遮 挡补全子网络、 分解子网络进行预训练, 得到各子网络的参数, 各子网络 的参数包括各子网络中相互连接的两层之间的权重矩阵和偏置。
在获取各子网络的对应的训练样本后, 根据各子网络对应的训练样本 分别对遮挡估计子网络、 遮挡补全子网络、 分解子网络进行预训练, 得到 各子网络的参数。 以下将具体介绍各个子网络的训练过程:
首先, 对遮挡估计子网络进行预训练, 以遮挡估计子网络为三层网络 为例进行说明, 遮挡估计子网络包括: 输入层、 隐含层和输出层, 输入层、 隐含层和输出层依次连接。 应该明确的是遮挡估计子网络的层数还可以更 多, 本发明并不对此限制, 不论遮挡估计子网络有几层, 都可以按照本实 施例提供的方法进行训练, 本实施例中只是以遮挡估计子网络为三层为例 进行说明, 根据各子网络对应的训练样本对遮挡估计子网络进行预训练, 具体包括:
第一歩: 提取遮挡估计子网络对应的训练样本中各图像的视觉特征向 量, 得到训练样本中各图像的特征向量集合 Χ = { χ, }, 其中, 列向量 X,表示 第 副图像的视觉特征向量, 1≤ ≤/。
遮挡估计子网络对应的训练样本中包括 I副图像, 这 I副图像主要包 括两种类型的图像, 第一种类型为目标事物被遮挡的图像, 第二种类型为 目标事物没有被遮挡的图像。 分别提取训练样本中各图像的视觉特征向 量, 得到训练样本中各图像的特征向量集合 Χ = { χ, }, 特征向量集合 Χ = { χ, } 中的每一列表示一幅图像的视觉特征向量。
第二歩、 分别确定各图像的遮挡部分, 获取遮挡估计子网络对应的训 练样本中各图像遮挡部分的遮挡标记向量集合^ ^ ^} ,其中,列向量 表 小 ,·副图像的视觉特征向量 X,对应的遮挡标记向量。
在进行预训练时, 可通过人工的方式确定各图像的遮挡部分, 获取遮 挡估计子网络对应的训练样本中各图像遮挡部分的遮挡标记向量集合
7 = { }, 其中, 列向量 表示第 副图像的视觉特征向量 X,对应的遮挡标 记向量, 如果哪一幅图像没有被遮挡, 则该图像的遮挡标记向量各分量为 第三歩、 根据各图像遮挡标记向量集合 ={ }和各图像的特征向量 集合 X={x,}确定遮挡估计子网络的输入层和隐含层之间的权重矩阵 W。《和 偏置 , 以及确定遮挡估计子网络的隐含层与输出层之间的权重矩阵 W。 和偏置 b。
首先, ^W .+b0' = ν°' , 其中, W°' = [W°',b°'], ΐ,. =[χ,.' 。']', χ,表示第! '畐1 J 图像的视觉特征向量, W'表示转置运算;
2/ϊ,。' +b°2 =W°2l, 其中, ¾' = , W°2 = [W° b°2], h°l =[h°' l]; argmin^, 。 X0 -T(W¾H0') b°、、 W°2禾 t 。2, 其中, H°' 求解 s
是遮挡估计子网络的输入层的输出, ={3 , III是 Frobenius范数, χ。 — T(W H0')
其中, 求解 的最优化问题可采用以下两种方式: 方式一: 可基于最小平方字典学习 (least squares dictionary learning)方式求 解, 可迭代求解以下两个公式:
ar min 禾口 arg min
1 Ψ2 即首先用线性变换 w。将 线性逼近 , 一旦 求解出来, 再用另一个 线性变换 W。, 将/?。 ?^。1 逼近 。 上述两个问题可基于以下两个闭型公 式求解:
w ϋ(χχ')— w f。/?。'(/?。'/?。' Γ1
方式二: 如果训练样本数目过多, 以上矩阵求逆运算时复杂度太高, 可 以采用在线字典学习算法求解。
然后, 介绍对遮挡补全子网络的预训练, 以遮挡补全子网络为五层网络 为例, 遮挡补全子网络包括: 输入层、 三个隐含层和输出层, 三个隐含层分 别为第一隐含层、 第二隐含层、 第三隐含层, 输入层、 第一隐含层、 第二隐 含层、 第三隐含层和输出层依次连接。 应该明确的是遮挡补全子网络的层数 还可以更多, 本发明并不对此限制, 不论遮挡补全子网络有几层, 都可以按 照本实施例提供的方法进行训练, 本实施例中只是以遮挡补全子网络为五层 为例进行说明,根据各子网络对应的训练样本对遮挡补全子网络进行预训练, 可以包括以下歩骤:
第一歩、 提取遮挡补全子网络对应的训练样本中各图像无遮挡时的视觉 特征向量集合 ;
其中, 遮挡补全子网络对应的训练样本中各图像是无遮挡的目标事物, 可采用真实环境中拍摄到的无遮挡的图像。
第二歩、 提取遮挡补全子网络对应的训练样本中各图像设置有遮挡时的 视觉特征向量集合
遮挡补全子网络对应的训练样本中各图像是无遮挡的目标事物, 在提取 遮挡补全子网络对应的训练样本中各图像设置有遮挡时的视觉特征向量集合 VS 可通过人工方式对真实环境中拍摄到的无遮挡的图像人为模拟出遮挡部 分, 图 6为预训练遮挡补全子网络时目标行人遮挡设置示意图, 如图 6所示, 目标事物为目标行人, 分别人为设置各图像的正当部分, 图中黑色部分表示 图像设置的遮挡部分, 图***为遮挡了目标行人的 40各部分, 模拟出对目 标行人的 40种遮挡模式。
第三歩、 根据遮挡补全子网络对应的训练样本中各图像有遮挡时的视觉 特征向量集合 和无遮挡时的视觉特征向量集合 确定遮挡补全子网络的输 入层与第一隐含层之间的权重矩阵 和偏置 , 确定遮挡补全子网络的第一 隐含层与第二隐含层之间的权重矩阵 和偏置 ,确定遮挡补全子网络的第 二隐含层与第三隐含层之间的权重矩阵 w 和偏置^, 确定遮挡补全子网络 的第三隐含层与输出层之间的权重矩阵 f和偏置 , 其中, f是 ^的转置 矩阵, 是 w 的转置矩阵。
具体地, 令 = W + l^ )为遮挡补全子网络的输入层的输出, ΫΕ是特征 向量集合 中的一个向量, 最小化以下第一受限玻尔兹曼机 RBM能量:
E{V, hc' ) = (Vm_"2 m') "― hc - ,
其中, xm是将遮挡补全子网络对应的训练样本中各图像的遮挡部分作为 噪声时的标准差向量的第 m个分量, Ϋ;是特征向量 ΫΕ的第 m个分量, h;;为 V 的第 n个分量, „表示连接 和1^的权重, 为^'的第11个分量, 表示^ 的第 m个分量;
采用对比度扩散法对第一 RBM能量最小化, 得到权重矩阵 W 偏置 和 uc' ;
将遮挡补全子网络的输入层的输出作为第一隐含层的输入, 令第一隐含 层的输出为 = Pm +b , 最小化以下第二受限波尔兹曼机 RBM能量:
(j2c、 -uC2)2
E(hc、, hC2),=Y-^ ~ 2 "― ,
Figure imgf000028_0001
其中, ;;是 = 7(^^' + 1 ')的第 p个分量, '为/ ^的第 P个分量, 为 h 的第 q个分量, H表示连接 和!^的权重, 为 的第 q个分量, uc表示^ 的第 p个分量;
采用对比度扩散法对第二 RBM能量最小化,得到权重矩阵 W 、偏置 ^和
«¾
求权重矩阵 ^¾和^^'的转置矩阵, 得到 '和 f。
一种方式中, 为了得到更准确的参数, 在得到权重矩阵 W W W^'和 偏置 、 ^和" ; 之后, 还包括:
根据以下公式重新构建训练样本中各图像无遮挡的情况下视觉特征向量 集合
Vc ^ p(WCi'p(WC2'p(WC2p(WCiVc +bCi) + bC2) + u 2)uCi);
采用梯度下降法最小化 ^和 之间的误差, 得到调整后的 w 、 W b " 、 和" , 将调整后的 W 、 W b u V和" ε '作为遮挡补全子网络的 最终参数。
最后, 介绍分解子网络的预训练过程, 以分解子网络为三层网络为例进 行说明, 分解子网络包括: 输入层、 隐含层和输出层, 输入层、 隐含层和输 出层依此连接。 应该明确的是分解子网络的层数还可以更多, 本发明并不对 此限制, 不论分解子网络有几层, 都可以按照本实施例提供的方法进行训练, 本实施例中只是以分解子网络为三层为例进行说明, 根据各子网络对应的训 练样本对分解子网络进行预训练, 包括以下歩骤:
第一歩、 提取分解子网络对应的训练样本中各图像的视觉特征向量集合 ^ = {^}, 其中, 分解子网络对应的的训练样本是无遮挡时的目标事物。
第二歩、 提取分解子网络对应的训练样本中各图像的各部位类标图像集 合?7 = {^}。
令 为特征向量集合^中的一个视觉特征向量 在分解子网络的输入层 的输出 ^ = 0^ + ), 分解子网络的隐含层对应 M个权重矩阵 {W^ } , i 表 示类标图像的个数, 的取值为 i ≤M的正整数,将 按照以下映射函数映射 为不同的类标图像:
Figure imgf000029_0001
其中, 表示目标事物的第 个部位的类标图像, 表示第 部分的类标图 像对应的分解子网络的隐含层和输出层之间的偏置, 表示第 ,·部分的类标 图像对应的分解子网络的隐含层和输出层之间的权重矩阵, 可通过人工方式 标定每副图像的各部位的类标图像
令 r为 中^ f有视觉特征向量在分解子网络上映射成的类标图像的集 合, 最小化 r和 F之间的误差, 得到 w'i、 w; 。
需要说明的是, 对遮挡估计子网络、 遮挡补全子网络、 分解子网络的预 训练是独立进行的, 训练时也没有先后的顺序。
为例提高整个神经网络***的性能, 在得到各个子网络的参数后, 将各 子网络的参数作为一个整体进一歩作调整。 参数调整包括以下几个歩骤: 第一歩、 构建损失函数 E, 并最小化以下损失函数 E:
其中, E(Hb) = |F-i^, Χ = {χ, }是遮挡估计子网络训练样本中各图像的 视觉特征向量集, X,表示第 副图像的视觉特征向量, F = }是人工确定的训 练样本中各图像的类标图像集合, 是人工确定的第 幅图像的类标图像, r = {y, }是神经网络***的输出训练样本中各图像的类标图像集, 是神经网络 ***输出的第 ,·幅图像的类标图像, W和 b是神经网络***的权重矩阵和偏置 的集合;
第二歩、 采用随机梯度下降法求解损失函数 E的最优解, 确定神经网 络***的调整后的权重矩阵和偏置。
采用随机梯度下降法求解损失函数 E的最优解,确定神经网络***的 调整后的权重矩阵, 具体为:
将预训练得到各子网络的权重矩阵, 按照以下公式进行迭代: Δ.+1 =0.9 Δ, -Ο.ΟΟΙ ε-W' -ε ^- , W' =W'+AM ,
J J J 其中, Ζ表示神经网络***的 层数, /e {l,...L}, 表示迭代次数, Δ表示梯度下降时的变化率, £是学习 率, ^是导数, ^^-W是第 层的后向投影误差 ^与上一层是输出/ 之间的乘积。
后向投影误差 ^有三种不同的计算方式, 神经网络***的最后一层的 后向投影误差为^ = ^^( -3 ^^(1-} ,其中 ί¾¾(·)表示取对角矩阵运算, y 表示一幅图像的实际的类标图像, y表示神经网络***输出的图像的类标 图像。 如果第 层有 S型函数运算, 则第 z层的后向投影误差
el ^diag{Wl+vel+l)diag{hl){\-hl) , 其中, agO表示取对角矩阵运算, 是上 一层的权重矩阵, 是上一层的后向投影误差。如果第 /层有 / x) = max(0,x) 运算, 则第 层的后向投影误差
Figure imgf000030_0001
[-],表示一个向量的第 个分量。 图 7为本发明神经网络***一个实施例例的结构示意图,如图 7所示, 本实施例的神经网络***可以包括: 遮挡估计子网络 31、遮挡补全子网络 32、 分解子网络 33。
其中, 遮挡估计子网络 31, 用于根据获取到的目标事物的第一视觉特 征 ^向量确定目标事物被遮挡部分的遮挡标记向量 , 遮挡标记向量 的 各分量的取值为大于 0小于 1, 第一视觉特征向量为有遮挡时目标事物的 视觉特征向量;
遮挡补全子网络 32, 用于根据第一视觉特征向量 X与遮挡标记向量 确定目标事物的第三视觉特征向量 ^, 第三视觉特征向量 ^为无遮挡时目 标事物的视觉特征向量;
分解子网络 33,用于根据第三视觉特征向量 ^确定目标事物的各部位 的类标图像, 组合各部位的类标图像得到目标事物的解析结果。
可选地, 遮挡估计子 31网络为三层网络, 包括: 输入层、 隐含层和 输出层, 输入层、 隐含层和输出层依次连接; 遮挡估计子网络 31的输入层和隐含层之间的映射函数为公式 (1) : h^ =p{^ x + b^), 其中 W为遮挡估计子网络 31的输入层和隐含层之间的权 重矩阵, ^为遮挡估计子网络 31的输入层与隐含层之间的偏置,
p(x) = max(0, x)为非线性激活函数;
遮挡估计子网络 31的隐含层和输出层之间的映射函数为公式 (2) :
^ =T(W^h^ +b^) , W 是遮挡估计子网络 31的隐含层与输出层之间的权重 矩阵, 是遮挡估计子网络 31的隐含层与输出层之间的偏置,
(x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1;
遮挡估计子网络 31具体用于:
将第一视觉特征向量 X作为遮挡补全子网络 31的输入层的输入参数, 根据公式 (1) 和 (2) 计算遮挡标记向量 。
可选地, 遮挡补全子网络 31为五层网络, 包括: 输入层、 3个隐含层 和输出层, 3个隐含层分别为第一隐含层、 第二隐含层、 第三隐含层, 输 入层、 第一隐含层、 第二隐含层、 第三隐含层和输出层依次连接;
遮挡补全子网络 32的输入层与第一隐含层之间映射函数为公式(3) :
Zl =p(WHx*x°) + b^ , 其中, 为遮挡补全子网络 32的输入层与第一隐含 层之间的权重矩阵, 为遮挡补全子网络 32的输入层与第一隐含层之间 的偏置;
遮挡补全子网络 32的第一隐含层与第二隐含层之间的映射函数为公 式 (4) : z^piW^z^b^) , 其中, W 为遮挡补全子网络 32的第一隐含层 与第二隐含层之间的权重矩阵, 为遮挡补全子网络 32的第一隐含层与 第二隐含层之间的偏置;
遮挡补全子网络 32的第二隐含层与第三隐含层之间的映射函数为公 式 (5) : Z3 = 7(w^Z2 + ^), 为遮挡补全子网络 32的第二隐含层与第三 隐含层之间的权重矩阵, ^为遮挡补全子网络 32的第二隐含层与第三隐 含层之间的偏置;
遮挡补全子网络 32的第三隐含层与输出层之间的映射函数为公式 (6) : x^ =p(w^Z3 + u^ , w 为遮挡补全子网络 32的第三隐含层与输出层 之间的权重矩阵, 为遮挡补全子网络 32的第三隐含层与输出层之间的 偏置, W 是 的转置矩阵, f是 的转置矩阵, /^)= χ(0,χ)为非线性 激活函数; 遮挡补全子网络 32具体用于:
将相乘结果为 χ*χ。作为遮挡补全子网络 32的输入层的参数, 根据公 式 (3) 、 (4) 、 (5) 、 (6) 计算第三视觉特征向量 。
可选地, 分解子网络 33为三层网络, 包括: 输入层、 隐含层和输出 层, 输入层、 隐含层和输出层以此连接;
分解子网络 33的输入层和隐含层之间的映射函数为公式 (7) : z -p(W"xc+b") , 为分解子网络 33的输入层和隐含层之间的权重矩阵, ^为分解子网络 33的隐含层和输出层之间的偏置;
分解子网络 33的隐含层和输出层之间的映射函数为公式 (8) : ),;=^ z +b^) ,其中, 为分解子网络 33的隐含层和输出层之间的偏置, 表示目标事物的第 i部分的类标图像, 表示分解子网络的隐含层和输 出层之间的第 i部分的类标图像的权重矩阵, 表示分解子网络的隐含层 和输出层之间的第第 i部分的类标图像的偏置, W ^ x)为非线性激 活函数, (x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1;
分解子网络 33具体用于: 将第三视觉特征向量 ^作为分解子网络的 输入层的输入参数, 根据公式 (7) 和 (8) 确定目标事物的各部位的类标 图像, 将各类标图像组合起来, 得带目标事物的解析结果。
在一种实现方式中, 遮挡估计子网络 31具体用于: 对第一视觉特征 X 向量降采样, 得到第二视觉特征向量 , 并根据第一视觉特征向量确定目 标事物被遮挡部分的遮挡标记向量 ^, 第二视觉特征向量 的维度小于第 一视觉特征 X, 遮挡标记向量 与述第二视觉特征向量 xd的维度相同; 遮 挡补全子网络 32具体用于:根据第二视觉特征向量 与遮挡标记向量 确 定目标事物的第三视觉特征向量 ^。
本实施例提供的神经网络***, 可用于执行图 1所示方法实施例提供 的技术方案, 具体实现方式和技术效果类似, 这里不再赘述。
图 8为本发明基于神经网络***的图像解析装置一实施例的结构示意 图, 如图 8所示, 本实施例提供的基于神经网络***的图像解析装置, 包 括: 获取模块 41、 训练模块 42。
其中, 获取模块 41, 用于获取神经网络***的各子网络对应的训练样 本, 神经网络***包括遮挡估计子网络、 遮挡补全子网络、 分解子网络, 各子网络对应的训练样本分别包括 I副图像, I取大于 1的正整数; 训练模块 42,用于根据各子网络对应的训练样本分别对遮挡估计子网 络、 遮挡补全子网络、 分解子网络进行预训练, 得到各子网络的参数, 各 子网络的参数包括各子网络中相互连接的两层之间的权重矩阵和偏置。
本实施例中, 遮挡估计子网络可以为三层网络, 包括: 输入层、 隐含 层和输出层, 输入层、 隐含层和输出层依次连接, 训练模块 42具体用于: 提取遮挡估计子网络对应的训练样本中各图像的视觉特征向量, 得到 训练样本中各图像的特征向量集合 Χ ={χ,}, 其中, 列向量 X,表示第 副图像 的视觉特征向量, l≤i≤i ;
分别确定各图像的遮挡部分, 获取遮挡估计子网络对应的训练样本中 各图像遮挡部分的遮挡标记向量集合 ^^{ } , 其中, 列向量 表示第 副 图像的视觉特征向量 X,对应的遮挡标记向量;
根据各图像遮挡标记向量集合^ ^ί ΐ和各图像的特征向量集合 Χ ={χ,}确定遮挡估计子网络的输入层和隐含层之间的权重矩阵 W。和偏置 b- , 以及确定遮挡估计子网络的隐含层与输出层之间的权重矩阵 W 和偏 置
训练模块 42具体通过以下方式确定 w。、 b。'、 w 和 首先, 令
W'x^b0' =W°' . , 其中, 。' =[W。',&。'], . =[x; 0']', x,表示第 !·副图像的视觉 特征向量, [χ]'表示转置运算; 令 W。f + 2= ¾ ', 其中, Α;。' i;),
2 , 得到 w。'、 b°
Figure imgf000033_0001
和 , 其中, 是遮挡估计子网络的输入层的输出, ={ }, H 是 Frobenius范数。
本实施例中, 遮挡补全子网络为五层网络, 包括: 输入层、 3 个隐含层 和输出层, 3 个隐含层分别为第一隐含层、 第二隐含层、 第三隐含层, 输入 层、 第一隐含层、 第二隐含层、 第三隐含层和输出层依次连接; 训练模块 42 具体用于:
提取遮挡补全子网络对应的训练样本中各图像无遮挡时的视觉特征向量 集合 , 其中, 遮挡补全子网络对应的训练样本中各图像是无遮挡的目标事 提取遮挡补全子网络对应的训练样本中各图像设置有遮挡时的视觉特征 向量集合 ;
根据遮挡补全子网络对应的训练样本中各图像有遮挡时的视觉特征 向量集合 和无遮挡时的视觉特征向量集合 确定遮挡补全子网络的输 入层与第一隐含层之间的权重矩阵 和偏置 ,确定遮挡补全子网络的第 一隐含层与第二隐含层之间的权重矩阵 和偏置 ^, 确定遮挡补全子网 络的第二隐含层与第三隐含层之间的权重矩阵 和偏置^, 确定遮挡补 全子网络的第三隐含层与输出层之间的权重矩阵 W 和偏置 ^, 其中, W 是 的转置矩阵, 是 w 的转置矩阵。
训练模块 42具体通过以下方式得到权重矩阵 w W 偏置 ^、 " 、 V禾口 MC' :
令/^ = W + b 为遮挡补全子网络的输入层的输出, ^是特征向量集合 ^中的一个向量, 最小化以下第一受限玻尔兹曼机 RBM能量:
E{V, hc' ) = "― hc - ,
其中, xm是将遮挡补全子网络对应的训练样本中各图像的遮挡部分作为 噪声时的标准差向量的第 m个分量, Ϋ;是特征向量 的第 m个分量, i ^为 的第 n个分量, 表示连接 和 的权重, 为 的第 n个分量, 表示 的第 m个分量;
采用对比度扩散法对第一 RBM能量最小化,得到权重矩阵 、偏置 和 uc' ;
将遮挡补全子网络的输入层的输出作为第一隐含层的输入, 令第一隐含 层的输出为 Λ¾ = P(^C2 hCi +b , 最小化以下第二受限波尔兹曼机 RBM能量:
Figure imgf000034_0001
其中, ;;是 = 7(1^^ + 1^ )的第 p个分量, 为/^的第 p个分量, 为/^ 的第 q个分量, H表示连接 和!^的权重, 为 的第 q个分量, uc表示^ 的第 p个分量;
采用对比度扩散法对第二 RBM能量最小化,得到权重矩阵 W 、偏置 ^和
«¾
求权重矩阵 W 和 ^的转置矩阵, 得到 W 和 W
本实施例中, 训练模块还用于: 根据以下公式重新构建训练样本中各 图像无遮挡的情况下视觉特征向量集合
Vc = p(Wc''p(W^'p(W^p(Wc'Vc + bc' ) + bc + uc uc') .采用梯度下降法最小化 ^和^ 之间的误差, 得到调整后的 W 、 W b u 和 ^。
本实施例中, 分解子网络可以为三层网络, 包括: 输入层、 隐含层和 输出层, 输入层、 隐含层和输出层依此连接。 训练模块 42具体用于: _ 取分解子网络对应的训练样本中各图像的视觉特征向量集合
X C = ^ 其中, 分解子网络对应的的训练样本是无遮挡时的目标事物;
_ 取分解子网络对应的训练样本中各图像的各部位类标图像集合 令 为特征向量集合^中的一个视觉特征向量 在分解子网络的输入层 的输出 = p{W'^ ~ ^ ) , 表示类标图像的个数, 的取值为 1 ^'≤M的正整数,, 将 按照以下映射函数映射为不同的类标图像:
Figure imgf000035_0002
其中, 表示目标事物的第 个部位的类标图像, 表示第 部分的类标图 像对应的分解子网络的隐含层和输出层之间的偏置, 表示第 部分的类标 图像对应的: ^解子网络的隐含层和输出层之间的权重矩阵;
令 r为 中所有视觉特征向量在分解子网络上映射成的类标图像的 集合, 最小化 和 之间的误差, 得到 w 、 ^ 。 本实施例提供的基于神经网络***的图像解析装置, 可用于执行图 5 所示方法实施例提供的技术方案, 具体实现方式和技术效果类似, 这里不 再赘述。 图 9为本发明基于神经网络***的图像解析装置又一实施例的结构示 意图, 如图 9所示, 本实施例的装置在图 8所示装置结构的基础上, 进一 歩地, 还可以包括: 参数调整模块 43。
其中, 参数调整模块 43, 用于构建损失函数 E, 最小化损失函数 E:
E(X ;W, b) =
Figure imgf000035_0001
, 其中, Χ = {χ, }是遮挡估计子网络训练样本中各图像的 视觉特征向量集, X,表示第 副图像的视觉特征向量, F = {^}是人工确定的训 练样本中各图像的类标图像集合, 是人工确定的第 幅图像的类标图像, r = {y,}是神经网络***的输出训练样本中各图像的类标图像集, 是神经网络 ***输出的第幅 图像的类标图像, W和 b是神经网络***的权重矩阵和偏置 的集合;
采用随机梯度下降法求解损失函数 E的最优解,确定神经网络***的 调整后的权重矩阵和偏置。
本实施例中, 参数调整模块 43具体用于: 将预训练得到各子网络的 权重矩阵, 按照以下公式进行迭代: ,
Figure imgf000036_0001
W +l ^ W + Aj+l , 其中, Z表示神经网络***的层数, / e {l, . . . L}, ·表示迭代次 数, Δ表示梯度下降时的变化率, £是学习率, ^是导数, 是 aw' aw'
第 /层的后向投影误差 ^与上一层是输出/ -1之间的乘积。
神经网络***的后向投影误差有以下三种形式: 神经网络***的最后 一层的后向投影误差 eL = diag (y - y)diag(l - y), 其中 diag (·)表示取对角矩阵运 算, y表示一幅图像的实际的类标图像, y表示神经网络***输出的图像 的类标图像。 如果第 Z层有 S型函数运算, 贝 层的后向投影误差 e - diag (W 1+1 el+1 )diag (hl )(1 - hl ), 其中, diag (·)表示取对角矩阵运算, 是上 一层的权重矩阵, 是上一层的后向投影误差。如果第 /层有 / x) = max(0,x) 运算, 则第 层的后向投影误差
Figure imgf000036_0002
[-],表示一个向量的第 个分量。
本实施例提供的基于神经网络***的图像解析装置, 可用于执行图 5 所示方法实施例提供的技术方案, 具体实现方式和技术效果类似, 这里不 再赘述。
图 10为本发明神经网络***又一实施例的结构示意图,如图 10所示, 本实施例的神经网络*** 500包括: 处理器 51和存储器 52, 处理器和存 储器通过总线连接, 存储器 52存储执行指令, 当神经网络*** 500运行 时, 处理器 51与存储器 52之间通信, 处理器 51执行指令使得神经网络 *** 500执行本发明提供的基于神经网络***的图像解析方法。 本实施例 中, 神经网络***的遮挡估计子网络、 遮挡补全子网络和分解子网络都可 以通过处理器 51来实现, 由处理器 51执行各个子网络的功能。 具体地: 处理器 51控制遮挡估计子网络根据获取到的目标事物的第一视觉特 征"^向量确定目标事物被遮挡部分的遮挡标记向量 , 遮挡标记向量 的 各分量的取值为大于 0小于 1, 第一视觉特征向量为有遮挡时目标事物的 视觉特征向量;
处理器 51控制遮挡补全子网络根据第一视觉特征向量 X与遮挡标记向 量 确定目标事物的第三视觉特征向量 ^, 第三视觉特征向量 ^为无遮挡 时目标事物的视觉特征向量 ·'
处理器 51控制分解子网络根据第三视觉特征向量 确定目标事物的 各部位的类标图像, 组合各部位的类标图像得到目标事物的解析结果。
本实施例中, 遮挡估计子网络可以为三层网络, 包括: 输入层、 隐含 层和输出层, 输入层、 隐含层和输出层依次连接; 遮挡估计子网络的输入 层和隐含层之间的映射函数为公式 (1) : h^ =p{^ x + b^) , 其中 W为遮挡 估计子网络的输入层和隐含层之间的权重矩阵, ^为遮挡估计子网络的输 入层与隐含层之间的偏置, W = max(0, X)为非线性激活函数;
遮挡估计子网络的隐含层和输出层之间的映射函数为公式 (2) : ^ =T(W^h^ +b^) , W 是遮挡估计子网络的隐含层与输出层之间的权重矩 阵, 是遮挡估计子网络的隐含层与输出层之间的偏置, (x) = l/(l + eXp(-x) 是 S型函数, 返回值大于 0小于 1;
处理器 51具体控制遮挡估计子网络将第一视觉特征向量 X作为遮挡估 计子网络的输入层的输入参数, 根据公式 (1) 和 (2) 计算遮挡标记向量 o
X
本实施例中, 遮挡补全子网络为五层网络, 包括: 输入层、 3个隐含 层和输出层, 3个隐含层分别为第一隐含层、 第二隐含层、 第三隐含层, 输入层、 第一隐含层、 第二隐含层、 第三隐含层和输出层依次连接;
遮挡补全子网络的输入层与第一隐含层之间映射函数为公式 (3) : Ζι =
Figure imgf000037_0001
,其中, 为遮挡补全子网络的输入层与第一隐含层之 间的权重矩阵, W为遮挡补全子网络的输入层与第一隐含层之间的偏置; 遮挡补全子网络的第一隐含层与第二隐含层之间的映射函数为公式 (4) : Z2 =p(W^z1 + b^) ' 其中, W 为遮挡补全子网络的第一隐含层与第二 隐含层之间的权重矩阵, 为遮挡补全子网络的第一隐含层与第二隐含层 之间的偏置;
遮挡补全子网络的第二隐含层与第三隐含层之间的映射函数为公式 (5) : z3 =p(W^z2 +u^) ' 为遮挡补全子网络的第二隐含层与第三隐含 层之间的权重矩阵, ^为遮挡补全子网络的第二隐含层与第三隐含层之间 的偏置;
遮挡补全子网络的第三隐含层与输出层之间的映射函数为公式 (6) : ^ =p(W^ z3 + u-) , W 为遮挡补全子网络的第三隐含层与输出层之间的权重 矩阵, 为遮挡补全子网络的第三隐含层与输出层之间的偏置, w 是 的转置矩阵, W 是 的转置矩阵, W ax^x)为非线性激活函数;
处理器 51具体控制遮挡估计子网络将相乘结果为 x*x。作为遮挡补全 子网络的输入层的参数, 根据公式 (3) 、 (4) 、 (5) 、 (6) 计算第三 视觉特征向量 ^。
本实施例中, 分解子网络为三层网络, 包括: 输入层、 隐含层和输出 层, 输入层、 隐含层和输出层以此连接; 分解子网络的输入层和隐含层之 间的映射函数为公式 (7) : z =p{W^xc+b^) , 为分解子网络的输入层和 隐含层之间的权重矩阵, 为分解子网络的隐含层和输出层之间的偏置; 分解子网络的隐含层和输出层之间的映射函数为公式 (8) :
yi =T(W^ Z +b^) , 其中, 为分解子网络的隐含层和输出层之间的偏置, y! 表示目标事物的第 部分的类标图像, 表示分解子网络的隐含层和输出 层之间的第 部分的类标图像的权重矩阵, 表示分解子网络的隐含层和 输出层之间的第 部分的类标图像的偏置, W ^^x)为非线性激活函 数, (x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1;
处理器 51具体用于控制分解子网络将第三视觉特征向量 作为分解 子网络的输入层的输入参数, 根据公式 (7) 和 (8) 确定目标事物的各部 位的类标图像, 将各类标图像组合起来, 得带目标事物的解析结果。
本实施例中, 处理器 51具体用于控制遮挡估计子网络: 对第一视觉 特征 X向量降采样, 得到第二视觉特征向量 , 并根据第一视觉特征向量 确定目标事物被遮挡部分的遮挡标记向量 ^, 第二视觉特征向量 的维度 小于第一视觉特征 X, 遮挡标记向量 与述第二视觉特征向量 ^的维度相 同; 并控制遮挡补全子网络根据第二视觉特征向量 ^与遮挡标记向量 确 定目标事物的第三视觉特征向量 ^。
本实施例的神经网络***, 可以用于执行图 1所示方法实施例的技术 方案, 其实现原:! S和技术效果类似, 此处不再赘述。
图 11为本发明基于神经网络***的图像解析装置还一实施例结构示 意图, 本实施例的基于神经网络***的图像解析装置 600包括: 处理器 61 和存储器 62, 处理器 61和存储器 62通过总线连接, 存储器 62存储执行 指令, 当基于神经网络***的图像解析装置 600运行时, 处理器 61与存 储器 62之间通信, 处理器 61执行指令使得基于神经网络***的图像解析 装置 600执行本发明提供的基于神经网络***的图像解析方法。处理器 61 具体用于执行以下操作:
获取神经网络***的各子网络对应的训练样本, 神经网络***包括遮 挡估计子网络、 遮挡补全子网络、 分解子网络, 各子网络对应的训练样本 分别包括 I副图像, I取大于 1的正整数;
根据各子网络对应的训练样本分别对遮挡估计子网络、遮挡补全子网 络、 分解子网络进行预训练, 得到各子网络的参数, 各子网络的参数包括 各子网络中相互连接的两层之间的权重矩阵和偏置。
本实施例中, 遮挡估计子网络为三层网络, 包括: 输入层、 隐含层和 输出层, 输入层、 隐含层和输出层依次连接。 处理器 61根据各子网络对 应的训练样本对遮挡估计子网络进行预训练, 具体为:
提取遮挡估计子网络对应的训练样本中各图像的视觉特征向量, 得到 训练样本中各图像的特征向量集合 Χ = { χ, }, 其中, 列向量 X,表示第 副图像 的视觉特征向量, 1≤ ≤/;
分别确定各图像的遮挡部分, 获取遮挡估计子网络对应的训练样本中 各图像遮挡部分的遮挡标记向量集合 } , 其中, 列向量 表示第 副 图像的视觉特征向量 X,对应的遮挡标记向量;
根据各图像遮挡标记向量集合^ = { }和各图像的特征向量集合 Χ = { χ, }确定遮挡估计子网络的输入层和隐含层之间的权重矩阵 W。i和偏置 b- , 以及确定遮挡估计子网络的隐含层与输出层之间的权重矩阵 W 和偏 置 O
处理器 61根据各图像遮挡标记向量集 = { }和各图像的特征向量集 Χ = { χ, }确定遮挡估计子网络的输入层与隐含层之间的权重矩阵 W。i和偏置 b。', 以及确定遮挡估计子网络的隐含层与输出层之间的权重矩阵 W 和平 偏置 b。 具体为:
令 W。' x,. + b0' = W°' ., 其中, 。' = [W°' ,b°' ], . = [χ; °' ]', x,表示第 i副图像的 视觉特征向量, [X]'表示转置运算;
令 W。2/i,。' + b°2 = W°2h°', 其中, = p{W °l xt), W°2 = [W° b°^, h = [ f ; are minno n。. X0 - T(W¾H0' ) b' w°2禾 t , 其中, H°' = { ' } 求解 S
是遮挡估计子网络的输入层的输出, = {3 , II是 Frobenius范数。
本实施例中, 遮挡补全子网络为五层网络, 包括: 输入层、 3 个隐含层 和输出层, 3 个隐含层分别为第一隐含层、 第二隐含层、 第三隐含层, 输入 层、 第一隐含层、 第二隐含层、 第三隐含层和输出层依次连接; 处理器 61根 据各子网络对应的训练样本对遮挡补全子网络进行预训练, 具体为:
提取遮挡补全子网络对应的训练样本中各图像无遮挡时的视觉特征向量 集合 , 其中, 遮挡补全子网络对应的训练样本中各图像是无遮挡的目标事 提取遮挡补全子网络对应的训练样本中各图像设置有遮挡时的视觉特征 向量集合 ;
根据遮挡补全子网络对应的训练样本中各图像有遮挡时的视觉特征向量 集合^和无遮挡时的视觉特征向量集合 确定遮挡补全子网络的输入层与第 一隐含层之间的权重矩阵 和偏置 ^, 确定遮挡补全子网络的第一隐含层与 第二隐含层之间的权重矩阵 和偏置 ,确定遮挡补全子网络的第二隐含层 与第三隐含层之间的权重矩阵 和偏置^, 确定遮挡补全子网络的第三隐 含层与输出层之间的权重矩阵 w 和偏置 M ,其中, w 是 的转置矩阵, 是 的转置矩阵。
处理器 61 根据遮挡补全子网络对应的训练样本中各图像有遮挡时的视 觉特征向量集合^和无遮挡的情况下视觉特征向量集合 确定遮挡补全子网 络的输入层与第一隐含层之间的权重矩阵 和偏置 V, 确定遮挡补全子网络 的第一隐含层与第二隐含层之间的权重矩阵^和偏置 ^,确定遮挡补全子网 络的第二隐含层与第三隐含层之间的权重矩阵 和偏置^, 确定遮挡补全 子网络的第三隐含层与输出层之间的权重矩阵 和偏置 , 具体为:
令/^ = W^+b 为遮挡补全子网络的输入层的输出, ^是特征向量集合 ^中的一个向量, 最小化以下第一受限玻尔兹曼机 RBM能量: Ε(Ψ, hc' ) = 、 m 2 m/ "- hc - 2^ ,
2(Tm m,n m
其中, σΜ是将遮挡补全子网络对应的训练样本中各图像的遮挡部分作为 噪声时的标准差向量 σ的第 m个分量, Ϋ;是特征向量 ΫΕ的第 m个分量, h:'为 的第 n个分量, :„表示连接 Ϋ; 和 h:'的权重, 为 的第 n个分量, 表 示 的第 m个分量;
采用对比度扩散法对第一 RBM能量最小化, 得到权重矩阵 偏置 和 uc';
将遮挡补全子网络的输入层的输出作为第一隐含层的输入, 令第一隐含 层的输出为 = Pm +b , 最小化以下第二受限波尔兹曼机 RBM能量:
Figure imgf000041_0001
其中, ;;是 = 7(^^ + 1 ')的第 ρ个分量, '为/ ^的第 ρ个分量, 为 h 的第 q个分量, 表示连接 h;和 的权重, 为 b 的第 q个分量, u c表示^ 的第 p个分量;
采用对比度扩散法对第二 RBM能量最小化,得到权重矩阵 W 、偏置 ^和 " ;
最后, 求权重矩阵 ^ 和^^'的转置矩阵, 得到 '和 '。
处理器 61 在确定权重矩阵 W W 偏置 、 " 、 b ^之后, 还用 于: 根据以下公式重新构建训练样本中各图像无遮挡的情况下视觉特征向量 集合
Vc ^p(Wc'p(WC2'p(WC2p(Wc'Vc+bc') + bC2) + uC2)uc') ;
采用梯度下降法最小化 ^和 之间的误差, 得到调整后的 w 、 w b
UCl、 禾口 M 。
本实施例中, 分解子网络为三层网络, 包括: 输入层、 隐含层和输出层, 输入层、 隐含层和输出层依此连接;
处理器 61根据各子网络对应的训练样本对分解子网络进行预训练,具体 为:
提取分解子网络对应的训练样本中各图像的视觉特征向量集合 ^^}, 其中, 分解子网络对应的的训练样本是无遮挡时的目标事物;
提取分解子网络对应的训练样本中各图像的各部位类标图像集合 Yc ={yc t}
令 为特征向量集合^中的一个视觉特征向量 在分解子网络的输入层 的输出 =p{W'^ + b^) , 表示类标图像的个数, 的取值为 I≤''≤M的正整数,, 将 按照以下映射函数映射为不同的类标图像:
Figure imgf000042_0002
其中, 表示目标事物的第 个部位的类标图像, 表示第 部分的类标图 像对应的分解子网络的隐含层和输出层之间的偏置, 表示第 ,·部分的类标 图像对应的分解子网络的隐含层和输出层之间的权重矩阵;
令 r为 中^有视觉特征向量在分解子网络上映射成的类标图像的集 合, 最小化; 和 F之间的误差, 得到 w'i、 H 、 。
本实施例中, 处理器 61根据训练样本分别对遮挡估计子网络、遮挡补全 子网络、 分解子网络进行预训练, 得到各子网络的参数之后, 还用于:
构建损失函数 E, 最小化损失函数 E:
E{X;W,b) = f-Y\l,其中, Χ ={χ,}是遮挡估计子网络训练样本中各图像的 视觉特征向量集, X,表示第 副图像的视觉特征向量, F = }是人工确定的训 练样本中各图像的类标图像集合, 是人工确定的第 幅图像的类标图像, r={y,}是神经网络***的输出训练样本中各图像的类标图像集, 是神经网络 ***输出的第幅 图像的类标图像, W和 b是神经网络***的权重矩阵和偏置 的集合;
采用随机梯度下降法求解损失函数 E的最优解,确定神经网络***的 调整后的权重矩阵和偏置。
其中, 处理器 61采用随机梯度下降法求解损失函数 E的最优解, 确 定神经网络***的调整后的权重矩阵, 具体为: 将预训练得到各子网络的 权重矩阵, 按照以下公式进行迭代: Δ,+1 =0.9.Δ,-0.001^/- ^,
J 1 1 dw
Wj'+l ^Wj l +Aj+l , 其中, Z表示神经网络***的层 /e {l,...L}, 表示迭代次 数, Δ表示梯度下降时的变化率, £是学习率, 是
Figure imgf000042_0001
第 /层的后向投影误差 ^与上一层是输出/ -1之间的乘积。
本实施例中神经网络***的后向投影误差有三种形式, 神经网络*** 的最后一层的后向投影误差 eL = diag(y - y)diag(l - y), 其中 表示取对角 矩阵运算, y表示一幅图像的实际的类标图像, y表示神经网络***输出 的图像的类标图像。 如果第 层有 S型函数运算, 则第 z层的后向投影误差 el ^ diag {Wl+vel+l )diag {hl ){\ - hl ) , 其中, agO表示取对角矩阵运算, 是上 —层的权重矩阵, 是上一层的后向投影误差。如果第 /层有 / x) = max(0, x) 运算, 则第 层的后向投影误差 ,
Figure imgf000043_0001
[-],表示一个向量的第 个分量。
本实施例的装置, 可以用于执行图 5所示方法实施例的技术方案, 其 实现原理和技术效果类似, 此处不再赘述。
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分 歩骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算 机可读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的歩 骤; 而前述的存储介质包括: R0M、 RAM, 磁碟或者光盘等各种可以存储程 序代码的介质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种基于神经网络***的图像解析方法, 其特征在于, 包括: 所述神经网络***获取目标事物的第一视觉特征向量 X, 所述神经网 络***包括遮挡估计子网络、 遮挡补全子网络、 分解子网络;
所述遮挡估计子网络根据目标事物的第一视觉特征 X向量确定所述目 标事物被遮挡部分的遮挡标记向量 ^, 所述遮挡标记向量 ^的各分量的取 值为大于 0小于 1;
所述遮挡补全子网络根据所述第一视觉特征向量 X与所述遮挡标记向 量 确定所述目标事物的第三视觉特征向量 ^, 所述第三视觉特征向量 ^ 为补全所述遮挡部分后所述目标事物的视觉特征向量;
所述分解子网络根据所述第三视觉特征向量 确定所述目标事物的 各部位的类标图像, 组合所述各部位的类标图像得到所述目标事物的解析 结果。
2、 根据权利要求 1所述的方法, 其特征在于, 所述遮挡估计子网络 为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输 出层依次连接;
所述遮挡估计子网络根据所述第一视觉特征向量 X确定所述目标事物 被遮挡部分的遮挡标记向量 , 包括:
所述遮挡估计子网络将所述第一视觉特征向量 X作为所述遮挡估计子 网络的输入层的输入参数, 根据以下公式 (1) 和 (2) 计算所述遮挡标记 向量 ^
h°' - p(W0lx + b01) ( 1)
x。 =r(W。 +&。2) (2)
其中, 公式 (1) 为所述遮挡估计子网络的输入层与隐含层之间的映 射函数, 公式 (2) 为所述遮挡估计子网络的的隐含层与输出层之间的映 射函数, W '为所述遮挡估计子网络的输入层与隐含层之间的权重矩阵, 。 为所述遮挡估计子网络的输入层与隐含层之间的偏置, W ^^^ )为非 线性激活函数, W 是所述遮挡估计子网络的隐含层与输出层之间的权重 矩阵, 是所述遮挡估计子网络的隐含层与输出层之间的偏置,
(x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1。 3、 根据权利要求 2所述的方法, 其特征在于, 所述遮挡补全子网络 为五层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个隐含层分别 为第一隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一隐含层、 第 二隐含层、 第三隐含层和输出层依次连接;
所述遮挡补全子网络根据所述第一视觉特征向量 X与所述遮挡标记向 量 确定所述目标事物的第三视觉特征向量 ^, 包括:
所述遮挡补全子网络将所述遮挡标记向量 与所述第一视觉特征向 量 X逐分量相乘, 得到遮挡特征向量 χ*χ。, 其中, 所述遮挡标记向量 ^与 所述第一视觉特征向量 X的维度相同;
所述遮挡补全子网络将所述遮挡特征向量 χ*χ。作为所述遮挡补全子 网络的输入层的参数, 根据以下公式 (3) 、 (4) 、 (5) 、 (6) 计算所 述第三视觉特征向量
Ζ, = 7(WC'( * 。) + V)
z2 = p(WC2 Zl + bC2)
Z3 = 7(WC2 Z2 +M ¾)
其中, 公式 (3) 为所述遮挡补全子网络的输入层与第一隐含层之间 映射函数, 公式 (4) 为所述遮挡补全子网络的第一隐含层与第二隐含层 之间的映射函数, 公式 (5) 为所述遮挡补全子网络的第二隐含层与第三 隐含层之间的映射函数, 公式 (6) 为所述遮挡补全子网络的第三隐含层 与输出层之间的映射函数, 为所述遮挡补全子网络的输入层与第一隐含 层之间的权重矩阵, 为所述遮挡补全子网络的输入层与第一隐含层之间 的偏置, 为所述遮挡补全子网络的第一隐含层与第二隐含层之间的权重 矩阵, 为所述遮挡补全子网络的第一隐含层与第二隐含层之间的偏置, 为所述遮挡补全子网络的第二隐含层与第三隐含层之间的权重矩阵,
^为所述遮挡补全子网络的第二隐含层与第三隐含层之间的偏置, w 为 所述遮挡补全子网络的第三隐含层与输出层之间的权重矩阵, 为所述遮 挡补全子网络的第三隐含层与输出层之间的偏置, W 是 的转置矩阵, 是 的转置矩阵, /Hx) = max(0, x)为非线性激活函数。
4、 根据权利要求 3所述的方法, 其特征在于, 所述分解子网络为三 层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出层 依次连接;
所述分解子网络根据所述第三视觉特征向量 确定所述目标事物的各 部位的类标图像, 组合所述各部位的类标图像得到所述目标事物的解析结 果, 包括:
所述分解子网络将所述第三视觉特征向量 ^作为所述分解子网络的输 入层的输入参数, 根据以下公式 (7 ) 和 (8 ) 确定所述目标事物的各部位 的类标图像:
z ^ p{W xc + b ) ( 7 )
Figure imgf000046_0001
其中, 公式 (7 ) 为所述分解子网络的输入层和隐含层之间的映射函 数,公式(8 )为所述分解子网络的隐含层和输出层之间的映射函数, 为 所述分解子网络的输入层和隐含层之间的权重矩阵, 为所述分解子网络 的输入层和隐含层之间的偏置, 表示所述目标事物的第 部分的类标图 像, 表示所述第 ,·部分的类标图像对应的所述分解子网络的隐含层和输 出层之间的权重矩阵, 表示所述第 ,·部分的类标图像对应的所述分解子 网络的隐含层和输出层之间的偏置, x) = m«x(0, x)为非线性激活函数, (x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1;
将所述各类标图像组合起来, 得到所述目标事物的解析结果。
5、 根据权利要求 1所述的方法, 其特征在于, 所述遮挡估计子网络根据 目标事物的第一视觉特征 X向量确定所述目标事物被遮挡部分的遮挡标记向 量 · 包括:
所述遮挡估计子网络对所述第一视觉特征 X向量降采样,得到第二视觉特 征向量 xd, 并根据所述第一视觉特征向量确定所述所述目标事物被遮挡部分 的遮挡标记向量 , 其中, 所述第二视觉特征向量 的维度小于所述第一视 觉特征 X, 所述遮挡标记向量 与述第二视觉特征向量 xd的维度相同 ·,
所述遮挡补全子网络根据所述第一视觉特征向量 X与所述遮挡标记向量 确定所述目标事物的第三视觉特征向量 ^, 包括:
所述遮挡补全子网络根据所述第二视觉特征向量 xd与所述遮挡标记向量 ^确定所述目标事物的第三视觉特征向量 。 6、 一种基于神经网络***的图像解析方法, 其特征在于, 包括: 获取所述神经网络***的各子网络对应的训练样本, 所述神经网络系 统包括遮挡估计子网络、 遮挡补全子网络、 分解子网络, 所述各子网络对 应的训练样本分别包括 I副图像, I取大于 1的正整数;
根据所述各子网络对应的训练样本分别对所述遮挡估计子网络、遮挡 补全子网络、 分解子网络进行预训练, 得到所述各子网络的参数, 所述各 子网络的参数包括所述各子网络中相互连接的两层之间的权重矩阵和偏 置。
7、 根据权利要求 6所述的方法, 其特征在于, 所述遮挡估计子网络 为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输 出层依次连接;
所述根据各子网络对应的训练样本对所述遮挡估计子网络进行预训 练, 包括:
提取所述遮挡估计子网络对应的训练样本中各图像的视觉特征向量, 得到所述训练样本中各图像的特征向量集合 Χ ={χ,}, 其中, 列向量 X,表示 第 副图像的视觉特征向量, l≤i≤I ;
分别确定所述各图像的遮挡部分, 获取所述遮挡估计子网络对应的训 练样本中各图像遮挡部分的遮挡标记向量集合^ ^ },其中,列向量 表 示第 副图像的视觉特征向量 X,对应的遮挡标记向量;
根据所述各图像遮挡标记向量集合 ^^ί ΐ和各图像的特征向量集合
Χ ={χ,}确定所述遮挡估计子网络的输入层和隐含层之间的权重矩阵 W。i和 偏置 ^, 以及确定所述遮挡估计子网络的隐含层与输出层之间的权重矩阵 W 禾口偏置 b°
8、 根据权利要求 7所述的方法, 其特征在于, 所述根据所述各图像 遮挡标记向量集 }和各图像的特征向量集 Χ ={χ,}确定所述遮挡估计 子网络的输入层与隐含层之间的权重矩阵 W。《和偏置 ^, 以及确定所述遮 挡估计子网络的隐含层与输出层之间的权重矩阵 W 和平偏置 ^, 包括: 令 W。'x; + b0' = W0'^, 其中, 。' = [W0> ,b。' ], xt = [X:,b0' ], x,表示第 i畐 lj图像的 视觉特征向量, [X]'表示转置运算;
令 W。2/i,。' +b°2 ^W°2h , 其中, h = 7(W°' .), W°2 ^[W° b°2], hp =[ Ϊ'',1]'; X0 )| ,得到所述 W。'、 b。、、 W°2禾口 ,其中, H°' = } 求解 S
是遮挡估计子网络的输入层的输出, = {3 , II是 Frobenius范数。
9、 根据权利要求 6所述的方法, 其特征在于, 所述遮挡补全子网络为五 层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个隐含层分别为第一 隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一隐含层、 第二隐含层、 第三隐含层和输出层依次连接;
所述根据所述各子网络对应的训练样本对所述遮挡补全子网络进行预训 练, 包括:
提取所述遮挡补全子网络对应的训练样本中各图像无遮挡时的视觉特征 向量集合 其中, 所述遮挡补全子网络对应的训练样本中各图像是无遮挡 的目标事物;
提取所述遮挡补全子网络对应的训练样本中各图像设置有遮挡时的视觉 特征向量集合 ;
根据所述遮挡补全子网络对应的训练样本中各图像有遮挡时的视觉特征 向量集合 和无遮挡时的视觉特征向量集合 确定所述遮挡补全子网络的输 入层与第一隐含层之间的权重矩阵 和偏置 , 确定所述遮挡补全子网络的 第一隐含层与第二隐含层之间的权重矩阵 和偏置 ,确定所述遮挡补全子 网络的第二隐含层与第三隐含层之间的权重矩阵 和偏置^, 确定所述遮 挡补全子网络的第三隐含层与输出层之间的权重矩阵 '和偏置 ,其中, 是 的转置矩阵, 是 ^的转置矩阵。
10、 根据权利要求 9所述的方法, 其特征在于, 所述根据所述遮挡补全 子网络对应的训练样本中各图像有遮挡时的视觉特征向量集合 和无遮挡的 情况下视觉特征向量集合 确定所述遮挡补全子网络的输入层与第一隐含层 之间的权重矩阵 和偏置 V, 确定所述遮挡补全子网络的第一隐含层与第二 隐含层之间的权重矩阵^ 和偏置 ^,确定所述遮挡补全子网络的第二隐含层 与第三隐含层之间的权重矩阵 和偏置^, 确定所述遮挡补全子网络的第 三隐含层与输出层之间的权重矩阵 w 和偏置 , 包括:
令/^ = W + )为所述遮挡补全子网络的输入层的输出, 是特征向量 集合^中的一个向量, 最小化以下第一受限玻尔兹曼机 RBM能量:
£(VC, hC' ) = - ) _ _ ,
2(Tm 其中, Tm是将所述遮挡补全子网络对应的训练样本中各图像的遮挡部分 作为噪声时的标准差向量 σ的第 m个分量, 是特征向量 ΫΕ的第 m个分量, 为 的第 n个分量, ¾„表示连接 ~ 和 1^的权重, b:'为 的第 n个分量, 表示^的第 m个分量;
采用对比度扩散法对所述第一 RBM能量最小化, 得到所述权重矩阵 W 偏置 禾口 MC' ;
将所述遮挡补全子网络的输入层的输出作为所述第一隐含层的输入, 令 所述第一隐含层的输出为 =p(W^h-+b , 最小化以下第二受限波尔兹曼机 RBM能量: , q q q
p 2op q VA p
其中, ;;是 = 7(^^ + 1 ')的第 p个分量, '为/ ^的第 p个分量, 为 h 的第 q个分量, 表示连接 h;和 的权重, 为 的第 q个分量, uc表示^ 的第 p个分量;
采用对比度扩散法对所述第二 RBM能量最小化,得到所述权重矩阵 W 、 偏置 ^和" ;
求所述权重矩阵 nwf的转置矩阵, 得到 和 W
11、 根据权利要求 10所述的方法, 其特征在于, 所述根据所述有遮挡的 情况下视觉特征向量集合 和无遮挡的情况下视觉特征向量集合 确定所述 遮挡补全子网络的输入层与第一隐含层之间的权重矩阵 和偏置 ', 确定所 述遮挡补全子网络的第一隐含层与第二隐含层之间的权重矩阵 W 和偏置 ^, 确定所述遮挡补全子网络的第二隐含层与第三隐含层之间的权重矩阵 和 偏置^, 确定所述遮挡补全子网络的第三隐含层与输出层之间的权重矩阵 W 和偏置 之后, 包括:
根据以下公式重新构建所述训练样本中各图像无遮挡的情况下视觉特征 向量集合
Vc ^ p(Wc,'p(WC2'p(WC2p(Wc'Vc +bc') + bC2) + u 2)uc');
采用梯度下降法最小化所述 ^和 之间的误差, 得到调整后的 w 、 w b 、 uC2、 V禾口 MC' 0
12、 根据权利要求 6所述的方法, 其特征在于, 所述分解子网络为三层 网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出层依此 连接;
所述根据各子网络对应的所述训练样本对所述分解子网络进行预训练, 包括:
提取所述分解子网络对应的训练样本中各图像的视觉特征向量集合 ^ = {^} , 其中, 所述分解子网络对应的的训练样本是无遮挡时的目标事物; 提取所述分解子网络对应的训练样本中各图像的各部位类标图像集合 = {^}
令 为特征向量集合 中的一个视觉特征向量 在所述分解子网络的输 入层的输出 = (W' +W), ,·表示类标图像的个数, ,·的取值为 i≤ M的正 整数, , 将 按照以下映射函数映射为不同的类标图像:
Figure imgf000050_0002
其中, 表示所述目标事物的第个部位的类标图像, 表示所述第 部分 的类标图像对应的所述分解子网络的隐含层和输出层之间的偏置, 表示所 述第 部分的类标图像对应的所述分解子网络的隐含层和输出层之间的权重 矩阵;
令 r为 中所有视^特征向量在所述分解子网络上映射成的类标图像的 集合, 最小化所述 r和 之间的误差, 得到 w'i、 w; 。
13、 根据权利要求 6-12任一项所述的方法, 其特征在于, 所述根据所述 训练样本分别对所述遮挡估计子网络、 遮挡补全子网络、 分解子网络进行预 训练, 得到所述各子网络的参数之后, 还包括:
构建损失函数 E, 最小化所述损失函数 E:
E(X ;W, b) = {χ, }
Figure imgf000050_0001
是遮挡估计子网络训练样本中各图像的 视觉特征向量集, X,表示第 副图像的视觉特征向量, F = }是人工确定的所 述训练样本中各图像的类标图像集合, ^:是人工确定的第 幅图像的类标图 像, r = {y,}是所述神经网络***的输出所述训练样本中各图像的类标图像集, 是所述神经网络***输出的第幅 图像的类标图像, W和 b是所述神经网络 ***的权重矩阵和偏置的集合;
采用随机梯度下降法求解所述损失函数 E的最优解,确定所述神经网 络***的调整后的权重矩阵和偏置。
14、 根据权利要求 13所述的方法, 其特征在于, 所述采用随机梯度 下降法求解所述损失函数 E的最优解,确定所述神经网络***的调整后的 权重矩阵, 包括:
将预训练得到所述各子网络的权重矩阵, 按照以下公式进行迭代:
Δ.+1 =0.9-Δ, - . Ι ε-W' -ε ^- , W' ^W'+Ai+1 , 其中, /表示所述神经网络系 统的层数, /e{l,...L}, 表示迭代次数, Δ表示梯度下降时的变化率, £是 学习率, ^是导数, ^ = /^( '是第 层的后向投影误差^与上一层是输 出/ -1之间的乘积。
15、 根据权利要求 14所述的方法, 其特征在于, 所述神经网络*** 的最后一层的后向投影误差 eL = diag(y - y)diag(l- y), 其中 表示取对角 矩阵运算, y表示一幅图像的实际的类标图像, y表示所述神经网络*** 输出的所述图像的类标图像。
16、 根据权利要求 14所述的方法, 其特征在于, 如果第 Z层有 S型函 数运算, 则第 /层的后向投影误差
Figure imgf000051_0001
其中, diag(. 表示取对角矩阵运算, 是上一层的权重矩阵, 是上一层的后向投影 误差。
17、 根据权利要求 14所述的方法, 其特征在于, 如果第 层有 /^x max^x)运算, 则第 Z层的后向投影误差 e' =f 〉Q, 其中, =[wV-1+b']i , [.],表示一个向量的第 !·个分量。
18、 一种神经网络***, 其特征在于, 包括:
遮挡估计子网络, 用于根据获取到的目标事物的第一视觉特征"^向量 确定所述目标事物被遮挡部分的遮挡标记向量 , 所述遮挡标记向量 的 各分量的取值为大于 0小于 1, 所述第一视觉特征向量为有遮挡时所述目 标事物的视觉特征向量; 遮挡补全子网络, 用于根据所述第一视觉特征向量 X与所述遮挡标记 向量 确定所述目标事物的第三视觉特征向量 , 所述第三视觉特征向量 为无遮挡时所述目标事物的视觉特征向量;
分解子网络, 用于根据所述第三视觉特征向量 ^确定所述目标事物的 各部位的类标图像, 组合所述各部位的类标图像得到所述目标事物的解析 结果。
19、 根据权利要求 18所述的神经网络***, 其特征在于, 所述遮挡 估计子网络为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出层依次连接;
所述遮挡估计子网络的输入层和隐含层之间的映射函数为公式 (1) : h0' =p(w- x + b0') , 其中 W为所述遮挡估计子网络的输入层和隐含层之间的 权重矩阵, ^为所述遮挡估计子网络的输入层与隐含层之间的偏置, p(x) = max(0, x)为非线性激活函数;
所述遮挡估计子网络的隐含层和输出层之间的映射函数为公式 (2) : xa =T{W^h^ +b^) , W。是所述遮挡估计子网络的隐含层与输出层之间的权重 矩阵, 是所述遮挡估计子网络的隐含层与输出层之间的偏置,
(x) = l/(l + exp(-x)是 S型函数, 返回值大于 0小于 1;
所述遮挡估计子网络具体用于:
将所述第一视觉特征向量 X作为所述遮挡估计子网络的输入层的输入 参数, 根据公式 (1) 和 (2) 计算所述遮挡标记向量 ^。
20、 根据权利要求 18所述的神经网络***, 其特征在于, 所述遮挡 补全子网络为五层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个 隐含层分别为第一隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一 隐含层、 第二隐含层、 第三隐含层和输出层依次连接;
所述遮挡补全子网络的输入层与第一隐含层之间映射函数为公式
(3) : Ζι
Figure imgf000052_0001
, 其中, 为所述遮挡补全子网络的输入层与 第一隐含层之间的权重矩阵, 为所述遮挡补全子网络的输入层与第一隐 含层之间的偏置;
所述遮挡补全子网络的第一隐含层与第二隐含层之间的映射函数为 公式 (4) : z^piW^z^b^) , 其中, W 为所述遮挡补全子网络的第一隐含 层与第二隐含层之间的权重矩阵, 为所述遮挡补全子网络的第一隐含层 与第二隐含层之间的偏置;
所述遮挡补全子网络的第二隐含层与第三隐含层之间的映射函数为 公式 (5) : Zi =p^z2 +u^) , 为所述遮挡补全子网络的第二隐含层与 第三隐含层之间的权重矩阵, ^为所述遮挡补全子网络的第二隐含层与第 三隐含层之间的偏置;
所述遮挡补全子网络的第三隐含层与输出层之间的映射函数为公式 (6) : x^ =p(W^ Z3 + u^ , W 为所述遮挡补全子网络的第三隐含层与输出 层之间的权重矩阵, 为所述遮挡补全子网络的第三隐含层与输出层之间 的偏置, W 是 的转置矩阵, f是 的转置矩阵, /^)= X(0,X)为非线 性激活函数;
所述遮挡估计子网络具体用于:
将所述相乘结果为 χ*χ。作为所述遮挡补全子网络的输入层的参数, 根 据公式 (3) 、 (4) 、 (5) 、 (6) 计算所述第三视觉特征向量 ^。
21、 根据权利要求 18所述的神经网络***, 其特征在于, 所述分解 子网络为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含 层和输出层以此连接;
所述分解子网络的输入层和所述隐含层之间的映射函数为公式 (7) : z =p(W'^c+b^ , 为所述分解子网络的输入层和隐含层之间的权重矩阵, 为所述分解子网络的隐含层和输出层之间的偏置;
所述分解子网络的隐含层和输出层之间的映射函数为公式 (8) : yi =T(W^ Z +b^) , 其中, 为所述分解子网络的隐含层和输出层之间的偏 置, 表示所述目标事物的第 部分的类标图像, 表示所述分解子网络 的隐含层和输出层之间的第 部分的类标图像的权重矩阵, b 表示所述分 解子网络的隐含层和输出层之间的第 ,·部分的类标图像的偏置,
p(x) = max(0, x)为非线性激活函数, (x) = l/(l + exp(-x)是 S型函数, 返回值大 于 0小于 1;
所述分解子网络具体用于: 将所述第三视觉特征向量 ^作为所述分解 子网络的输入层的输入参数, 根据公式 (7) 和 (8) 确定所述目标事物的 各部位的类标图像, 将所述各类标图像组合起来, 得带所述目标事物的解 : 估 据
遮挡标记向量 与述第二视觉特征向量 xd的维度相同 ·,
所述遮挡补全子网络具体用于:
根据所述第二视觉特征向量 xd与所述遮挡标记向量 ^确定所述目标事 物的第三视觉特征向量 ^。
23、 一种基于神经网络***的图像解析装置, 其特征在于, 包括: 获取模块, 用于获取所述神经网络***的各子网络对应的训练样本, 所述神经网络***包括遮挡估计子网络、 遮挡补全子网络、 分解子网络, 所述各子网络对应的训练样本分别包括 I副图像, I取大于 1的正整数; 训练模块, 用于根据所述各子网络对应的训练样本分别对所述遮挡估 计子网络、 遮挡补全子网络、 分解子网络进行预训练, 得到所述各子网络 的参数, 所述各子网络的参数包括所述各子网络中相互连接的两层之间的 权重矩阵和偏置。
24、 根据权利要求 23所述的装置, 其特征在于, 所述遮挡估计子网 络为三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和 输出层依次连接;
所述训练模块具体用于: 提取所述遮挡估计子网络对应的训练样本中 各图像的视觉特征向量, 得到所述训练样本中各图像的特征向量集合 Χ = {Χ, }, 其中, 列向量 X,表示第 ,·副图像的视觉特征向量, l≤i≤I ;
分别确定所述各图像的遮挡部分, 获取所述遮挡估计子网络对应的训 练样本中各图像遮挡部分的遮挡标记向量集合 ^^ { } ,其中,列向量 表 示第 副图像的视觉特征向量 X,对应的遮挡标记向量;
根据所述各图像遮挡标记向量集合 ^^ ί ΐ和各图像的特征向量集合 Χ = {χ, }确定所述遮挡估计子网络的输入层和隐含层之间的权重矩阵 W。《和 偏置 ^, 以及确定所述遮挡估计子网络的隐含层与输出层之间的权重矩阵 W 禾口偏置 b°
25、 根据权利要求 24所述的装置, 其特征在于, 所述训练模块具体 用于:
令 W。'x; + = °ixi , 其中, 。' = [W° b°' ], x ~t = [χ; °' ]', X,表示第 i副图像的 视觉特征向量, [X]'表示转置运算;
^W°2h +b°2 ^W°2h , 其中, Α;。' ΐ,.), W°2 ^[W° b°2] , hp ^[h 'l]; x。— T( 。')||p 2, 得到所述 b。、 w 禾 t , 其中, 求解 S
= { }是遮挡估计子网络的输入层的输出, 是 Frobenius范
26、 根据权利要求 23所述的装置, 其特征在于, 所述遮挡补全子网 络为五层网络, 包括: 输入层、 3个隐含层和输出层, 所述 3个隐含层分 别为第一隐含层、 第二隐含层、 第三隐含层, 所述输入层、 第一隐含层、 第二隐含层、 第三隐含层和输出层依次连接;
所述训练模块具体用于: 提取所述遮挡补全子网络对应的训练样本中各 图像无遮挡时的视觉特征向量集合 , 其中, 所述遮挡补全子网络对应的训 练样本中各图像是无遮挡的目标事物;
提取所述遮挡补全子网络对应的训练样本中各图像设置有遮挡时的视觉 特征向量集合^; 根据所述遮挡补全子网络对应的训练样本中各图像有遮挡时的视觉 特征向量集合 和无遮挡时的视觉特征向量集合 确定所述遮挡补全子 网络的输入层与第一隐含层之间的权重矩阵 和偏置 W,确定所述遮挡补 全子网络的第一隐含层与第二隐含层之间的权重矩阵 和偏置 ^, 确定 所述遮挡补全子网络的第二隐含层与第三隐含层之间的权重矩阵 和偏 置^, 确定所述遮挡补全子网络的第三隐含层与输出层之间的权重矩阵 W 和偏置 ^, 其中, W 是 的转置矩阵, 是 W 的转置矩阵。
27、 根据权利要求 26所述的装置, 其特征在于, 所述训练模块具体 用于:
令/^ = W +b 为所述遮挡补全子网络的输入层的输出, Ϋε是特征向量 集合 中的一个向量, 最小化以下第一受限玻尔兹曼机 RBM能量: Ε(Ψ, hc' ) = 、 m 2 m/ "- h 2^—Kwln,
m 2(Tm n m,n m
其中, Tm是将所述遮挡补全子网络对应的训练样本中各图像的遮挡部分 为噪声时的标准差向量的第 m个分量, Ϋ 是特征向量 的第 m个分量, h:' 为 W、的第 n个分量, :„表示连接 和 的权重, 为 的第 n个分量 u!!表 示 的第 m个分量;
采用对比度扩散法对所述第一 RBM能量最小化, 得到所述权重矩阵 、 偏置 禾口 MC';
将所述遮挡补全子网络的输入层的输出作为所述第一隐含层的输入, 令 所述第一隐含层的输出为 =p(W^h-+b , 最小化以下第二受限波尔兹曼机 RBM能量:
E(hCl, h¾) '-Y Δ ,
Figure imgf000056_0001
其中, ;;是 = 7(1^^ + 1^)的第 p个分量, 为/^的第 p个分量, 为/^ 的第 q个分量, 表示连接 h;和 的权重, 为 b 的第 q个分量, u c表示^ 的第 p个分量;
采用对比度扩散法对所述第二 RBM能量最小化,得到所述权重矩阵 W 、 偏置 ^和" ; 求所述权重矩阵 W 和 ^的转置矩阵, 得到 和 W
28、 根据权利要求 27所述的装置, 其特征在于, 所述训练模块还用于: 根据以下公式重新构建所述训练样本中各图像无遮挡的情况下视觉特征 向量集合
Vc ^ p(WCl'p(WC2'p(WC2p(WClVc +bc') + bC2) + u 2)uCl); 采用梯度下降法最小化所述 ^和 之间的误差, 得到调整后的 w 、
WC'、 b 、 UC2、 V禾口 Mq
29、 根据权利要求 23所述的装置, 其特征在于, 所述分解子网络为 三层网络, 包括: 输入层、 隐含层和输出层, 所述输入层、 隐含层和输出 层依此连接;
所述训练模块具体用于: 提取所述分解子网络对应的训练样本中各图像 的视觉特征向量集合 ^ = {^}, 其中, 所述分解子网络对应的的训练样本是无 遮挡时的目标事物;
提取所述分解子网络对应的训练样本中各图像的各部位类标图像集合 令 为特征向量集合^中的一个视觉特征向量 在所述分解子网络的输 入层的输出 = (W'i +W), ,·表示类标图像的个数, ,·的取值为 l≤ M的正 整数, , 将 V按照以下映射函数映射为不同的类标图像:
Figure imgf000057_0002
其中, 表示所述目标事物的第个部位的类标图像, 表示所述第 部分 的类标图像对应的所述分解子网络的隐含层和输出层之间的偏置, 表示所 述第 ,·部分的类标图像对应的所述分解子网络的隐含层和输出层之间的权重 矩阵;
令 r为 中所有视觉特征向量在所述分解子网络上映射成的类标图 像的集合, 最小化所述 r和 F之间的误差, 得到 w w; b
30、 根据权利要求 23-29任一项所述的装置, 其特征在于, 还包括: 参数调整模块, 用于构建损失函数 E, 最小化所述损失函数 E:
E(X;W,b) =
Figure imgf000057_0001
, 其中, X ={x,}是遮挡估计子网络训练样本中各图像的 视觉特征向量集, X,表示第 副图像的视觉特征向量, F = { 是人工确定的所 述训练样本中各图像的类标图像集合, 是人工确定的第 幅图像的类标图 像, r = {y,}是所述神经网络***的输出所述训练样本中各图像的类标图像集, 是所述神经网络***输出的第幅 ,·图像的类标图像, W和 b是所述神经网络 ***的权重矩阵和偏置的集合;
采用随机梯度下降法求解所述损失函数 E的最优解,确定所述神经网 络***的调整后的权重矩阵和偏置。
31、 根据权利要求 30所述的装置, 其特征在于, 所述参数调整模块 具体用于:
将预训练得到所述各子网络的权重矩阵, 按照以下公式进行迭代: Δ.+1 =0.9-Aj - . Ι ε-Wl -ε ^γ ^ W^ ^Wj +Aj+l , 其中, Ζ表示所述神经网络系 统的层数, /e {l, ... L}, 表示迭代次数, Δ表示梯度下降时的变化率, £是 学习率, ^是导数, ^ = /^( '是第 层的后向投影误差^与上一层是输 出/ -1之间的乘积。
32、 根据权利要求 31所述的装置, 其特征在于, 所述神经网络*** 的最后一层的后向投影误差 eL = diag(y - y)diag(l - y), 其中 表示取对角 矩阵运算, y表示一幅图像的实际的类标图像, y表示所述神经网络*** 输出的所述图像的类标图像。
33、 根据权利要求 31所述的装置, 其特征在于, 如果第 z层有 S型函 数运算, 则第/层的后向投影误差
Figure imgf000058_0001
其中, diag (. 表示取对角矩阵运算, 是上一层的权重矩阵, 是上一层的后向投影 误差。
34、 根据权利要求 31所述的装置, 其特征在于, 如果第 层有
/^x max^ x)运算, 则第 Z层的后向投影误差 〉Q, 其中,
Figure imgf000058_0002
, < 0
δ[ = [Wh'-^ b'],., [.],表示一个向量的第 个分量。
PCT/CN2014/081975 2013-11-22 2014-07-10 神经网络***、基于神经网络***的图像解析方法和装置 WO2015074428A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310598419.7A CN104657776B (zh) 2013-11-22 2013-11-22 神经网络***、基于神经网络***的图像解析方法和装置
CN201310598419.7 2013-11-22

Publications (1)

Publication Number Publication Date
WO2015074428A1 true WO2015074428A1 (zh) 2015-05-28

Family

ID=53178892

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/081975 WO2015074428A1 (zh) 2013-11-22 2014-07-10 神经网络***、基于神经网络***的图像解析方法和装置

Country Status (2)

Country Link
CN (1) CN104657776B (zh)
WO (1) WO2015074428A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111179159A (zh) * 2019-12-31 2020-05-19 北京金山云网络技术有限公司 消除视频中目标影像的方法、装置、电子设备及存储介质
CN111783598A (zh) * 2020-06-24 2020-10-16 北京百度网讯科技有限公司 一种人脸识别模型训练方法、装置、设备及介质
CN112380425A (zh) * 2020-10-23 2021-02-19 华南理工大学 社区推荐方法、***、计算机设备及存储介质
CN112819742A (zh) * 2021-02-05 2021-05-18 武汉大学 一种基于卷积神经网络的事件场合成孔径成像方法
CN115688544A (zh) * 2022-06-20 2023-02-03 河海大学 一种基于mlp神经网络的微波衰减降雪场层析重构方法

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102158683B1 (ko) * 2015-12-10 2020-09-22 딥마인드 테크놀로지스 리미티드 외부 메모리로 신경망들 증강
WO2017129325A1 (en) * 2016-01-29 2017-08-03 Fotonation Limited A convolutional neural network
US10497089B2 (en) 2016-01-29 2019-12-03 Fotonation Limited Convolutional neural network
CN106294584B (zh) * 2016-07-28 2019-11-05 北京百度网讯科技有限公司 排序模型的训练方法及装置
CN106910176B (zh) * 2017-03-02 2019-09-13 中科视拓(北京)科技有限公司 一种基于深度学习的人脸图像去遮挡方法
CN107330908B (zh) * 2017-06-28 2018-07-24 陕西师范大学 一种基于卷积受限玻尔兹曼机的形状建模方法及相关装置
CN109960974A (zh) * 2017-12-22 2019-07-02 北京市商汤科技开发有限公司 人脸关键点检测方法、装置、电子设备及存储介质
CN108154239A (zh) * 2017-12-27 2018-06-12 郑州云海信息技术有限公司 一种机器学习方法及其装置
CN110321999B (zh) * 2018-03-30 2021-10-01 赛灵思电子科技(北京)有限公司 神经网络计算图优化方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738426A (zh) * 2005-09-09 2006-02-22 南京大学 一种视频运动目标分割与跟踪方法
CN101021900A (zh) * 2007-03-15 2007-08-22 上海交通大学 利用降维方法进行人脸姿态估计的方法
CN101141633A (zh) * 2007-08-28 2008-03-12 湖南大学 一种复杂场景中的运动目标检测与跟踪方法
CN101807245A (zh) * 2010-03-02 2010-08-18 天津大学 基于人工神经网络的多源步态特征提取与身份识别方法
US20110266350A1 (en) * 2010-04-30 2011-11-03 Chapman Bryan P Multiface document

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738426A (zh) * 2005-09-09 2006-02-22 南京大学 一种视频运动目标分割与跟踪方法
CN101021900A (zh) * 2007-03-15 2007-08-22 上海交通大学 利用降维方法进行人脸姿态估计的方法
CN101141633A (zh) * 2007-08-28 2008-03-12 湖南大学 一种复杂场景中的运动目标检测与跟踪方法
CN101807245A (zh) * 2010-03-02 2010-08-18 天津大学 基于人工神经网络的多源步态特征提取与身份识别方法
US20110266350A1 (en) * 2010-04-30 2011-11-03 Chapman Bryan P Multiface document

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111179159A (zh) * 2019-12-31 2020-05-19 北京金山云网络技术有限公司 消除视频中目标影像的方法、装置、电子设备及存储介质
CN111179159B (zh) * 2019-12-31 2024-02-20 北京金山云网络技术有限公司 消除视频中目标影像的方法、装置、电子设备及存储介质
CN111783598A (zh) * 2020-06-24 2020-10-16 北京百度网讯科技有限公司 一种人脸识别模型训练方法、装置、设备及介质
CN111783598B (zh) * 2020-06-24 2023-08-08 北京百度网讯科技有限公司 一种人脸识别模型训练方法、装置、设备及介质
CN112380425A (zh) * 2020-10-23 2021-02-19 华南理工大学 社区推荐方法、***、计算机设备及存储介质
CN112380425B (zh) * 2020-10-23 2023-11-14 华南理工大学 社区推荐方法、***、计算机设备及存储介质
CN112819742A (zh) * 2021-02-05 2021-05-18 武汉大学 一种基于卷积神经网络的事件场合成孔径成像方法
CN112819742B (zh) * 2021-02-05 2022-05-13 武汉大学 一种基于卷积神经网络的事件场合成孔径成像方法
CN115688544A (zh) * 2022-06-20 2023-02-03 河海大学 一种基于mlp神经网络的微波衰减降雪场层析重构方法

Also Published As

Publication number Publication date
CN104657776B (zh) 2018-06-05
CN104657776A (zh) 2015-05-27

Similar Documents

Publication Publication Date Title
WO2015074428A1 (zh) 神经网络***、基于神经网络***的图像解析方法和装置
Chen et al. Fsrnet: End-to-end learning face super-resolution with facial priors
Trumble et al. Deep autoencoder for combined human pose estimation and body model upscaling
Rozantsev et al. On rendering synthetic images for training an object detector
CN110717977B (zh) 游戏角色脸部处理的方法、装置、计算机设备及存储介质
US10380788B2 (en) Fast and precise object alignment and 3D shape reconstruction from a single 2D image
US11182644B2 (en) Method and apparatus for pose planar constraining on the basis of planar feature extraction
Lin et al. ADMM-ADAM: A new inverse imaging framework blending the advantages of convex optimization and deep learning
WO2020233427A1 (zh) 目标的特征的确定方法和装置
US20230169727A1 (en) Generative Nonlinear Human Shape Models
Agudo et al. A scalable, efficient, and accurate solution to non-rigid structure from motion
CN105590096A (zh) 基于深度映射的人体活动识别特征表达方法
Crispell et al. Pix2face: Direct 3d face model estimation
CN111462274A (zh) 一种基于smpl模型的人体图像合成方法及***
Cohen et al. Deep convolutional robust PCA with application to ultrasound imaging
Liang et al. Compositional human pose regression
Michel et al. Tracking the articulated motion of the human body with two RGBD cameras
CN116012950A (zh) 一种基于多重心时空注意图卷积网络的骨架动作识别方法
CN112419419A (zh) 用于人体姿势和形状估计的***和方法
CN108154176B (zh) 一种针对单一深度图像的3d人体姿态估计算法
Jiang et al. Reweighted sparse representation with residual compensation for 3D human pose estimation from a single RGB image
US20220207790A1 (en) Image generation method and apparatus, and computer
Zhang et al. Deep learning-based real-time 3D human pose estimation
Malti On the exact recovery conditions of 3D human motion from 2D landmark motion with sparse articulated motion
Sunney et al. A real-time machine learning framework for smart home-based Yoga Teaching System

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14864219

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14864219

Country of ref document: EP

Kind code of ref document: A1