An intimate behavior recognition method and device, an electronic device, and a storage medium

By extracting frames from videos and detecting human bodies, the location of key points on the human body is identified, and the positional relationship of these key points is used to determine intimate behavior. This solves the problem of high cost and low efficiency of manual recognition in existing technologies, and realizes automated recognition of intimate behavior.

CN118247845BActive Publication Date: 2026-11-20BEIJING IQIYI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410373571.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2026-11-20
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

Current technologies for recognizing intimate behaviors mainly rely on manual methods, which result in high costs and low efficiency.

Method used

By extracting frames from videos and detecting human bodies, the location of key points on the human body is identified, and the positional relationship of these key points is used to determine whether intimate behavior exists. This includes techniques such as intersection, similarity calculation, and fitted line matching.

Benefits of technology

It enables automatic recognition of intimate behaviors, reducing labor costs and improving recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118247845B_ABST
    Figure CN118247845B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a close behavior recognition method, device, electronic equipment and storage medium, wherein the close behavior recognition method can frame a to-be-recognized video to obtain one or more to-be-recognized images, each to-be-recognized image includes at least two human bodies; human body detection is performed on the one or more to-be-recognized images to determine the position information of each human body in the to-be-recognized image frame; the position of the human body key point of each human body is recognized according to the position information of each human body in the to-be-recognized image frame, wherein the human body key point corresponds to a human body part; and whether there is a close behavior between each two human bodies is judged according to the position relationship of the human body key point of each human body. Through the close behavior recognition method, whether there is a close behavior between each two human bodies can be judged, automatic recognition of the close behavior is realized, manual cost can be reduced, and the recognition efficiency of the close behavior can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a method, apparatus, electronic device, and storage medium for recognizing intimate behavior. Background Technology

[0002] Currently, intimate behaviors such as hugging, kissing, and proposing are frequently seen in videos. Recognizing these intimate behaviors allows for easier video labeling and classification. However, current methods for identifying intimate behaviors are often manual, which is both costly and inefficient. Summary of the Invention

[0003] The purpose of this invention is to provide a method, device, electronic device, and storage medium for recognizing intimate behaviors, thereby improving the efficiency of recognizing intimate behaviors. The specific technical solution is as follows:

[0004] In a first aspect of this invention, a method for recognizing intimate behavior is provided, the method comprising:

[0005] Frames are extracted from the video to be identified to obtain one or more images to be identified, each image to be identified including at least two human bodies;

[0006] Human body detection is performed on one or more images to be identified to determine the position information of each human body in the image frame to be identified;

[0007] Based on the position information of each human body in the image frame to be identified, the position of the key points of each human body is identified, wherein the key points of the human body correspond to human body parts;

[0008] Based on the positional relationship of key points on each human body, it is determined whether there is intimate behavior between any two human bodies.

[0009] In one possible implementation, determining whether intimate behavior exists between any two individuals based on the positional relationships of key points on each identified individual includes:

[0010] For each pair of human bodies, based on the coordinates of the identified key points, determine whether there is an overlap between the coordinates of the key points of the two human bodies;

[0011] When there is an overlap, it is determined that there is intimate behavior between the two individuals.

[0012] In one possible implementation, determining whether intimate behavior exists between any two individuals based on the positional relationships of key points on each identified individual includes:

[0013] For each pair of human bodies, based on the coordinates of the identified key points, the positions of multiple target body parts corresponding to the key points of the target human body are determined, resulting in a combination of key point positions.

[0014] The similarity between the identified key point location combinations and multiple preset key point location combinations is calculated.

[0015] If the similarity between the identified key point location combination and any preset key point location combination is greater than a preset threshold, it is determined that there is intimate behavior between the two people.

[0016] In one possible implementation, identifying the location of key points of each human body based on the location information of each human body in the image frame to be identified includes:

[0017] Based on the position information of each human body in the image frame to be identified, and based on the calculated distance between each pair of human bodies;

[0018] Based on the calculated distance between each pair of human bodies, identify the two closest human bodies, wherein the two closest human bodies include a first human body and a second human body;

[0019] The positions of key human points are identified for the first human body and the second human body in the image to be identified, respectively.

[0020] The step of determining whether intimate behavior exists between any two individuals based on the positional relationships of key points on each identified individual includes:

[0021] Based on the locations of key points of the first and second human bodies identified, it is determined whether the first and second human bodies engage in intimate behavior.

[0022] In one possible implementation, determining whether the first and second human bodies engage in intimate behavior based on the identified locations of key points on the first and second human bodies includes:

[0023] Based on the positions of the key points of the first and second human bodies identified, preset human body regions are identified to obtain the positions of multiple preset human body regions corresponding to each.

[0024] Determine whether the positions of the multiple preset human body regions corresponding to the first human body and the multiple preset human body regions corresponding to the second human body overlap. If there is an overlap, it is determined that there is intimate behavior.

[0025] In one possible implementation, determining whether the first and second human bodies engage in intimate behavior based on the identified locations of key points on the first and second human bodies includes:

[0026] Based on the identified key points of the first and second human bodies, the corresponding human posture, limb position and key point fitting lines are identified.

[0027] The fitted information of human posture, limb position and key points of the first and second human bodies are matched with the behavioral logic corresponding to multiple preset intimate behaviors, and the existence of intimate behaviors is determined based on the matching results.

[0028] In one possible implementation, the preset intimate behavior is an hugging behavior, and the step of identifying the corresponding human posture, limb position, and fitted line of key points based on the identified positions of the first and second human bodies includes:

[0029] Based on the positions of the key points of the first and second human bodies, the corresponding human postures are identified respectively; based on the positions of the key points of the first and second human bodies, the corresponding limb positions are identified respectively; based on the positions of the key points of the first and second human bodies, straight lines are fitted to the key points of the legs to obtain the fitted lines of the key points.

[0030] The process of matching the fitted information of the human posture, limb position, and key points corresponding to the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results, includes:

[0031] Determine whether the human postures of the first and second human bodies are both standing or sitting; determine whether the angle between the fitted lines of the key points of the two bodies is less than a first preset angle threshold; determine whether the distance between the upper bodies of the two bodies is less than a first preset distance threshold; determine whether the upper arms are crossed; determine whether the heads of the two bodies overlap or cross.

[0032] If both are determined to be yes, then intimate behavior is determined to exist.

