Personnel identification method and related equipment

By extracting feature vectors from the capture files and performing classification model processing, housewives in the community are identified, and the problems of low efficiency and poor accuracy of housewives in the existing technology are solved, and efficient and accurate identification is achieved.

CN114445764BActive Publication Date: 2025-02-18SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111617906.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-02-18
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In the existing community management, housewives are inefficient in identification, mainly relying on manual inquiries and registration, which is time-consuming and labor-intensive, and has the problem of low identification accuracy.

Method used

By extracting feature vectors from the captured files of female personnel of preset age groups and entering a pre-trained classification model for processing, we can determine whether the target person is a home-based person and further identify whether he is a housewife to avoid manual inquiries and registration .

Benefits of technology

It improves the recognition efficiency and accuracy of housewives, avoids the situation where targets provide untrue information, and simplifies the management process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445764B_ABST
    Figure CN114445764B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method for identifying a person, including: obtaining a snapshot file of a target person, extracting a feature matrix corresponding to the target person from the snapshot file of the target person according to a preset extraction method, wherein the target person is a female person of a preset age group; inputting a feature vector into a pre-trained classification model for processing to obtain a classification result of the feature matrix, wherein the classification model is trained by a feature vector corresponding to a person at home in a second target area, wherein the second target area includes a first target area; and identifying whether the target person is a housewife according to the classification result of the feature vector. By taking a female person of a preset age group as the target person, extracting a feature matrix corresponding to the target person from the snapshot file of the target person, and inputting the feature matrix into a pre-trained classification model for processing, judging whether the target person is a housewife according to the classification result, no manual inquiry and registration are required, thereby improving the efficiency of identifying housewives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of community management, and in particular to a personnel identification method and related equipment. Background Art

[0002] With the development of cities, managing cities based on communities as population units can effectively reduce the difficulty of urban population management. For community security managers, implementing the occupational identity information of community residents can further reduce the difficulty of management, thereby improving management efficiency. Housewives (also known as full-time wives) refer to women aged 20 to 60 who do not work and stay at home to take care of the family. However, the main method for identifying housewives in the community is based on manual inquiry and registration, which is time-consuming and labor-intensive. Re-inquiry and registration are required for each update. Therefore, there is a problem of low efficiency in identifying housewives in the existing community management. Summary of the invention

[0003] The embodiment of the present invention provides a method for identifying persons. The method of the present invention is only used by the police for community management. Female persons of a preset age group are taken as target persons, and feature vectors corresponding to the target persons are extracted from the snapshot files of the target persons. The feature vectors are input into a pre-trained classification model for processing to determine whether the target person is a home-based person. In the case where the target person is a home-based person, the image information of the target person is obtained to further identify whether the target person is a housewife. No manual inquiry and registration are required, thereby improving the efficiency of identifying housewives. At the same time, since the feature vectors corresponding to the target person are extracted from the snapshot files to identify housewives, the situation where the target person provides false information is avoided, thereby improving the accuracy of identifying housewives.

[0004] In a first aspect, an embodiment of the present invention provides a method for identifying a person, the method comprising:

[0005] Acquire a snapshot file of a target person, and extract a feature matrix of the target person on a working day from the snapshot file of the target person according to a preset extraction method, wherein the snapshot file of the target person is a snapshot file of the target person in a first target area, and the target person is a female person of a preset age group;

[0006] Inputting the feature matrix into a pre-trained classification model for processing to obtain a classification result of the feature matrix, wherein the classification model is trained by a feature matrix corresponding to a person at home in a second target area, and the second target area includes the first target area;

[0007] According to the classification result of the feature matrix, it is identified whether the target person is a housewife.

[0008] Optionally, the feature matrix includes a feature vector of the target person, the feature vector is composed of different types of sub-feature vectors, each sub-feature vector corresponds to an extraction method, and extracting the feature vector corresponding to the target person from the captured file according to the preset extraction method includes:

[0009] Extracting sub-feature vectors of the target person from the captured files according to various extraction methods;

[0010] The sub-feature vectors of the target person are concatenated in a preset order to obtain a feature vector corresponding to the target person;

[0011] A feature matrix of the target person is constructed according to the feature vector corresponding to the target person.

[0012] Optionally, the identifying whether the target person is a housewife according to the classification result of the feature vector includes:

[0013] If the classification result of the feature matrix is ​​a person at home, then extracting the behavior information corresponding to the target person from the snapshot file of the target person, wherein the behavior information corresponding to the target person is extracted based on the image information corresponding to the target person;

[0014] Identify whether the target person is a housewife based on the behavior information.

[0015] Optionally, extracting behavior information corresponding to the target person according to the image information corresponding to the target person includes:

[0016] Extracting image information corresponding to the target person from the captured file of the target person, and performing behavior detection on the image information corresponding to the target person, wherein the behavior detected by the behavior detection includes at least one of buying groceries and taking care of children;

[0017] The step of identifying whether the target person is a housewife according to the behavior information includes:

[0018] If it is detected that the image information corresponding to the target person includes at least one of grocery shopping and child-raising, then whether the target person is a housewife is identified based on at least one of the grocery shopping and child-raising behaviors.

[0019] Optionally, the performing behavior detection on the image information corresponding to the target person includes:

[0020] Performing face detection and body detection on the image information corresponding to the target person to obtain a face detection frame and a body detection frame;

[0021] Matching the face detection frame with the body detection frame, and determining the body detection frame of the target person through the face image in the face detection frame;

