Image analysis method and system

Information

  • Patent Grant
  • 12100209
  • Patent Number
    12,100,209
  • Date Filed
    Thursday, July 1, 2021
    3 years ago
  • Date Issued
    Tuesday, September 24, 2024
    3 months ago
  • Inventors
  • Original Assignees
    • HUAWEI CLOUD COMPUTING TECHNOLOGIES CO., LTD.
  • Examiners
    • Varndell; Ross
    • Bilodeau; Dustin
    Agents
    • Maier & Maier, PLLC
  • CPC
  • Field of Search
    • CPC
    • G06V20/41
    • G06V10/764
    • G06V10/82
    • G06V20/70
    • G06V40/20
    • G06F16/5854
    • G06F16/587
    • G06N3/044
    • G06N3/045
    • G06N3/08
    • G06N3/049
    • G06T7/60
    • G06T2207/20081
    • G06T2207/20084
  • International Classifications
    • G06F16/587
    • G06F16/583
    • G06N3/04
    • G06V10/764
    • G06V10/82
    • G06V20/40
    • G06V20/70
    • G06V40/20
    • Term Extension
      469
Abstract
An image analysis method, including: obtaining influencing factors of t frames of images, where the influencing factors include self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, self-owned features of each target subject include a location feature, an attribute feature, and a posture feature, and t and h are natural numbers greater than 1; and obtaining a panoramic semantic description based on the influencing factors, where the panoramic semantic description includes a description of relationships between target subjects, relationships between actions of the target subjects and the target subjects, and relationships between the actions of the target subjects.
Description
TECHNICAL FIELD

The embodiments relate to the image processing field, and in particular, to an image analysis method and system.


BACKGROUND

A task of an image description is generating a corresponding text description for a given image. The image description may automatically extract information from the image and generate the corresponding text description based on the automatically extracted information, to translate the image into knowledge. For example, the picture description may generate a text description such as “a man is surfing on the sea” for an image shown in FIG. 1A.


Currently, image description can only perform a low-level semantic description on the image. Only a single-subject single action (for example, the man is surfing on the sea in FIG. 1A) or a multi-subject single action (for example, a group of students are doing morning exercises in FIG. 1B) can be described. However, image description cannot perform a panoramic semantic description on the image. Relationships between a plurality of subjects, relationships between the subjects and actions, and relationships between the actions (for example, a man sees that a woman is knocked down by a vehicle in FIG. 1C) cannot be described.


SUMMARY

The embodiments provide an image analysis method and system, to perform a panoramic semantic description on an image.


According to a first aspect, an image analysis method is provided, including:


obtaining influencing factors of t frames of images, where the influencing factors include self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, self-owned features of each target subject include a location feature, an attribute feature, and a posture feature, t and h are natural numbers greater than 1, the location feature is used to indicate a location of a corresponding target subject in the image, the attribute feature is used to indicate an attribute of the corresponding target subject, the posture feature is used to indicate an action of the corresponding target subject, and the relational vector features are used to indicate relationships between target subjects; and


obtaining a panoramic semantic description based on the influencing factors, where the panoramic semantic description includes a description of the relationships between target subjects, relationships between actions of the target subjects and the target subjects, and relationships between the actions of the target subjects.


In the solution, the higher-level panoramic semantic description can be obtained based on location features, attribute features, and posture features of a plurality of target subjects in a plurality of frames of images and relational vector features between the plurality of target subjects in the plurality of frames of images, to better reflect relationships between the plurality of subjects, relationships between the subjects and actions, and relationships between the actions in the images.


In some possible implementations, the obtaining influencing factors of a panoramic semantic description includes:

    • extracting features of the t frames of images to obtain t feature vectors;
    • extracting location features of the t feature vectors to obtain the location features;
    • extracting attribute features of the t feature vectors to obtain the attribute features;
    • extracting posture features of the t feature vectors to obtain the posture features; and
    • extracting relational vector features of the t feature vectors to obtain the relational vector features.


In some possible implementations, the location features, the attribute features, the posture features, and the relational vector features are extracted by a same convolutional neural network (CNN).


In the solution, the same CNN is used to extract the location features, the attribute features, the posture features, and the relational vector features. Therefore, when the location features, the attribute features, the posture features, and the relational vector features are extracted, previously extracted feature vectors may be used, to avoid extracting the vector features for a plurality of times, and reduce a calculation amount. There is no need to extract the feature vectors when the location features are extracted, extract the feature vectors when the attribute features are extracted, extract the feature vectors when the posture features are extracted, or extract the feature vectors when the relational vector features are extracted.


In some possible implementations, region-of-interest pooling is performed on a feature vector i based on a target subject a and a target subject b that are in an image i to obtain a feature vector Va,b corresponding to the target subject a and the target subject b, where i, a, and b are all natural numbers, 0<i≤t, 1≤a,b≤h, and the feature vector i is extracted based on the image i.


Region-of-interest pooling is performed based on the target subject a to obtain a feature vector va,a corresponding to the target subject a.


A relational vector feature Viab between the target subject a and the target subject b that are in the image i is calculated according to the following formula:







G

a
,
b


=


1





v

a
,
b








(



w

a
,
b




(


v

a
,
b


,

v

a
,
a



)




v

a
,
b



)






wa,b=sigmoid(w(va,b, va,a)), sigmoid( ) is an S-type function, va,b is the feature vector corresponding to the target subject a and the target subject b, va,a is the feature vector corresponding to the target subject a, and w( ) is an inner product function.


In some possible implementations, the obtaining a panoramic semantic description based on the influencing factors includes:


extracting a first semantic description based on the location features;


extracting a second semantic description based on the attribute features and the first semantic description;


extracting a third semantic description based on the posture features and the second semantics; and


extracting the panoramic semantic description based on the relational vector features and the third semantic description.


In some possible implementations, the first semantic description, the second semantic description, and the third semantic description are extracted by a same recurrent neural network (RNN).


According to a second aspect, an image analysis system including a feature extraction module and a panoramic semantic model is provided.


The feature extraction module is configured to obtain influencing factors of a panoramic semantic description. The influencing factors include self-owned features of h target subjects in each of t frames of images and relational vector features between the h target subjects in each of the t frames of images, the self-owned features include a location feature, an attribute feature, and a posture feature, where t and h are natural numbers greater than 1. The location feature is used to indicate a location of a corresponding target subject in the image. The attribute feature is used to indicate an attribute of the corresponding target subject. The posture feature is used to indicate an action of the corresponding target subject. The relational vector features are used to indicate relationships between target subjects.


The panoramic semantic model is configured to obtain the panoramic semantic description based on the influencing factors. The panoramic semantic description includes a description of the relationships between target subjects, relationships between the target subjects and actions, and relationships between the actions.


In some possible implementations, the feature extraction module includes a feature vector extraction unit, a location feature extraction unit, an attribute feature extraction unit, a posture feature extraction unit, and a relational vector feature unit.


The feature vector extraction unit is configured to extract features of the t frames of images to obtain t feature vectors.


The location feature extraction unit is configured to extract location features of the t feature vectors to obtain the location features.


The attribute feature extraction unit is configured to extract attribute features of the t feature vectors to obtain the attribute features.


The posture feature extraction unit is configured to extract posture features of the t feature vectors to obtain the posture features.


The relational vector feature unit is configured to extract relational vector features of the t feature vectors to obtain the relational vector features.


In some possible implementations, the feature extraction module includes a CNN. The feature vector extraction unit, the location feature extraction unit, the attribute feature extraction unit, the posture feature extraction unit, and the relational vector feature extraction unit are integrated into the CNN.


In some possible implementations, the relational vector feature extraction unit is configured to: perform region-of-interest pooling on a feature vector i based on a target subject a and a target subject b that are in an image i to obtain a feature vector va,b corresponding to the target subject a and the target subject b, where i, a, and b are natural numbers, 0<i≤t, and 1≤a,b≤h;


perform region-of-interest pooling based on the target subject a to obtain a feature vector va,a corresponding to the target subject a; and


calculate a relational vector feature Viab between the target subject a and the target subject b that are in the image i according to the following formula:







G

a
,
b


=


1





v

a
,
b








(



w

a
,
b




(


v

a
,
b


,

v

a
,
a



)




v

a
,
b



)






wa,b=sigmoid(w(va,b,va,a)), sigmoid( ) is an S-type function, va,b is the feature vector corresponding to the target subject a and the target subject b, va,a is the feature vector corresponding to the target subject a, and w( ) is an inner product function.


In some possible implementations, the panoramic semantic model includes a first time sequence feature extraction unit, a second time sequence feature extraction unit, a third time sequence feature extraction unit, and a fourth time sequence feature extraction unit.


The first time sequence feature extraction unit is configured to extract a first semantic description based on the location features.


The second time sequence feature extraction unit is configured to extract a second semantic description based on the attribute features and the first semantic description.


The third time sequence feature extraction unit is configured to extract a third semantic description based on the posture features and the second semantics.


The fourth time sequence feature extraction unit is configured to extract the panoramic semantic description based on the relational vector features and the third semantic description.


In some possible implementations, the panoramic semantic model includes a RNN. The first time sequence feature extraction unit, the second time sequence feature extraction unit, the third time sequence feature extraction unit, and the fourth time sequence feature extraction unit are respectively one layer in the RNN.


According to a third aspect, a compute node including a processor and a memory is provided. The processor is configured to:


obtain influencing factors of t frames of images, where the influencing factors include self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, self-owned features of each target subject include a location feature, an attribute feature, and a posture feature, t and h are natural numbers greater than 1, the location feature is used to indicate a location of a corresponding target subject in the image, the attribute feature is used to indicate an attribute of the corresponding target subject, the posture feature is used to indicate an action of the corresponding target subject, and the relational vector features are used to indicate relationships between target subjects; and


obtain a panoramic semantic description based on the influencing factors, where the panoramic semantic description includes a description of the relationships between target subjects, relationships between actions of the target subjects and the target subjects, and relationships between the actions of the target subjects.


In the solution, the higher-level panoramic semantic description can be obtained based on location features, attribute features, and posture features of a plurality of target subjects in a plurality of frames of images and relational vector features between the plurality of target subjects in the plurality of frames of images, to better reflect relationships between the plurality of subjects, relationships between the subjects and actions, and relationships between the actions in the images.


In some possible designs, the processor is configured to:

    • extract features of the t frames of images to obtain t feature vectors;
    • extract location features of the t feature vectors to obtain the location features;
    • extract attribute features of the t feature vectors to obtain the attribute features;
    • extract posture features of the t feature vectors to obtain the posture features; and
    • extract relational vector features of the t feature vectors to obtain the relational vector features.


In some possible implementations, the location features, the attribute features, the posture features, and the relational vector features are extracted by a same CNN.