[0033] In one possible implementation, the preset intimate behavior is a kissing behavior, and the step of identifying the corresponding human posture, limb position, and fitted line of key points based on the identified positions of the first and second human bodies includes:

[0034] Based on the positions of the key points of the first and second human bodies, the corresponding human postures are identified respectively; based on the positions of the key points of the first and second human bodies, the corresponding limb positions are identified respectively; based on the positions of the key points of the first and second human bodies, straight lines are fitted to the key points of the legs to obtain the fitted lines of the key points.

[0035] The process of matching the fitted information of the human posture, limb position, and key points corresponding to the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results, includes:

[0036] The system determines whether the human postures of the first and second human bodies are both standing, sitting, or lying down; whether the angle between the fitted lines of the key points of the two bodies is less than a second preset angle threshold, or whether the distance between the fitted lines of the key points of the two bodies is less than a second preset distance threshold; whether the distance between the upper bodies of the two bodies is less than a third preset distance threshold; whether the arms of the two bodies are crossed; whether the heads of the two bodies are not crossed; and whether the eyes, eyebrows, or noses of the two bodies overlap.

[0037] If both are determined to be yes, then intimate behavior is determined to exist.

[0038] In one possible implementation, the preset intimate behavior is a marriage proposal, and the step of identifying the corresponding human posture, limb position, and fitted line of key points based on the identified positions of the first and second human bodies includes:

[0039] Based on the positions of the key points of the first and second human bodies identified, their corresponding human postures are identified respectively, wherein the first human body is a female human body and the second human body is a male human body.

[0040] The process of matching the fitted information of the human posture, limb position, and key points corresponding to the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results, includes:

[0041] Determine whether the human posture of the first identified human body is standing; determine whether the human posture of the second identified human body is kneeling on one knee.

[0042] If both are determined to be yes, then intimate behavior is determined to exist.

[0043] In one possible implementation, the human detection process on the one or more images to be identified, yielding at least two human detection results, includes:

[0044] Human detection is performed on one or more images to be identified to obtain the number of human bodies in the one or more images to be identified;

[0045] Based on the number of human bodies detected, select one or more target images for two human bodies.

[0046] The gender and / or distance between two human bodies in the target image are identified.

[0047] One or more final images are selected based on the recognition results, wherein the two human figures in the final image are of opposite sexes and / or the distance between the two human figures is less than a preset distance threshold.

[0048] Human detection is performed on the final image to obtain the detection results of two human bodies in the final image.

[0049] In one possible implementation, the step of performing human detection on the one or more images to be identified, and determining the position information of each human body in the image frame to be identified, includes:

[0050] Human detection is performed on one or more images to be identified to determine the human detection box for each human body in the image frame to be identified;

[0051] The position information of each human body in the image frame to be identified is determined based on the position of the human body detection box.

[0052] In a second aspect of the invention, an intimate behavior recognition device is also provided, the device comprising:

[0053] The video frame extraction module is used to extract frames from the video to be identified, obtaining one or more images to be identified, each of which includes at least two human bodies.

[0054] The human body detection module is used to perform human body detection on one or more images to be identified, and determine the position information of each human body in the image frame to be identified;

[0055] The location recognition module is used to identify the location of key points of each human body based on the location information of each human body in the image frame to be recognized, wherein the key points of the human body correspond to human body parts;

[0056] The behavior determination module is used to determine whether there is intimate behavior between any two people based on the positional relationship of the key points of each human body.

[0057] In one possible implementation, the behavior determination module is specifically used to determine, for each pair of human bodies, whether the coordinate positions of the key points of the human bodies of the two human bodies intersect, based on the coordinate positions of the identified key points of the human bodies; when there is an intersection, it is determined that there is intimate behavior between the two human bodies.

[0058] In one possible implementation, the behavior determination module includes:

[0059] The combination determination submodule is used to determine the positions of multiple target body parts corresponding to key points of the target human body for each pair of human bodies, based on the coordinate positions of the identified key points of the human body, and obtain the combination of key point positions.

[0060] The similarity calculation submodule is used to calculate the similarity between the identified key point location combination and multiple preset key point location combinations;

[0061] The behavior determination submodule is used to determine that there is intimate behavior between the two people if the similarity between the identified key point location combination and any preset key point location combination is greater than a preset threshold.

[0062] In one possible implementation, the location identification module includes:

[0063] The distance calculation submodule is used to calculate the distance between every two human bodies based on the position information of each human body in the image frame to be identified.

[0064] The human body recognition submodule is used to identify the two closest human bodies based on the calculated distance between each pair of human bodies, wherein the two closest human bodies include a first human body and a second human body;

[0065] The location recognition submodule is used to identify the locations of key human points in the first human body and the second human body in the image to be recognized, respectively.

[0066] The behavior determination module is specifically used to determine whether the first human body and the second human body are engaging in intimate behavior based on the locations of key points identified in the first human body and the second human body.

[0067] In one possible implementation, the behavior determination module is specifically used to identify preset human body regions based on the positions of key points of the first human body and the second human body, respectively, to obtain the positions of multiple preset human body regions corresponding to each; to determine whether the positions of the multiple preset human body regions corresponding to the first human body and the multiple preset human body regions corresponding to the second human body overlap; if there is an overlap, it is determined that intimate behavior exists.

[0068] In one possible implementation, the behavior determination module includes:

[0069] The fitting and recognition submodule is used to identify the corresponding human posture, limb position and fitting line of key points based on the identified key points of the first human body and the second human body.

[0070] The matching and recognition submodule is used to match the fitted information of human posture, limb position and key points of the first human body and the second human body with the behavioral logic corresponding to multiple preset intimate behaviors, and to determine whether intimate behavior exists based on the matching results.

[0071] In one possible implementation, the preset intimate behavior is a hugging behavior, and the fitting and recognition submodule is specifically used to identify the corresponding human postures of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; to identify the corresponding limb positions of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; and to fit the key points of the legs with straight lines based on the positions of the key points of the first human body and the second human body respectively, so as to obtain the fitting lines of the key points.

[0072] The matching and recognition submodule is specifically used to determine whether the human postures corresponding to the first human body and the second human body are both standing or sitting; to determine whether the angle between the fitted lines of the key points of the two bodies is less than a first preset angle threshold; to determine whether the distance between the upper bodies of the two bodies is less than a first preset distance threshold; to determine whether the upper arms are crossed; and to determine whether the heads of the two bodies overlap or cross. If all of these are determined to be true, then it is determined that there is intimate behavior.