[0022] Behavior detection is performed on the human body image in the human body detection frame of the target person, and the behaviors detected by the behavior detection include grocery shopping behavior and child-raising behavior.

[0023] Optionally, the performing behavior detection on the human body image in the human body detection frame of the target person includes:

[0024] Expanding the human body detection frame of the target person in a preset direction to obtain an expanded human body detection frame;

[0025] Behavior detection is performed on the human image in the expanded human detection frame.

[0026] Optionally, the step of identifying whether the target person is a housewife based on at least one of the behaviors of shopping for groceries and taking care of children includes:

[0027] Calculate the ratio of the number of days when the target person is captured engaging in at least one of the behaviors of shopping for groceries and taking care of children to the total number of days when the target person is captured;

[0028] It is identified whether the target person is a housewife according to the day ratio.

[0029] In a second aspect, an embodiment of the present invention provides a person identification device, the device comprising:

[0030] A first acquisition module is used to acquire a snapshot file of a target person, and extract a feature matrix of the target person on a working day from the snapshot file of the target person according to a preset extraction method, wherein the snapshot file of the target person is a snapshot file of the target person in a first target area, and the target person is a female person of a preset age group;

[0031] a processing module, configured to input the feature matrix into a pre-trained classification model for processing to obtain a classification result of the feature matrix, wherein the classification model is trained by a feature matrix corresponding to permanent residents in a second target area, wherein the second target area includes the first target area;

[0032] The recognition module is used to extract the image information corresponding to the target person from the captured file of the target person if the classification result of the feature matrix is ​​a home-based person, and to identify whether the target person is a housewife based on the image information.

[0033] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the personnel identification method provided in the embodiment of the present invention when executing the computer program.

[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the personnel identification method provided in the embodiment of the invention are implemented.

[0035] In an embodiment of the present invention, a snapshot file of a target person is obtained, and a feature matrix corresponding to the target person is extracted from the snapshot file of the target person according to a preset extraction method. The snapshot file of the target person is a snapshot file of the target person in a first target area, and the target person is a female person of a preset age group; the feature matrix is ​​input into a pre-trained classification model for processing to obtain a classification result of the feature matrix, and the classification model is obtained by training the feature matrix corresponding to the home-based person in the second target area, and the second target area includes the first target area; according to the classification result of the feature matrix, it is identified whether the target person is a housewife. By taking a female person of a preset age group as the target person, extracting the feature matrix corresponding to the target person from the snapshot file of the target person, and inputting the feature matrix into the pre-trained classification model for processing, it is determined whether the target person is a home-based person, without manual inquiry and registration, thereby improving the efficiency of identifying housewives. At the same time, since the feature matrix corresponding to the target person is extracted from the snapshot file to identify the housewife, it is avoided that the target person provides false information, thereby improving the accuracy of identifying the housewife. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 It is a flowchart of a method for identifying a person provided by an embodiment of the present invention;

[0038] Figure 2 is a schematic diagram of face and body matching provided by an embodiment of the present invention;

[0039] Figure 3 This is a flow chart of face and body matching provided by an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of a human body detection frame expansion provided by an embodiment of the present invention;

[0041] Figure 5 is a structural schematic diagram of a personnel identification device provided by an embodiment of the present invention;

[0042] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] See also Figure 1 , Figure 1 is a flow chart of a personnel identification method provided by an embodiment of the present invention, such as Figure 1 As shown, the person identification method is used for identifying a housewife, and includes:

[0045] 101. Obtain a snapshot file of a target person, and extract a feature matrix of the target person on a working day from the snapshot file of the target person according to a preset extraction method.

[0046] The captured files of the target person are the captured files of the target person in the first target area. The first target area may be a community or an area where multiple communities are located. Further, front-end acquisition devices are installed at different positions in the first target area. The front-end acquisition devices are used to collect images of the corresponding monitoring area, and the portrait captured information of the captured person is extracted from the collected images. In this way, the portrait captured information with time attributes of different captured persons can be collected at different time points by the front-end acquisition devices at different positions in the first target area. Since different front-end acquisition devices are installed at different positions, different front-end acquisition devices have different spatial position attributes. In this way, when the front-end acquisition devices accumulate a certain time span, the collected portrait data has time and space attributes. The target person may be one or more captured persons, and the target person is a female person of a preset age group. The target person may be a female person of a preset age group specified by a user, or may be a female person of a preset age group who is not determined as a housewife and is regularly determined as a target person. Among them, the preset age group may be 20 to 60 years old.

[0047] The above-mentioned snapshot archive is the portrait snapshot information of the captured person extracted from the images of each monitoring area in the first target area collected by the front-end acquisition device. The portrait snapshot information may include the identity information, capture location, capture time and capture image of the captured person, wherein the identity information can be obtained in the identity database by the face feature comparison method, the identity information may include age information and gender information, the capture location may be the installation location of the front-end acquisition device, the capture time is the time when the image is captured, the captured image may include the original captured image as well as the face image and the body image, wherein the original captured image may also be called a large portrait image, the large portrait image may include multiple captured persons, the face image only includes the face of the corresponding captured person, the body image only includes the body of the corresponding captured person, and the face image and body image of the captured person can be extracted by performing face detection and body detection from the original snapshot image.

[0048] Optionally, face detection and body detection may be performed on the image information corresponding to the target person to obtain a face detection frame and a body detection frame; the face detection frame and the body detection frame are matched, and the body detection frame of the target person is determined through the face image in the face detection frame.