In the solution, the same CNN is used to extract the location features, the attribute features, the posture features, and the relational vector features. Therefore, when the location features, the attribute features, the posture features, and the relational vector features are extracted, previously extracted feature vectors may be used, to avoid extracting the vector features for a plurality of times, and reduce a calculation amount. In other words, there is no need to extract the feature vectors when the location features are extracted, extract the feature vectors when the attribute features are extracted, extract the feature vectors when the posture features are extracted, or extract the feature vectors when the relational vector features are extracted.


In some possible implementations, region-of-interest pooling is performed on a feature vector i based on a target subject a and a target subject b that are in an image i to obtain a feature vector va,b corresponding to the target subject a and the target subject b, where i, a, and b are all natural numbers, 0<i≤t, 1≤a,b≤h, and the feature vector i is extracted based on the image i.


Region-of-interest pooling is performed based on the target subject a to obtain a feature vector va,a corresponding to the target subject a.


A relational vector feature Viab between the target subject a and the target subject b that are in the image i is calculated according to the following formula:







G

a
,
b


=


1





v

a
,
b








(



w

a
,
b




(


v

a
,
b


,

v

a
,
a



)




v

a
,
b



)






wa,b=sigmoid(w(va,b,va,a)), sigmoid( ) is an S-type function, va,b is the feature vector corresponding to the target subject a and the target subject b, va,a is the feature vector corresponding to the target subject a, and w( ) is an inner product function.


In some possible implementations, the processor is configured to:


extract a first semantic description based on the location features; extract a second semantic description based on the attribute features and the first semantic description;


extract a third semantic description based on the posture features and the second semantics; and


extract the panoramic semantic description based on the relational vector features and the third semantic description.


In some possible implementations, the first semantic description, the second semantic description, and the third semantic description are extracted by a same RNN.


According to a fourth aspect, a compute node cluster including at least one compute node is provided. Each compute node includes a processor and a memory. The processor executes code in the memory to perform the method according to any one of the first aspect.


According to a fifth aspect, a computer program product is provided. When the computer program product is read and executed by a computer, the method according to any one of the first aspect is performed.


According to a sixth aspect, a computer non-transient storage medium including an instruction is provided. When the instruction is run on at least one compute node in a compute node cluster, the compute node cluster is enabled to perform the method according to any one of the first aspect.





BRIEF DESCRIPTION OF DRAWINGS

To describe the solutions in embodiments or in the background more clearly, the following describes the accompanying drawings for describing the embodiments or the background.



FIG. 1A is a schematic diagram of an image used for image descriptions;



FIG. 1B is a schematic diagram of an image used for image descriptions;



FIG. 1C is a schematic diagram of an image used for image descriptions;



FIG. 2 is a schematic diagram of a single-frame image used for a panoramic semantic description according to an embodiment;



FIG. 3 is a schematic diagram of a plurality of frames of images used for a panoramic semantic description according to an embodiment;



FIG. 4 is a schematic diagram of feature extraction of location features, attribute features, posture features, and relational vector features;



FIG. 5 is a schematic diagram of a panoramic semantic model according to an embodiment;



FIG. 6A is a schematic diagram of a panoramic semantic model according to another embodiment;



FIG. 6B is a schematic diagram of a panoramic semantic model according to another embodiment;



FIG. 7 is a flowchart of a semantic description method according to an embodiment;



FIG. 8 is a schematic diagram of a structure of a semantic description system according to an embodiment;



FIG. 9 is a schematic diagram of a structure of a compute node according to an embodiment;



FIG. 10 is a schematic diagram of a structure of a cloud service cluster according to an embodiment;



FIG. 11 is a schematic diagram of a structure of a semantic description system according to another embodiment; and



FIG. 12 is a schematic diagram of a structure of a semantic description system according to still another embodiment.





DETAILED DESCRIPTION OF THE EMBODIMENTS

Terms used in embodiments are merely used to explain the embodiments but are non-limiting.


A single image used for a panoramic semantic description in the embodiments is first described in detail.



FIG. 2 is a schematic diagram of a single-frame image used for a panoramic semantic description according to an embodiment. In the embodiment, the single-frame image used for the panoramic semantic description may include a plurality of target subjects. The target subjects may be one or more of a person, an animal, an object, and the like. FIG. 2 is used as an example. The target subjects in the image shown in FIG. 2 include a man, a woman, and a vehicle. Different target subjects may perform different actions. The actions may be one or more of drinking water, reading a book, doing an exercise, playing basketball, playing football, running, swimming, and the like. FIG. 2 is used as an example. In the figure, an action of the man is looking toward the woman, an action of the woman is falling down, and an action of the vehicle in the figure is knocking the woman down. It may be understood that FIG. 2 is merely an example. In the embodiments, the target subject may be another subject, there may be more target subjects, and the action of the target subject may be another action or the like and are non-limiting.


In an embodiment, as shown in FIG. 3, an image analysis system may extract, from a video in a time sequence, t frames of images I1, I2, . . . , and It used for a panoramic semantic description, where t is a natural number. The images I1, I2, . . . , and It all include same target subjects. For example, the image I1 includes a target subject 1, a target subject 2, and a target subject 3. The image I2 includes the target subject 1, the target subject 2, and the target subject 3, . . . , and the image It also includes the target subject 1, the target subject 2, and the target subject 3. It may be understood that time intervals between two adjacent frames of images in the t frames of images may be same or different and is non-limiting.


In an embodiment, the image analysis system may perform the panoramic semantic description on the image It by using a panoramic semantic model. Input variables of the panoramic semantic model are influencing factors of the panoramic semantic description. The influencing factors of the panoramic semantic description include self-owned features (including location features, attribute features, and posture features) of target subjects in the images I1 to It and relational vector features between the target subjects in the images I1 to It.


The location feature may be used to indicate a location of a corresponding target subject in the corresponding image. The location feature may be represented as (x, y, w, h), where x and y are a horizontal coordinate and a vertical coordinate of a central point of the target subject in the image, w is a width of the target subject in the image, and h is a height of the target subject in the image. The attribute feature is used to indicate an attribute of the corresponding target subject. The attribute feature may include a plurality of types of attribute features. Attribute features may be different if target subjects are different. For example, the target subject is a person. The attribute feature of the target subject may include one or more of a gender, a hairstyle, a clothes type, a clothes color, a height, a body size, and the like. The posture feature of the target subject is used to indicate an action of the corresponding target subject. The target subject also has a plurality of posture features. Posture features may be different if target subjects are different. For example, the target subject is a person. The posture feature of the target subject may include one or more of falling down, lying down, walking, running, jumping, and the like. The relational feature vector is a vector representing a relationship between two target subjects.


For example, each frame of image in the images I1, I2, . . . , and It includes h target subjects. The influencing factors of the panoramic semantic description may include:


influencing factors, of a panoramic semantic description, obtained from the image I1: self-owned features of h target subjects in the image I1 and relational vector features between the h target subjects in the image I1.


The self-owned features of the h target subjects in the image I1 include:








[




P
1
1




S
1
1




Z
1
1






P
2
1




S
2
1




Z
2
1

















P
h
1




S
h
1




Z
h
1




]





Herein, a location feature P11, an attribute feature S11, and a posture feature Z11 are self-owned features of a target subject 1 in the image I1, a location feature P21, an attribute feature S21, and a posture feature Z21 are self-owned features of a target subject 2 in the image I1, . . . , and a location feature Ph1, an attribute feature Sh1, and a posture feature Zh1 are self-owned features of a target subject h in the image I1.


The relational vector features between the h target subjects in the image I1 include:








[




V
12
1




V
13
1







V

1

h

1











V
23
1







V

1

h

1







































V

h
-

1

h


1




]





Herein, V121 is a relational vector feature between the target subject 1 and the target subject 2 in the image I1, V131 is a relational vector feature between the target subject 1 and a target subject 3 in the image I1, . . . , V1h1 is a relational vector feature between the target subject 1 and the target subject h in the image I1, V231 is a relational vector feature between the target subject 2 and the target subject 3 in the image I1, . . . , V2h1 is a relational vector feature between the target subject 2 and the target subject h in the image I1, . . . , and Vh-1h1 is a relational vector feature between a target subject (h-1) and the target subject h in the image I1.


The influencing factors of the panoramic semantic description may further include: influencing factors of, a panoramic semantic description, obtained from the image I2: self-owned features of h target subjects in the image I2 and relational vector features between the h target subjects in the image I2.


The self-owned features of the h target subjects in the image I2 include:








[




P
1
2




S
1
2




Z
1
2






P
2
2




S
2
2




Z
2
2

















P
h
2




S
h
2




Z
h
2




]





Herein, a location feature P12, an attribute feature S12, and a posture feature Z12 are self-owned features of a target subject 1 in the image I2, a location feature P22, an attribute feature S22, and a posture feature Z22 are self-owned features of a target subject 2 in the image I2, . . . , and a location feature Ph2, an attribute feature Sh2, and a posture feature Zh2 are self-owned features of a target subject h in the image I2.


The relational vector features between the h target subjects in the image I2 include:








[




V
12
2




V
13
2







V

1

h

2











V
23
2







V

1

h

2







































V

h
-

1

h


2




]





Herein, V122 is a relational vector feature between the target subject 1 and the target subject 2 in the image I2, V132 is a relational vector feature between the target subject 1 and a target subject 3 in the image I2, . . . , V1h2 is a relational vector feature between the target subject 1 and the target subject h in the image I2, V232 is a relational vector feature between the target subject 2 and the target subject 3 in the image I2, V2h2 is a relational vector feature between the target subject 2 and the target subject h in the image I2, . . . , and Vh-1h2 is a relational vector feature between a target subject (h-1) and the target subject h in the image I2.


The influencing factors of the panoramic semantic description may further include: influencing factors, of a panoramic semantic description, obtained from the image It: self-owned features of h target subjects in the image It and relational vector features between the h target subjects in the image It.


The self-owned features of the h target subjects in the image It include:








[




P
1
t




S
1
t




Z
1
t






P
2
t




S
2
t




Z
2
t

















P
h
t




S
h
t




Z
h
t




]





Herein, a location feature P1t, an attribute feature S1t, and a posture feature Z1t are self-owned features of a target subject 1 in the image It, a location feature P2t, an attribute feature S2t, and a posture feature Z2t are self-owned features of a target subject 2 in the image It, . . . , and a location feature Pht, an attribute feature Sht, and a posture feature Zht are self-owned features of a target subject h in the image It.


The relational vector features between the h target subjects in the image It include:








[




V
12
t




V
13
t







V

1

h

t











V
23
t







V

2

h

t







































V

h
-

1

h


t




]