[0073] In one possible implementation, the preset intimate behavior is a kissing behavior, and the fitting and recognition submodule is specifically used to identify the corresponding human postures of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; to identify the corresponding limb positions of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; and to fit the key points of the legs with straight lines based on the positions of the key points of the first human body and the second human body respectively, so as to obtain the fitting lines of the key points.

[0074] The matching and recognition submodule is specifically used to determine whether the human postures corresponding to the first and second human bodies are both standing, sitting, or lying down; whether the angle between the fitted lines of the key points of the two bodies is less than a second preset angle threshold, or whether the distance between the fitted lines of the key points of the two bodies is less than a second preset distance threshold; whether the distance between the upper bodies of the two bodies is less than a third preset distance threshold; whether the arms of the two bodies are crossed; whether the heads of the two bodies are not crossed; and whether the eyes, eyebrows, or noses of the two bodies overlap. If all of these are determined to be true, then intimate behavior is determined to exist.

[0075] In one possible implementation, the preset intimate behavior is a marriage proposal behavior, and the fitting recognition submodule is specifically used to identify the corresponding human postures of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body, wherein the first human body is a female human body and the second human body is a male human body.

[0076] The matching and recognition submodule is specifically used to determine whether the human posture of the first human being identified is a standing posture; and to determine whether the human posture of the second human being identified is a kneeling posture; if both are determined to be yes, then it is determined that there is intimate behavior.

[0077] In one possible implementation, the video frame extraction module is specifically used to perform human detection on one or more images to be identified, to obtain the number of human bodies in the one or more images to be identified; select one or more target images with two human bodies based on the detected number of human bodies; identify the gender and / or distance between the two human bodies in the target images; select one or more final images based on the identification results, wherein the two human bodies in the final images are of opposite genders and / or the distance between the two human bodies is less than a preset distance threshold; perform human detection on the final images to obtain the detection results of the two human bodies in the final images.

[0078] In one possible implementation, the video frame extraction module is specifically used to perform human detection on one or more images to be identified, determine the human detection box for each human body in the image frame to be identified, and identify and determine the position information of each human body in the image frame to be identified based on the position of the human detection box.

[0079] In another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0080] Memory, used to store computer programs;

[0081] When a processor executes a program stored in memory, it implements any of the aforementioned intimate behavior recognition methods.

[0082] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the above-described intimate behavior recognition methods.

[0083] In another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the aforementioned intimate behavior recognition methods.

[0084] This invention provides a method, apparatus, electronic device, and storage medium for recognizing intimate behavior. The method involves extracting frames from a video to be recognized, obtaining one or more images to be recognized, each image including at least two human bodies. Human body detection is performed on the images to determine the position information of each human body within the image frame. Based on the position information of each human body in the image frame, the positions of key points on each human body are identified, where each key point corresponds to a body part. Based on the positional relationship of the identified key points, it is determined whether intimate behavior exists between any two human bodies. This method allows for frame extraction from the video to be recognized, followed by human body detection on the extracted frames to determine the position information of each human body in the image frame. Based on the position information of each human body in the image frame, the positions of key points on each human body are identified, thereby determining whether intimate behavior exists between any two human bodies based on the positional relationship of the identified key points. This achieves automatic recognition of intimate behavior, reducing labor costs and improving the efficiency of intimate behavior recognition. Attached Figure Description

[0085] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0086] Figure 1 A flowchart illustrating the intimate behavior recognition method provided in this application embodiment;

[0087] Figure 2 A schematic diagram of key human body points provided in the embodiments of this application;

[0088] Figure 3 A flowchart illustrating the intimate behavior judgment method provided in this application embodiment;

[0089] Figure 4Another flowchart illustrating the intimate behavior judgment method provided in this application embodiment;

[0090] Figure 5 This is a schematic diagram of a process for obtaining human body detection results provided in an embodiment of this application;

[0091] Figure 6 This is a schematic diagram of the intimate behavior recognition device provided in the embodiments of this application;

[0092] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0093] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0094] Currently, intimate behaviors such as hugging, kissing, and proposing are frequently seen in videos. Recognizing these intimate behaviors facilitates video annotation and classification based on the identified intimacy. However, there is currently no efficient solution for recognizing intimate behaviors. To address this technical problem, this application provides an intimate behavior recognition method, apparatus, electronic device, and storage medium.

[0095] In a first aspect of this invention, a method for recognizing intimate behavior is provided, see [link to previous document]. Figure 1 , Figure 1 This is a flowchart illustrating the intimate behavior recognition method provided in an embodiment of this application. The method includes:

[0096] Step S11: Frame extraction is performed on the video to be identified to obtain one or more images to be identified, each image to be identified including at least two human bodies;

[0097] Step S12: Perform human body detection on one or more images to be identified, and determine the position information of each human body in the image frame to be identified;

[0098] Step S13: Based on the position information of each human body in the image frame to be identified, identify the position of the key points of each human body, wherein the key points of the human body correspond to human body parts;

[0099] Step S14: Based on the positional relationship of the key points of each human body identified, determine whether there is intimate behavior between each pair of human bodies.

[0100] Corresponding to step S11 above, the video to be identified can be a standalone video or a segment extracted from a video. For example, after acquiring a video, such as a movie or TV series, video segments can be extracted from the acquired video, such as cutting the movie or TV series into four-second segments, six-second segments, etc. In one case, when the method of this application embodiment performs human body recognition through a recognition model, the video segment can be cut and frames extracted using the recognition model. Specifically, the frame extraction frequency can be set according to the situation, for example, the frame extraction frequency can be set to one frame per second, one frame per two seconds, etc. Since this application embodiment is used for the recognition of intimate behavior, the image to be identified should include at least two human bodies.

[0101] Corresponding to step S12 above, when performing human detection on one or more images to be identified, human detection can be performed using a recognition model. This recognition model can be the same model used for video frame extraction in step S11 above. That is, this recognition model can not only extract frames from the video to be identified to obtain images to be identified, but also perform human detection on the images to be identified to obtain the position information of each human body in the image frames to be identified. In one possible implementation, performing human detection on one or more images to be identified and determining the position information of each human body in the image frames to be identified includes: performing human detection on one or more images to be identified, determining a human detection box for each human body in the image frames to be identified; identifying and determining the position information of each human body in the image frames to be identified based on the position of the human detection box.