[0049] In an embodiment of the present invention, the image information may be a large portrait image of a front-end acquisition device. Multiple persons may appear in the large portrait image of the front-end acquisition device, and the detection tasks of the face frame and the body frame are completed independently. In addition, the current snapshot files of one person are mainly aggregated by facial features, so it is necessary to match the face and the body accordingly, that is, to associate the personnel files with the face and the body. An embodiment of the present invention proposes a fast matching process for faces and bodies, which can quickly associate faces and bodies. For details, please refer to Figure 2 , Figure 2 is a schematic diagram of face and body matching provided by an embodiment of the present invention, such as Figure 2 As shown, the face and the body are detected in the large portrait image by image detection technology, and the face detection frame and the body detection frame are obtained. The coordinates of the single face detection frame of the target person in the large portrait image are matched with the coordinates of all the detected body detection frames in the entire large portrait image. When the ratio of the face detection frame to the body detection frame (also called the head-to-body ratio) is less than a preset threshold value α, the corresponding face detection frame is determined to match the body detection frame. In a possible embodiment, when the ratio of the height of the face detection frame to the height of the body detection frame is less than a preset threshold value first threshold value α, and the upper and lower interval ratio of the face detection frame to the body detection frame is also less than a preset second threshold value β, the corresponding face detection frame is determined to match the body detection frame. Or when the ratio of the face detection frame to the body detection frame is greater than the preset threshold value α, the corresponding face detection frame is determined to match the body detection frame.

[0050] For details, please refer to Figure 3 , Figure 3 is a flowchart of face and body matching provided by an embodiment of the present invention. Figure 3 In the process, the face frame to be matched (face detection frame to be matched) and all the human frames (human detection frames) in the same portrait image are compared; whether there is a human frame containing the face frame; if there is no human frame containing the face frame, return empty; if there is a human frame containing the face frame, calculate the head-to-body ratio r1 and the upper and lower interval ratio r2; determine whether there is only one human frame containing the face frame; if there is only one human frame containing the face frame, determine whether the set conditions are met, and the set conditions are: if the head-to-body ratio r1≤α, the upper and lower interval ratio r2<β, or if the head-to-body ratio r1 When >α, no requirement is imposed on the upper-lower interval ratio r2; if the set condition is not met, empty is returned; if the set condition is met, the matched human frame is returned; if more than one human frame contains the face frame, the human frame with the upper-lower interval ratio r2 closest to 0.1 is selected; it is determined whether the human frame with the upper-lower interval ratio r2 closest to 0.1 meets the set condition; if the human frame with the upper-lower interval ratio r2 closest to 0.1 does not meet the set condition, empty is returned; if the human frame with the upper-lower interval ratio r2 closest to 0.1 meets the set condition, the matched human frame is returned.

[0051] Optionally, portrait snapshot information of the first target area can be obtained; based on the portrait snapshot information of the first target area, a corresponding snapshot file can be established for the captured person. Specifically, the portrait snapshot information of the captured person can be extracted from the images of all captured persons in the first target area, and a snapshot file can be established for each captured person according to the one-person-one-file establishment rule. By establishing snapshot files for different captured persons, all portrait snapshot information of the same captured person can be aggregated into the same snapshot file, forming spatiotemporal data information of each captured person collected by the front-end device at different locations and times.

[0052] Furthermore, portrait features can be used to aggregate all portrait snapshot information of the same captured person into the same snapshot file, and portrait snapshot information of different captured persons into different snapshot files. Different file identifiers can be set for the snapshot files of different captured persons to facilitate the management and search of snapshot files. The file identifier can be a file ID or a facial feature value of the captured person corresponding to the file.

[0053] It should be noted that since the snapshot file includes the spatiotemporal data information of the corresponding captured person collected by the front-end device at different locations and times, the snapshot file has attributes in the spatiotemporal dimension. Therefore, the feature matrix extracted from the snapshot file of the target person also has certain spatiotemporal attributes.

[0054] The above-mentioned preset extraction method can be to extract the identity information, capture location, capture time and capture image of the captured person in the capture file as features to obtain a feature matrix based on the capture file, or it can be to perform regularity analysis on the portrait capture information in the capture file, extract features from the capture file based on the results of the regularity analysis, obtain a feature vector based on the rule, and then construct a corresponding feature matrix based on the feature vector based on the rule.

[0055] The above-mentioned feature matrix is ​​composed of feature vectors of target persons. The above-mentioned feature matrix can be an n×m matrix, where n represents the number of target persons and m represents that the dimension of the feature vector corresponding to one target person is m.

[0056] It should be noted that, in the embodiment of the present invention, the corresponding target person is identified as a housewife in the community through the snapshot file, that is, whether the target person is a housewife living in the first target area is identified. A housewife refers to a home-based woman aged between 20 and 60 who does not work and stays at home to take care of the family. The age and gender of the target person can be obtained through the identity information of the captured person in the portrait snapshot information. The identity information can be obtained in the identity database through the method of facial feature comparison. The identity information may include age information and gender information.

[0057] In the embodiment of the present invention, a housewife is a person who stays at home (not an office worker), so whether the target person is a housewife can be identified by identifying whether the target person is a home worker. The feature matrix can be extracted using the spatiotemporal data (snapshot files) of the target person on working days. It is very difficult to distinguish between office workers and home workers in terms of activity patterns on non-working days. There is little difference in the travel patterns of office workers or home workers on non-working days.