Herein, Vt12 is a relational vector feature between the target subject 1 and the target subject 2 in the image It, V13t is a relational vector feature between the target subject 1 and a target subject 3 in the image It, . . . , V1ht is a relational vector feature between the target subject 1 and the target subject h in the image It, V23t is a relational vector feature between the target subject 2 and the target subject 3 in the image It, . . . , V2ht is a relational vector feature between the target subject 2 and the target subject h in the image It, . . . , and Vh-1ht is a relational vector feature between a target subject (h−1) and the target subject h in the image It.


It may be understood that the example of the influencing factors of the panoramic semantic description is merely used as an example. The influencing factors of the panoramic semantic description may further include other influencing factors and is non-limiting.


In an exemplary embodiment, location features, attribute features, and posture features of the target subjects in the images I1, I2, . . . , and It and relational vector features between the target subjects in the images I1, I2, . . . , and It may be separately calculated based on feature vectors V1, V2, . . . , and Vt of the images I1, I2, . . . , and Vt. In other words, location features, attribute features, and posture features of target subjects in the image I1 and relational vector features between the target subjects in the image I1 may be calculated based on the feature vector V1 of the image I1, location features, attribute features, and posture features of target subjects in the image I2 and relational vector features between the target subjects in the image I2 may be calculated based on the feature vector V2 of the image I2, . . . , and location features, attribute features, and posture features of target subjects in the image It and relational vector features between the target subjects in the image It may be calculated based on the feature vector Vt of the image It.


As shown in FIG. 4, feature vectors V1, V2, . . . , and Vt of images I1, I2, . . . , and It may be obtained in this way. An image Ii is used as an example. The image Ii may be input into a feature vector extraction unit to obtain a feature vector Vi of the image Ii, where i is a natural number, and 1≤i≤t. The feature vector extraction unit may sequentially include an input layer, a convolution compute layer, a pooling layer, and a fully connected layer.


The input layer:


It is assumed that input of the input layer is the image Ii, and output is equal to the input. In other words, no processing is performed on the input. For ease of description, it is assumed herein that there is no processing in the input layer. However, processing such as normalization may be performed in the input layer.


The convolution compute layer:


The image Ii output by the input layer is used as input of the convolution compute layer, and is convolved by n convolution kernels Kl (l=1, 2, . . . , n) to generate n feature images al (l=1, 2, . . . , n). A process of generating each feature image al is specifically as follows:







C
l

=


conv





2


(

I
,

K
l

,

valid










,

)


+

b
l









u
l

=

C
l








a
l

=

f


(

u
l

)






conv represents performing a convolution operation on the image I by using a convolution kernel Kl, valid represents a padding manner, bl represents an offset value, ul represents a convolution calculation result, and f( ) represents an activation function such as a relu function.


The pooling layer:


The n feature images al output by the convolution compute layer are used as input of the pooling layer, and after pooling is performed by using a pooling window, n pooled images bl (l=1, 2, . . . , n) are generated. A generation process of each pooled image bl is specifically as follows:

bl=max Pool (al)


maxPool represents average pooling.


The fully connected layer:


The n pooled images bl (l=1, 2, . . . , n) are sequentially expanded into a vector, and are sequentially connected into a long vector. The long vector is used as input of the fully connected layer network. Output of the fully connected layer is the feature vector Vi of the image Ii.


The parameters in the feature vector extraction unit, the convolution kernel Kl (including an element, a size, a step size, and the like), the offset value bl, f( ) and βl may be manually set based on a feature (a location feature, an attribute feature, a posture feature, and a relational vector feature) that needs to be extracted, a size of the image Ii, and the like. The convolution kernel Kl is used as an example. When the feature that needs to be extracted is the location feature, the element of the convolution kernel Kl may be an element of a sobel operator. For another example, when the image Ii is relatively large, the size of the convolution kernel Kl may be relatively large. On the contrary, when the image Ii is relatively small, the size of the convolution kernel Kl may be relatively small. For another example, when the image Ii is relatively large, the step size of the convolution kernel Kl may also be relatively large. On the contrary, when the image Ii is relatively small, the step size of the convolution kernel Kl may also be relatively small.


It may be understood that the feature vector extraction unit is merely used as an example. The feature vector extraction unit may alternatively be in another form. For example, the feature vector extraction unit may include more convolution compute layers and more pooling layers, and may fill the image Ii, and the like.


For brevity, the foregoing describes only extraction of the feature vector Vi of the image Ii. Actually, extraction manners of the feature vectors V1, V2, . . . , and Vl of the images I1, I2, . . . , and It are similar to the extraction manner of the feature vector Vi of the image Ii. Details are not described herein again.


As shown in FIG. 4, location features of target subjects in the images I1, I2, . . . , and It may be obtained in this way. The image Ii is used as an example. It may be assumed that the image Ii includes the h target subjects. The feature vector Vi is input into a location feature extraction unit for extraction to obtain location features P1i, P2i, . . . , and Phi of the h target subjects in the image Ii, where i is a natural number, and 1≤i≤t. The location feature extraction unit may be represented as:

y1=g1(x1).


Herein, x1 may be the feature vector Vi of the image Ii, y1 may be the location features P1i, P2i, . . . , and Phi of the h target subjects in the image Ii, g1( ) is a mapping relationship between the feature vector Vi and the location features P1i, P2i, . . . , and Phi, and g1( ) may be obtained by training a large quantity of known images and location features of known target subjects. For brevity, the foregoing describes only extraction of the location features P1i, P2i, . . . and Phi of the h target subjects in the image Ii. Actually, extraction manners of location features P11, P21, . . . , and Ph1, P12, P22, . . . , and Ph2, . . . , and P1t, P2t, . . . , and Pht of h target subjects in each of the images I1, I2, . . . , and It are similar to the extraction manner of the location features P1i, P2i, . . . , and Phi of the h target subjects in the image Ii. Details are not described herein again.


As shown in FIG. 4, attribute features of the target subjects in the images I1, I2, . . . , and It may be obtained in this way. The image Ii is used as an example. It is assumed that the image Ii includes the h target subjects. The feature vector Vi is input into an attribute feature extraction unit for extraction to obtain attribute features S1i, S2i, . . . , and Shi of the h target subjects in the image Ii, where i is a natural number, and 1≤i≤t. The attribute extraction unit may be represented as:

y2=g2(x1)


Herein, x1 may be the feature vector Vi of the image Ii, y2 may be the attribute features S1i, S2i, . . . , and Shi of the h target subjects in the image Ii, g2( ) is a mapping relationship between the feature vector Vi and the attribute features S1i, S2i, . . . , and Shi, and g2( ) may be obtained by training a large quantity of known images and attribute features of known target subjects. For brevity, the foregoing describes only extraction of the attribute features S1i, S2i, . . . , and Shi of the h target subjects in the image Ii. Actually, extraction manners of attribute features S11, S21, . . . , and Sh1, S12, S22, . . . , and Sh2, . . . , and S1t, S2t, . . . , and sht of h target subjects in each of the images I1, I2, . . . , and It are similar to the extraction manner of the attribute features S1i, S2i, . . . , and Shi of the h target subjects in the image Ii. Details are not described herein again.


As shown in FIG. 4, posture features of the target subjects in the images I1, I2 . . . , and It may be obtained in this way. The image Ii is used as an example. It is assumed that the image Ii includes the h target subjects. The feature vector Vi is input into a posture extraction unit for extraction to obtain posture features Z1i, Z2i, . . . , and Zhi of the h target subjects in the image Ii, where i is a natural number, and 1≤i≤t. The posture extraction unit may be represented as:

y3=g3(x1).


Herein, x1 may be the feature vector Vi of the image Ii, y3 may be the posture features Z1i, Z2i, . . . , and Zhi of the h target subjects in the image Ii, g3( ) is a mapping relationship between the feature vector Vi and the posture features Z1i, Z2i, . . . , and 4, and g2( ) may be obtained by training a large quantity of known images and posture features of known target subjects. For brevity, the foregoing describes only extraction of the posture features Z1i, Z2i, . . . , and Zhi of the h target subjects in the image Ii. Actually, extraction manners of posture features Z11, Z21, . . . , and Zh1, Z12, Z22, . . . , and Zh2, . . . , and Z1t, Z2t, . . . , and Zht of h target subjects in each of the images I1, I2, . . . , and It are similar to the extraction manner of the posture features Z1i, Z2i, . . . , and Zhi of the h target subjects in the image Ii. Details are not described herein again.


As shown in FIG. 4, relational vector feature between the target subjects in the images I1, I2, . . . , and It may be obtained in this way. The image Ii is used as an example. It is assumed that the image Ii includes the h target subjects. Relational vector features between the h target subjects in the image Ii include: G12i, G13i, . . . , and G1hi; G23i, . . . , and G2hi; . . . ; and Gh-1hi. A relational feature vector Gabi may be calculated by a relational vector feature extraction unit, where i, a, and b are natural numbers, 1≤i≤t and 1≤a,b≤h.


The relational vector feature extraction unit is configured to perform region-of-interest pooling (ROI) based on a target subject a and a target subject b to obtain a feature vector va,b, corresponding to the target subject a and the target subject b.


The relational vector feature extraction unit is configured to perform ROI pooling based on the target subject a to obtain a feature vector va,a corresponding to the target subject a.


The relational vector feature extraction unit is configured to calculate the relational vector feature Vabi according to the following formula:







G

a
,
b


=


1





v

a
,
b








(



w

a
,
b




(


v

a
,
b


,

v

a
,
a



)




v

a
,
b



)






wa,b=sigmoid(w(va,b, va,a)), sigmoid( ) is an S-type function, va,b is the feature vector corresponding to the target subject a and the target subject b, va,a is the feature vector corresponding to the target subject a, w( ) is an inner product function, and wa,b may be obtained by training a large quantity of known target subjects and known feature vectors.


For brevity, the foregoing describes only extraction of the relational vector features G12i, G13i, . . . , and Gh-1hi of the h target subjects in the image Ii. Extraction manners of relational vector features G121, G131, . . . , Gh-1h1, G122, G132, . . . , and Gh-1h2, . . . , and G12t, G13t, . . . , and Gh-1ht of h target subjects in each of the images I1, I2, . . . , and I1 are similar to the extraction manner of the relational vector features G12i, G13i, . . . , and Gh-1hi of the h target subjects in the image Ii. Details are not described herein again.


Extraction of the feature vectors, the location features, the attribute features, the posture features, and the relational vector features may be implemented separately by different CNN, or may be integrated into a same CNN for implementation and is non-limiting. The CNN may include a VGGNet, a ResNet, an FPNet, and the like. When the extraction of the feature vectors, the location features, the attribute features, the posture features, and the relational vector features is integrated into the same CNN for completion, the extraction of the feature vectors, the location features, the attribute features, the posture features, and the relational vector features may be implemented separately at different layers in the CNN.