[0102] Corresponding to step S13 above, in this application, when identifying the position of each human body's key points based on the position information of each human body in the image frame to be identified, human body key point detection can be achieved by identifying and locating the precise positions of specific parts of the human body in the image (such as hands, feet, elbows, knees, eyes, nose, mouth, etc.), generating key point coordinates representing the human posture. When identifying the position of each human body's key points, multiple preset human body parts can be identified, thereby determining the coordinates of the corresponding key points based on the identified positions of the human body parts. For example, see... Figure 2 , Figure 2This is a schematic diagram of key human body points provided in the embodiments of this application. Key points 0-17 in the diagram can represent: 0, "Nose", 1, "Neck", 2, "Rshoulder", 3, "Rebow", 4, "RWrist", 5, "LShoulder", 6, "LElbow", 7, "LWrist", 8, "RHip", 9, "RKnee", 10, "RAnkle", 11, "LHip", 12, "LKnee", 13, "LAnkle", 14, "Reye", 15, "LEye", 16, "REar", 17, "LEar". In one example, when identifying the location of key points of each human body based on the location information of each human body in the image frame to be identified, the key point detection model can be used for detection. In the corresponding step S13, after checking the detection box, the human body region can be checked, the image corresponding to the human body region can be extracted, and then the extracted human body region can be input into the key point detection model for key point detection.

[0103] Corresponding to step S14 above, when determining whether there is intimate behavior between two people based on the positional relationship of the key points of each identified human body, it can be determined that there is intimate behavior between the two people. On one hand, it can be determined whether the coordinates of the key points of the two people intersect; if there is an intersection, it is determined that there is intimate behavior between the two people. For example, if the key points of the heads of two people overlap, it can be determined that there is intimate behavior. On the other hand, it can be determined that there is similarity between the identified key point position combination and multiple preset key point position combinations; if the similarity between the identified key point position combination and any preset key point position combination is greater than a preset threshold, it is determined that there is intimate behavior between the two people.

[0104] The method described in this application can identify intimate behaviors. On one hand, after determining that intimate behavior exists, the video or image to be identified can be recalled and then manually labeled. On the other hand, after determining that intimate behavior exists, further identification or labeling of intimate behavior can be performed; for details, please refer to the following embodiments.

[0105] As can be seen, this intimate behavior recognition method can extract frames from the video to be recognized, then perform human detection on the extracted video frames, determine the position information of each human body in the image frame to be recognized, and identify the position of each human body's key points based on the position information of each human body in the image frame to be recognized. Thus, based on the positional relationship of the identified human body's key points, it can be determined whether there is intimate behavior between each pair of human bodies, thereby realizing the automatic recognition of intimate behavior. This not only reduces labor costs but also improves the efficiency of intimate behavior recognition.

[0106] In one possible implementation, determining whether intimate behavior exists between two individuals based on the positional relationship of key human body points identified for each individual includes: for each pair of individuals, determining whether the coordinates of the key human body points of the two individuals intersect; if there is an intersection, determining that intimate behavior exists between the two individuals. In practical use, when determining whether the coordinates of the key human body points of two individuals intersect based on the coordinates of the identified key human body points, it is possible to determine whether the coordinates of the key human body points of the two individuals are the same. Alternatively, the positions of multiple body parts can be determined based on the coordinates of the identified key human body points, and then it can be determined whether there is overlap based on the positions of the body parts. If there is overlap, it can be determined that the coordinates of the key human body points of two individuals intersect, thereby determining that intimate behavior exists between the two individuals.

[0107] In one possible implementation, determining whether intimate behavior exists between two individuals based on the positional relationships of key points on each identified human body includes: for each pair of individuals, determining the positions of multiple target body parts corresponding to target key points based on the coordinates of the identified key points, thus obtaining a key point position combination; calculating the similarity between the identified key point position combination and multiple preset key point position combinations; if the similarity between the identified key point position combination and any preset key point position combination is greater than a preset threshold, then it is determined that intimate behavior exists between the two individuals. In practical use, when determining the positions of multiple target body parts corresponding to target key points based on the coordinates of the identified key points on each pair of individuals to obtain a key point position combination, the coordinates of preset body parts can be used as a key point position combination. For example, key points corresponding to an arm can be used as a key point position combination, or key points corresponding to a head can be used as a key point position combination. By calculating the similarity between the identified key point location combination and multiple preset key point location combinations, the identified key point location combination can be vectorized, and then the similarity between the vectors corresponding to the multiple preset key point location combinations can be calculated. If the similarity between the identified key point location combination and any preset key point location combination is greater than a preset threshold, it is determined that there is intimate behavior between the two people.

[0108] In one possible implementation, see Figure 3 , Figure 3 This is a flowchart illustrating a method for determining intimate behavior provided in an embodiment of this application. Based on the identified locations of key points on the first and second human bodies, the method determines whether intimate behavior exists between the first and second human bodies, including:

[0109] Step S31: Based on the positions of the key points of the first human body and the second human body, the preset human body regions are identified respectively, and the positions of multiple preset human body regions corresponding to each are obtained.

[0110] Step S32: Determine whether the positions of the multiple preset human body regions corresponding to the first human body and the multiple preset human body regions corresponding to the second human body overlap. If there is an overlap, it is determined that there is intimate behavior.

[0111] In one example, the preset human body can be the head; when the head areas of two people overlap, intimate behavior can be determined. In actual use, different key points can correspond to different human body areas; see [link to relevant documentation]. Figure 2 , Figure 2This is a schematic diagram of key human body points provided in the embodiments of this application. Key points 0-17 in the diagram can represent: 0, "Nose", 1, "Neck", 2, "Rshoulder", 3, "Rebow", 4, "RWrist", 5, "LShoulder", 6, "LElbow", 7, "LWrist", 8, "RHip", 9, "RKnee", 10, "RAnkle", 11, "LHip", 12, "LKnee", 13, "LAnkle", 14, "Reye", 15, "LEye", 16, "REar", 17, "LEar". Human body regions can be determined based on predefined key point numbers, thereby obtaining the positions of multiple preset human body regions corresponding to each region. Specifically, it is determined whether the positions of the multiple preset human body regions corresponding to the first human body overlap with the positions of the multiple preset human body regions corresponding to the second human body. This can be done by identifying whether the boundaries of the multiple preset human body regions corresponding to the first human body and the multiple preset human body regions corresponding to the second human body intersect. If they do, it is determined that there is an overlap, and if there is an overlap, it is determined that there is intimate behavior. In particular, determining whether the positions of the multiple preset human body regions corresponding to the first human body and the multiple preset human body regions corresponding to the second human body overlap can determine whether specific regions overlap, such as whether the head region, upper body region, and arm region overlap. If any region overlaps, it is determined that there is intimate behavior. It should be noted that this method can determine whether intimate behavior exists, but it cannot determine the specific intimate behavior. In subsequent annotation, after determining that intimate behavior exists, recall can be performed, and then manual annotation can be carried out. In one example, the scheme of this application embodiment can be used for coarse annotation, that is, only determine whether two people in the image are engaging in intimate behavior, while the specific intimate behavior needs to be finely annotated manually, thereby realizing that the method of this application embodiment assists in manual annotation. Since coarse annotation serves human annotation, it needs to have a high recall rate. Therefore, the coarse annotation rules cannot be too strict. They can be set to determine the existence of intimate behavior as long as there is an overlap in any region, thereby triggering recall and allowing for further identification and annotation of intimate behavior by humans.

