Social sharing method, device and computer-readable medium based on push-up detection
By identifying facial position and size changes in the push-up video frame sequence, accurately detecting and sharing pictures of push-ups, it solves the problem of being unable to accurately detect and share push-ups in the existing technology, and improves social experience and supervision capabilities.
Patent Information
- Application Number
- CN202111014530.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-31
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-08-31
AI Technical Summary
The existing technology cannot accurately detect and automatically capture the push-up action, resulting in the inability to objectively measure the user's push-up behavior, affecting the fun and supervision capabilities of social scenes.
By obtaining the push-up video of the user's face image, identify the face position and size information in the video frame sequence, identify the push-up action according to the changes, and extract social pictures from the video for sharing after recognition.
It achieves accurate detection and automatic sharing of users' push-up movements, improves social experience and fun, and meets users' push-up movement recording needs in social scenarios.
Smart Images

Figure CN113723307B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a social sharing method, device and computer-readable medium based on push-up detection. Background Art
[0002] Push-ups are a common daily exercise program. In some social scenarios, people have the need to use "push-ups" to socialize, such as: online push-up competitions, or punching in push-ups to achieve the goal of continuous fitness. However, due to the lack of means to accurately determine whether push-ups have been done through mobile devices such as mobile phones, it is impossible to objectively measure whether the user's push-up behavior is real and effective, which will lead to the loss of social interest and daily supervision capabilities. At the same time, such social scenarios are highly integrated with the push-up movements made by users. If some characteristic pictures can be captured during the push-up process as social sharing materials, it will effectively improve the integration of push-up exercise and social interaction and improve the interest of social interaction. Therefore, how to provide a solution that can accurately detect the push-up behavior of users and automatically capture pictures for sharing during the detection process is an urgent problem to be solved. Summary of the invention
[0003] One purpose of the present application is to provide a social sharing method, device and computer-readable medium based on push-up detection to solve the problem that there is currently a lack of solutions that can accurately detect push-up behavior and automatically capture pictures for sharing.
[0004] To achieve the above objectives, some embodiments of the present application provide a social sharing method based on push-up detection, the method comprising:
[0005] Obtain a push-up video including a user's facial image;
[0006] Acquire a video frame sequence from the push-up video, wherein the video frame sequence includes at least a plurality of first video frames arranged in time sequence;
[0007] Identify the position information of the user's facial image in the corresponding first video frame;
[0008] Determine the size information of the user's facial image in each first video frame according to the position information of the user's facial image in each first video frame;
[0009] According to the change of the size information of the user's facial image in the video frame sequence, the push-up action of the user is recognized;
[0010] After recognizing the push-up action of the user, extracting at least one second video frame including a facial image of the user from the push-up video;
[0011] The second video frame is shared as a social picture on a social platform.
[0012] In addition, an embodiment of the present application also provides a social sharing device based on push-up detection, which includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the social sharing method based on push-up detection.
[0013] The embodiment of the present application also provides a computer-readable medium having computer program instructions stored thereon, and the computer program instructions can be executed by a processor to implement the social sharing method based on push-up detection.
[0014] Compared with the prior art, in a social sharing solution based on push-up detection provided by an embodiment of the present application, a push-up video including a user's facial image can be obtained, and then a video frame sequence is obtained from the push-up video, the position information of the user's facial image in the corresponding first video frame is identified, and the size information of the user's facial image in each first video frame is determined according to the position information of the user's facial image in each first video frame, and the push-up action of the user is identified according to the change of the size information of the user's facial image in the video frame sequence, so that the user can collect the required push-up video through a user device with a camera function, such as a camera in a mobile phone, a tablet computer, etc., and each push-up action of the user can be accurately detected through subsequent processing. After the push-up action of the user is identified, at least one second video frame including the user's facial image can be extracted from the push-up video, and then the second video frame can be shared as a social picture on the social platform, so that pictures in the push-up process can be automatically captured and shared to meet the user's social needs for push-ups and enhance the social experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A processing flow chart of a social sharing method based on push-up detection provided in an embodiment of the present application;
[0016] Figure 2 A schematic diagram of the position relationship of the user device placed by the user to capture a push-up video in an embodiment of the present application;
[0017] Figure 3 A schematic diagram of a first video frame obtained in an embodiment of the present application;
[0018] Figure 4 A schematic diagram of another first video frame obtained in an embodiment of the present application;
[0019] Figure 5A flowchart of a method for identifying a user's push-up action in an embodiment of the application;
[0020] Figure 6 A processing flow chart for implementing push-up detection and social sharing using the solution provided in an embodiment of the present application;
[0021] Figure 7 A processing flow chart of the authentication function part in the social sharing method based on push-up detection provided in an embodiment of the present application;
[0022] Figure 8 A processing flow chart for implementing push-up detection and social sharing using another solution provided in an embodiment of the present application;
[0023] Fig. 9 A schematic diagram of the structure of a device for implementing social sharing based on push-up detection provided by an embodiment of the present application;
[0024] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0027] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0028] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0029] A social sharing method based on push-up detection is provided in an embodiment of the present application. The method can collect the required push-up videos through a user device with a camera function, such as a camera in a mobile phone, a tablet computer and other devices, and can accurately detect each push-up action of the user through subsequent processing. After the push-up action of the user is identified, at least one second video frame including a facial image of the user can be extracted from the push-up video, and then the second video frame can be shared as a social picture on a social platform, so that pictures of the push-up process can be automatically captured and shared, so as to meet the user's social needs for push-ups and enhance the social experience.
[0030] In actual scenarios, the execution subject of this method can be a user device, or a device formed by integrating a user device and a network device through a network. The data processing part of this solution can be implemented locally on the user device, or it can be implemented in the network device and the processing results can be provided to the user device through the network. For example, the image processing of the first video frame, the data processing of the position information and size information, the calculation of the credibility, etc. can all be provided by the user device to the network device. After the calculation is completed using the computing resources of the network device, the result is returned to the local user device. The interactive part is implemented by the user device, such as the acquisition of push-up videos, which can be completed by the user device based on the camera installed on it.
[0031] The user device may include but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, etc., and the network device may include but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0032] Figure 1 The processing flow of a social sharing method based on push-up detection provided by an embodiment of the present application is shown, which at least includes the following processing steps:
[0033] Step S101, acquiring a push-up video including a user's facial image. In actual scenarios, acquiring a push-up video can be achieved through various acquisition devices, where the acquisition device can be a camera connected to the user's device or a camera built into the user's device, etc. For example, the front camera of a mobile phone or tablet computer can be used to capture the user's push-up movements, and the user's facial image can be included in the lens.
[0034] Because in the solution provided in the embodiment of the present application, subsequent processing will require detection of push-up movements based on changes in the size of the user's facial image, so when acquiring a push-up video, the shooting direction of the push-up video needs to have a certain correspondence with the push-up movement direction, so that the user's facial image will undergo more significant changes in size in different first video frames as the push-up movement changes, thereby improving the accuracy of detection.
[0035] In the embodiment of the present application, the angle between the shooting direction of the push-up video and the push-up movement direction of the user can be set to be less than a preset value, such as the angle between the two can be limited to within a range of 5°, 10° or 20°, so as to obtain a good detection effect, and then a push-up video including the user's facial image is obtained based on the shooting direction. For example, in an actual scenario, if a mobile device such as a mobile phone or a tablet is used, the device can be placed under the user's face and the front camera of the mobile device can be used to shoot, so that the lens is perpendicular to the horizontal plane supported by the user, thereby obtaining a push-up video that meets the angle limit and includes the user's facial image. Specifically, Figure 2 shown.
[0036] In some embodiments of the present application, relevant video content can also be played to the user when conditions are met, wherein the preset conditions include at least one of the following: a push-up video including a user's facial image is currently being acquired; the push-up movements of the currently identified user do not meet the standard push-up movements; no new push-up movements are identified within a preset time, such as when the user suddenly stops doing push-ups but does not cancel the push-up detection function of the device.
[0037] In actual scenarios, corresponding to these different preset conditions, the related video content played can also show different specific content. For example, the related video content can be the currently acquired push-up video, which allows the user to view the push-up movements they are doing in real time. The related video content can also be a push-up teaching video, which allows the user to learn the correct push-up movements by referring to the standard teaching video. In addition, it can also be an interactive video of other users with whom the user is currently interacting, which allows the user to interact with other users through videos while doing push-ups, thereby enhancing the social experience.
[0038] In this way, in conjunction with a mobile device with a front camera, the device can capture push-up videos while playing relevant content that helps enhance the social experience to the user through the display screen, such as synchronously playing the captured push-up videos, push-up instructional videos, and video content of other users with whom the user is currently interacting, etc., making this solution more suitable for mobile social scenarios, and being able to conveniently view mobile devices without affecting push-ups, thereby enhancing the user experience.
[0039] In some embodiments of the present application, before acquiring a push-up video including a user's facial image, detection trigger information may also be acquired. This allows trigger detection to be implemented, and the user can actively control the device to acquire a push-up video including a user's facial image and perform subsequent detection processing by inputting trigger information when needed. In an actual scenario, the trigger information may be input based on a trigger operation performed by the user through the device. For example, when the user controls the device to enter a push-up function or application, the user clicks the start button, so that the device acquires the trigger information input based on the operation of clicking the start button to start shooting the push-up video, so that the device executes subsequent steps to complete the push-up detection.
[0040] Here, those skilled in the art should understand that the specific input form of the above-mentioned trigger information is only an example, and other forms based on similar principles that exist or will appear in the future, if applicable to the present application, should also be included in the scope of protection of the present application and included here by reference.
[0041] Step S102, obtaining a video frame sequence from the push-up video, wherein the video frame sequence includes at least a plurality of first video frames arranged in chronological order. The acquisition of the video frame sequence can be completed in real time and synchronously with the acquisition of the push-up video, that is, in the process of acquiring the push-up video, the required video frame sequence can be extracted from the push-up video in real time, without waiting for the entire push-up video to be shot, and then extracting the video frame sequence based on a segment of video data that has been shot, thereby improving the efficiency of the entire detection process.
[0042] When acquiring a video frame sequence, you can choose the granularity of the video frame sequence based on the needs of the actual application scenario. For example, if the most accurate detection effect is required, you can use each first video frame in the push-up video as a video frame sequence. In this case, since the first video frame contains complete information in the push-up video, the result obtained by detection will be the most accurate. However, since the number of first video frames that need to be processed is the largest, the computational load will be the highest.
[0043] In order to improve the detection efficiency, when acquiring the video frame sequence, the push-up video can be sampled, and the first video frame can be extracted from it according to a certain ratio. For example, if the push-up video is shot and acquired in a format of 30 frames per second, when acquiring the video frame sequence, it can be extracted in a format of 6 frames per second, that is, 1 frame is extracted from every 5 frames of the push-up video to form a video frame sequence. In addition, in order to avoid missing key frames, resulting in the loss of key information in the process of extracting the video frame sequence, the proportion of extracting the first video frame when acquiring the video frame sequence can be dynamically adjusted according to the speed of the user's push-up action. When the speed of the user's push-up action is faster, the sampling ratio can be higher, such as extracting 10 frames per second, and when the speed of the user's push-up action is faster, the sampling ratio can be lower, such as extracting 4 frames per second. In this way, while improving the detection efficiency, the loss of key information can be avoided and the accuracy of the detection can be improved.
[0044] Step S103: identifying the position information of the user's facial image in the corresponding first video frame.
[0045] The specific object corresponding to the user facial image can be set according to actual application requirements, and the user facial image can be an image of the user's facial features, an image of the user's eyes, an image of the user's mouth, an image of the user's nose, or an image of the user's facial skin. In addition, a combination of the above can also be used. By performing image recognition processing on each first video frame, the position information of the user's facial image in the corresponding first video frame can be identified from each first video frame.
[0046] In this embodiment, the position information can be expressed in the form of coordinates, for example, a vertex in the image range of the first video frame is used as the coordinate origin to establish a plane coordinate system, and each pixel point is used as a coordinate unit, so that the position of the user's facial image in the corresponding first video frame can be marked in the form of coordinates. Among them, the method of expressing the position information can be to pre-set the alignment point according to the specific form of the user's facial image. For example, when the image of the user's mouth is used as the user's facial image, the pixel point on the far right of the mouth image can be set as the alignment point, so as to determine the position information in each first video frame. The number of alignment points can be set to be greater than 1 according to the needs of the actual scene, for example, it can be set to 3, 5, etc.
[0047] In some embodiments of the present application, a neural network algorithm may be used to realize the recognition of position information, that is, each first video frame is input into a pre-trained neural network, and the position information of the user's facial image in the corresponding first video frame is output.
[0048] Step S104, determining the size information of the user's facial image in each first video frame according to the position information of the user's facial image in each first video frame. The size can be expressed in the form of pixel coordinate values, that is, the pixel coordinate values of the alignment points in the user's facial image. Figure 3 and Figure 4 Taking the two first video frames as an example, if the alignment point is set to the rightmost point in the image of the user's facial features, and the origin of its coordinate system is the vertex at the lower left corner of the first video frame, then Figure 3 The size information of the user's face image is the pixel coordinate value (x1, y1) of the alignment point p1, and Figure 4 The size information of the user's facial image in is the pixel coordinate value (x2, y2) of the alignment point p2. In actual use, only the coordinate value of one of the coordinate axes may be used, for example, only the pixel coordinate values x1 and x2 of the x-axis may be used.
[0049] Step S105, according to the change of the size information of the user's facial image in the video frame sequence, the push-up action of the user is identified. After the size information of each first video frame in the video frame sequence is determined, the change of its size information in the time dimension can be determined. Based on the movement law of the push-up action, it can be known that the continuous change process of the size information should be periodic, and each push-up action corresponds to the change process of the size information from "small-large-small" or "large-small-large" until the user stops doing push-ups.
[0050] In this way, after obtaining the continuous change process of the size information between all the first video frames in the video frame sequence, the push-up action of the user can be identified according to the change of the size information of the user's facial image in the video frame sequence. The identified push-up action can be recorded and saved locally or uploaded to the cloud. The recorded content may include the video content corresponding to the push-up action, the frequency of push-ups, the number of push-ups, etc.
[0051] Figure 5 The flowchart of a processing method for identifying a user's push-up action in an embodiment of the present application is shown, which at least includes the following processing steps:
[0052] Step S501, according to the time sequence of the first video frames in the video frame sequence, determine the change sequence of the size information of the user's facial image. For example, if the size information in 10 consecutive first video frames uses the pixel coordinate value of the x-axis, after arranging them in time sequence, they can form the following change sequence [840, 800, 850, 900, 950, 910, 845, 795, 850, 899].
[0053] Step S502, determining the maximum and minimum values of the size information in the change sequence. When solving the maximum and minimum values, a function can be first fitted based on the discrete values in the change sequence, and then the maximum and minimum values of these discrete values are determined by calculating the derivative. In the above-mentioned change sequence of this embodiment, the maximum value is 950, corresponding to the 5th first video frame, and the minimum values are 800 and 795, corresponding to the 2nd and 8th first video frames.
[0054] Step S503, identifies the periodic change process based on the maximum and minimum values as a push-up action of the user. The periodic change process may refer to a change process from a maximum value to a minimum value and then to a maximum value, or a change process from a minimum value to a maximum value and then to a minimum value. In this embodiment, the periodic change process is the corresponding change process of the 2nd to 8th first video frames, thereby identifying that the user has completed a push-up action during the 2nd to 8th first video frames. Based on this principle, all push-up actions performed by the user in a video can be identified, and the push-up actions can be accurately counted to meet the user's social needs for push-ups.
[0055] Here, those skilled in the art should understand that the specific forms of the above-mentioned position information and size information are only examples, and other forms based on similar principles that are currently available or will appear in the future should also be included in the scope of protection of this application if they are applicable to this application, and are included here by reference. For example, the position information can also be the coordinates of the pixel points that constitute the outline of the user's facial image, and the size information can be the number of pixel points within the range covered by the outline of the user's facial image. Therefore, the push-up action of the user can also be identified based on this form of size information and its changes.
[0056] Step S106: after the push-up action of the user is recognized, extract at least one second video frame from the push-up video.
[0057] Step S107, sharing the second video frame as a social picture on a social platform. After the push-up action of the user is recognized, it can be determined that the user is in a state of doing push-ups during the process of collecting the push-up video. At this time, the second video frame extracted from the push-up video contains the facial expression of the user during the push-up process, which can be shared as a social picture on a social platform, which can enhance the fun of social interaction.
[0058] Because in social scenarios, users often hope that the information they share can gain higher attention, therefore, in some embodiments of the present application, when extracting at least one second video frame from the push-up video, multiple candidate video frames can be first extracted from the push-up video, and then at least one second video frame whose popularity meets the first preset condition is determined from the multiple candidate video frames, so that the social pictures used for sharing can gain higher attention in social activities, further enhancing the social experience.
[0059] Among them, the popularity can represent the popularity of a second video frame as a social picture. When at least one second video frame whose popularity meets the first preset condition is determined among the multiple candidate video frames, each candidate video frame can be first input into a pre-trained neural network to output the popularity value of the corresponding candidate video frame. The popularity value can be a score that can represent the popularity of the picture.
[0060] When the neural network is trained, sample images can be obtained from the social platform. The sample images can come from images shared by different users on the social platform. These images can be similar to the social images shared by this solution, that is, images including user facial images taken by other users while doing push-ups. The popularity values of the sample images are marked by scoring these sample images. The scoring method can be a subjective evaluation by the user manually, or it can be an evaluation by collecting other information related to these sample images. For example, the number of interactions received by these sample images after release, such as the number of likes, comments, and reposts, can be collected, and then the popularity value is calculated based on these values according to the preset calculation rules, or these values can be directly used as the popularity value.
[0061] The neural network can be trained based on sample images with marked popularity values, and the parameters of the neural network can be adjusted iteratively to make the loss function meet the training requirements, thus completing the training of the neural network. Thus, the trained neural network can predict the input candidate video frames and predict the popularity values of the candidate video frames.
[0062] After obtaining the popularity values of each candidate video frame, the candidate video frame with the highest popularity value can be determined as the second video frame whose popularity meets the first preset condition, so that the most popular picture in the push-up video can be shared as a social picture on the social platform to enhance the user's social experience. For example, in this embodiment, 10 candidate video frames are extracted from a push-up video, namely f1~f10. After these 10 candidate video frames are input into the trained neural network, 10 popularity values K1~K10 corresponding to f1~f10 are output. After sorting these popularity values, the sorting result is: K5>K4>K8>K9>K1>K2>K3>K7>K10>K6. It can be seen that the popularity value K5 corresponding to the candidate video frame f5 is the highest, so the candidate video frame f5 can be determined as the second video frame whose popularity meets the first preset condition.
[0063] Here, those skilled in the art should understand that the above-mentioned specific forms of popularity meeting the first preset condition are only examples, and other forms based on similar principles that are currently available or will appear in the future should also be included in the scope of protection of the present application if they can be applied to the present application, and are included here by reference. For example, according to different needs when selecting the second video frame, N candidate video frames with the highest popularity values can also be selected as the second video frames whose popularity meets the first preset condition, or all candidate video frames whose popularity values exceed a certain threshold can be determined as the second video frames whose popularity meets the first preset condition, etc.
[0064] In other embodiments of the present application, in order to make the uploaded pictures have higher quality, the video frames contained in the push-up video can be purposefully screened when extracting candidate video frames. Thus, when extracting multiple candidate video frames from the push-up video, multiple candidate video frames whose picture quality meets the preset second preset condition can be extracted from the push-up video, so as to control the quality of social pictures and improve the social experience.
[0065] When extracting candidate video frames, a neural network can also be used. First, the video frames in the push-up video can be input into a pre-trained neural network, and the picture quality values of the corresponding video frames can be output. Then, the video frames whose picture quality values are higher than the preset value are determined as candidate video frames whose picture quality meets the second preset condition.
[0066] Among them, the picture quality can refer to the quality of the picture itself in terms of data attributes, such as clarity, etc., so that the clarity of the social pictures finally obtained for sharing can be higher. In addition, the picture quality can also refer to the quality of the content expressed by the picture in terms of social attributes, such as whether the content in the picture is beautiful enough, whether the picture expression of the picture is interesting enough, etc., so that the social pictures finally obtained for sharing can better meet the needs of social scenes, such as containing more interesting expressions, and the content of the captured facial images is more beautiful. In different application scenarios, any one or more forms of picture quality can be selected according to actual needs to screen the video frames in the push-up video, so as to obtain high-quality candidate video frames. Correspondingly, the picture quality value output by the neural network can also be a combination of one or several specific values such as picture clarity, picture beauty, and picture fun.
[0067] When training the neural network, the sample images can be manually labeled to determine their corresponding image quality values, and then input into the neural network for training. The parameters of the neural network can be adjusted iteratively to make the loss function meet the training requirements, and the training of the neural network can be completed. Thus, the trained neural network can predict the video frames in the input push-up video and predict the image quality values of these video frames.
[0068] Figure 6 The processing flow of implementing social picture sharing by using the solution provided by the present application is shown, which at least includes the following processing steps:
[0069] Step S601, acquiring a push-up video through camera shooting and extracting a video frame sequence, and then detecting whether the captured user is doing push-ups based on the video frame sequence.
[0070] Step S602: If it is detected that push-ups are being performed, a quality judgment is performed on the video frames in the push-up video to determine whether the image quality of the video frames meets the requirements.
[0071] Step S603: For video frames whose image quality meets the requirements, add them to the large candidate pool as candidate video frames.
[0072] Step S604: determine whether the popularity of the candidate video frames in the candidate pool meets the requirements.
[0073] Step S605: For the candidate video frame that meets the requirements, determine it as the second video frame, and publish it on the social platform as a social picture for sharing.
[0074] Therefore, while accurately detecting the user's push-up movements, at least one second video frame including the user's facial image can be extracted from the push-up video, and then the second video frame can be shared as a social picture on the social platform, so that pictures of the push-up process can be automatically captured and shared to meet the user's social needs for push-ups and enhance the social experience.
[0075] In other embodiments of the present application, in order to further improve the reliability of push-up recognition and prevent users from cheating by simulating push-up movements through other actions, a functional module for counterfeit detection can be added in addition to push-up recognition. Figure 7 The processing steps shown are:
[0076] Step S701, identifying the heartbeat representation information of the user in the corresponding first video frame. In some embodiments of the present application, a neural network algorithm can be used to realize the identification of the heartbeat representation information, that is, each first video frame is input into a pre-trained neural network, and the heartbeat representation information of the user in the corresponding first video frame is output.
[0077] Step S702: determining the user's heartbeat frequency according to changes in the heartbeat representation information in the video frame sequence.
[0078] The heartbeat characterization information includes characterization information corresponding to cardiac contraction and characterization information corresponding to cardiac diastole. When the heartbeat characterization information undergoes a periodic change, it represents the process of a heartbeat. For example, in this embodiment, the characterization information corresponding to cardiac contraction can be recorded as "+1", and the characterization information corresponding to cardiac diastole can be recorded as "-1". When the heartbeat characterization information changes from +1 to -1 and then to +1, it can be considered as a heartbeat. In this way, the correspondence between the heartbeat and the video frame sequence can be determined, such as N heartbeats for every M first video frames. Furthermore, combined with the frame rate of the video frame sequence, the user's heart rate during this period of time can be determined. For example, when the frame rate of the video frame sequence is 10 frames per second, the heart rate at this time is 10N / M times / second.
[0079] Since the first video frame includes the user's facial video, the different characteristics of the user's forehead during diastole and systole can be identified. For example, during systole, due to the pumping of arterial blood, the color of the blood flowing through the forehead should be reddish, and during diastole, due to the return of venous blood, the color of the blood flowing through the forehead should be darker. At this time, optical recognition can be used to identify the different colors of the forehead to determine different heartbeat characterization information. Here, those skilled in the art should understand that the specific form of the above-mentioned heartbeat characterization information is only an example. If other existing or future forms based on similar principles are applicable to this application, they should also be included in the scope of protection of this application and included here by reference.
[0080] When determining the user's heartbeat frequency based on the changes in the heartbeat representation information, the maximum and minimum values in the change sequence corresponding to the heartbeat representation information can also be used to realize the judgment of the period, and then determine the heartbeat frequency. The specific processing process can be as follows: first, according to the time sequence of the first video frame in the video frame sequence, the change sequence of the heartbeat representation information of the user's facial image is determined, and then the maximum and minimum values of the size information in the change sequence are determined, and finally the periodic change time based on the maximum and minimum values is determined as the user's heartbeat time, and the user's heartbeat frequency is determined based on the heartbeat time.
[0081] Step S703, determining the credibility of the currently recognized push-up action according to the heart rate and the frequency and / or number of the recognized push-up actions. In actual scenarios, the user's heart rate is related to the user's exercise intensity, that is, the more and faster the push-ups are done, the heart rate tends to rise. For example, when the user first starts doing push-ups, his heart rate is often low, and after the user has done a period of push-ups, his heart rate will be at a higher value.
[0082] Based on this principle, the credibility of the currently identified push-up action can be determined according to the heart rate and the frequency and / or number of the identified push-up actions. If the user simulates the push-up action through other non-labor-intensive actions, the heart rate and the frequency and / or number of the identified push-up actions will not be consistent with the association relationship, and a lower credibility will be obtained at this time. On the contrary, if the user is actually doing push-ups, the heart rate obtained and the frequency and / or number of the identified push-up actions will meet a certain association relationship, and a higher credibility will be obtained at this time. Thus, it can be judged whether the push-ups done by the user are effective, avoid cheating by the user, and improve the fun and supervision ability of social interaction based on push-ups. For example, in an actual scenario, a credibility threshold can be set. When the credibility of the determined push-up action is lower than the threshold, the push-ups done by the user can be judged invalid, and a reminder is sent to the user by sending a message to inform the user of the invalid result. In addition, the push-up statistics can be canceled after or without a reminder, such as directly clearing the number of push-ups to zero and restarting the counting after the credibility is higher than the threshold. This can be more suitable for social scenarios such as push-up competitions between multiple users, thereby improving the social experience.
[0083] In some embodiments of the present application, a neural network algorithm can be used to calculate the credibility, that is, the currently determined heart rate and the frequency and / or number of the identified push-up movements are input into a pre-trained neural network to output the credibility. In actual scenarios, the credibility can be a value in the numerical interval of (0-1), and a credibility threshold can be set to compare the currently determined credibility with the credibility threshold. If it is greater than the credibility threshold, it is determined that the currently identified push-up movement is credible and valid, and if it is less than the credibility threshold, it is determined that the currently identified push-up movement is uncredible and invalid.
[0084] In other embodiments of the present application, it is also possible to determine whether the current detection process is a valid detection by detecting whether the acquisition device has moved, wherein whether the movement has occurred can be determined by the displacement amplitude of the acquisition device during the detection process. For example, if the displacement exceeds a certain preset distance, it means that the current detection is invalid. Therefore, in the push-up detection method provided by the embodiment of the present application, the displacement amplitude of the acquisition device used to obtain the push-up video including the user's facial image during the detection process can also be obtained. If the displacement amplitude exceeds the preset value, it means that the acquisition device has moved to a certain extent, and the current detection will be judged to be invalid. At this time, the push-up detection can be paused or ended. If the pause processing method is adopted, the push-up detection can be continued after the displacement action is completed, and when the end processing method is adopted, the push-up detection can be restarted after the displacement action is completed.
[0085] Figure 8 The present invention shows a processing flow for implementing social picture sharing using another solution provided by the present application. The solution further combines the authentication processing of push-up actions, thereby further improving the reliability of push-up recognition. Specifically, the following processing steps are included:
[0086] Step S801, acquiring a push-up video through camera shooting and extracting a first video frame.
[0087] Step S802: Detect size information of the user's face image through the first video frame.
[0088] Step S803, identifying push-up movements according to the change in size information, and determining the number and frequency of push-up movements.
[0089] Step S804, detecting heartbeat representation information through the first video frame;
[0090] Step S805, calculating the heart rate according to the change of the heart rate representation information.
[0091] Step S806, calculating the credibility of the push-up action according to the frequency of the push-up action and the heart rate.
[0092] Step S807, judging whether the push-up action is valid based on the credibility, if not valid, returning to re-detection.
[0093] Step S808: If valid, output the results, such as the number and frequency of push-ups.
[0094] Step S809: If it is detected that push-ups are being performed, a quality judgment is performed on the video frames in the push-up video to determine whether the image quality of the video frames meets the requirements.
[0095] Step S810: For video frames whose image quality meets the requirements, add them to the large candidate pool as candidate video frames.
[0096] Step S811, determining whether the popularity of the candidate video frames in the candidate pool meets the requirements.
[0097] Step S812: For the candidate video frame that meets the requirements, determine it as the second video frame, and publish it on the social platform as a social picture for sharing.
[0098] Therefore, the user can collect the required push-up video through any user device with a camera function, such as a camera in a mobile phone, tablet computer and other devices, and through subsequent processing, each push-up action of the user can be accurately detected to meet the user's social needs for push-ups.
[0099] Based on the same inventive concept, a social sharing device based on push-up recognition is also provided in an embodiment of the present application. The method corresponding to the device is the social sharing method based on push-up recognition in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The device includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the aforementioned social sharing method based on push-up recognition.
[0100] Fig. 9 The structure of a device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the device 900 includes a central processing unit (CPU, Central Processing Unit) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 902 or the program loaded from the storage part 908 to the random access memory (RAM, Random Access Memory) 903. In RAM 903, various programs and data required for system operation are also stored. CPU 901, ROM 902 and RAM903 are connected to each other through bus 904. Input / output (I / O, Input / Output) interface 905 is also connected to bus 904.
[0101] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 908 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet.
[0102] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 901, the above functions defined in the method of the present application are executed.
[0103] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0104] In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0105] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0106] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0107] As another aspect, the present application further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more computer program instructions, which may be executed by a processor to implement the methods and / or technical solutions of the above multiple embodiments of the present application.
[0108] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0109] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A social sharing method based on push-up detection, wherein: The method includes: Obtain a push-up video including a user's facial image; Acquire a video frame sequence from the push-up video, wherein the video frame sequence includes at least a plurality of first video frames arranged in time sequence; Identify the position information of the user's facial image in the corresponding first video frame; Determine the size information of the user's facial image in each first video frame according to the position information of the user's facial image in each first video frame; Determine a change sequence of size information of the user's facial image according to the time sequence of the first video frame in the video frame sequence; Determine the maximum and minimum values of the size information in the change sequence; The periodic change process based on the maximum and minimum values is identified as a push-up action of the user; After recognizing the push-up action of the user, extracting a plurality of candidate video frames whose image quality meets a preset second preset condition from the push-up video; Determine at least one second video frame whose popularity meets a first preset condition among the plurality of candidate video frames; Sharing the second video frame as a social picture on a social platform; Identifying heartbeat representation information of a user in a corresponding video frame, wherein the heartbeat representation information includes representation information corresponding to cardiac contraction and representation information corresponding to cardiac diastole; Determine a change sequence of the heartbeat representation information of the user's facial image according to a time sequence of the video frames in the video frame sequence; Determine the maximum and minimum values of the size information in the change sequence; Determine the periodic change time based on the maximum value and the minimum value as one heartbeat time of the user, and determine the heartbeat frequency of the user based on the heartbeat time; The credibility of the currently recognized push-up action is determined according to the heartbeat frequency and the frequency and / or number of the recognized push-up actions.
2. The method according to claim 1, wherein: Determining at least one second video frame whose popularity meets a first preset condition from among a plurality of candidate video frames comprises: Input each candidate video frame into the pre-trained neural network and output the popularity value of the corresponding candidate video frame; The candidate video frame with the highest popularity value is determined as the second video frame whose popularity meets the first preset condition.
3. The method according to claim 1, wherein: Extracting a plurality of candidate video frames whose picture quality meets a preset second preset condition from the push-up video includes: Inputting video frames in the push-up video into a pre-trained neural network, and outputting picture quality values of corresponding video frames; The video frames whose picture quality values are higher than the preset value are determined as candidate video frames whose picture quality meets the second preset condition.
4. The method according to claim 3, wherein: The image quality value includes: image clarity, image aesthetics and / or image interest.
5. The method according to claim 1, wherein: Identifying the position information of the user's facial image in the corresponding first video frame includes: Each first video frame is input into a pre-trained neural network, and the position information of the user's facial image in the corresponding first video frame is output.
6. The method according to claim 1, wherein: The size information includes pixel coordinate values of alignment points in the user's facial image.
7. The method according to claim 1, wherein: The user face image includes at least one of the following: An image of the user's eyes; An image of the user’s mouth; An image of the user’s nose; An image of the user's facial skin.
8. The method according to claim 1, wherein: Get a push-up video that includes an image of the user's face, including: The angle between the shooting direction of the push-up video and the push-up movement direction of the user is set to be smaller than a preset value, and a push-up video including a user's facial image is acquired based on the shooting direction.
9. The method according to claim 1, wherein: The method further comprises: When a preset condition is met, relevant video content is played to the user, wherein the preset condition includes at least one of the following: Currently acquiring a push-up video that includes an image of the user's face; The push-up action of the currently recognized user does not meet the standard push-up action; No new push-up movements were recognized within the preset time.
10. The method according to claim 1, wherein: Identify the user's heartbeat representation information in the corresponding video frame, including: Each video frame is input into a pre-trained neural network, and the heartbeat representation information of the user in the corresponding video frame is output.
11. The method according to claim 1, wherein: Determining the credibility of the currently recognized push-up action according to the heartbeat frequency and the frequency of the push-up action includes: The heartbeat frequency and the frequency of the push-up action are input into a pre-trained neural network, and the credibility of the currently recognized push-up action is output.
12. A social sharing device based on push-up detection, the device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein: When the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 11.
13. A computer readable medium having computer program instructions stored thereon, the computer program instructions being executable by a processor to implement the method according to any one of claims 1 to 11.