[0058] Optionally, the feature matrix includes a feature vector of the target person, the feature vector is composed of different types of sub-feature vectors, each sub-feature vector corresponds to an extraction method, and the sub-feature vector of the target person can be extracted from the snapshot file according to each extraction method; the sub-feature vectors of the target person are spliced ​​in a preset order to obtain the feature vector corresponding to the target person; and the feature matrix of the target person is constructed according to the feature vector corresponding to the target person. Features of multiple dimensions (multiple types of sub-feature vectors) can effectively express the activity pattern characteristics of community workers and home workers, and all people in the community can be distinguished into workers and home workers through the activity pattern characteristics of these dimensions.

[0059] In the feature vector based on the snapshot archive, the sub-feature vector can be a sub-feature vector corresponding to the identity information, the snapshot location, the snapshot time and the snapshot image. Specifically, the method for extracting each sub-feature vector can extract the identity information from the snapshot archive and encode it into an identity feature vector x, extract the snapshot location from the snapshot archive and encode it into a location feature vector d, extract the snapshot time from the snapshot archive and encode it into a time feature vector t, extract the companion feature vector s from the snapshot image in the snapshot archive, etc., concatenate the identity feature vector, location feature vector, time feature vector and companion feature vector in sequence to obtain a feature vector (x, d, t, s), and construct a feature matrix n×(x, d, t, s) based on the feature vector (x, d, t, s).

[0060] Optionally, in an embodiment of the present invention, the feature matrix is ​​preferably a feature matrix based on a rule. Specifically, the captured files of people at home and those at work in the first target area or the second target area are obtained; based on the captured files of people at home and those at work, the activity rules of people at home and those at work in the first target area or the second target area are compared and analyzed; based on the results of the comparative analysis, the activity rule type of people at home is determined; based on the activity rule type of people at home, the required sub-feature vector type is determined, and the extraction method of each type of sub-feature vector is determined based on the activity rule type of people at home.

[0061] The first target area may be an area where a community or multiple communities are located, and the second target area may be an area having certain common attributes with the first target area. For example, if the first target area is a community in the south, then the second target area is all communities in the south. If the front-end acquisition device of the first target area is a depth camera, then the second target area is all communities whose front-end acquisition devices are depth cameras.

[0062] It should be noted that, in the embodiment of the present invention, a snapshot file is created for each person being captured. Therefore, not only people at home have corresponding snapshot files, but people at work also have corresponding snapshot files.

[0063] The above-mentioned comparative analysis of the activity patterns of the home-based people and the activity patterns of the working people in the first target area or the second target area based on the snapshot files of the home-based people and the snapshot files of the working people can be conducted by expert judgment or big data analysis, so as to extract the activity patterns of the home-based people and the activity patterns of the working people. It is understandable that there are certain differences in the daily behaviors of the home-based people and the working people in the community on weekdays when entering and leaving the community. The activity patterns of the home-based people in the community on weekdays have certain commonalities, such as the number of days they appear in the community on weekdays, the number of times they appear, the camera preferences they appear, the time points when they appear frequently, etc., which have certain similarities and clustering, and are obviously different from the working people.

[0064] Experts can summarize and organize the activity pattern characteristics of people at home and people working in the community to obtain the activity patterns of people at home and people working in the community.

[0065] It is also possible to extract the commonalities of the activity patterns of people at home and people at work in the community through big data analysis, and then extract the differences between the activity patterns of people at home and people at work in the community as characteristics, thereby eliminating the same types of activity patterns of people at home and people at work, and obtaining the activity pattern types of people at home.

[0066] Different types of activity patterns can also be set for people at home and people at work. Through clustering algorithms, it is calculated which types of activity patterns people at home tend to cluster in and which types of activity patterns people at work tend to cluster in, thereby determining the types of activity patterns for people at home.

[0067] In an embodiment of the present invention, the difference between the activity patterns of the above-mentioned people at home and the activity patterns of the people at work can be reflected in the proportion of snapshots in different time zones, the number of snapshots in different time zones, the distribution of front-end acquisition devices, the total number of snapshots, the degree of time discreteness, the degree of space discreteness, etc. Specifically, the method for extracting the sub-feature vectors corresponding to the above-mentioned types of activity patterns can be shown in the following Table 1:

[0068] Table 1

[0069]

[0070]

[0071] In the above Table 1, the types of activity patterns of people at home are the proportion of snapshots at [17,24) points, the proportion of snapshots at [10,17) points, the proportion of snapshots at [5,10) points, the number of snapshots at [17,24) points, the number of snapshots at [10,17) points, the number of snapshots at [5,10) points, the proportion of snapshots at [5,10) points that are outside the community, the proportion of snapshots at [17,24) points that are entering the community, the average number of front-end acquisition devices that capture them every day, the number of front-end acquisition devices in all snapshots, the total number of snapshots, the degree of dispersion of the snapshot time dimension (KL divergence), and the degree of dispersion of the snapshot location dimension (KL divergence). There are a total of 13 activity pattern types, corresponding to 13 sub-feature vectors and extraction methods. At this time, based on Table 1, the dimension of the feature vector of the target person is 13. In this embodiment of the present invention, the sub-feature vector of age can be added, and the dimension of the feature vector of the target person is 14.

[0072] 102. Input the feature matrix into a pre-trained classification model for processing to obtain a classification result of the feature matrix.