[0112] In one possible implementation, determining whether the first and second human bodies engage in intimate behavior based on the identified key point positions of the first and second human bodies includes: identifying the corresponding human posture, limb position, and fitted lines of key points based on the identified key point positions of the first and second human bodies; matching the identified fitted information of human posture, limb position, and key points of the first and second human bodies with behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results. Since the key point positions are determined based on the identified human body parts, only the key point positions corresponding to the limbs need to be identified when identifying limb positions. When identifying human postures, posture identification can be based on the relative positions of key points, etc. Specifically, refer to existing technologies; when identifying the fitted lines of key points, only straight lines can be fitted to key points of specific parts. See [link to relevant documentation]. Figure 2 The key points corresponding to the head region are: 0, 1, 14, 15, 16, 17; the key points corresponding to the upper body region are: 1, 2, 5, 8, 11; and the key points corresponding to the arm region are: 2, 3, 4, 5, 6, 7. Connecting these key points yields the corresponding fitted lines. This allows for the identification of the corresponding human posture, limb position, and fitted lines based on the key point positions. When matching the identified fitted information of the human posture, limb position, and key points of the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, the similarity between the two can be calculated. If the calculated similarity is greater than a preset threshold, a match is determined, thus indicating the existence of intimate behavior. In one example, intimate behaviors in this embodiment may include hugging, kissing, and proposing marriage. The specific logic is as follows: Hugging logic: 1. Both parties are standing or sitting, and the fitted lines of the key points of their legs are parallel or nearly parallel; 2. The upper bodies of both parties are close together, and the key points of their arms intersect; 3. The key points of their heads coincide or intersect. The logic for a kiss is as follows: 1. Both parties are standing, sitting, or lying down, with their leg key points aligned with parallel or nearly parallel straight lines; 2. Their upper bodies are close together, with their arm key points intersecting; 3. Their head key points do not intersect, but their eye, eyebrow, and nose key points coincide. The logic for a marriage proposal is as follows: 1. The woman is standing; 2. The man is kneeling on one knee, with the key points connecting his knees and the base of his legs perpendicular or nearly perpendicular.

[0113] In one possible implementation, see Figure 4 , Figure 4 This is another flowchart illustrating the intimate behavior judgment method provided in this application embodiment. The step of identifying the location of key points of each human body based on its position information in the image frame to be identified includes:

[0114] Step S41: Based on the position information of each human body in the image frame to be identified, calculate the distance between each pair of human bodies;

[0115] Step S42: Based on the calculated distance between each pair of human bodies, identify the two closest human bodies, wherein the two closest human bodies include the first human body and the second human body.

[0116] Step S43: Identify the positions of key human points in the first human body and the second human body in the image to be identified, respectively.

[0117] The step of determining whether intimate behavior exists between any two individuals based on the positional relationships of key points on each identified individual includes:

[0118] Step S44: Based on the identified key points of the first human body and the second human body, determine whether the first human body and the second human body are engaged in intimate behavior.

[0119] Based on the position information of each human body in the image frame to be identified, and the calculated distance between each pair of human bodies, the center position of each human body can be identified, thereby calculating the distance between each pair of center positions. For example, a detection box corresponding to each human body can be identified, and the distance between each pair of human bodies can be calculated. Multiple distance calculations can be performed based on the identified detection boxes, such as the distance between the center points of the detection boxes and the distance between corresponding sides. In practical use, when calculating the distance between each pair of human bodies in the image to be identified based on the detection boxes corresponding to each human body, the center point of each detection box can be identified, and then the horizontal distance between any two center points can be calculated and used as the distance between the two human bodies. Then, based on the calculated distance between each pair of human bodies, the two closest human bodies are identified, and the positions of the human body key points of the first and second human bodies in the image to be identified are then identified. Based on the identified key point positions of the first and second human bodies, it can be determined whether the first and second human bodies are engaging in intimate behavior. This method allows for the identification of only the two closest human bodies. Since intimate behavior only exists between the two closest human bodies, it improves computational efficiency, avoids invalid calculations, and reduces the computational load.

[0120] In one possible implementation, see Figure 5 , Figure 5 This is a schematic diagram of a process for obtaining human detection results provided in an embodiment of this application. The step of performing human detection on one or more images to be identified to obtain at least two human detection results includes:

[0121] Step S51: Perform human detection on one or more images to be identified to obtain the number of human bodies in one or more images to be identified;

[0122] Step S52: Based on the number of human bodies detected, select one or more target images with two human bodies.

[0123] Step S53: Identify the gender and / or distance between the two human bodies in the target image;

[0124] Step S54: Select one or more final images based on the recognition results, wherein the two human figures in the final image are of opposite sexes and / or the distance between the two human figures is less than a preset distance threshold.

[0125] Step S55: Perform human detection on the final image to obtain the detection results of two human bodies in the final image.

[0126] The process involves identifying the gender and / or distance between two individuals in the target image, selecting one or more final images based on the identification results, and then performing human detection on the final images. Since the distance between two people is generally small during intimate interactions in actual use, this application only determines the existence of intimate interactions when the distance is less than a preset distance; otherwise, it directly determines that no intimate interactions exist. Furthermore, since intimate interactions often occur between opposite sexes in actual use, this embodiment can also perform gender identification. Specifically, this can be done using a gender identification model, the specific method of which can be found in existing technologies. In actual use, if multiple identified individuals are all of the same sex, it can be directly determined that no intimate interactions exist. Specifically, this gender identification model can be a binary classification model. By using this model to identify the two closest individuals of the opposite sex, images that do not conform to actual patterns can be removed, thereby improving computational efficiency.