In an exemplary embodiment, influencing factors of a panoramic semantic description (the location features of the target subjects in the images I1, I2, . . . , and It, the attribute features of the target subjects in the images I1, I2, . . . , and It, the posture features of the target subjects in the images I1, I2, . . . , and It, and the relational vector features between the target subjects in the images I1, I2, . . . , and It) have the following influences on the panoramic semantic description: The location features of the target subjects in the images I1, I2, . . . , and It may provide a first semantic description about locations of the target subjects. The attribute features of the target subjects in the images I1, I2, . . . , and It and the first semantic description may be used to obtain a second semantic description of attributes of the target subjects. The posture features of the target subjects in the images I1, I2, . . . , and It and the second semantic description may be used to obtain a third semantic description. Finally, the relational vector features between the target subjects of the images I1, I2, . . . , and It and the third semantic description may be used to obtain the panoramic semantic description.


An example shown in FIG. 3 is used as an example. The influencing factors of the panoramic semantic description have the following influences on the panoramic semantic description: First, a first semantic description “an object A and an object B are on the left side of an object C” may be obtained by using location features of each of a man, a woman, and a vehicle that are in the images I1, I2, . . . , and It in FIG. 3. Then, a second semantic description “the woman and the vehicle are on the left side of the man” may be obtained by using attribute features of the man, the woman, and the vehicle that are in the images I1, I2, . . . , and It in FIG. 3 and the first semantic description. Then, a third semantic description may be obtained by using posture features of the man, the woman, and the vehicle that are in the images I1, I2, . . . , and It in FIG. 3 and the second semantic description. Finally, the panoramic semantic description “the man on the right sees that the woman on the left is knocked down by the vehicle” may be obtained by using relational vector features in the images I1, I2, . . . , and It in FIG. 3 and the third semantic description.


It may be understood that the example shown in FIG. 3 is merely used as an example. In another embodiment, the panoramic semantic description may be further performed on another image.


In an embodiment, a panoramic semantic model may be represented as:

y=Panorama(x).


x is the influencing factors of the panoramic semantic description, y is the panoramic semantic description, Panorama( ) is a mapping relationship between the influencing factors of the panoramic semantic description and the panoramic semantic description, and Panorama( ) may be obtained by training a large quantity of influencing factors of known panoramic semantic descriptions and the known panoramic semantic descriptions. In an exemplary embodiment, a panoramic semantic model may be shown in FIG. 5.


Location features P11, P21, . . . , and Ph1, P12, P22, . . . , and Ph2, . . . , and P1t, P2t, . . . , and Pht of h target subjects in images I1, I2, . . . , and It are input into a time sequence feature extraction unit 1 to obtain a first semantic description.


Attribute features S11, S21, . . . , and Sh1, S12, S22, . . . , and Sh2, . . . , and S1t, S2t, . . . , and Sht of the h target subjects in the images I1, I2, . . . , and It and the first semantic description are input into a time sequence feature extraction unit 2 to obtain a second semantic description.


Posture features Z11, Z21, . . . , and Zh1, Z12, Z22, . . . , and Zh2, . . . , and Z1t, Z2t, . . . , and Zht of the h target subjects in the images I1, I2, . . . , and It and the second semantic description are input into a time sequence feature extraction unit 3 to obtain a third semantic description.


Relational vector features V121, V131, . . . , and Vh-1h1, V122, V132, . . . , and Vh-1h2, . . . , and V1t, V2t, . . . , and Vht of the h target subjects in the images I1, I2, . . . , and It and the third semantic description are input into a time sequence feature extraction unit 4 to obtain a panoramic semantic description.


It may be understood that extraction of the first semantic description, the second semantic description, the third semantic description, and the panoramic semantic description may be implemented separately by different RNN, or may be implemented by a same RNN. The RNN may include a long short-term memory (LSTM) model, a bidirectional LSTM (BiLSTM) model, and the like. When the extraction of the first semantic description, the second semantic description, the third semantic description, and the panoramic semantic description is implemented in the same RNN, the extraction may be implemented separately at different layers in the RNN.


For example, time sequence feature extraction units 1 to 4 are all LSTMs. In a embodiment, a panoramic semantic model may be shown in FIG. 6A and FIG. 6B.


The following provides calculation processes in a neuron 1, a neuron 2, . . . , and a neuron tin the first time sequence feature extraction unit.


In the neuron 1:


First, a forgotten value f10 is calculated based on location features P11, P21, . . . , and Ph1 of h target subjects in an image I1 and an initial output value h10:

f10=σ(W10f·[h10,[P11,P21, . . . Ph1]]+b10f).


σ( ) is a sigmoid function, b10f is an offset value, and W10f is a weight matrix.


Then, an input value C11 is calculated based on the location features P11, P21, . . . , and Ph1 of the h target subjects in the image I1, an initial input value C10, the initial output value h10, and the forgotten value f10:

i10=σ(W10i·[h10,[P11,P21, . . . Ph1]]+b10i)
{tilde over (C)}10=tanh(W10c·[h10,[P11,P21, . . . Ph1]]+b10c)
C11=f10*C10+i10*{tilde over (C)}10


σ( ) is a sigmoid function, tanh is an activation function, both W10i and W10c are weight matrices, and both b10i and b10c are offset values.


Finally, an output value h11 is calculated based on the location features P11, P21, . . . , and Ph1 of the h target subjects in the image I1, the initial output value h10 and the input value C11:

o10=σ(W10o·[h10,[P11,P21, . . . Ph1]]+b10o)
h11=o10 tanh(C11)


σ( ) is a sigmoid function, tanh is an activation function, W10o is a weight matrix, and b10o is an offset value.


In the neuron 2:


First, a forgotten value f11 is calculated based on location features P12, P22, . . . , and Ph2 of h target subjects in an image I2 and the output value h11;

f11=σ(W11f·[h11,[P12,P22, . . . Ph2]]+b11f)


σ( ) is a sigmoid function, b11f is an offset value, and W11f a weight matrix.


Then, an input value C12 is calculated based on the location features P12, P22, . . . , and Ph2 of the h target subjects in the image I2 an input value C11, the output value h11, and the forgotten value f:

i11=σ(W11i·[h11,[P12,P22, . . . Ph1]]+b11i)
{tilde over (C)}11=tanh(W11c·[h11,[P12,P22, . . . Ph2]]+b1c)
C12=f11*C11+i11*{tilde over (C)}11


σ( ) is a sigmoid function, tanh is an activation function, both W11i and W11c are weight matrices, and both b11i and b11c are offset values.


Finally, an output value h12 is calculated based on the location features P12, P22, . . . , and Ph2 of the h target subjects in the image I2, the output value k1 and the input value C12:

o11=σ(W11o·[h11,[P12,P22, . . . Ph2]]+b11o)
h12=o11 tanh(C12)


σ( ) is a sigmoid function, tanh is an activation function, W11o is a weight matrix, and b11o is an offset value.


In the neuron t:


First, a forgotten value f1t-1 is calculated based on location features P1t, P2t, . . . , and Pht of h target subjects in an image It and an output value h1t-1:

f1t-1=σ(W1t-1f·[h1t-1,[P1t,P2t, . . . Pht]]+b1t-1f)


σ( ) is a sigmoid function, b1t-1f is an offset value, and W1t-1f is a weight matrix.


Then, an input value C1t is calculated based on the location features P1t, P2t, . . . , and Pht of the h target subjects in the image It, an input value C1t-i, the output value h1t-1, and the forgotten value f1t-1:

i1t-1=σ(W1t-1i·[h1t-1,[P1t,P2t, . . . Pht]]+b1t-1i)
{tilde over (C)}1t-1=tanh(W1t-1c·[h1t-1,[P1t,P2t, . . . Pht]]+b1t-1c)
C1t=f1t-1*C1t-1+i1t-1*{tilde over (C)}1t-1


σ( ) is a sigmoid function, tanh is an activation function, both W1t-1i and W1t-1c are weight matrices, and both b1t-1i and b1t-1c are offset values.


Finally, an output value h1t is calculated based on the location features P1t, P2t, . . . , and Pht of the h target subjects in the image Ii, the output value h1t-1 and the input value C1t:

o1t-1=σ(W1t-1o·[h1t-1,[P1t,P2t, . . . Pht]]+b1t-1o)
h1t=o1t-1 tanh(C1t)


σ( ) is a sigmoid function, tanh is an activation function, W1t-1o is a weight matrix, and b1t-1o is an offset value.


The foregoing h11 to h1t may constitute a first semantic description.


It may be understood that the initial output value h10, offset values b10f to b1t-1f, offset values b10i to b1t-1i, offset values b10c to b1t-1c, and offset values b10o to b1t-1o may be manually set. Weight matrices W10f to W1t-1f, weight matrices W10i to W1t-1i, weight matrices W10c to W1t-1c may be obtained by training a large quantity of known first semantic descriptions and location features of known target subjects.


The following provides calculation processes in a neuron 1, a neuron 2, . . . , and a neuron tin the second time sequence feature extraction unit.


In the neuron 1:


First, a forgotten value f20 is calculated based on attribute features S11, S21, . . . , and Sh1 of the h target subjects in the image I1 and an initial output value h20:

f20=σ(W20f·[h20,[S11,S21, . . . Sh1]]+b20f)


σ( ) is a sigmoid function, b20f is an offset value, and W20f is a weight matrix.


Then, an input value C21 is calculated based on the attribute features S11, S21, and Sh1 of the h target subjects in the image I1, an initial input value C20, the initial output value h20, and the forgotten value f20:

i20=σ(W20i·[h20,[S11,S21, . . . Sh1]]+b20i)
{tilde over (C)}20=tanh(W20c·[h20,[S11,S21, . . . Sh1]]+b20c)
C21=f20*C20+i20*{tilde over (C)}20


σ( ) is a sigmoid function, tanh is an activation function, both W20i and W20c are weight matrices, and both b20i and b20c are offset values.


Finally, an output value h21 is calculated based on the attribute features S11, S21, . . . , and Sh1 of the h target subjects in the image I1, the initial output value h20 and the input value C21:

o20=σ(W20o·[h20,[S11,S21, . . . Sh1]]+b20o)
h21=o20 tanh(C21)


σ( ) is a sigmoid function, tanh is an activation function, W20o is a weight matrix, and b20o is an offset value.


In the neuron 2:


First, a forgotten value f21 is calculated based on attribute features S12, S22, . . . , and Sh2 of the h target subjects in the image I2 and the output value h21:

f21=σ(W21f·[h21,[S12,S22, . . . Sh2]]+b21f)


σ( ) is a sigmoid function, b21f is an offset value, and W21f is a weight matrix.