[0073] In an embodiment of the present invention, the classification model is trained by a feature matrix corresponding to the people at home in the second target area, and the second target area includes the first target area. Of course, the second target area may also be the first target area. The second target area may be an area having some of the same attributes as the first target area. For example, if the first target area is a community in the south, then the second target area is all communities in the south. If the front-end acquisition device of the first target area is a depth camera, then the second target area is all communities whose front-end acquisition devices are depth cameras.

[0074] The above classification model is used to classify the target person, and predict the target person as a home person or an office person according to the feature vector of the target person.

[0075] Optionally, a corresponding classification model can be constructed based on the number of people living at home in the first target area or the second target area; a data set for training can be constructed based on the feature matrix corresponding to the people living at home in the second target area and the labels of the people living at home; and the constructed classification model can be trained using the data set to obtain a trained classification model.

[0076] The first target area can be the current community where personnel identification is required, and the second target area can be multiple communities with the same attributes as the current community. The classification model can select the corresponding classification model according to the actual situation, for example, the number of labels can be referred to. When the amount of data on home and office personnel registered in the community is large, a traditional machine learning model can be constructed as a classification model, such as a random forest, support vector machine and other machine learning models; when the amount of registered label data is small, a model based on a semi-supervised method or a clustering method can be constructed as a classification model, such as a semi-supervised classification model based on a label propagation algorithm or a clustering model based on K-means.

[0077] In the embodiment of the present invention, it is considered that there may be certain differences in the activity patterns of different regions, such as communities in the north and the south, and there may be certain differences in the travel of people at home, especially the seasonal influence. According to different communities, the commonalities and characteristics of the communities in the current region are learned by using the registered label information of the community, so that the classification model can be further improved in recognition accuracy. At the same time, considering that there may be large differences in the installation of front-end acquisition equipment in different communities, it is difficult to learn a highly robust classification model that considers all aspects. In the embodiment of the present invention, after training the classification model in different communities, the captured persons in each community are predicted, which can effectively avoid the differences in the front-end acquisition equipment, so that the classification model can learn the inherent characteristics of the current community more targeted.

[0078] The above classification model can be a binary classification model, which is used to identify the captured person as two categories: home-based persons or office-based persons. The trained binary classification model is denoted as F(·), and the mathematical function expression relationship is as follows:

[0079] y=F(X)

[0080] Where X represents the extracted activity pattern features, which is an n×m matrix, n represents the number of target personnel, and m represents the feature matrix based on the activity pattern. In the embodiment of the present invention, a 14-dimensional feature vector is used, so the value of m here can be 14. y is the output result of the binary classification model, and the value range is a discrete value with only 2 values, which can be represented as one of the home personnel or the office personnel. For example, the value of y is defined as 0 and 1, 1 represents the home personnel, and 0 represents the office personnel. The result of y is an n-dimensional vector with only 0 and 1 values, which expresses whether the n personnel files are home personnel or office personnel.

[0081] The binary classification model F(·) needs to be trained before actual use to obtain the specific parameters of the trained binary classification model. The training process requires labeling a certain number of label data of people at home and people at work. The label data is y *, and then extract the feature vectors of the people at home and those at work with label data. For example, the m-dimensional feature vector above can be used to obtain the n×m feature matrix X * . The feature matrix X * Input it into the constructed binary classification model to obtain the output y of the binary classification model, and calculate the output y and the label data as y * The error is minimized and iterative training is performed with the goal of minimizing the error loss until the binary classification model converges or reaches the preset number of times to obtain a trained binary classification model.

[0082] After the feature matrix n×m is input into the classification model, the classification model will output the corresponding classification result, which can be (z1, z2, ... zn), where z1 represents the classification result of the first target person, z2 represents the classification result of the second target person, and zn represents the classification result of the nth target person. Currently, when there is only one target person (n=1), the classification result output is z1.

[0083] 103. Based on the classification results of the feature matrix, identify whether the target person is a housewife.

[0084] After inputting the feature matrix n×m of the target persons in the first target area into the classification model, the classification model will output the corresponding classification results, which can be (z1, z2, ...zn), where z1 represents the classification result of the first target person. If z1=1, it means that the first target person is a home-based person in the first target area; if z1=0, it means that the first target person is an office worker in the first target area; z2 represents the classification result of the second target person. If z2=1, it means that the second target person is a home-based person in the first target area; if z2=0, it means that the second target person is an office worker in the first target area; zn represents the classification result of the nth target person. If zn=1, it means that the nth target person is a home-based person in the first target area; if zn=0, it means that the nth target person is an office worker in the first target area.

[0085] Optionally, if the classification result of the feature matrix is ​​a home-based person, or if the classification result of the feature vector of the target person is a home-based person, then the behavior information corresponding to the target person is extracted from the captured file of the target person, and the behavior information corresponding to the target person is extracted based on the image information corresponding to the target person; and whether the target person is a housewife is identified based on the behavior information.

[0086] The above-mentioned behavior information may be behaviors specific to housewives, such as taking care of children, buying groceries, chatting in the community, and the like.

[0087] Optionally, image information corresponding to the target person is extracted from the captured file of the target person, and behavior detection is performed on the image information corresponding to the target person, and the behaviors detected by the behavior detection include at least one of buying groceries and taking care of children; if it is detected that at least one of the buying groceries and taking care of children is present in the image information corresponding to the target person, then it is identified whether the target person is a housewife based on at least one of the buying groceries and taking care of children.