[0127] In one possible implementation, the preset intimate behavior is an hugging behavior. The step of identifying the corresponding human posture, limb position, and fitted lines of key points based on the identified key points of the first and second human bodies includes: identifying the corresponding human posture based on the identified key points of the first and second human bodies; identifying the corresponding limb position based on the identified key points of the first and second human bodies; fitting straight lines to the leg key points based on the identified key points of the first and second human bodies to obtain the fitted lines of the key points; matching the fitted information of the human posture, limb position, and key points of the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results includes: determining whether the identified human postures of the first and second human bodies are both standing or sitting; determining whether the angle between the fitted lines of the key points of both parties is less than a first preset angle threshold; determining whether the distance between the upper bodies of both parties is less than a first preset distance threshold; determining whether the upper arms are crossed; determining whether the heads of both parties overlap or cross; if all are determined to be yes, then intimate behavior is determined to exist.

[0128] In one possible implementation, the preset intimate behavior is a kissing behavior. The step of identifying the corresponding human posture, limb position, and fitted lines of key points based on the identified key points of the first and second human bodies includes: identifying the corresponding human posture based on the identified key points of the first and second human bodies; identifying the corresponding limb position based on the identified key points of the first and second human bodies; fitting straight lines to the leg key points based on the identified key points of the first and second human bodies to obtain the fitted lines of the key points; and then combining the identified human postures of the first and second human bodies... The fitting information of limb positions and key points is matched with the behavioral logic corresponding to multiple preset intimate behaviors, and the existence of intimate behavior is determined based on the matching results. This includes: determining whether the human postures of the first and second human bodies are both standing, sitting, or lying down; determining whether the angle between the fitting lines of the key points of the two parties is less than a second preset angle threshold, or whether the distance between the fitting lines of the key points of the two parties is less than a second preset distance threshold; determining whether the distance between the upper bodies of the two parties is less than a third preset distance threshold; determining whether the arms of the two parties are crossed; determining whether the heads of the two parties are not crossed; determining whether the eyes, eyebrows, or noses of the two parties overlap; if all of these are determined to be true, then intimate behavior is determined to exist.

[0129] In one possible implementation, the preset intimate behavior is a marriage proposal. The step of identifying the corresponding body posture, limb position, and fitted lines of key points based on the identified key points of the first and second bodies includes: identifying the corresponding body posture based on the identified key points of the first and second bodies, where the first body is a female body and the second body is a male body; the step of matching the fitted information of the identified body posture, limb position, and key points of the first and second bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether an intimate behavior exists based on the matching results, includes: determining whether the identified body posture of the first body is a standing posture; determining whether the identified body posture of the second body is a kneeling posture; if both are determined to be yes, then an intimate behavior is determined to exist.

[0130] Specifically, the logic for an embrace can be: 1. Both parties are standing or sitting, with their leg key points fitting parallel or nearly parallel straight lines; 2. Their upper bodies are close together, with their arm key points intersecting; 3. Their head key points coincide or intersect. The logic for a kiss can be: 1. Both parties are standing, sitting, or lying down, with their leg key points fitting parallel or nearly parallel straight lines; 2. Their upper bodies are close together, with their arm key points intersecting; 3. Their head key points do not intersect, but their eye, eyebrow, and nose key points coincide. The logic for a marriage proposal can be: 1. The woman is standing; 2. The man is kneeling on one knee, with the lines connecting the key points of his knees and the key points of his groin perpendicular or nearly perpendicular.

[0131] In practical use, after determining the existence of intimate behavior, the method further includes: labeling the video to be identified based on the intimate behavior. In practice, the automatic intimate behavior labeling algorithm primarily uses coarse matching to assist manual labeling, while fine matching is used as a supplement to support behaviors with relatively simple and clear features. In practical use, the labeled images or videos can be used to train the model. Therefore, through the scheme of this application, a human keypoint matching strategy can be designed to achieve both coarse and fine matching of intimate behavior, assisting manual labeling or directly used for model training.

[0132] In a second aspect of the invention, an intimate behavior recognition device is also provided, see [link to relevant documentation]. Figure 6 , Figure 6 A schematic diagram of a closeness behavior recognition device provided in an embodiment of this application, the device comprising:

[0133] The video frame extraction module 601 is used to extract frames from the video to be identified to obtain one or more images to be identified, each image to be identified including at least two human bodies.

[0134] Human body detection module 602 is used to perform human body detection on one or more images to be identified, and determine the position information of each human body in the image frame to be identified;

[0135] The position recognition module 603 is used to identify the position of each human body key point according to the position information of each human body in the image frame to be recognized, wherein the human body key point corresponds to a human body part;

[0136] The behavior determination module 604 is used to determine whether there is intimate behavior between any two people based on the positional relationship of the key points of each human body identified.

[0137] In one possible implementation, the behavior determination module is specifically used to determine, for each pair of human bodies, whether the coordinate positions of the key points of the human bodies of the two human bodies intersect, based on the coordinate positions of the identified key points of the human bodies; when there is an intersection, it is determined that there is intimate behavior between the two human bodies.

[0138] In one possible implementation, the behavior determination module includes:

[0139] The combination determination submodule is used to determine the positions of multiple target body parts corresponding to key points of the target human body for each pair of human bodies, based on the coordinate positions of the identified key points of the human body, and obtain the combination of key point positions.

[0140] The similarity calculation submodule is used to calculate the similarity between the identified key point location combination and multiple preset key point location combinations;

[0141] The behavior determination submodule is used to determine that there is intimate behavior between the two people if the similarity between the identified key point location combination and any preset key point location combination is greater than a preset threshold.

[0142] In one possible implementation, the location identification module includes:

[0143] The distance calculation submodule is used to calculate the distance between every two human bodies based on the position information of each human body in the image frame to be identified.

[0144] The human body recognition submodule is used to identify the two closest human bodies based on the calculated distance between each pair of human bodies, wherein the two closest human bodies include a first human body and a second human body;

[0145] The location recognition submodule is used to identify the locations of key human points in the first human body and the second human body in the image to be recognized, respectively.