Then, an input value C22 is calculated based on the attribute features S12, S22, . . . , and Sh2 of the h target subjects in the image I2, an input value C21, the output value h21, and the forgotten value f21:

i21=σ(W31i·[h21,[S12,S22, . . . Sh2]]+b21i)
{tilde over (C)}21=tanh(W21c·[h21,[S12,S22, . . . Sh2]]+b21c)
C22=f21*C21+i21*{tilde over (C)}21


σ( ) is a sigmoid function, tanh is an activation function, both W21i and W21c are weight matrices, and both b21i and b21c are offset values.


Finally, an output value h12 is calculated based on the attribute features S12, S22, . . . , and Sh2 of the h target subjects in the image I2, the output value h21 and the input value C22:

o21=σ(W21o·[h21,[S12,S22, . . . Sh2]]+b21o)
h12=o11 tanh(C12)


σ( ) is a sigmoid function, tanh is an activation function, W21o is a weight matrix, and b21o is an offset value.


In the neuron t:


First, a forgotten value f2t-1 is calculated based on attribute features S1t, S2t, . . . , and Sht of the h target subjects in the image It and an output value h2t-1:

f2t-1=σ(W2t-1f·[h2t-1,[S1t,S2t, . . . Sht]]+b2t-1f)


σ( ) is a sigmoid function, b2t-1f is an offset value, and W2t-1f is a weight matrix.


Then, an input value C2t is calculated based on the attribute features S1t, S2t, . . . , and Sht of the h target subjects in the image It, an input value C2t-1, the output value h2t-1, and the forgotten value f2t-1:

i2t-1=σ(W2t-1i·[h2t-1,[S1t,S2t, . . . Sht]]+b2t-1i)
{tilde over (C)}2t-1=tanh(W2t-1c·[h2t-1,[S1t,S2t, . . . Sht]]+b2t-1c)
C2t=f2t-1*C2t-1+i2t-1*{tilde over (C)}2t-1


σ( ) is a sigmoid function, tanh is an activation function, both W2t-1i and W2t-1c are weight matrices, and both b2t-1i and b2t-1c and are offset values.


Finally, an output value ha is calculated based on the attribute features S1t, S2t, . . . , and Sht of the h target subjects in the image It, the output value h2t-1 and the input value C2t:

o2t-1=σ(W2t-1o·[h2t-1,[S1t,S2t, . . . Sht]]+b2t-1o)
h2t=o2t-1 tanh(C2t)


σ( ) is a sigmoid function, tanh is an activation function, W2t-1o is a weight matrix, and b2t-1o is an offset value.


The foregoing h21 to h2t may constitute a second semantic description.


It may be understood that the initial output value h20, offset values b20f to b2t-1f, offset values b20i to b2t-1i, offset values b20c to b2t-1c, offset values b20o to b2t-1o may be manually set. Weight matrices W20f to W2t-1f, weight matrices W20i to W2t-1i, weight matrices W20c to W2t-1c are obtained by training a large quantity of known second semantic descriptions, known first semantic descriptions, and attribute features of known target subjects.


The following provides calculation processes in a neuron 1, neuron 2, . . . , and a neuron t in the third time sequence feature extraction unit.


In the neuron 1:


First, a forgotten value f30 is calculated based on posture features Z11, Z21, . . . , and Zh1 of the h target subjects in the image I1 and an initial output value h30:

f30=σ(W30f·[h30,[Z11,Z21, . . . Zh1]]+b30f)


σ( ) is a sigmoid function, b30f is an offset value, and W30f is a weight matrix.


Then, an input value C31 is calculated based on the posture features Z11, Z21, . . . , and Zh1 of the h target subjects in the image I1, an initial input value C30, the initial output value h30, and the forgotten value f30:

i30=σ(W30i·[h30,[Z11,Z21, . . . Zh1]]+b30i)
{tilde over (C)}30=tanh(W30c·[h30,[Z11,Z21, . . . Zh1]]+b30c)
C31=f30*C30+i30*{tilde over (C)}30


σ( ) is a sigmoid function, tanh is an activation function, both W30i and W30c are weight matrices, and both b30i and b30c are offset values.


Finally, an output value h31 is calculated based on the posture features Z11, Z21, . . . , and Zh1 of the h target subjects in the image I1, the initial output value h30 and the input value C31:

o30=σ(W30o·[h30,[Z11,Z21, . . . Zh1]]+b30o)
h31=o30 tanh(C31)


σ( ) is a sigmoid function, tanh is an activation function, W30o is a weight matrix, and b30o is an offset value.


In the neuron 2:


First, a forgotten value f31 is calculated based on posture features Z12, Z22, . . . , and Zh2 of the h target subjects in the image I2 and the output value h31:

f31=σ(W31f·[h31,[Z12,Z22, . . . Zh2]]+b31f)


σ( ) is a sigmoid function, b31f is an offset value, and W31f is weight matrix.


Then, an input value C32 is calculated based on the posture features Z12, Z22, . . . , and Zh2 of the h target subjects in the image I2, an input value C31, the output value h31, and the forgotten value f31:

i31=σ(W31i·[h31,[Z12,Z22, . . . Zh2]]+b31i)
{tilde over (C)}31=tanh(W31c·[h31,[Z12,Z22, . . . Zh2]]+b31c)
C32=f31*C31+i31*{tilde over (C)}31


σ( ) is a sigmoid function, tanh is an activation function, both W31i and W31c are weight matrices, and both b31i and b31c are offset values.


Finally, an output value h32 is calculated based on the posture features Z12, Z22, . . . , and Zh2 of the h target subjects in the image I2, the output value h31 and the input value C32:

o31=σ(W31o·[h31,[Z12,Z22, . . . Zh2]]+b31o)
h32=o31 tanh(C32)


σ( ) is a sigmoid function, tanh is an activation function, W31o is a weight matrix, and b31o is an offset value.


In the neuron t:


First, a forgotten value f3t-1 is calculated based on posture features Z1t, Z2t, . . . , and Zht of the h target subjects in the image It and an output value h3t-1:

f3t-1=σ(W3t-1f·[h3t-1,[Z1t,Z2t, . . . Zht]]+b3t-1f)


σ( ) is a sigmoid function, b3t-1f is an offset value, and W3t-1f is a weight matrix.


Then, an input value C3t is calculated based on the posture features Z1t, Z2t, . . . , and Zht of the h target subjects in the image It, an input value C3t-1, the output value h3t-1, and the forgotten value f3t-1:

i3t-1=σ(W3t-1i·[h3t-1,[Z1t,Z2t, . . . Zht]]+b3t-1i)
{tilde over (C)}3t-1=tanh(W3t-1c·[h3t-1,[Z1t,Z2t, . . . Zht]]+b3t-1c)
C3t=f3t-1*C3t-1+i3t-1*{tilde over (C)}3t-1


σ( ) is a sigmoid function, tanh is an activation function, both W3t-1i and W3t-1c are weight matrices, and both b3t-1i and b3t-1c are offset values.


Finally, an output value h3t is calculated based on the posture features Z1t, Z2t, . . . , and Zht of the h target subjects in the image It, the output value h3t-1 and the input value C3t:

o3t-1=σ(W3t-1o·[h3t-1,[Z1t,Z2t, . . . Zht]]+b3t-1o)
h3t=o3t-1 tanh(C3t)


σ( ) is a sigmoid function, tanh is an activation function, W3t-1o is a weight matrix, and b3t-1o is an offset value.


The foregoing h31 to h3t may constitute a third semantic description.


It may be understood that the initial output value h30, offset values b30f to b3t-1f, offset values b30i to b3t-1i, offset values b30c to b3t-1, offset values b30o to b3t-1o may be manually set. Weight matrices W30f to W3t-1f, weight matrices W30i to W3t-1i, weight matrices W30c to W3t-1c are obtained by training a large quantity of known third semantic descriptions, known second semantic descriptions, and posture features of known target subjects.


The following provides calculation processes in a neuron 1, a neuron 2, . . . , and a neuron t in the fourth time sequence feature extraction unit.


In the neuron 1:


First, a forgotten value f40 is calculated based on relational vector features G121, G131, . . . , and Gh-1h1 of the h target subjects in the image I1 and an initial output value h40:

f40=σ(W40f·[h40,[G121,G131, . . . Gh-1h1]]+b40f)


σ( ) is a sigmoid function, b40f is an offset value, and W40f is a weight matrix.


Then, an input value C41 is calculated based on the relational vector features G121, G131, . . . , and Gh-1h1 of the h target subjects in the image I1, an initial value C40, the initial output value h40, and the forgotten value f40:

i40=σ(W40i,[h40,[G121,G131, . . . Gh-1h1]]+b40i)
{tilde over (C)}40=tanh(W40c·[h40,[G121,G131, . . . Gh-1h1]]+b40c)
C41=f40*C40+i40*{tilde over (C)}40


σ( ) is a sigmoid function, tanh is an activation function, both W40i and W40c are weight matrices, and both b40i and b40c are offset values.


Finally, an output value h41 is calculated based on the relational vector features G121, G131, . . . , and Gh-1h1 of the h target subjects in the image I1, the initial output value h40 and the input value C41:

o40=σ(W40o·[h40,[G121,G131, . . . Gh-1h1]]+b40o)
h41=o40 tanh(C41)


σ( ) is a sigmoid function, tanh is an activation function, W40o is a weight matrix, and b40o is an offset value.


In the neuron 2:


First, a forgotten value f41 is calculated based on relational vector features G122, G132, . . . , Gh-1h2 of the h target subjects in the image I2 and the output value h41:

f41=σ(W41f·[h41,[G122,G132, . . . Gh-1h2]]+b41f)


σ( ) is a sigmoid function, b41f is an offset value, and W41f is a weight matrix.


Then, an input value C42 is calculated based on the relational vector features G122, G132, . . . , and Gh-1h2 of the h target subjects in the image I2, and input value C41, the output value h41, and the forgotten value f41:

i41=σ(W41i·[h41,[G122,G132, . . . Gh-1h2]]+b41i)
{tilde over (C)}41=tanh(W41c·[h41,[G122,G132, . . . Gh-1h2]]+b41c)
C42=f41*C41+i41*{tilde over (C)}41


σ( ) is a sigmoid function, tanh is an activation function, both W41i and W41c are weight matrices, and both b41i and b41c are offset values.


Finally, an output value h42 is calculated based on the relational vector features G122, G132, . . . , and Gh-1h2 of the h target subjects in the image I2, the output value h41 and the input value C42:

o41=σ(W41o·[h41,[G122,G132, . . . Gh-1h2]]+b41o)
h42=o41 tanh(C42)


σ( ) is a sigmoid function, tanh is an activation function, W41o is a weight matrix, and b41o is an offset value.