[0088] In an embodiment of the present invention, the image information may be a large portrait image captured by a front-end acquisition device. After the above-mentioned face and body matching process, the matched face detection frame and body detection frame data are output. That is, at this time, there is a large portrait image captured by the front-end acquisition device and the coordinates of the matched face detection frame and body detection frame therein, and thus the coordinate position of each captured person's file in the corresponding large portrait image is obtained, and the coordinate position is the coordinate position of the entire body detection frame.

[0089] Optionally, face detection and body detection can be performed on the image information corresponding to the target person to obtain a face detection frame and a body detection frame; the face detection frame is matched with the body detection frame, and the body detection frame of the target person is determined through the face image in the face detection frame; behavior detection is performed on the body image in the body detection frame of the target person, and the behaviors detected by the behavior detection include grocery shopping behavior and child-raising behavior.

[0090] Specifically, a classification model can be used to perform behavior detection on the image information corresponding to the target person. The classification model can be expressed by the following formula:

[0091] y`=F`(x`)

[0092] Among them, x' is the input of the model, which is the image in the human body detection frame, and y' is the output result of the model, whether there is any behavior of buying groceries or taking care of children. Specifically, the binary classification model F'(·) of the present invention adopts a deep convolutional network structure, which can be a resnet50 network structure. By marking a certain number of images with the behavior of buying groceries or taking care of children as positive samples, and training with pictures without buying groceries or taking care of children as negative samples, the parameters of the resnet50 classification model are obtained, so as to predict all other pictures.

[0093] Optionally, the human body detection frame of the target person can be expanded in a preset direction to obtain an expanded human body detection frame; and behavior detection can be performed on the human body image in the expanded human body detection frame. The above expansion of the human body detection frame in the preset direction can be understood as preprocessing of the human body detection frame, and the preset direction can be the two sides of the human body detection frame. Due to the addition of the preprocessing process of expanding the human body detection frame in the preset direction, the classification effect is better than that obtained by directly inputting the image into the human body detection frame. Because when buying groceries or taking care of children occurs, there will be corresponding visual representations occurring near the human body, and using only the image of the human body frame cannot be well learned. For example, carrying a bag of food or holding a child often exceeds the human body frame area in visual representation. The embodiment of the invention can expand the original human body frame to the left and right by a certain threshold ratio γ, that is, expand the original human body frame to the left and right by a certain ratio, and obtain a larger area centered on the original human body frame as input, which improves the accuracy of classification, thereby improving the accuracy of behavior detection. The expansion of the human body detection frame can be as follows Figure 4 shown.

[0094] Optionally, the ratio of the number of days in which the target person is captured doing at least one of buying groceries and taking care of children to the total number of days in which the target person is captured can be calculated; and whether the target person is a housewife can be identified based on the ratio of the number of days. When the ratio of the number of days in which the target person is captured doing at least one of buying groceries and taking care of children to the total number of days in which the target person is captured is greater than a certain value, it means that the target person has a high number of occurrences of at least one of buying groceries and taking care of children, which meets the characteristics of a housewife. Therefore, it can be more accurately identified whether the target person is a housewife.

[0095] Specifically, calculate the number of days t in which the target person's snapshot files contain the behavior of buying groceries or taking care of children * , and the total number of days t that the target person was captured. When t * When the value of / t exceeds the preset threshold δ, the woman is judged as a housewife. The specific calculation method is as follows:

[0096]

[0097] Final result judgment method:

[0098] When δ * >δ, the target person is identified as a housewife;

[0099] When δ * When ≤δ, the target person is identified as a non-housewife.

[0100] In an embodiment of the present invention, a snapshot file of a target person is obtained, and a feature matrix corresponding to the target person is extracted from the snapshot file of the target person according to a preset extraction method. The snapshot file of the target person is a snapshot file of the target person in a first target area, and the target person is a female person of a preset age group; the feature matrix is ​​input into a pre-trained classification model for processing to obtain a classification result of the feature matrix, and the classification model is obtained by training the feature matrix corresponding to the home-based person in the second target area, and the second target area includes the first target area; according to the classification result of the feature matrix, it is identified whether the target person is a housewife. By taking a female person of a preset age group as the target person, extracting the feature matrix corresponding to the target person from the snapshot file of the target person, and inputting the feature matrix into the pre-trained classification model for processing, it is determined whether the target person is a home-based person, without manual inquiry and registration, thereby improving the efficiency of identifying housewives. At the same time, since the feature matrix corresponding to the target person is extracted from the snapshot file to identify the housewife, it is avoided that the target person provides false information, thereby improving the accuracy of identifying the housewife.

[0101] It should be noted that the personnel identification method provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can perform personnel identification.

[0102] See also Figure 5 , Figure 5 is a structural diagram of a personnel identification device provided by an embodiment of the present invention, such as Figure 5 As shown, the personnel identification device includes:

[0103] The first acquisition module 501 is used to acquire a snapshot file of a target person, and extract a feature matrix of the target person on a working day from the snapshot file of the target person according to a preset extraction method, wherein the snapshot file of the target person is a snapshot file of the target person in a first target area, and the target person is a female person of a preset age group;

[0104] A processing module 502 is used to input the feature matrix into a pre-trained classification model for processing to obtain a classification result of the feature matrix, wherein the classification model is trained by the feature matrix corresponding to the permanent residents in the second target area, and the second target area includes the first target area;

[0105] The identification module 503 is used to extract the image information corresponding to the target person from the snapshot file of the target person if the classification result of the feature matrix is ​​a home-based person, and identify whether the target person is a housewife based on the image information.

[0106] Optionally, the feature matrix includes a feature vector of the target person, the feature vector is composed of different types of sub-feature vectors, each sub-feature vector corresponds to an extraction method, and the first acquisition module 501 includes:

[0107] A first extraction submodule, used for extracting the sub-feature vector of the target person from the captured file according to various extraction methods;

[0108] A splicing submodule, used to splice the sub-feature vectors of the target person in a preset order to obtain a feature vector corresponding to the target person;

[0109] The construction submodule is used to construct a feature matrix of the target person according to the feature vector corresponding to the target person.

[0110] Optionally, the identification module 503 includes:

[0111] A second extraction submodule is used for extracting the behavior information corresponding to the target person from the captured file of the target person if the classification result of the feature matrix is ​​a person at home, wherein the behavior information corresponding to the target person is extracted based on the image information corresponding to the target person;

[0112] The identification submodule is used to identify whether the target person is a housewife based on the behavior information.

[0113] Optionally, the second extraction submodule is further used to extract image information corresponding to the target person from the captured file of the target person, and perform behavior detection on the image information corresponding to the target person, wherein the behavior detected by the behavior detection includes at least one of buying groceries and taking care of children;

[0114] The identification submodule is also used to identify whether the target person is a housewife based on at least one of the behaviors of buying groceries and taking care of children if it is detected that the image information corresponding to the target person contains at least one of the behaviors of buying groceries and taking care of children.

[0115] Optionally, the second extraction submodule includes:

[0116] A first detection unit is used to perform face detection and body detection on the image information corresponding to the target person to obtain a face detection frame and a body detection frame;

[0117] A matching unit, used to match the face detection frame with the body detection frame, and determine the body detection frame of the target person through the face image in the face detection frame;

[0118] The second detection unit is used to perform behavior detection on the human body image in the human body detection frame of the target person, and the behaviors detected by the behavior detection include grocery shopping behavior and child-raising behavior.

[0119] Optionally, the second detection unit includes:

[0120] An expansion subunit, used to expand the human body detection frame of the target person in a preset direction to obtain an expanded human body detection frame;

[0121] The detection subunit is used to perform behavior detection on the human image in the expanded human detection frame.

[0122] Optionally, the identification submodule includes:

[0123] a calculation unit, used for calculating the ratio of the number of days when the target person is captured with at least one of the behaviors of shopping for groceries and taking care of children to the total number of days when the target person is captured;

[0124] An identification unit is used to identify whether the target person is a housewife according to the day ratio.

[0125] It should be noted that the personnel identification device provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can perform personnel identification.

[0126] The personnel identification device provided in the embodiment of the present invention can implement each process implemented by the personnel identification method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.

[0127] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 6 As shown, it includes: a memory 602, a processor 601, and a computer program of a personnel identification method stored in the memory 602 and executable on the processor 601, wherein:

[0128] The processor 601 is used to call the computer program stored in the memory 602 to perform the following steps:

[0129] Acquire a snapshot file of a target person, and extract a feature matrix of the target person on a working day from the snapshot file of the target person according to a preset extraction method, wherein the snapshot file of the target person is a snapshot file of the target person in a first target area, and the target person is a female person of a preset age group;

[0130] Inputting the feature matrix into a pre-trained classification model for processing to obtain a classification result of the feature matrix, wherein the classification model is trained by a feature matrix corresponding to a person at home in a second target area, and the second target area includes the first target area;

[0131] According to the classification result of the feature matrix, it is identified whether the target person is a housewife.

[0132] Optionally, the feature matrix includes a feature vector of the target person, the feature vector is composed of different types of sub-feature vectors, each sub-feature vector corresponds to an extraction method, and the processor 601 executes the extraction of the feature vector corresponding to the target person from the captured file according to the preset extraction method, including:

[0133] Extracting sub-feature vectors of the target person from the captured files according to various extraction methods;

[0134] The sub-feature vectors of the target person are concatenated in a preset order to obtain a feature vector corresponding to the target person;

[0135] A feature matrix of the target person is constructed according to the feature vector corresponding to the target person.

[0136] Optionally, the processor 601 performs the step of identifying whether the target person is a housewife based on the classification result of the feature matrix, including:

[0137] If the classification result of the feature matrix is ​​a person at home, then extracting the behavior information corresponding to the target person from the snapshot file of the target person, wherein the behavior information corresponding to the target person is extracted based on the image information corresponding to the target person;

[0138] Identify whether the target person is a housewife based on the behavior information.

[0139] Optionally, the extracting, by the processor 601, obtaining behavior information corresponding to the target person according to the image information corresponding to the target person includes:

[0140] Extracting image information corresponding to the target person from the captured file of the target person, and performing behavior detection on the image information corresponding to the target person, wherein the behavior detected by the behavior detection includes at least one of buying groceries and taking care of children;

[0141] The step of identifying whether the target person is a housewife according to the behavior information includes:

[0142] If it is detected that the image information corresponding to the target person includes at least one of grocery shopping and child-raising, then whether the target person is a housewife is identified based on at least one of the grocery shopping and child-raising behaviors.

[0143] Optionally, the performing of behavior detection on the image information corresponding to the target person performed by the processor 601 includes:

[0144] Performing face detection and body detection on the image information corresponding to the target person to obtain a face detection frame and a body detection frame;

[0145] Matching the face detection frame with the body detection frame, and determining the body detection frame of the target person through the face image in the face detection frame;

[0146] Behavior detection is performed on the human image in the human detection frame of the target person, and the behaviors detected by the behavior detection include grocery shopping behavior and child-raising behavior.

[0147] Optionally, the performing of behavior detection on the human body image in the human body detection frame of the target person performed by the processor 601 includes:

[0148] Expanding the human body detection frame of the target person in a preset direction to obtain an expanded human body detection frame;

[0149] Behavior detection is performed on the human image in the expanded human detection frame.

[0150] Optionally, the processor 601 performs the step of identifying whether the target person is a housewife according to at least one of the behaviors of shopping for groceries and taking care of children, including:

[0151] Calculate the ratio of the number of days when the target person is captured engaging in at least one of the behaviors of shopping for groceries and taking care of children to the total number of days when the target person is captured;

[0152] It is identified whether the target person is a housewife according to the day ratio.

[0153] It should be noted that the electronic device provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can perform personnel recognition.

[0154] The electronic device provided in the embodiment of the present invention can implement each process implemented by the person identification method in the above method embodiment and can achieve the same beneficial effect. To avoid repetition, it will not be described here.

[0155] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the personnel identification method provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0156] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0157] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A method for identifying a person, characterized in that: The following steps are involved: Acquire a snapshot file of a target person, and extract a feature matrix of the target person on a working day from the snapshot file of the target person according to a preset extraction method, wherein the snapshot file of the target person is a snapshot file of the target person in a first target area, and the target person is a female person of a preset age group; The feature matrix includes a feature vector of the target person, and the feature vector is composed of different types of sub-feature vectors. The feature vector corresponding to the target person is extracted from the captured file according to a preset extraction method, including: Extracting sub-feature vectors of the target person from the captured files according to various extraction methods; The sub-feature vectors of the target person are concatenated in a preset order to obtain a feature vector corresponding to the target person; Constructing a feature matrix of the target person according to the feature vector corresponding to the target person; Inputting the feature matrix into a pre-trained classification model for processing to obtain a classification result of the feature matrix, wherein the classification model is trained by a feature matrix corresponding to a person at home in a second target area, and the second target area includes the first target area; According to the classification result of the feature matrix, it is identified whether the target person is a housewife.

2. The method for identifying a person according to claim 1, wherein: According to the classification result of the feature vector, identifying whether the target person is a housewife includes: If the classification result of the feature matrix is ​​a person at home, then extracting the behavior information corresponding to the target person from the snapshot file of the target person, wherein the behavior information corresponding to the target person is extracted based on the image information corresponding to the target person; Identify whether the target person is a housewife based on the behavior information.

3. The method for identifying a person according to claim 2, wherein: The extracting behavior information corresponding to the target person according to the image information corresponding to the target person includes: Extracting image information corresponding to the target person from the captured file of the target person, and performing behavior detection on the image information corresponding to the target person, wherein the behavior detected by the behavior detection includes at least one of buying groceries and taking care of children; The step of identifying whether the target person is a housewife according to the behavior information includes: If it is detected that the image information corresponding to the target person includes at least one of grocery shopping and child-raising, then whether the target person is a housewife is identified based on at least one of the grocery shopping and child-raising behaviors.

4. The method for identifying a person according to claim 3, characterized in that: The performing behavior detection on the image information corresponding to the target person includes: Performing face detection and body detection on the image information corresponding to the target person to obtain a face detection frame and a body detection frame; Matching the face detection frame with the body detection frame, and determining the body detection frame of the target person through the face image in the face detection frame; Behavior detection is performed on the human body image in the human body detection frame of the target person, and the behaviors detected by the behavior detection include grocery shopping behavior and child-raising behavior.

5. The method for identifying a person according to claim 4, characterized in that: The performing behavior detection on the human body image in the human body detection frame of the target person includes: Expanding the human body detection frame of the target person in a preset direction to obtain an expanded human body detection frame; Behavior detection is performed on the human image in the expanded human detection frame.

6. The method for identifying a person according to claim 3, characterized in that: The step of identifying whether the target person is a housewife based on at least one of the behaviors of buying groceries and taking care of children includes: Calculate the ratio of the number of days when the target person is captured engaging in at least one of the behaviors of shopping for groceries and taking care of children to the total number of days when the target person is captured; It is identified whether the target person is a housewife according to the day ratio.

7. A person identification device, characterized in that: The device comprises: The first acquisition module is used to acquire the captured files of the target person, and extract the feature matrix of the target person on weekdays from the captured files of the target person according to a preset extraction method, wherein the captured files of the target person are captured files of the target person in the first target area, and the target person is a female person of a preset age group; the feature matrix includes a feature vector of the target person, and the feature vector is composed of different types of sub-feature vectors, and the feature vector corresponding to the target person is extracted from the captured files according to the preset extraction method, including: extracting the sub-feature vectors of the target person from the captured files according to various extraction methods; splicing the sub-feature vectors of the target person in a preset order to obtain the feature vector corresponding to the target person; and constructing the feature matrix of the target person according to the feature vector corresponding to the target person; a processing module, configured to input the feature vector into a pre-trained classification model for processing to obtain a classification result of the feature vector, wherein the classification model is trained by feature vectors corresponding to permanent residents in a second target area, wherein the second target area includes the first target area; The recognition module is used to extract the image information corresponding to the target person from the captured file of the target person if the classification result of the feature vector is a home-based person, and to identify whether the target person is a housewife based on the image information.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the person identification method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the personnel identification method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Person identification method and device and electronic device

    CN108154171A

  • Social relationship identification method and device, electronic equipment and storage medium

    CN112668520A