[0146] The behavior determination module is specifically used to determine whether the first human body and the second human body are engaging in intimate behavior based on the locations of key points identified in the first human body and the second human body.

[0147] In one possible implementation, the behavior determination module is specifically used to identify preset human body regions based on the positions of key points of the first human body and the second human body, respectively, to obtain the positions of multiple preset human body regions corresponding to each; to determine whether the positions of the multiple preset human body regions corresponding to the first human body and the multiple preset human body regions corresponding to the second human body overlap; if there is an overlap, it is determined that intimate behavior exists.

[0148] In one possible implementation, the behavior determination module includes:

[0149] The fitting and recognition submodule is used to identify the corresponding human posture, limb position and fitting line of key points based on the identified key points of the first human body and the second human body.

[0150] The matching and recognition submodule is used to match the fitted information of human posture, limb position and key points of the first human body and the second human body with the behavioral logic corresponding to multiple preset intimate behaviors, and to determine whether intimate behavior exists based on the matching results.

[0151] In one possible implementation, the preset intimate behavior is a hugging behavior, and the fitting and recognition submodule is specifically used to identify the corresponding human postures of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; to identify the corresponding limb positions of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; and to fit the key points of the legs with straight lines based on the positions of the key points of the first human body and the second human body respectively, so as to obtain the fitting lines of the key points.

[0152] The matching and recognition submodule is specifically used to determine whether the human postures corresponding to the first human body and the second human body are both standing or sitting; to determine whether the angle between the fitted lines of the key points of the two bodies is less than a first preset angle threshold; to determine whether the distance between the upper bodies of the two bodies is less than a first preset distance threshold; to determine whether the upper arms are crossed; and to determine whether the heads of the two bodies overlap or cross. If all of these are determined to be true, then it is determined that there is intimate behavior.

[0153] In one possible implementation, the preset intimate behavior is a kissing behavior, and the fitting and recognition submodule is specifically used to identify the corresponding human postures of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; to identify the corresponding limb positions of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body respectively; and to fit the key points of the legs with straight lines based on the positions of the key points of the first human body and the second human body respectively, so as to obtain the fitting lines of the key points.

[0154] The matching and recognition submodule is specifically used to determine whether the human postures corresponding to the first and second human bodies are both standing, sitting, or lying down; whether the angle between the fitted lines of the key points of the two bodies is less than a second preset angle threshold, or whether the distance between the fitted lines of the key points of the two bodies is less than a second preset distance threshold; whether the distance between the upper bodies of the two bodies is less than a third preset distance threshold; whether the arms of the two bodies are crossed; whether the heads of the two bodies are not crossed; and whether the eyes, eyebrows, or noses of the two bodies overlap. If all of these are determined to be true, then intimate behavior is determined to exist.

[0155] In one possible implementation, the preset intimate behavior is a marriage proposal behavior, and the fitting recognition submodule is specifically used to identify the corresponding human postures of the first human body and the second human body respectively based on the positions of the key points of the first human body and the second human body, wherein the first human body is a female human body and the second human body is a male human body.

[0156] The matching and recognition submodule is specifically used to determine whether the human posture of the first human being identified is a standing posture; and to determine whether the human posture of the second human being identified is a kneeling posture; if both are determined to be yes, then it is determined that there is intimate behavior.

[0157] In one possible implementation, the video frame extraction module is specifically used to perform human detection on one or more images to be identified, to obtain the number of human bodies in the one or more images to be identified; select one or more target images with two human bodies based on the detected number of human bodies; identify the gender and / or distance between the two human bodies in the target images; select one or more final images based on the identification results, wherein the two human bodies in the final images are of opposite genders and / or the distance between the two human bodies is less than a preset distance threshold; perform human detection on the final images to obtain the detection results of the two human bodies in the final images.

[0158] In one possible implementation, the video frame extraction module is specifically used to perform human detection on one or more images to be identified, determine the human detection box for each human body in the image frame to be identified, and identify and determine the position information of each human body in the image frame to be identified based on the position of the human detection box.

[0159] As can be seen, this intimate behavior recognition device can extract frames from the video to be recognized, then perform human detection on the extracted video frames, determine the position information of each human body in the image frame to be recognized, and identify the position of each human body's key points based on the position information of each human body in the image frame to be recognized. Thus, based on the positional relationship of the identified key points of each human body, it can be determined whether there is intimate behavior between each pair of human bodies, thereby realizing the automatic recognition of intimate behavior. This not only reduces labor costs but also improves the efficiency of intimate behavior recognition.

[0160] This invention also provides an electronic device, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0161] Memory 703 is used to store computer programs;

[0162] When processor 701 executes a program stored in memory 703, it performs the following steps:

[0163] Frames are extracted from the video to be identified to obtain one or more images to be identified, each image to be identified including at least two human bodies;

[0164] Human body detection is performed on one or more images to be identified to determine the position information of each human body in the image frame to be identified;

[0165] Based on the position information of each human body in the image frame to be identified, the position of the key points of each human body is identified, wherein the key points of the human body correspond to human body parts;

[0166] Based on the positional relationship of key points on each human body, it is determined whether there is intimate behavior between any two human bodies.

[0167] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0168] The communication interface is used for communication between the aforementioned terminal and other devices.

[0169] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0170] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0171] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the intimate behavior recognition methods described in the above embodiments.

[0172] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the intimate behavior recognition methods described in the above embodiments.

[0173] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0174] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0175] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, storage media, and computer program products are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0176] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for recognizing intimate behaviors, characterized in that, The method includes: Frames are extracted from the video to be identified to obtain one or more images to be identified, each image to be identified including at least two human bodies; Human body detection is performed on one or more images to be identified to determine the position information of each human body in the image frame to be identified; Based on the position information of each human body in the image frame to be identified, the location of key human body points of each human body is identified, including: calculating the distance between every two human bodies based on the position information of each human body in the image frame to be identified; identifying the two closest human bodies based on the calculated distance between every two human bodies, wherein the two closest human bodies include a first human body and a second human body; and identifying the location of key human body points of the first human body and the second human body in the image to be identified, respectively; wherein the key human body points correspond to human body parts. Based on the positional relationship of the key points of each human body identified, determine whether there is intimate behavior between each pair of human bodies, including: based on the position of the key points of the first human body and the second human body identified, determine whether there is intimate behavior between the first human body and the second human body. After determining that intimate behavior exists, the video to be identified is labeled according to the intimate behavior; The step of determining whether the first and second human bodies engage in intimate behavior based on the identified locations of key points on the first and second human bodies includes: Based on the identified key points of the first and second human bodies, the corresponding human posture, limb position and key point fitting lines are identified. The fitted information of human posture, limb position and key points corresponding to the first human body and the second human body is matched with the behavioral logic corresponding to multiple preset intimate behaviors, and the existence of intimate behaviors is determined according to the matching results; the preset intimate behaviors include kissing behavior, marriage proposal behavior and hugging behavior.