In the neuron t:


First, a forgotten value f4t-1 is calculated based on relational vector features G12t, G13t, . . . , and Gh-1ht of the h target subjects in the image It and an output value h4t-1:

f4t-1=σ(W4t-1f·[h4t-1,[G12t,G13t, . . . Gh-1ht]]+b4t-1f)


σ( ) is a sigmoid function b4t-1f is an offset value, and W4t-1f is a weight matrix.


Then, an input value C4t is calculated based on the relational vector features G12t, G13t, . . . , Gh-1ht of the h target subjects in the image It, an input value C4t-1, the output value h4t-1, and the forgotten value f4t-1:

i4t-1=σ(W4t-1i·[h4t-1,[G12t,G13t, . . . Gh-1ht]]+b4t-1i)
{tilde over (C)}4t-1=tanh(W4t-1c·[h4t-1,[G12t,G13t, . . . Gh-1ht]]+b4t-1c)
C4t=f4t-1*C4t-1+i4t-1*{tilde over (C)}4t-1


σ( ) is a sigmoid function, tanh is an activation function, both W4t-1i and W4t-1c are weight matrices, and both b4t-1i and b4t-1c are offset values.


Finally, an output value h4t is calculated based on the relational vector features G12t, G13t, . . . , and Gh-1ht of the h target subjects in the image It, the output value h4t-1 and the input value C4t:

o4t-1=σ(W4t-1o·[h4t-1,[G12t,G13t, . . . Gh-1ht]]+b4t-1o)
h4t=o4t-1 tanh(C4t)


σ( ) is a sigmoid function, tanh is an activation function, W4t-1o is a weight matrix, and b4t-1o is an offset value.


The foregoing h41 to h4t may constitute a panoramic semantic description.


It may be understood that the initial output value h40, offset values b40f to b4t-1, offset values b40i to b4t-1i, offset values b40c to b4t-1c, offset values b40o to b4t-1o may be manually set. Weight matrices W40f to W4t-1f, weight matrices W40i to W4t-1i, weight matrices W40c to W4t-1c are obtained by training a large quantity of known panoramic semantic descriptions, known third semantic descriptions, and relational vector features of known target subjects.



FIG. 7 is a schematic diagram of a flowchart of an image analysis method. The image analysis method in this implementation may include the following steps:


S101: An image analysis system obtains influencing factors oft frames of images, where the influencing factors include self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, and the self-owned features of each target subject include a location feature, an attribute feature, and a posture feature, where t and h are natural numbers greater than 1.


In an exemplary embodiment, the location feature is used to indicate a location of a corresponding target subject in the image. The location feature may be represented as (x, y, w, h), where x and y are a horizontal coordinate and a vertical coordinate of a central point of the target subject in the image, w is a width of the target subject in the image, and h is a height of the target subject in the image.


In an exemplary embodiment, the attribute feature may include a plurality of types of attribute features. Attribute features may be different if target subjects are different. For example, the target subject is a person. The attribute feature of the target subject may include one or more of a gender, a hairstyle, a clothes type, a clothes color, a height, a body size, and the like.


In an exemplary embodiment, the target subject also has a plurality of posture features. Posture features may be different if target subjects are different. For example, the target subject is a person. The posture feature of the target subject may include one or more of falling down, lying down, walking, running, jumping, and the like.


In an exemplary embodiment, the relational feature vector is a vector representing a relationship between two target subjects.


S102: The image analysis system obtains a panoramic semantic description based on the influencing factors.


In an exemplary embodiment, a panoramic semantic model reflects a mapping relationship between the influencing factors and the panoramic semantic description. The panoramic semantic model may be represented as:

y=Panorama(x).


x is the influencing factors of the panoramic semantic description, y is the panoramic semantic description, Panorama( ) is the mapping relationship between the influencing factors of the panoramic semantic description and the panoramic semantic description, and Panorama( ) may be obtained by training a large quantity of influencing factors of a known panoramic semantic description and the known panoramic semantic description.


In an exemplary embodiment, the panoramic semantic description can describe relationships between the target subject, relationships between the target subjects and actions, and relationships between the actions.


In an exemplary embodiment, feature extraction is performed on the t frames of images to obtain t feature vectors. Location feature extraction is performed on the t feature vectors to obtain the location features. Attribute feature extraction is performed on the t feature vectors to obtain the attribute features. Posture feature extraction is performed on the t feature vectors to obtain the posture features. Relational vector feature extraction is performed on the t feature vectors to obtain the relational vector features.


In an exemplary embodiment, extraction of the feature vectors, the location features, the attribute features, the posture features, and the relational vector features may be implemented separately by different CNN, or may be integrated into a same CNN. When the extraction of the feature vectors, the location features, the attribute features, the posture features, and the relational vector features is integrated into the same CNN, the extraction of the feature vectors, the location features, the attribute features, the posture features, and the relational vector features may be implemented at one layer in the CNN.


In an exemplary embodiment, a first semantic description is extracted based on the location features. A second semantic description is extracted based on the attribute features and the first semantic description. A third semantic description is extracted based on the posture features and the second semantics. The panoramic semantic description is extracted based on the relational vector features and the third semantic description.


In an exemplary embodiment, the first semantic description to the third semantic description, and the panoramic semantic description may be extracted by different RNN, or may be integrated into a same RNN for extraction. The RNN may include a LSTM model, BiLSTM model, and the like. When the first semantic description to the third semantic description, and the panoramic semantic description are integrated into the same RNN for extraction, the first semantic description to the third semantic description, and the panoramic semantic description may be extracted separately at different layers in the RNN.


For ease of description, definitions of the image, the target subject, the panoramic semantic description, and the like are not described in detail in this embodiment. For details, refer to FIG. 2 and FIG. 3 and descriptions of related definitions of the image, the target subject, the panoramic semantic model, the panoramic semantic description, and the like. The feature vectors, the location features, the attribute features, the posture features, the relational vector features, and extraction manners thereof are not described either in this embodiment. For details, refer to FIG. 4 and related descriptions. In addition, the panoramic semantic model and how to use the panoramic semantic model to perform the panoramic semantic description on the image are not described in detail in this embodiment. For details, refer to FIG. 5, FIG. 6A and FIG. 6B, and related descriptions.


In the solution, the higher-level panoramic semantic description may be obtained based on location features, attribute features, and posture features of a plurality of target subjects in a plurality of frames of images and relational vector features between the plurality of target subjects in the plurality of frames of images, to better reflect relationships between the plurality of subjects, between the subjects and actions, and between the actions in the images.



FIG. 8 is a schematic diagram of a structure of an image analysis system according to an implementation. The image analysis system in this embodiment includes a feature extraction module 510 and a panoramic semantic description module 520. The feature extraction module 510 includes a feature vector extraction unit 511, a location feature extraction unit 512, an attribute feature extraction unit 513, a posture feature extraction unit 514, and a relational vector feature unit 515. The panoramic semantic descriptor module 520 includes a first time sequence feature extraction unit 522, a second time sequence feature extraction unit 523, a third time sequence feature extraction unit 524, and a fourth time sequence feature extraction unit 525.


The feature extraction module 510 is configured to obtain influencing factors of a panoramic semantic description. The influencing factors include self-owned features of h target subjects in each of t frames of images and relational vector features between the h target subjects in each of the t frames of images, and the self-owned features include a location feature, an attribute feature, and a posture feature, where t and h are natural numbers greater than 1. The location feature is used to indicate a location of a corresponding target subject in the image. The attribute feature is used to indicate an attribute of the corresponding target subject. The posture feature is used to indicate an action of the corresponding target subject. The relational vector features are used to indicate relationships between target subjects.


The panoramic semantic description module 520 is configured to input the influencing factors into a panoramic semantic model to obtain the panoramic semantic description. The panoramic semantic model reflects a mapping relationship between the influencing factors and the panoramic semantic description. The panoramic semantic description can describe the relationships between target subjects, relationships between the target objects and actions, and the relationship between the actions.


In an exemplary embodiment, the location feature is used to indicate the location of the corresponding target subject in the image. The location feature may be represented as (x, y, w, h), where x and y are a horizontal coordinate and a vertical coordinate of a central point of the target subject in the image, w is a width of the target subject in the image, and h is a height of the target subject in the image.


In an exemplary embodiment, the attribute feature may include a plurality of types of attribute features. Attribute features may be different if target subjects are different. For example, the target subject is a person. The attribute feature of the target subject may include one or more of a gender, a hairstyle, a clothes type, a clothes color, a height, a body size, and the like.


In an exemplary embodiment, the target subject also has a plurality of posture features. Posture features may be different if target subjects are different. For example, the target subject is a person. The posture feature of the target subject may include one or more of falling down, lying down, walking, running, jumping, and the like.


In an exemplary embodiment, a relational feature vector is a vector representing a relationship between two target subjects.


In an exemplary embodiment, the panoramic semantic model reflects the mapping relationship between the influencing factors and the panoramic semantic description. The panoramic semantic model may be represented as:

y=Panorama(x).


x is the influencing factors of the panoramic semantic description, y is the panoramic semantic description, Panorama( ) is the mapping relationship between the influencing factors of the panoramic semantic description and the panoramic semantic description, and Panorama( ) may be obtained by training a large quantity of influencing factors of a known panoramic semantic description and the known panoramic semantic description.


In an exemplary embodiment, the feature vector extraction unit 511 is configured to extract features of the t frames of images to obtain t feature vectors. The location feature extraction unit 512 is configured to extract location features of the t feature vectors to obtain the location features. The attribute feature extraction unit 513 is configured to extract attribute features of the t feature vectors to obtain the attribute features. The posture feature extraction unit 514 is configured to extract posture features of the t feature vectors to obtain the posture features. The relational vector feature unit 515 is configured to extract relational vector features of the t feature vectors to obtain the relational vector features.


In an exemplary embodiment, the feature extraction module 510 includes a CNN. The feature vector extraction unit 511, the location feature extraction unit 512, the attribute feature extraction unit 513, the posture feature extraction unit 514, and the relational vector feature extraction unit 515 are integrated into the CNN. The feature vector extraction unit 511, the location feature extraction unit 512, the attribute feature extraction unit 513, the posture feature extraction unit 514, and the relational vector feature extraction unit 515 may be in different CNN, or may be integrated into a same CNN. The CNN may include a VGGNet, a ResNet, an FPNet, and the like. When the feature vector extraction unit 511, the location feature extraction unit 512, the attribute feature extraction unit 513, the posture feature extraction unit 514, and the relational vector feature extraction unit 515 are integrated into the same CNN, the feature vector extraction unit 511, the location feature extraction unit 512, the attribute feature extraction unit 513, the posture feature extraction unit 514, and the relational vector feature 515 may be a layer in the CNN.


