Social relationship identification method and system based on deep supervised feature selection
By combining the deep learning algorithm and the l2,1 paradigm, the optimal feature subset for social relationship recognition is selected from multi-source features, which solves the problems of noise and redundancy in multi-source features and improves the accuracy and calculation of social relationship recognition. efficiency.
Patent Information
- Application Number
- CN202110628155.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-06
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-06-06
AI Technical Summary
When existing social relationship recognition methods use face or body attributes, multi-source features are prone to contain noise and redundancy, which affects recognition accuracy.
The deep learning algorithm is combined with the l2,1 paradigm, and the optimal feature subset is selected from multi-source features by learning a sparse weight matrix. The Softmax classifier is used to calculate the probability distribution of social relationship categories, and redundant features are removed through weight matrix sparse optimization. .
The accuracy and computational efficiency of social relationship recognition are improved, and the understanding of the contribution of different attributes is enhanced by automatically selecting the optimal feature subset.
Smart Images

Figure CN113536907B
Abstract
Description
Technical Field
[0001] The present invention relates to social relationship recognition technology in the field of computer vision, and in particular to a social relationship recognition method and system based on deep supervised feature selection. Background Art
[0002] In recent years, researchers have focused on mining social information from images or videos, such as kinship verification, social roles, social relationship attributes, and social relationships. Ramanathan et al. first attempted to describe the social roles people play in activities in 2013. They presented roles and interactions through a conditional random field, and derived the weights of the model and the role assignments in the video. Zhang et al. proposed a deep model in 2015 to classify social relationship characteristics (such as warmth, friendliness, and dominance) between two or more people by capturing multiple facial attributes. In addition, they constructed a bridging layer to exploit the intrinsic correspondence between heterogeneous attribute sources. At the same time, many researchers focused on analyzing kinship as a subset of social relationships. Lu et al. proposed a new neighborhood exclusion metric learning (NRML) method for kinship verification tasks. Robinson et al. collected the largest kinship dataset (i.e., FIW dataset) in 2017 and designed several baseline frameworks for kinship verification tasks and family identification tasks.
[0003] As far as the social relationship recognition task is concerned, most of the existing methods can be divided into two categories: based on environmental objects and based on multiple facial or body attributes. In the existing social relationship recognition literature, environmental objects are regarded as basic clues. Li et al. (2017) proposed a two-channel model for identifying social relationships in still images. The first channel makes a rough prediction of social relationships based on the appearance and geometric information of pairs of individuals. The second channel integrates an attention mechanism into the environmental objects generated by the region proposal network to refine the results of the coarse-grained prediction. Wang et al. (2018) developed an end-to-end trainable graph reasoning model that uses a gated graph neural network (GGNN) to propagate node information through the graph and introduces a new graph attention mechanism to reason about key environmental objects around people in the image.
[0004] Similarly, facial or body attributes can provide effective information for understanding social relationships in images. Sun et al. contributed the Double-Stream CaffeNet model for social domain or social relationship classification in 2017. From the perspective of social psychology, multiple attribute features of the face and body are collected to improve the accuracy of classification. These features are then concatenated into a vector as the input of the classifier. However, this cascade feature is high-dimensional and may contain noise and redundancy. Summary of the invention
[0005] The purpose of the present invention is to provide a social relationship recognition method and system based on deep supervised feature selection, which mainly focuses on social relationship tasks based on facial or body attributes, selects an optimal subset from multi-source features to remove noise, and improves the accuracy of social relationship recognition.
[0006] The technical solution to achieve the purpose of the present invention is: a social relationship identification method based on deep supervised feature selection, comprising the following steps:
[0007] Generate a representation of the relationship between two people through multiple feature extractors;
[0008] Deep learning algorithms and 2,1 The two paradigms are combined to select the optimal feature subset from multiple source features by learning a sparse weight matrix;
[0009] Using the selected features, a Softmax classifier is used to calculate the probability distribution of the input pairs on the social relationship categories;
[0010] Weight matrix sparse optimization, using l 2,1 Sparse weight matrix, removes redundant features, improves computational efficiency and recognition accuracy.
[0011] Furthermore, the deep learning algorithm is combined with 2,1 The optimal feature subset is selected from multi-source features by learning a sparse weighted matrix, which specifically includes the following steps:
[0012] For the group-based feature selection strategy, the selected features are expressed as
[0013]
[0014] where a i represents the characteristics of the i-th attribute, is the weight matrix corresponding to the attribute, k is the number of attributes, |a i | means a i The characteristic dimension, d s Represents attribute dimension;
[0015] For dimension-based feature selection, we concatenate the feature vectors of all attributes, i.e. The selected features can be rewritten as
[0016]
[0017] In the formula, and
[0018] Furthermore, the method of using the selected features and using a Softmax classifier to calculate the probability distribution of the input pair on the social relationship category specifically includes the following steps:
[0019] Using the optimal feature subset output by the feature selection module, the Softmax classifier is used to calculate the probability distribution of the input pair on the social relationship category; for the selected optimal feature subset f s , the probability calculation formula is:
[0020]
[0021] where p j is the jth element of vector p, indicating that the input pair belongs to relation c j The probability of M represents M categories.
[0022] Furthermore, the weight matrix sparse optimization specifically includes the following steps:
[0023] In each iteration, we extract B groups of portrait pairs represented as T and minimize the objective loss function L, as follows:
[0024]
[0025] where g t is the true relationship (label) of group t, The prediction of group t is g t The probability of W represents the weight matrix, which can be the weight w in the group-based feature selection strategy i Or weights in dimension-based feature selection strategies The first term in the above formula is the cross entropy loss function, which aims to train the Softmax classifier. The second term reg(·) represents the regularization of the weight matrix. The stochastic gradient descent algorithm is used to learn the optimal weights. In order to obtain the sparse weight matrix W, the regularization term of the loss function l is replaced by l 2,1 The norm indicates that the parameter α is used to balance its influence in the loss function; l 2,1 The norm is a norm function that is widely used in feature selection algorithms. It is mainly used to force our weight matrix to be as sparse as possible.
[0026] The group-based feature selection strategy selects feature subsets at the attribute level, and its regularization term can be written as:
[0027]
[0028] Where ||W i ||F is W iThe Frobenius norm of the dimension-based feature selection strategy is to select feature subsets at the dimension level. This strategy eliminates most of the redundancy. According to the above formula, the weight matrix Application 2,1 norm, its regularization term can be written as:
[0029]
[0030] In the formula, express The (r,c)th element of yes The c-th column vector of ; In order to ensure that the proposed strategy performs feature selection at the dimensionality level, we force each column in the weight matrix to be as sparse as possible.
[0031] A social relationship recognition system based on deep supervised feature selection, comprising:
[0032] The feature extraction module generates a representation of the relationship between two people through multiple feature extractors;
[0033] Feature selection module, combining deep learning algorithms with l 2,1 The two paradigms are combined to select the optimal feature subset from multiple source features by learning a sparse weight matrix;
[0034] The classification module uses the selected features and a Softmax classifier to calculate the probability distribution of the input pairs on the social relationship categories;
[0035] Weight matrix sparse optimization module, using l 2,1 The paradigm sparses the learned weight matrix and removes redundant features.
[0036] Compared with the prior art, the present invention has the following significant advantages:
[0037] (1) The present invention designs a novel deep supervised feature selection framework to automatically understand social relationships in images; (2) The present invention utilizes two feature selection strategies: group feature selection and dimension feature selection, to summarize the best feature subsets in attributes and dimensions, respectively; the selected best feature subsets have a better understood structure, which is conducive to investigating the contribution of different attributes. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is the DSFS workflow diagram. DETAILED DESCRIPTION
[0039] Social relations connect everyone in human society. Exploring social relations in static images helps to study the behaviors or characteristics between people. Existing literature has found that face and body attributes can provide objective semantic information for social relation recognition. However, they ignore the impact of attributes on recognition accuracy, and these multi-source attributes may contain redundancy and noise. The present invention aims to improve the accuracy of social relation recognition by more effectively extracting multi-source attribute features. To this end, the present invention proposes a new deep supervised feature selection (DSFS) framework to identify social relations in photos, which combines deep learning algorithms with l 2,1 The proposed DSFS framework is combined with the face and body attributes to learn a discriminative feature subset from multi-source features. Experimental results on the PIPA relational dataset qualitatively demonstrate the effectiveness of the proposed DSFS framework.
[0040] A social relationship recognition algorithm based on deep supervised feature selection of the present invention comprises the following steps:
[0041] Step 1, feature extraction: Generate a representation of the relationship between two people through multiple feature extractors; specifically, extract attribute features of the face and body regions as representations of the portrait pair through different feature extractors. In the feature extraction module, the present invention uses 12 types of face and body attributes, including face / body age, face / body gender, face / body position and proportion, face appearance, face posture, face emotion, body clothing, body intimacy, and body activity. Attribute features are extracted using the corresponding classification model, and all attribute features are used as representations of the input portrait pair;
[0042] Step 2, feature selection: This module combines deep learning algorithms with l 2,1 The paradigm is combined to select the optimal feature subset from the multi-source features by learning a sparse weight matrix to achieve the purpose of removing noise and redundancy in the multi-source features. In this invention, we use two feature selection strategies: group-based feature selection and dimension-based feature selection. Specifically, the purpose of the group-based feature selection strategy is to select the optimal feature subset based on the contribution of the attributes, and the dimension-based feature selection learns the optimal feature subset at a fine-grained level to eliminate most of the redundancy;
[0043] Step 3, classification: Using the selected features, a Softmax classifier (Iqbal et al., 2019) is used to calculate the probability distribution of the input pairs on the social relationship categories;
[0044] Step 4: Sparse optimization of the weight matrix, using l 2,1 Sparse weight matrix.
[0045] The present invention is further described in detail below with reference to the accompanying drawings and embodiments:
[0046] Example
[0047] A social relationship recognition method based on deep supervised feature selection, such as Figure 1 As shown, the method comprises the following steps:
[0048] Step 1) Use pre-trained Double-Stream CaffeNet (Sun et al., 2017; Jia et al., 2014), pre-trained CNN-CRF (Liu et al., 2015) or Multi-task RNN (Chu et al., 2015) models to extract facial and body attribute features. The position and scale attributes of the face / body are composed of spatial information, including position coordinates, relative distance and relative size ratio.
[0049] Step 2) The feature vectors of the 12 facial and body attributes obtained in step 1) are used as inputs of the feature selection module, and the optimal feature subset is selected using a group-based feature selection strategy and a dimension-based feature selection strategy.
[0050] For the group-based feature selection strategy, the selected features are expressed as
[0051]
[0052] where a i Represents one of the attribute characteristics, is the weight matrix corresponding to the attribute, and k is the number of attributes;
[0053] For dimension-based feature selection, we concatenate the feature vectors of all attributes, i.e. The selected features can be rewritten as
[0054]
[0055] In the formula, and
[0056] Step 3) Using the optimal feature subset output by the feature selection module, we use the Softmax classifier (Iqbal et al., 2019) to calculate the probability distribution of the input pair on the social relationship category. s The probability calculation formula is
[0057]
[0058] where p j is the jth element of vector p, indicating that the input pair belongs to relation c j The probability of M categories.
[0059] Step 4) To train our DSFS framework, in each iteration, we extract B sets of portrait pairs, denoted as T, and minimize the objective loss function L, as follows:
[0060]
[0061] where g t is the true relationship to t, and W represents the weight matrix, which can be the weight w in the group-based feature selection strategy i Or weights in dimension-based feature selection strategies The first term in formula (4) is the cross entropy loss function, which aims to train the Softmax classifier. The second term reg(·) represents the regularization of the weight matrix. We use the stochastic gradient descent algorithm to learn the optimal weights. In order to obtain the sparse weight matrix W, the regularization term of the loss function l is replaced by l 2,1 The norm indicates that the parameter α is used to balance its influence in the loss function. 2,1 The norm is a norm function widely used in feature selection algorithms (Li and Tang, 2015; Li et al., 2013), which is mainly to force our weight matrix to be as sparse as possible.
[0062] The group-based feature selection strategy is to select feature subsets at the attribute level. According to formula (1), its regularization term can be written as:
[0063]
[0064] Where ||W i ||F is W i The Frobenius norm of ; the dimension-based feature selection strategy is to select feature subsets at the dimension level, which eliminates most of the redundancy. According to formula (5), we have the weight matrix Application 21 norm, its regularization term can be written as
[0065]
[0066] In the formula, express The (r,c)th element of yes In order to ensure that the proposed strategy performs feature selection at the dimensionality level, we force each column in the weight matrix to be as sparse as possible.
[0067] Table 1
[0068]
[0069] As shown in Table 1, the comparison results of the three basic models and our proposed model on the PIPA-relation dataset are: Face+Softmax: only using facial features for training and Softmax classification, the result is 51.74%; Body+Softmax: only using body features for training and Softmax classification, the result is 58.25%;
[0070] Face+Body+SVM: Body and facial features are combined with SVM classification. The result is 57.20%; DSFS-Group and DSFS-Dimensional are the models we proposed, and the results are better than the above models.
[0071] The present invention also provides a social relationship identification system based on deep supervised feature selection, comprising:
[0072] The feature extraction module generates a representation of the relationship between two people through multiple feature extractors;
[0073] Feature selection module, combining deep learning algorithms with l 2,1 The two paradigms are combined to select the optimal feature subset from multiple source features by learning a sparse weight matrix;
[0074] The classification module uses the selected features and a Softmax classifier to calculate the probability distribution of the input pairs on the social relationship categories;
[0075] Weight matrix sparse optimization module, using l 2,1 The paradigm sparses the learned weight matrix and removes redundant features.
[0076] It should be pointed out that the implementation method of each module in the above-mentioned device is specifically described in the above-mentioned social relationship identification method based on deep supervised feature selection, and the present invention will not repeat it again.
[0077] Furthermore, the present invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned social relationship identification method based on deep supervised feature selection when executing the program.
[0078] And a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned social relationship identification method based on deep supervised feature selection.
[0079] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A social relationship recognition method based on deep supervised feature selection, characterized in that: The following steps are involved: Generate a representation of the relationship between two people through multiple feature extractors; Deep learning algorithms and 2,1 The two paradigms are combined to select the optimal feature subset from multiple source features by learning a sparse weight matrix; Using the selected features, a Softmax classifier is used to calculate the probability distribution of the input pairs on the social relationship categories; Weight matrix sparse optimization, using l 2,1 Sparse weight matrix, removes redundant features; The weight matrix sparse optimization specifically includes the following steps: In each iteration, B groups of portrait pairs are extracted and represented as T, and the objective loss function L is minimized, as follows: where g t is the true relation of group t, The prediction of group t is g t The probability of W represents the weight matrix, which can be the weight w in the group-based feature selection strategy i Or weights in dimension-based feature selection strategies The first term in the above formula is the cross entropy loss function, which aims to train the Softmax classifier. The second term reg(·) represents the regularization of the weight matrix. The stochastic gradient descent algorithm is used to learn the optimal weights. In order to obtain the sparse weight matrix W, the regularization term of the loss function l is replaced by l 2,1 The norm indicates that the parameter α is used to balance its influence in the loss function; The group-based feature selection strategy selects feature subsets at the attribute level, and its regularization term can be written as: Where ||W i ||F is W i The Frobenius norm of ; The dimension-based feature selection strategy is to select feature subsets at the dimension level; According to the above formula, the weight matrix Application 2,1 norm, its regularization term can be written as: In the formula, express The (r,c)th element of yes The c-th column vector of ; In order to ensure that the proposed strategy performs feature selection at the dimensional level, each column in the weight matrix is forced to be as sparse as possible.
2. The social relationship identification method based on deep supervised feature selection according to claim 1, characterized in that: The deep learning algorithm and 2,1 The optimal feature subset is selected from multi-source features by learning a sparse weighted matrix, which specifically includes the following steps: For the group-based feature selection strategy, the selected features are expressed as where a i represents the characteristics of the i-th attribute, is the weight matrix corresponding to the attribute, k is the number of attributes, |a i | means a i The characteristic dimension, d s Represents attribute dimension; For dimension-based feature selection, the feature vectors of all attributes are concatenated, that is, The selected features can be rewritten as In the formula, and 3. The social relationship identification method based on deep supervised feature selection according to claim 1, characterized in that: The method of using the selected features and using the Softmax classifier to calculate the probability distribution of the input pair on the social relationship category specifically includes the following steps: Using the optimal feature subset output by the feature selection module, the Softmax classifier is used to calculate the probability distribution of the input pair on the social relationship category; for the selected optimal feature subset f s , the probability calculation formula is: where p j is the jth element of vector p, indicating that the input pair belongs to relation c j The probability of M represents M categories.
4. A social relationship recognition system based on deep supervised feature selection, characterized in that: include: The feature extraction module generates a representation of the relationship between two people through multiple feature extractors; Feature selection module, combining deep learning algorithms with l 2,1 The two paradigms are combined to select the optimal feature subset from multiple source features by learning a sparse weight matrix; The classification module uses the selected features and a Softmax classifier to calculate the probability distribution of the input pairs on the social relationship categories; Weight matrix sparse optimization module, using l 2,1 The weight matrix learned by the paradigm sparsely removes redundant features, as follows: In each iteration, B groups of portrait pairs are extracted and represented as T, and the objective loss function L is minimized, as follows: where g t is the true relation of group t, The prediction of group t is g t The probability of W represents the weight matrix, which can be the weight w in the group-based feature selection strategy. i Or weights in dimension-based feature selection strategies The first term in the above formula is the cross entropy loss function, which aims to train the Softmax classifier. The second term reg(·) represents the regularization of the weight matrix. The stochastic gradient descent algorithm is used to learn the optimal weights. In order to obtain the sparse weight matrix W, the regularization term of the loss function l is replaced by l 2,1 The norm indicates that the parameter α is used to balance its influence in the loss function; The group-based feature selection strategy selects feature subsets at the attribute level, and its regularization term can be written as: Where ||W i ||F is W i The Frobenius norm of ; The dimension-based feature selection strategy is to select feature subsets at the dimension level; According to the above formula, the weight matrix Application 2,1 norm, its regularization term can be written as: In the formula, express The (r,c)th element of yes The c-th column vector of ; In order to ensure that the proposed strategy performs feature selection at the dimensional level, each column in the weight matrix is forced to be as sparse as possible.
5. The social relationship identification system based on deep supervised feature selection according to claim 4, characterized in that: The feature selection module combines the deep learning algorithm with l 2,1 The optimal feature subset is selected from multi-source features by learning a sparse weighted matrix, as follows: For the group-based feature selection strategy, the selected features are expressed as where a i represents the characteristics of the i-th attribute, is the weight matrix corresponding to the attribute, k is the number of attributes, |a i | means a i The characteristic dimension, d s Represents attribute dimension; For dimension-based feature selection, the feature vectors of all attributes are concatenated, that is, The selected features can be rewritten as In the formula, and 6. The social relationship identification system based on deep supervised feature selection according to claim 4, characterized in that: The classification module uses the selected features and a Softmax classifier to calculate the probability distribution of the input pair on the social relationship category, as follows: Using the optimal feature subset output by the feature selection module, the Softmax classifier is used to calculate the probability distribution of the input pair on the social relationship category; for the selected optimal feature subset f s , the probability calculation formula is: where p j is the jth element of vector p, indicating that the input pair belongs to relation c j The probability of M represents M categories.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the social relationship identification method based on deep supervised feature selection as described in any one of claims 1-3 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the social relationship identification method based on deep supervised feature selection as described in any one of claims 1 to 3 is implemented.