2. The method according to claim 1, characterized in that, The step of determining whether intimate behavior exists between any two individuals based on the positional relationships of key points on each identified individual includes: For each pair of human bodies, based on the coordinates of the identified key points, determine whether there is an overlap between the coordinates of the key points of the two human bodies; When there is an overlap, it is determined that there is intimate behavior between the two individuals.

3. The method according to claim 1, characterized in that, The step of determining whether intimate behavior exists between any two individuals based on the positional relationships of key points on each identified individual includes: For each pair of human bodies, based on the coordinates of the identified key points, the positions of multiple target body parts corresponding to the key points of the target human body are determined, resulting in a combination of key point positions. The similarity between the identified key point location combinations and multiple preset key point location combinations is calculated. If the similarity between the identified key point location combination and any preset key point location combination is greater than a preset threshold, it is determined that there is intimate behavior between the two people.

4. The method according to claim 1, characterized in that, The preset intimate behavior is hugging. The step of identifying the corresponding human posture, limb position, and fitted lines of key points based on the identified positions of the first and second human bodies includes: Based on the positions of the key points of the first and second human bodies, the corresponding human postures are identified respectively; based on the positions of the key points of the first and second human bodies, the corresponding limb positions are identified respectively; based on the positions of the key points of the first and second human bodies, straight lines are fitted to the key points of the legs to obtain the fitted lines of the key points. The process of matching the fitted information of the human posture, limb position, and key points corresponding to the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results, includes: Determine whether the human postures of the first and second human bodies are both standing or sitting; determine whether the angle between the fitted lines of the key points of the two bodies is less than a first preset angle threshold; determine whether the distance between the upper bodies of the two bodies is less than a first preset distance threshold; determine whether the upper arms are crossed; determine whether the heads of the two bodies overlap or cross. If both are determined to be yes, then intimate behavior is determined to exist.

5. The method according to claim 1, characterized in that, The preset intimate behavior is kissing. The step of identifying the corresponding human posture, limb position, and fitted lines of key points based on the identified positions of the first and second human bodies includes: Based on the positions of the key points of the first and second human bodies, the corresponding human postures are identified respectively; based on the positions of the key points of the first and second human bodies, the corresponding limb positions are identified respectively; based on the positions of the key points of the first and second human bodies, straight lines are fitted to the key points of the legs to obtain the fitted lines of the key points. The process of matching the fitted information of the human posture, limb position, and key points corresponding to the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results, includes: The system determines whether the human postures of the first and second human bodies are both standing, sitting, or lying down; whether the angle between the fitted lines of the key points of the two bodies is less than a second preset angle threshold, or whether the distance between the fitted lines of the key points of the two bodies is less than a second preset distance threshold; whether the distance between the upper bodies of the two bodies is less than a third preset distance threshold; whether the arms of the two bodies are crossed; whether the heads of the two bodies are not crossed; and whether the eyes, eyebrows, or noses of the two bodies overlap. If both are determined to be yes, then intimate behavior is determined to exist.

6. The method according to claim 1, characterized in that, The preset intimate behavior is a marriage proposal behavior. The step of identifying the corresponding human posture, limb position, and fitted lines of key points based on the identified positions of the first and second human bodies includes: Based on the positions of the key points of the first and second human bodies identified, their corresponding human postures are identified respectively, wherein the first human body is a female human body and the second human body is a male human body. The process of matching the fitted information of the human posture, limb position, and key points corresponding to the first and second human bodies with the behavioral logic corresponding to multiple preset intimate behaviors, and determining whether intimate behavior exists based on the matching results, includes: Determine whether the human posture of the first identified human body is standing; determine whether the human posture of the second identified human body is kneeling on one knee. If both are determined to be yes, then intimate behavior is determined to exist.

7. The method according to claim 1, characterized in that, The step of performing human detection on one or more images to be identified, and determining the position information of each human body in the image frame to be identified, includes: Human detection is performed on one or more images to be identified to determine the human detection box for each human body in the image frame to be identified; The position information of each human body in the image frame to be identified is determined based on the position of the human body detection box.

8. A device for recognizing intimate behavior, characterized in that, The device includes: The video frame extraction module is used to extract frames from the video to be identified, obtaining one or more images to be identified, each of which includes at least two human bodies. The human body detection module is used to perform human body detection on one or more images to be identified, and determine the position information of each human body in the image frame to be identified; The location recognition module is used to identify the location of key points of each human body based on the location information of each human body in the image frame to be recognized, wherein the key points of the human body correspond to human body parts; The behavior determination module is used to determine whether there is intimate behavior between any two people based on the positional relationship of the key points of each human body identified. After determining that intimate behavior exists, the video to be identified is labeled according to the intimate behavior; The location recognition module includes: The distance calculation submodule is used to calculate the distance between each pair of human bodies based on the position information of each human body in the image frame to be identified; The human body recognition submodule is used to identify the two closest human bodies based on the calculated distance between each pair of human bodies, wherein the two closest human bodies include a first human body and a second human body; The location recognition submodule is used to identify the locations of key human points in the first human body and the second human body in the image to be recognized, respectively. The behavior determination module is specifically used to determine whether the first human body and the second human body are engaging in intimate behavior based on the identified key points of the first human body and the second human body. The behavior determination module includes: The fitting and recognition submodule is used to identify the corresponding human posture, limb position and fitting line of key points based on the identified key points of the first human body and the second human body. The matching and recognition submodule is used to match the fitted information of the human posture, limb position and key points corresponding to the first human body and the second human body with the behavioral logic corresponding to multiple preset intimate behaviors, and to determine whether there is an intimate behavior based on the matching result; the preset intimate behaviors include kissing behavior, marriage proposal behavior and hugging behavior.

9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and apparatus for estimating limb relations

    CN106803056A

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

    CN112633224A

  • Action recognition method and device, equipment and storage medium

    CN113792712A