In an exemplary embodiment, the first time sequence feature extraction unit 522 is configured to extract a first semantic description based on the location features. The second time sequence feature extraction unit is configured to extract a second semantic description based on the attribute features and the first semantic description. The third time sequence feature extraction unit is configured to extract a third semantic description based on the posture features and the second semantics. The fourth time sequence feature extraction unit is configured to extract the panoramic semantic description based on the relational vector features and the third semantic description.


In an exemplary embodiment, the panoramic semantic model 522 includes a RNN. The first time sequence feature extraction unit, the second time sequence feature extraction unit, the third time sequence feature extraction unit, and the fourth time sequence feature extraction unit are respectively one layer in the RNN. The first time sequence feature extraction unit to the fourth time sequence feature extraction unit may be in different RNN, or may be integrated into a same RNN. The RNN may include a LSTMmodel, a BiLSTM model, and the like. When the first time sequence feature extraction unit to the fourth time sequence feature extraction unit are integrated into the same RNN, the first time sequence feature extraction unit to the fourth time sequence feature extraction unit may be respectively a layer in the RNN.


For ease of description, definitions of the image, the target subject, the panoramic semantic description, and the like are not described in detail in this embodiment. For details, refer to FIG. 2 and FIG. 3 and descriptions of related definitions of the image, the target subject, the panoramic semantic model, the panoramic semantic description, and the like. The feature vectors, the location features, the attribute features, the posture features, the relational vector features, and extraction manners thereof are not described either in this embodiment. For details, refer to FIG. 4 and related descriptions. In addition, the panoramic semantic model and how to use the panoramic semantic model to perform the panoramic semantic description on the image are not described in detail in this embodiment. For details, refer to FIG. 5, FIG. 6A and FIG. 6B, and related descriptions.


In the solution, the higher-level panoramic semantic description can be obtained based on location features, attribute features, and posture features of a plurality of target subjects in a plurality of frames of images and relational vector features between the plurality of target subjects in the plurality of frames of images, to better reflect relationships between the plurality of subjects, between the subjects and actions, and between the actions in the images.


The image analysis system may be implemented on a compute node, or may be implemented on a cloud compute infrastructure. The following describes how to implement an image analysis system on a compute node and a cloud compute infrastructure.


As shown in FIG. 9, a compute node 100 may include a processor 110 and a memory 120. The processor is configured to run a feature extraction module 111 and a panoramic semantic model 112. The memory 120 is configured to store semantic descriptions, features, images, and the like 121. The compute node 100 further provides two external interface windows: a management interface 140 oriented to maintenance staff of a semantic description system and a user interface 150 oriented to a user. The interface window may have various forms, such as a web interface, a command line tool, and a REST interface.


In an exemplary embodiment, the management interface is used by the maintenance staff to input a large quantity of images used for a panoramic semantic description, a large quantity of known panoramic semantic descriptions, known third semantic descriptions, and relational vector features of known target subjects, a large quantity of known third semantic descriptions, known second semantic descriptions, and posture features of known target subjects, a large quantity of known second semantic descriptions, known first semantic descriptions, and attribute features of known target subjects, a large quantity of first semantic descriptions and location features of known target subjects to train the panoramic semantic model.


In an exemplary embodiment, the user interface is used by the user to input images whose panoramic semantic description needs to be extracted. The panoramic semantic description is output to the user through the user interface.


It may be understood that the compute node 100 is merely an example provided in this embodiment, and the compute node 100 may include more or fewer components than shown components, may combine two or more components, or may have different component configurations.


As shown in FIG. 10, a cloud compute infrastructure may be a cloud service cluster 200. The cloud service cluster 200 includes nodes and a communications network between the nodes. The node may be a compute node, or a virtual machine running on a compute node. The nodes may be classified into two types by function: a compute node 210 and a storage node 220. The compute node 210 is configured to run a feature extraction module 211 and a panoramic semantic model 212. The storage node 220 is configured to store semantic descriptions, features, images, and the like 221. The cloud service cluster 200 further provides two external interface windows: a management interface 240 oriented to maintenance staff of a question answering engine and a user interface 250 oriented to a user. The interface window may have various forms, such as a web interface, a command line tool, and a REST interface.


In an exemplary embodiment, the management interface is used by the maintenance staff to input a large quantity of images used for a panoramic semantic description, a large quantity of known panoramic semantic descriptions, known third semantic descriptions, and relational vector features of known target subjects, a large quantity of known third semantic descriptions, known second semantic descriptions, and posture features of known target subjects, a large quantity of known second semantic descriptions, known first semantic descriptions, and attribute features of known target subjects, a large quantity of first semantic descriptions and location features of known target subjects to train the panoramic semantic model.


In an exemplary embodiment, the user interface is used by the user to input images whose panoramic semantic description needs to be extracted. The panoramic semantic description is output to the user through the user interface.


It may be understood that the cloud service cluster 200 is merely an example provided in this embodiment, and the cloud service cluster 200 may include more or fewer components than shown components, may combine two or more components, or may have different component configurations.



FIG. 11 is a schematic diagram of a structure of a semantic description system according to another embodiment. The semantic description system shown in FIG. 8 may be implemented in a compute node 300 shown in FIG. 11. The compute node 300 in this implementation includes one or more processors 311, a communications interface 312, and a memory 313. The processor 311, the communications interface 312, and the memory 313 may be connected through a bus 314.


The processor 311 includes one or more general purpose processors. The general purpose processor may be any type of device that can process an electronic instruction. The general purpose processor includes a central processing unit (CPU), a microprocessor, a microcontroller, a main processor, a controller, an application specific integrated circuit (ASIC), or the like. The processor 311 executes various types of digital storage instructions, for example, software or firmware instructions stored in the memory 313, so that the compute node 300 provides relatively wide range of services. For example, the processor 311 can execute a program or process data, to execute at least a part of the method discussed. The processor 311 may run the feature extraction module and the panoramic semantic model that are shown in FIG. 8.


The communications interface 312 may be a wired interface (for example, an Ethernet interface), and is configured to communicate with another compute node or user.


The memory 313 may include a volatile memory, for example, a random access memory (RAM). The memory may further include a non-volatile memory, for example, a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). Alternatively, the memory may include a combination of the foregoing types of memories. The memory 313 may store program code and program data. The program code includes feature extraction module code and panoramic semantic model code. The program data includes a large quantity of images used for a panoramic semantic description, a large quantity of known panoramic semantic descriptions, known third semantic descriptions, and relational vector features of known target subjects, a large quantity of known third semantic descriptions, known second semantic descriptions, and posture features of known target subjects, a large quantity of known second semantic descriptions, known first semantic descriptions, and attribute features of known target subjects, a large quantity of first semantic descriptions and location features of known target subjects, to train the panoramic semantic model.


The processor 311 may be configured to invoke the program code in the memory 313, to perform the following steps.


The processor 311 is configured to obtain influencing factors of t frames of images. The influencing factors include self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, and the self-owned features of each target subject include a location feature, an attribute feature, and a posture feature, where t and h are natural numbers greater than 1.


The processor 311 is configured to obtain a panoramic semantic description based on the influencing factors. The panoramic semantic description includes a description of relationships between target subjects, relationships between actions of the target subjects and the target subjects, and relationships between the actions of the target subjects.


For ease of description, definitions of the image, the target subject, the panoramic semantic description, and the like are not described in detail in this embodiment. For details, refer to FIG. 2 and FIG. 3 and descriptions of related definitions of the image, the target subject, the panoramic semantic model, the panoramic semantic description, and the like. The feature vectors, the location features, the attribute features, the posture features, the relational vector features, and extraction manners thereof are not described either in this embodiment. For details, refer to FIG. 4 and related descriptions. In addition, the panoramic semantic model and how to use the panoramic semantic model to perform the panoramic semantic description on the image are not described in detail in this embodiment. For details, refer to FIG. 5, FIG. 6A and FIG. 6B, and related descriptions.



FIG. 12 is a schematic diagram of a structure of a semantic description system according to still another embodiment. The semantic description system in this implementation may be implemented in a cloud service cluster shown in FIG. 12. The cloud service cluster includes at least one compute node 410 and at least one storage node 420.


The compute node 410 includes one or more processors 411, a communications interface 412, and a memory 413. The processor 411, the communications interface 412, and the memory 413 may be connected through a bus 417.


The processor 411 includes one or more general purpose processors. The general purpose processor may be any type of device that can process an electronic instruction. The general purpose processor includes a CPU, a microprocessor, a microcontroller, a main processor, a controller, an ASIC, or the like. The processor 411 can be a dedicated processor for the compute node 410 only or can be shared with other compute nodes 410. The processor 411 executes various types of digital storage instructions, for example, software or firmware instructions stored in the memory 413, so that the compute node 410 provides relatively wide range of services. For example, the processor 411 can execute a program or process data, to execute at least a part of the method discussed. The processor 411 may run the feature extraction module and the panoramic semantic model that are shown in FIG. 8.


The communications interface 412 may be a wired interface (for example, an Ethernet interface), and is configured to communicate with another compute node or user. When the communications interface 412 is the wired interface, the communications interface 412 may use a TCP/IP protocol suite, such as, an RAAS protocol, a remote function call (RFC) protocol, a simple object access protocol (SOAP) protocol, a simple network management protocol (SNMP) protocol, a common object request broker architecture (CORBA) protocol, and a distributed protocol.


The memory 413 may include a volatile memory, for example, a RAM. The memory may further include a non-volatile memory, for example, a ROM, a flash memory, a HDD), or a SSD. Alternatively, the memory may include a combination of the foregoing types of memories.


The compute node 420 includes one or more processors 421, a communications interface 422, and a memory 423. The processor 421, the communications interface 422, and the memory 423 may be connected through a bus 424.


The processor 421 includes one or more general purpose processors. The general purpose processor may be any type of device that can process an electronic instruction. The general purpose processor includes a CPU, a microprocessor, a microcontroller, a main processor, a controller, an ASIC, or the like. The processor 421 can be a dedicated processor for the storage node 420 only or can be shared with other storage nodes 420. The processor 421 executes various types of digital storage instructions, for example, software or firmware instructions stored in the memory 423, so that the storage node 420 provides relatively wide range of services. For example, the processor 421 can execute a program or process data, to execute at least a part of the method discussed.


The communications interface 422 may be a wired interface (for example, an Ethernet interface), and is configured to communicate with another compute device or user.


The storage node 420 includes one or more storage controllers 421 and a storage array 425. The storage controller 421 and the storage array 425 may be connected through a bus 426.


The storage controller 421 includes one or more general purpose processors. The general purpose processor may be any type of device that can process an electronic instruction. The general purpose processor includes a CPU, a microprocessor, a microcontroller, a main processor, a controller, an ASIC, or the like. The storage controller 421 can be a dedicated processor for the storage node 420 only or can be shared with the compute node 410 or other storage nodes 420. It may be understood that, in this embodiment, each storage node includes one storage controller. In another embodiment, a plurality of storage nodes may share one storage controller.


The storage array 425 may include a plurality of memories. The memory may be a non-volatile memory, such as a ROM, a flash memory, an HDD, or an SSD. The memory may also include a combination of the foregoing types of memories. For example, the storage array may include a plurality of HDDs or a plurality of SDDs, or the storage array may include an HDD and an SDD. With the assistance of the storage controller 421, the plurality of memories are combined in different manners to form a memory group, thereby providing higher storage performance and a data backup technology than a single memory. Optionally, the memory array 425 may include one or more data centers. The plurality of data centers may be disposed at a same location, or may be disposed separately at different locations. The storage array 425 may store program code and program data. The program code includes feature extraction module code and panoramic semantic model code. The program data includes a large quantity of images used for a panoramic semantic description, a large quantity of known panoramic semantic descriptions, known third semantic descriptions, and relational vector features of known target subjects, a large quantity of known third semantic descriptions, known second semantic descriptions, and posture features of known target subjects, a large quantity of known second semantic descriptions, known first semantic descriptions, and attribute features of known target subjects, a large quantity of first semantic descriptions and location features of known target subjects, to train a panoramic semantic model.


The compute node 410 may be configured to invoke the program code in the storage node 420, to perform the following steps.


The compute node 410 is configured to obtain influencing factors of t frames of images. The influencing factors include self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, and the self-owned features of each target subject include a location feature, an attribute feature, and a posture feature, where t and h are natural numbers greater than 1.


The compute node 410 is configured to obtain a panoramic semantic description based on the influencing factors. The panoramic semantic description includes a description of relationships between target subjects, relationships between actions of the target subjects and the target subjects, and relationships between the actions of the target subjects.


For ease of description, definitions of the image, the target subject, the panoramic semantic description, and the like are not described in detail in this embodiment. For details, refer to FIG. 2 and FIG. 3 and descriptions of related definitions of the image, the target subject, the panoramic semantic model, the panoramic semantic description, and the like. The feature vectors, the location features, the attribute features, the posture features, the relational vector features, and extraction manners thereof are not described either in this embodiment. For details, refer to FIG. 4 and related descriptions. In addition, the panoramic semantic model and how to use the panoramic semantic model to perform the panoramic semantic description on the image are not described in detail in this embodiment. For details, refer to FIG. 5, FIG. 6A and FIG. 6B, and related descriptions.


In the solution, the higher-level panoramic semantic description can be obtained based on location features, attribute features, and posture features of a plurality of target subjects in a plurality of frames of images and relational vector features between the plurality of target subjects in the plurality of frames of images, to better reflect relationships between the plurality of subjects, between the subjects and actions, and between the actions in the images.


All or some of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, all or some of the embodiments may be implemented in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedure or functions according to the embodiments are all or partially generated. The computer may be a general purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a storage disk, or a magnetic tape), an optical medium (for example, a DVD), a semiconductor medium (for example, a SSD), or the like.

Claims
  • 1. A method comprising: obtaining influencing factors of t frames of images, the influencing factors comprising self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, self-owned features of each target subject comprise a location feature, an attribute feature, and a posture feature, t and h are natural numbers greater than 1, the location feature is used to indicate a location of a corresponding target subject in the image, the attribute feature is used to indicate an attribute of the corresponding target subject, the posture feature is used to indicate an action of the corresponding target subject, and the relational vector features are used to indicate relationships between the h target subjects; andobtaining a panoramic semantic description based on the influencing factors, wherein the panoramic semantic description comprises a description of the relationships between the h target subjects, relationships between actions of the h target subjects and the h target subjects, and relationships between the actions of the h target subjects in each of the t frames of images, wherein obtaining of the influencing factors of the panoramic semantic description of the t frames of the images further comprises:extracting features of the t frames of images to obtain t feature vectors;extracting location features of the t feature vectors to obtain the location features;extracting attribute features of the t feature vectors to obtain the attribute features;extracting posture features of the t feature vectors to obtain the posture features; andextracting relational vector features of the t feature vectors to obtain the relational vector features;wherein the location features, the attribute features, the posture features, and the relational vector features are extracted by a same convolutional neural network.
  • 2. The method according to claim 1, wherein extraction of the relational vector features of the t feature vectors to obtain the relational vector features further comprises: performing region-of-interest pooling on a feature vector i based on a target subject a and a target subject b that are in an image i to obtain a feature vector Va,b corresponding to the target subject a and the target subject b, wherein i, a, and b are all natural numbers, 0<i≤t, 1≤a,b≤h, and the feature vector i is extracted based on the image i;
  • 3. The method according to claim 1, wherein obtaining of the panoramic semantic description based on the influencing factors further comprises: extracting a first semantic description based on the location features;extracting a second semantic description based on the attribute features and the first semantic description;extracting a third semantic description based on the posture features and the second semantics description; andextracting the panoramic semantic description based on the relational vector features and the third semantic description.
  • 4. The method according to claim 3, wherein the first semantic description, the second semantic description, and the third semantic description are extracted by a same recurrent neural network.
  • 5. An image analysis system, comprising a feature extraction module and a panoramic semantic model, wherein the feature extraction module is configured to obtain influencing factors of a panoramic semantic description, wherein the influencing factors comprise self-owned features of h target subjects in each of t frames of images and relational vector features between the h target subjects in each of the t frames of images, the self-owned feature comprise a location feature, an attribute feature, and a posture feature, t and h are natural numbers greater than 1, the location feature is used to indicate a location of a corresponding target subject in the image, the attribute feature is used to indicate an attribute of the corresponding target subject, the posture feature is used to indicate an action of the corresponding target subject, and the relational vector features are used to indicate relationships between the h target subjects; wherein the feature extraction module further comprises: a feature vector extraction unit configured to extract features of the t frames of images to obtain t feature vectors;a location feature extraction unit configured to extract location features of the t feature vectors to obtain the location features;an attribute feature extraction unit configured to extract attribute features of the t feature vectors to obtain the attribute features;a posture feature extraction unit configured to extract posture features of the t feature vectors to obtain the posture features;a relational vector feature unit configured to extract relational vector features of the t feature vectors to obtain the relational vector features;wherein the location features, the attribute features, the posture features, and the relational vector features are extracted by a same convolutional neural network; andthe panoramic semantic model is configured to obtain the panoramic semantic description based on the influencing factors, wherein the panoramic semantic description comprises a description of the relationships between the h target subjects, relationships between the h target subjects and actions, and relationships between the actions in each of the t frames of images.
  • 6. The system according to claim 5, wherein the relational vector feature extraction unit is configured to: perform region-of-interest pooling on a feature vector i based on a target subject a and a target subject b that are in an image i to obtain a feature vector Va,b corresponding to the target subject a and the target subject b, wherein i, a, and b are natural numbers, 0<i≤t, and 1≤a,b≤h; perform region-of-interest pooling based on the target subject a to obtain a feature vector Va,a corresponding to the target subject a; and calculate a relational vector feature Viab between the target subject a and the target subject b that are in the image i according to the following formula:
  • 7. The system according to claim 5, wherein the panoramic semantic model further comprises: a first time sequence feature extraction unit configured to extract a first semantic description based on the location features;a second time sequence feature extraction unit configured to extract a second semantic description based on the attribute features and the first semantic description;a third time sequence feature extraction unit configured to extract a third semantic description based on the posture features and the second semantics description; anda fourth time sequence feature extraction unit configured to extract the panoramic semantic description based on the relational vector features and the third semantic description.
  • 8. The system according to claim 7, wherein the panoramic semantic model comprises a recurrent neural network, and the first time sequence feature extraction unit, the second time sequence feature extraction unit, the third time sequence feature extraction unit, and the fourth time sequence feature extraction unit are respectively one layer in the recurrent neural network.
  • 9. A compute node cluster, comprising at least one compute node, wherein each compute node comprises a processor and a memory, and the processor executes code in the memory to perform the following method: obtaining influencing factors of t frames of images, wherein the influencing factors comprise self-owned features of h target subjects in each of the t frames of images and relational vector features between the h target subjects in each of the t frames of images, self-owned features of each target subject comprise a location feature, an attribute feature, and a posture feature, t and h are natural numbers greater than 1, the location feature is used to indicate a location of a corresponding target subject in the image, the attribute feature is used to indicate an attribute of the corresponding target subject, the posture feature is used to indicate an action of the corresponding target subject, and the relational vector features are used to indicate relationships between the h target subjects; andobtaining a panoramic semantic description based on the influencing factors, wherein the panoramic semantic description comprises a description of the relationships between the h target subjects, relationships between actions of the h target subjects and the h target subjects, and relationships between the actions of the h target subjects in each of the t frames of images, wherein obtaining of the influencing factors of the panoramic semantic description of the t frames of the images further comprises:extracting features of the t frames of images to obtain t feature vectors;extracting location features of the t feature vectors to obtain the location features;extracting attribute features of the t feature vectors to obtain the attribute features;extracting posture features of the t feature vectors to obtain the posture features; and
Priority Claims (1)
Number Date Country Kind
201910065251.0 Jan 2019 CN national
CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No. PCT/CN2019/107126, filed on Sep. 21, 2019, which claims priority to Chinese Patent Application No. 201910065251.0, filed on Jan. 23, 2019, the disclosure of which is hereby incorporated by reference in its entirety.

US Referenced Citations (5)
Number Name Date Kind
20080193010 Eaton et al. Aug 2008 A1
20170193286 Zhou Jul 2017 A1
20180115706 Kang Apr 2018 A1
20200019764 Sun Jan 2020 A1
20210133461 Ren May 2021 A1
Foreign Referenced Citations (10)
Number Date Country
102880692 Jan 2013 CN
104244086 Dec 2014 CN
103345764 Feb 2016 CN
106650617 May 2017 CN
108197589 Jun 2018 CN
108416776 Aug 2018 CN
108509880 Sep 2018 CN
108510012 Sep 2018 CN
108960330 Dec 2018 CN
2993618 Mar 2016 EP
Non-Patent Literature Citations (1)
Entry
Peter Ondruska, et al., “End-to-End Tracking and Semantic Segmentation Using Recurrent Neural Network”, arXiv: 1604.05091, 2016, pp. 1-9. (Year: 2016).
Related Publications (1)
Number Date Country
20210326634 A1 Oct 2021 US
Continuations (1)
Number Date Country
Parent PCT/CN2019/107126 Sep 2019 WO
Child 17365089 US