Whole body segmentation

By combining first and second machine learning techniques to segment and smooth user images, the cost and complexity issues of depth sensors in existing augmented reality systems are solved, enabling accurate segmentation of the user's body and visual effects applications, thereby improving image quality and user experience.

CN117136381BActive Publication Date: 2026-07-21SNAP INC
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SNAP INC
Filing Date
2022-02-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing augmented reality systems require depth sensors to detect the user's body, which increases the cost and complexity of the device. At the same time, they cannot effectively recognize the user's entire body, resulting in degraded image quality and failed background replacement.

Method used

The user's image is segmented and smoothed using first and second machine learning techniques. The first machine learning technique processes the body segmentation of the current frame, while the second machine learning technique processes the estimated segmentation of the previous frame, correcting any deviations to achieve accurate segmentation of the user's body.

Benefits of technology

Without using a depth sensor, image quality is improved, enabling complete segmentation of the user's body and visual effects applications, enhancing the user experience, and reducing system resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117136381B_ABST
    Figure CN117136381B_ABST
Patent Text Reader

Abstract

Methods and systems are disclosed for performing operations including receiving a monocular image including a depiction of an entire body of a user, generating a segmentation of the entire body of the user based on the monocular image, accessing a video feed including a plurality of monocular images received prior to the monocular image, smoothing the segmentation of the entire body generated based on the monocular image using the video feed to provide a smoothed segmentation, and applying one or more visual effects to the monocular image based on the smoothed segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority Declaration

[0002] This application claims the benefit of priority to U.S. Patent Application Serial No. 17 / 249,239, filed on February 24, 2021, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This disclosure generally relates to the use of messaging applications to provide augmented reality experiences. Background Technology

[0004] Augmented reality (AR) is a modification of a virtual environment. For example, in virtual reality (VR), the user is fully immersed in a virtual world, while in AR, the user is immersed in a world where virtual objects are combined with or overlaid on the real world. AR systems are designed to generate and present virtual objects that realistically interact with and interact with each other in the real world environment. Examples of AR applications can include single-player or multiplayer video games, instant messaging systems, and more. Attached Figure Description

[0005] In accompanying drawings that are not necessarily drawn to scale, similar reference numerals may describe similar parts in different views. To facilitate identification of any particular element or action being discussed, one or more of the highest-order digits in the reference numerals indicate the drawing number in which the element was first introduced. Some non-limiting examples are shown in the accompanying drawings:

[0006] Figure 1 It is a graphical representation of a networked environment in which the present disclosure can be deployed, based on some examples.

[0007] Figure 2 It is a graphical representation based on some example messaging client applications.

[0008] Figure 3 It is a graphical representation based on examples such as data structures maintained in a database.

[0009] Figure 4 It is a graphical representation based on some example messages.

[0010] Figure 5 This is a block diagram illustrating an example segmentation estimation system based on the example.

[0011] Figures 6 to 9 This is a graphical representation of the output of a segmentation estimation system based on some examples.

[0012] Figure 10A and Figure 10B This is a flowchart illustrating example operations of a message application server based on an example.

[0013] Figure 11 It is a graphical representation of a machine in the form of a computer system, based on some examples, within which a set of instructions can be executed to cause the machine to perform any or more of the methods discussed herein.

[0014] Figure 12 It is a block diagram showing an example of a software architecture that can be implemented therein. Detailed Implementation

[0015] The following description includes systems, methods, techniques, instruction sequences, and computer program products that embody illustrative examples of the present disclosure. In this description, numerous specific details are set forth for illustrative purposes to provide an understanding of the various examples. However, it will be apparent to those skilled in the art that the examples can be practiced without these specific details. Typically, well-known examples of instructions, protocols, structures, and techniques are not necessarily shown in detail.

[0016] Typically, virtual reality (VR) and augmented reality (AR) systems display modified images representing a given user by capturing an image of that user and additionally using a depth sensor to obtain a depth map of the real-world human body depicted in the image. By processing the depth map and the image together, VR and AR systems can detect the user's location within the image and can appropriately modify the user or background within the image. While such systems work well, the requirement for depth sensors limits their applications. This is because adding a depth sensor to the user device for image modification increases the overall cost and complexity of the device, thus reducing their appeal.

[0017] Some systems do not require depth sensors to modify images. For example, some systems allow users to replace the background in a video conference by detecting the user's face. Specifically, such systems can use specialized techniques optimized to recognize the user's face and identify the background in an image depicting the user's face. These systems can then replace only the pixels depicting the background, thus replacing the real-world background in the image with an alternative background. However, such systems cannot recognize the user's entire body. Therefore, if the user is more than a threshold distance from the camera, so that not only the user's face is captured by the camera, background replacement with an alternative background begins to fail. In this case, image quality is severely affected, and parts of the user's face and body may be unintentionally removed by the system because the system incorrectly identifies such parts as background rather than foreground. Furthermore, when more than one user is depicted in an image or video feed, such systems cannot properly replace the background.

[0018] The disclosed technology improves the efficiency of using electronic devices by segmenting an image depicting the entire body of a user or multiple users and applying one or more visual effects to the image. Specifically, the disclosed technology applies a first machine learning technique to generate a segment of the user's body based on a single image of the user (e.g., to distinguish pixels corresponding to the user's body from pixels corresponding to the background of the image). The disclosed technology then smooths, filters, or improves the generated segment based on an estimated segmentation of the body depicted in a single image (e.g., the current frame of a video) generated by applying a second machine learning technique to previously received video frames of the user.

[0019] Specifically, a video depicting a user's body is received. The current frame of the video is processed using a first machine learning technique to segment the user's body in the current frame. A set of previous frames (e.g., 1 to 2 seconds of video before the current frame) is processed using a second machine learning technique to estimate the body segmentation for subsequent frames (e.g., the current frame). The segmentation of the current frame generated using the first machine learning technique is compared with the estimated segmentation predicted based on the previous frames using the second machine learning technique. Any deviations or differences between the two segments are then corrected using the second machine learning technique to smooth, refine, and filter the segmentation of the current frame generated using the first machine learning technique.

[0020] In some examples, the disclosed techniques apply a first machine learning technique to generate a segment of the user's body based on a single image of the user (e.g., to distinguish pixels corresponding to the user's body from pixels corresponding to the background of the image). This segmentation is stored and used to adjust or correct subsequent segments generated by the first machine learning technique based on received subsequent frames or images. Specifically, the disclosed techniques smooth, filter, or improve the segmentation generated for a second image (e.g., a subsequent frame) based on the previously generated segmentation of a first image (e.g., a previous frame). In this case, only the first machine learning technique is used, and no second machine learning technique is used to smooth or generate the segmentation.

[0021] In this way, the disclosed technique can apply one or more visual effects to a user's body segmented in a current image. For example, a different image or virtual background can be used to replace the real-world background to provide the illusion that the user's entire body is in a different environment or background. As another example, visual elements can be used to enhance or replace the boundaries of the user's body or parts of the user's body itself (e.g., dressing the user in different clothing or removing the display of one or more parts of the user). This improves the overall user experience when using electronic devices. Furthermore, by performing such segmentation without using a depth sensor, the total amount of system resources required to complete the task is reduced.

[0022] Networked computing environment

[0023] Figure 1 This is a block diagram illustrating an example messaging system 100 for exchanging data (e.g., messages and associated content) over a network. Messaging system 100 includes multiple instances of client devices 102, each hosting several applications, including a messaging client 104 and other external applications 109 (e.g., third-party applications). Each messaging client 104 is communicatively coupled via a network 112 (e.g., the Internet) to other instances of messaging client 104, a messaging server system 108, and an external application server 110 (e.g., hosted on corresponding other client devices 102). The messaging client 104 can also communicate with locally hosted third-party applications 109 using an application programming interface (API).

[0024] The messaging client 104 is able to communicate and exchange data with other messaging clients 104 and the messaging server system 108 via the network 112. The data exchanged between messaging clients 104 and between messaging clients 104 and the messaging server system 108 includes functions (e.g., commands to activate functions) and payload data (e.g., text, audio, video, or other multimedia data).

[0025] Message server system 108 provides server-side functionality to a specific message client 104 via network 112. While some functions of message system 100 are described herein as being performed by message client 104 or message server system 108, the location of certain functions—whether within message client 104 or message server system 108—may be a design choice. For example, it might be technically preferred that certain technologies and functions are initially deployed within message server system 108, but later migrated to message client 104 with sufficient processing power on client device 102.

[0026] The message server system 108 supports various services and operations provided to the message client 104. Such operations include sending data to and receiving data from the message client 104, and processing data generated by the message client 104. As an example, this data may include message content, client device information, geolocation information, media enhancements and overlays, message content persistence conditions, social network information, and on-site event information. Data exchange within the message system 100 is activated and controlled through functions available via the user interface (UI) of the message client 104.

[0027] Specifically, turning to message server system 108, application programming interface (API) server 116 is coupled to application server 114 and provides a programming interface to application server 114. Application server 114 is communicatively coupled to database server 120, which facilitates access to database 126, which stores data associated with messages processed by application server 114. Similarly, web server 128 is coupled to application server 114 and provides a web-based interface to application server 114. To this end, web server 128 processes incoming network requests via Hypertext Transfer Protocol (HTTP) and several other related protocols.

[0028] Application Programming Interface (API) server 116 receives and sends message data (e.g., commands and message payloads) between client device 102 and application server 114. Specifically, API server 116 provides a set of interfaces (e.g., routines and protocols) that can be invoked or queried by messaging client 104 to activate the functionality of application server 114. API server 116 exposes various functions supported by application server 114, including: account registration; login functionality; sending messages from one messaging client 104 to another messaging client 104 via application server 114; sending media files (e.g., images or videos) from messaging client 104 to messaging server 118 and providing possible access for another messaging client 104; setting media data collections (e.g., stories); retrieving the friend list of a user of client device 102; retrieving such collections; retrieving messages and content; adding and deleting entities (e.g., friends) in an entity graph (e.g., a social graph); locating friends in the social graph; and opening application events (e.g., related to messaging client 104).

[0029] Application server 114 hosts several server applications and subsystems, including, for example, message server 118, image processing server 122, and social networking server 124. Message server 118 implements several message processing technologies and functions, particularly those related to the aggregation and other processing of content (e.g., text and multimedia content) included in messages received from multiple instances of message client 104. As will be described in further detail, text and media content from multiple sources can be aggregated into collections of content (e.g., referred to as stories or galleries). These collections are then made available to message client 104. Such processing can also be performed on the server side by message server 118, given the hardware requirements for other processor- and memory-intensive data processing.

[0030] Application server 114 also includes image processing server 122, which is dedicated to performing various image processing operations, typically relative to the image or video in the payload of a message sent from or received at message server 118.

[0031] Image processing server 122 is used to implement the scanning function of augmented reality system 208. The scanning function includes activating and providing one or more augmented reality experiences on client device 102 when an image is captured by client device 102. Specifically, messaging application 104 on client device 102 can be used to activate a camera device. The camera device displays one or more live images or videos along with one or more icons or identifiers of the augmented reality experiences to the user. The user can select a given identifier from the identifiers to activate the corresponding augmented reality experience or perform desired image modifications (e.g., replacing the background or parts of one or more joints of the user's body).

[0032] Social networking server 124 supports various social networking functions and services and makes these functions and services available to message server 118. To this end, social networking server 124 maintains and accesses entity graph 308 (such as...) within database 126. Figure 3 (As shown). Examples of functions and services supported by the social network server 124 include identifying other users of the messaging system 100 who are related to a particular user or who are being "followed" by that particular user, as well as identifying the interests and other entities of a particular user.

[0033] Returning to messaging client 104, the features and functionalities of the external resource (e.g., third-party application 109 or applet) are made available to the user via the interface of messaging client 104. Messaging client 104 receives user selections regarding options for launching or accessing features of the external resource (e.g., third-party resource), such as external application 109. The external resource may be a third-party application (external application 109) installed on client device 102 (e.g., a “local application”), or a smaller version (e.g., an “app”) of a third-party application hosted on client device 102 or located away from client device 102 (e.g., on a third-party server 110). The smaller version of the third-party application comprises a subset of the features and functionalities of the third-party application (e.g., a full-scale local version of a third-party standalone application) and is implemented using markup language documentation. In one example, the smaller version of the third-party application (e.g., an “app”) is a web-based markup language version of the third-party application and is embedded in messaging client 104. In addition to using markup language documents (e.g., *ml files), mini-programs can include scripting languages ​​(e.g., .*js files or .json files) and style sheets (e.g., *ss files).

[0034] In response to receiving a user selection of an option for launching or accessing an external resource (external application 109), the messaging client 104 determines whether the selected external resource is a web-based external resource or a locally installed external application. In some cases, the external application 109, locally installed on the client device 102, can be launched independently of and separately from the messaging client 104, for example, by selecting an icon corresponding to the external application 109 on the home screen of the client device 102. A smaller version of such an external application can be launched or accessed via the messaging client 104, and in some examples, no part of the smaller external application can be accessed (or only a limited part can be accessed) outside of the messaging client 104. The smaller external application can be launched by receiving and processing a markup language document associated with the smaller external application from the external application server 110 via the messaging client 104.

[0035] In response to determining that the external resource is a locally installed external application 109, the messaging client 104 instructs the client device 102 to launch the external application 109 by executing locally stored code corresponding to the external application 109. In response to determining that the external resource is a web-based resource, the messaging client 104 communicates with the external application server 110 to obtain a markup language document corresponding to the selected resource. The messaging client 104 then processes the obtained markup language document to present the web-based external resource within the user interface of the messaging client 104.

[0036] Messaging client 104 can notify users of client device 102 or other users (e.g., "friends") associated with such users of one or more external resources. For example, messaging client 104 can provide participants in a conversation (e.g., a chat session) within messaging client 104 with notifications related to the current or recent use of external resources by one or more members of a group of users. One or more users can be invited to join an active external resource or to activate (within the friends group) a recently used but currently inactive external resource. External resources can provide participants in the conversation (each using the corresponding messaging client 104) with the ability to share items, conditions, states, or locations within the external resource with one or more members of the user group in the chat session. Shared items can be interactive chat cards that chat members can use to interact, for example, to activate the corresponding external resource, view specific information within the external resource, or take chat members to a specific location or state within the external resource. Within a given external resource, response messages can be sent to users on messaging client 104. External resources can selectively include different media items in the response based on the current context of the external resource.

[0037] The messaging client 104 can present a list of available external resources (e.g., third-party or external applications 109 or mini-programs) to the user to launch or access a given external resource. This list can be presented in a context-sensitive menu. For example, the icons representing different external applications 109 (or mini-programs) can change based on how the user launches the menu (e.g., from a conversational interface or from a non-conversational interface).

[0038] System Architecture

[0039] Figure 2 This is a block diagram illustrating further details of a messaging system 100 according to some examples. Specifically, the messaging system 100 is shown as including a messaging client 104 and an application server 114. The messaging system 100 includes several subsystems supported on the client side by the messaging client 104 and on the server side by the application server 114. These subsystems include, for example, a short-lived timer system 202, a collection management system 204, an enhancement system 208, a map system 210, a game system 212, and an external resource system 220.

[0040] The short-lived timer system 202 is responsible for enabling temporary or time-limited access to content by the message client 104 and the message server 118. The short-lived timer system 202 includes several timers that selectively enable access to messages and associated content via the message client 104 (e.g., for rendering and display) based on duration and display parameters associated with a message or set of messages (e.g., a story). Further details regarding the operation of the short-lived timer system 202 are provided below.

[0041] The collection management system 204 is responsible for managing collections or sets of media (e.g., collections of text, images, video, and audio data). Collections of content (e.g., messages, including images, videos, text, and audio) can be organized into "event libraries" or "event stories." Such collections can be made available for a specified time period (e.g., the duration of an event related to the content). For example, content related to a concert can be made available as a "story" for the duration of the concert. The collection management system 204 can also be responsible for publishing icons that notify the user interface of the messaging client 104 of the existence of a specific collection.

[0042] Furthermore, the collection management system 204 includes a curation interface 206, which enables collection managers to manage and curate specific content collections. For example, the curation interface 206 allows event organizers to curate collections of content related to a specific event (e.g., removing inappropriate content or redundant messages). Additionally, the collection management system 204 employs machine vision (or image recognition technology) and content rules to automatically curate content collections. In some examples, users may be paid compensation for including user-generated content in the collection. In such cases, the collection management system 204 operates to automatically pay such users for using their content.

[0043] Enhancement system 208 provides various functionalities that enable users to enhance (e.g., annotate or otherwise modify or edit) media content associated with a message. For example, enhancement system 208 provides functionality related to generating and publishing media overlays for messages processed by messaging system 100. Enhancement system 208 can operable to provide media overlays or enhancements (e.g., image filters) to messaging client 104 based on the geographic location of client device 102. In another example, enhancement system 208 can operable to provide media overlays to messaging client 104 based on other information such as the social network information of the user of client device 102. Media overlays can include audio and visual content and visual effects. Examples of audio and visual content include pictures, text, logos, animations, and sound effects. Examples of visual effects include color overlays. Audio and visual content or visual effects can be applied to media content items (e.g., photos) at client device 102. For example, media overlays can include text, graphic elements, or images that can be overlaid on top of a photograph taken by client device 102. In another example, media overlays include location identifier overlays (e.g., Venice Beach), names of on-site events, or business names overlays (e.g., Beach Cafe). In yet another example, enhancement system 208 uses the geolocation of client device 102 to identify media overlays that include the business name at the location of client device 102. Media overlays may include additional identifiers associated with the business. Media overlays may be stored in database 126 and accessed via database server 120.

[0044] In some examples, the enhancement system 208 provides a user-based publishing platform that allows users to select geographic locations on a map and upload content associated with those locations. Users can also specify which media overlays should be offered to other users. The enhancement system 208 generates a media overlay that includes the uploaded content and associates it with the selected geographic location.

[0045] In other examples, augmentation system 208 provides a merchant-based publishing platform that enables merchants to select specific media overlays associated with geographic locations via a bidding process. For example, augmentation system 208 associates the media overlay of the highest bidder with a corresponding geographic location for a predefined amount of time. Augmentation system 208 communicates with image processing server 122 to obtain augmented reality experiences and presents identifiers of such experiences in one or more user interfaces (e.g., as icons on live images or videos, or as thumbnails or icons in interfaces specifically for presenting augmented reality experiences). Once an augmented reality experience is selected, one or more images, videos, or augmented reality graphic elements are retrieved and presented as overlays on images or videos captured by client device 102. In some cases, the camera is switched to a frontal view (e.g., the front camera of client device 102 is activated in response to the activation of a specific augmented reality experience), and images from the front camera of client device 102, rather than the rear camera of client device 102, begin to appear on client device 102. One or more images, videos, or augmented reality graphics elements are retrieved and rendered as an overlay on an image captured and displayed by the front-facing camera of the client device 102.

[0046] In other examples, augmentation system 208 can communicate and exchange data with another augmentation system 208 on another client device 102 and a server via network 106. The exchanged data may include: a session identifier that identifies the shared AR session; a transformation between the first client device 102 and the second client device 102 (e.g., multiple client devices 102 including the first device and the second device) for aligning the shared AR session to a common origin; a common coordinate system; functions (e.g., commands for activation functions); and other payload data (e.g., text, audio, video, or other multimedia data).

[0047] The enhancement system 208 sends a transformation to the second client device 102, allowing the second client device 102 to adjust its AR coordinate system based on the transformation. In this way, the first and second client devices 102 synchronize their coordinate systems and frames to display content in the AR session. Specifically, the enhancement system 208 calculates the origin of the second client device 102 in the coordinate system of the first client device 102. The enhancement system 208 then determines an offset in the coordinate system of the second client device 102 based on the position of this origin in the coordinate system of the second client device 102 from its perspective. This offset is used to generate a transformation that allows the second client device 102 to generate AR content based on a shared coordinate system with the first client device 102.

[0048] Enhancement system 208 can communicate with client device 102 to establish individual or shared AR sessions. Enhancement system 208 can also be coupled to messaging server 118 to establish electronic group communication sessions (e.g., group chat, instant messaging) for client device 102 within a shared AR session. The electronic group communication session can be associated with a session identifier provided by client device 102 to gain access to both the electronic group communication session and the shared AR session. In one example, client device 102 first gains access to the electronic group communication session and then obtains a session identifier within the electronic group communication session that allows client device 102 to access the shared AR session. In some examples, client device 102 can access the shared AR session without the assistance of enhancement system 208 in application server 114 or without communicating with enhancement system 208 in application server 114.

[0049] Map system 210 provides various geolocation functions and supports the presentation of map-based media content and messages by messaging client 104. For example, map system 210 enables the display (e.g., stored in profile data 316) of user icons or avatars on a map to indicate the current or past locations of a user's "friends," as well as media content (e.g., a collection of messages including photos and videos) generated by such friends within the context of the map. For example, a message posted by a user from a specific geographic location to messaging system 100 can be displayed to a specific user's "friends" on the map interface of messaging client 104 within the context of that specific location on the map. A user can also share his or her location and status information with other users of messaging system 100 (e.g., using appropriate status avatars) via messaging client 104, where the location and status information is similarly displayed to selected users within the context of the map interface of messaging client 104.

[0050] Game system 212 provides various game functions within the context of messaging client 104. Messaging client 104 provides a game interface that offers a list of available games (e.g., web-based games or web-based applications), which can be initiated by a user within the context of messaging client 104 and played with other users of messaging system 100. Messaging system 100 also enables specific users to invite other users to participate in specific games by sending invitations from messaging client 104. Messaging client 104 also supports both voice and text messaging (e.g., chat) within the game context, provides leaderboards for games, and also supports providing in-game rewards (e.g., game currency and items).

[0051] External resource system 220 provides messaging client 104 with an interface for communicating with external application server 110 to launch or access external resources. Each external resource (application) server 110 hosts, for example, markup language-based applications (e.g., HTML5) or smaller versions of external applications (e.g., games, utilities, payment, or ride-sharing applications outside of messaging client 104). Messaging client 104 can launch a web-based resource by accessing an HTML5 file from the external resource (application) server 110 associated with that resource (e.g., an application). In some examples, the application hosted by external resource server 110 is programmed in JavaScript using a software development kit (SDK) provided by messaging server 118. The SDK includes application programming interfaces (APIs) with functionality that can be invoked or activated by the web-based application. In some examples, messaging server 118 includes a JavaScript library that provides access to certain user data of messaging client 104 to a given third-party resource. HTML5 is used as an example technology for programming games, but applications and resources programmed based on other technologies can be used.

[0052] To integrate the SDK's functionality into a web-based resource, the external resource (APP) server 110 downloads the SDK from the message server 118, or the external resource (app) server 110 receives the SDK in another manner. Once downloaded or received, the SDK is included as part of the application code of the web-based external resource. The code of the web-based resource can then call or activate certain functions of the SDK to integrate the features of the message client 104 into the web-based resource.

[0053] The SDK stored on message server 118 effectively bridges external resources (e.g., third-party or external applications 109 or applets) with message client 104. This provides users with a seamless experience communicating with other users on message client 104 while preserving the look and feel of message client 104. To bridge communication between external resources and message client 104, in some examples, the SDK facilitates communication between external resource server 110 and message client 104. In some examples, a WebViewJavaScriptBridge running on client device 102 establishes two unidirectional communication channels between external resources and message client 104. Messages are sent asynchronously between external resources and message client 104 via these communication channels. Each SDK function activation is sent as a message and callback. Each SDK function is implemented by constructing a unique callback identifier and sending a message with that callback identifier.

[0054] By using the SDK, not all information from message client 104 is shared with external resource server 110. The SDK limits which information is shared based on the needs of the external resource. In some examples, each external resource server 110 provides the message server 118 with an HTML5 file corresponding to the web-based external resource. Message server 118 can add a visual representation (e.g., box art or other graphics) of the web-based external resource in message client 104. Once a user selects the visual representation or instructs message client 104 to access a feature of the web-based external resource via the message client 104's GUI, message client 104 obtains the HTML5 file and instantiates the resource required to access the feature of the web-based external resource.

[0055] The messaging client 104 presents a graphical user interface (GUI) for an external resource (e.g., a login page or title screen). During, before, or after presenting the login page or title screen, the messaging client 104 determines whether the initiated external resource has previously been authorized to access the user data of the messaging client 104. In response to determining that the initiated external resource has previously been authorized to access the user data of the messaging client 104, the messaging client 104 presents another GUI for the external resource, including its functionality and characteristics. In response to determining that the initiated external resource has not previously been authorized to access the user data of the messaging client 104, after a threshold time period (e.g., 3 seconds) of displaying the login page or title screen of the external resource, the messaging client 104 slides up a menu (e.g., animates the menu to float from the bottom of the screen to the middle or other part of the screen) to authorize the external resource to access the user data. This menu identifies the type of user data that the external resource will be authorized to use. In response to receiving a user selection of the accept option, the messaging client 104 adds the external resource to the list of authorized external resources and enables the external resource to access the user data from the messaging client 104. In some examples, message client 104 authorizes external resources to access user data based on the OAuth2 framework.

[0056] The messaging client 104 controls the type of user data shared with external resources based on the type of authorized external resource. For example, access to a first type of user data (e.g., a two-dimensional avatar of a user, with or without different avatar characteristics) is granted to external resources including full-scale external applications (e.g., third-party or external application 109). As another example, access to a second type of user data (e.g., payment information, a user's two-dimensional avatar, a user's three-dimensional avatar, and avatars with various avatar characteristics) is granted to external resources including smaller versions of external applications (e.g., a web-based version of a third-party application). Avatar representation characteristics include different ways of customizing the appearance and feel of the avatar representation (e.g., different poses, facial features, clothing, etc.).

[0057] The segmentation estimation system 224 segments the entire body of a user depicted in an image or multiple bodies of multiple users depicted in an image. As mentioned herein, the “entire body” of a user includes a predetermined combination of one or more skeletal body parts or joints of the user’s body (e.g., a combination of head joints, shoulder joints, and arm joints; a combination of shoulder joints and hip joints; or a combination of head joints, shoulder joints, hip joints, and leg joints). The segmentation estimation system 224 can perform object recognition on a captured video feed to detect the presence of one or more skeletal joints of the user. In response to determining that a detected skeletal joint matches a predetermined combination, the segmentation estimation system 224 determines that the entire body of the user is depicted in the video feed. The following is combined with… Figure 5 A schematic implementation of the segmentation estimation system 224 is shown and described.

[0058] Specifically, the segmentation estimation system 224 is a component accessible to an AR / VR application implemented on client device 102. The AR / VR application uses an RGB camera to capture monocular images of the user's real-world body. The AR / VR application applies various trained machine learning techniques to the captured images of the body and one or more previous frames depicting the body to segment the user's body in the images and apply one or more visual effects to the captured images. In some implementations, the AR / VR application continuously captures images of the user's body in real-time or periodically to continuously or periodically update the applied one or more visual effects. This allows the user to move around in the real world and view the updates of one or more visual effects in real time.

[0059] To enable AR / VR applications to apply one or more visual effects directly from captured RGB images, the AR / VR application obtains a first trained machine learning technique from segmentation estimation system 224. The first trained machine learning technique processes the captured RGB image to generate a segmentation corresponding to the body depicted in the captured RGB image. The AR / VR application also obtains a second trained machine learning technique from segmentation estimation system 224. The second trained machine learning technique processes one or more previously captured frames (e.g., video frames immediately preceding the RGB image 1 to 2 seconds) to estimate or predict segmentation for subsequent frames. Video frames of a threshold number of seconds (which may be user-defined, previously specified, and / or dynamically determined) may be stored continuously or periodically in a buffer, allowing video frames of the threshold number of seconds preceding the current RGB image to be accessed via the second trained machine learning technique. The output or prediction of the segmentation by the second trained machine learning technique is used to smooth, filter, or improve the segmentation generated by the first trained machine learning technique.

[0060] During training, the segmentation estimation system 224 obtains a first plurality of input training images, including different real-world bodies of the user. These training images also provide ground truth information relating to the segmentation of the body depicted in each image. A first machine learning technique (e.g., a deep neural network) is trained based on features from the plurality of training images. Specifically, the first machine learning technique extracts one or more features from a given training image and estimates the segmentation of the body. The first machine learning technique obtains ground truth information corresponding to the training images and adjusts or updates one or more coefficients to improve subsequent estimations of the segmentation.

[0061] During training, the segmentation estimation system 224 obtains a first plurality of input training videos comprising different real-world bodies (each having a number of frames corresponding to a threshold video duration such as 1 to 2 seconds). These training videos also provide ground truth information on the segmentation of the body relative to subsequent frames of each video. That is, the first training video can be associated with ground truth information identifying the segmentation of the body depicted in frames immediately following a given frame within the first training video. A second machine learning technique (e.g., a neural network) is trained based on features from the plurality of training videos. Specifically, the second machine learning technique extracts one or more features from a given training video and estimates or predicts the segmentation of the body in subsequent frames relative to previous frames of the training video. The second machine learning technique obtains ground truth information corresponding to the training videos and adjusts or updates one or more coefficients to improve subsequent estimates of the segmentation of the body depicted in subsequent videos.

[0062] Data Architecture

[0063] Figure 3 This is a schematic diagram illustrating a data structure 300 that can be stored in a database 126 of a message server system 108, according to certain examples. Although the contents of the database 126 are shown to include several tables, it should be understood that the data can be stored in other types of data structures (e.g., object-oriented databases).

[0064] Database 126 includes message data stored in message table 302. For any given message, this message data includes at least message sending data, message receiver (or recipient) data, and payload. See below for reference. Figure 4 Further details are described regarding information that can be included in the message and in the message data stored in message table 302.

[0065] Entity table 306 stores entity data and (for example, links to entity diagram 308 and profile data 316). Entities for which records are maintained within entity table 306 may include individuals, company entities, organizations, objects, locations, events, etc. Regardless of entity type, any entity whose data is stored in message server system 108 can be an identifiable entity. Each entity is provided with a unique identifier and an entity type identifier (not shown).

[0066] Entity graph 308 stores information about the relationships and associations between entities. As an example only, such relationships can be social, professional (e.g., working in the same company or organization), interest-based, or activity-based.

[0067] Profile data 316 stores various types of profile data about a specific entity. Based on privacy settings specified by the specific entity, profile data 316 can be selectively used and presented to other users of messaging system 100. In the case of an individual, profile data 316 includes, for example, a username, phone number, address, settings (e.g., notification and privacy settings), and an avatar representation (or a set of such avatar representations) selected by the user. A specific user can then selectively include one or more of these avatar representations in the content of messages transmitted via messaging system 100 and in a map interface displayed to other users by messaging client 104. The set of avatar representations may include “status avatars,” which present a graphical representation of a state or activity that a user can choose to communicate at a specific time.

[0068] In the case that the entity is a group, in addition to the group name, members and various settings of related groups (e.g., notifications), the group profile data 316 may similarly include one or more visual representations associated with the group.

[0069] Database 126 also stores enhancement data, such as overlays or filters, in enhancement table 310. The enhancement data is associated with and applied to videos (video data is stored in video table 304) and images (image data is stored in image table 312).

[0070] Database 126 can also store data related to individual and shared AR sessions. This data may include data transmitted between the AR session client controller of the first client device 102 and another AR session client controller of the second client device 102, as well as data transmitted between the AR session client controller and the augmentation system 208. The data may include a common coordinate system for establishing a shared AR scene, transformations between devices, session identifiers, images depicting the body, skeletal joint positions, wrist joint positions, feet, etc.

[0071] In one example, a filter is an overlay displayed as an image or video during presentation to the receiving user. Filters can be of various types, including those selected by the user from a set of filters presented to the sending user by the messaging client 104 as the sending user is composing a message. Other types of filters include geolocation filters (also known as geographic filters), which can be presented to the sending user based on geographic location. For example, a geolocation filter specific to a nearby or particular location can be presented by the messaging client 104 within the user interface based on geographic location information determined by the Global Positioning System (GPS) unit of the client device 102.

[0072] Another type of filter is a data filter, which can be selectively presented to the sending user by the messaging client 104 based on other inputs or information collected by the client device 102 during message creation processing. Examples of data filters include the current temperature at a specific location, the sending user's current travel speed, the battery life of the client device 102, or the current time.

[0073] Other augmented data that can be stored in image table 312 includes augmented reality content items (e.g., corresponding to an applied augmented reality experience). Augmented reality content items or augmented reality items can be real-time special effects and sounds that can be added to images or videos.

[0074] As described above, augmented data includes augmented reality content items, overlays, image transformations, AR images, and similar terms referring to modifications that can be applied to image data (e.g., video or images). This includes real-time modification, which modifies an image as it is captured by the device sensors (e.g., one or more cameras) of client device 102 and then displays the modified image on the screen of client device 102. This also includes modifications to stored content (e.g., modifiable video clips in a library). For example, in client device 102, which has access to multiple augmented reality content items, a user can use a single video clip with multiple augmented reality content items to see how different augmented reality content items will modify the stored clip. For example, by selecting different augmented reality content items for the content, multiple augmented reality content items with different pseudo-random motion models can be applied to the same content. Similarly, real-time video capture can be used with the illustrated modifications to show how the video image currently captured by the sensors of client device 102 will modify the captured data. Such data can be simply displayed on the screen without being stored in memory, or the content captured by the device's sensors can be recorded and stored in memory with or without modification (or both). In some systems, preview functionality can show different augmented reality content items that will be displayed simultaneously in different windows on the display. This can, for example, make it possible to view multiple windows with different pseudo-random animations on the display at the same time.

[0075] Therefore, using augmented reality content items and various systems, or other such transformation systems that modify content using that data, can involve the detection of objects (e.g., faces, hands, bodies, cats, dogs, surfaces, objects, etc.) in video frames; tracking these objects as they leave, enter, and move around within the field of view; and modifying or transforming them while tracking them. In various examples, different methods can be used to implement such transformations. Some examples may involve generating 3D mesh models of one or more objects; and using transformations of the models and animated textures within the video to implement the transformations. In other examples, tracking points on the objects can be used to place images or textures (which can be two-dimensional or three-dimensional) at the tracked locations. In further examples, neural network analysis of video frames can be used to place images, models, or textures within content (e.g., images or video frames). Thus, augmented reality content items refer both to the images, models, and textures used to create transformations within the content and to the additional modeling and analysis information required to implement such transformations using object detection, tracking, and placement.

[0076] Real-time video processing can be performed using any type of video data (e.g., video streams, video files, etc.) stored in the memory of any type of computerized system. For example, a user can load video files and store them in the device's memory, or the device's sensors can be used to generate video streams. Furthermore, computer-animated models can be used to process any object, such as a human face and parts of the human body, animals, or inanimate objects (e.g., chairs, cars, or other objects).

[0077] In some examples, when a specific modification is selected along with the content to be transformed, the computing device identifies the element to be transformed, and then, if the element to be transformed exists in the video frame, detects and tracks the element to be transformed. The elements of the object are modified according to the request for modification, thereby transforming the frames of the video stream. The transformation of the frames of the video stream can be performed using different methods for different types of transformations. For example, for a frame transformation that primarily refers to changes in the elements of the object, feature points of each element of the object are calculated (e.g., using an Active Shape Model (ASM) or other known methods). Then, for each element of at least one element of the object, a feature point-based mesh is generated. This mesh is used in a subsequent stage where the elements of the object in the video stream are tracked. During tracking, the aforementioned mesh for each element is aligned with the position of each element. Then, additional points are generated on the mesh. A first set of first points is generated for each element based on the request for modification, and a second set of points is generated for each element based on this set of first points and the request for modification. The frames of the video stream can then be transformed by modifying the elements of the object based on this set of first points and this set of second points, as well as the mesh. In this method, the background of the object being modified can also be changed or deformed by tracking and modifying the background of the object being modified.

[0078] In some examples, transforming certain regions of an object using its elements can be performed by calculating feature points for each element of the object and generating a mesh based on those calculated feature points. Points are generated on the mesh, and various regions are then generated based on those points. The elements of the object are then tracked by aligning the regions of each element with the positions of at least one element, and the properties of the regions can be modified based on modification requests, thereby transforming frames of the video stream. Depending on the specific modification request, the properties of the mentioned regions can be transformed in different ways. Such modifications can involve: changing the color of the region; removing at least some portions of the region from the frames of the video stream; including one or more new objects in the region based on the modification request; and modifying or distorting the elements of the region or object. In various examples, any combination of such modifications or other similar modifications can be used. For certain models to be animated, some feature points can be selected as control points to determine the entire state space of options for model animation.

[0079] In some examples of computer animation models that use face detection to transform image data, a specific face detection algorithm (e.g., Viola-Jones) is used to detect faces in the image. The Active Shape Model (ASM) algorithm is then applied to the facial regions of the image to detect facial feature reference points.

[0080] Other methods and algorithms suitable for face detection can be used. For example, in some examples, landmarks are used to locate features, which represent distinguishable points present in most of the images considered. For example, for a face landmark, the location of the left pupil could be used. If the initial landmark is not recognizable (e.g., if the person is wearing an eye patch), secondary landmarks can be used. Such a landmark identification process can be used for any such object. In some examples, a set of landmarks forms a shape. The shape can be represented as a vector using the coordinates of the points in the shape. One shape is aligned with another shape using a similarity transformation (allowing translation, scaling, and rotation) that minimizes the average Euclidean distance between the points of the shapes. The meanshape is the average of the aligned training shapes.

[0081] In some examples, a search for landmarks begins with a mean shape aligned with the position and size of a face determined by a global face detector. This search then repeats the following steps: proposing provisional shapes by adjusting the positions of shape points through template matching of the image texture around each point, and then conforming the provisional shapes to a global shape model until convergence occurs. In some systems, individual template matching is unreliable, and the shape model pools the results of weak template matching to form a stronger overall classifier. The entire search is repeated at each level of the image pyramid, from coarse to fine resolution.

[0082] The transformation system can capture image or video streams on a client device (e.g., client device 102) and perform complex image manipulations locally on client device 102 while maintaining an appropriate user experience, computation time, and power consumption. Complex image manipulations can include size and shape changes, emotion transformations (e.g., changing a face from frowning to smiling), state transformations (e.g., aging a subject, reducing apparent age, or changing gender), style transformations, application of graphical elements, and any other suitable image or video manipulations implemented by a convolutional neural network that has been configured to execute efficiently on client device 102.

[0083] In some examples, a computer animation model for transforming image data can be used by a system in which a user can use a client device 102 with a neural network to capture an image or video stream of the user (e.g., a selfie), the neural network operating as part of a messaging client 104 operating on the client device 102. A transformation system operating within the messaging client 104 determines the presence of a face within the image or video stream and provides a modification icon associated with the computer animation model to transform the data image, or the computer animation model can be presented as associated with the interface described herein. The modification icon includes changes that can be the basis for modifying the user's face in the image or video stream as part of a modification operation. Once a modification icon is selected, the transformation system initiates a process to transform the user's image to reflect the selected modification icon (e.g., generating a smiley face on the user). Once the image or video stream has been captured and the specified modification has been selected, the modified image or video stream can be presented in a graphical user interface displayed on the client device 102. The transformation system can implement a complex convolutional neural network on a portion of the image or video stream to generate and apply the selected modification. In other words, users can capture image or video streams and, once an edit icon has been selected, the modified result can be displayed in real-time or near real-time. Furthermore, while a video stream is being captured, the modifications can be persistent, and the selected edit icon remains toggled. Machine-trained neural networks can be used to achieve this type of modification.

[0084] A graphical user interface (GUI) presenting modifications performed by a transformation system can provide users with additional interactive options. Such options can be based on the interface used to initiate content capture and select specific computer animation models (e.g., initiated from a content creator user interface). In various examples, modifications can be persistent after the modification icon is initially selected. Users can toggle the modification on or off by tapping or otherwise selecting the face being modified by the transformation system, and save it for later viewing or browsing other areas of the imaging application. In cases where multiple faces are modified by the transformation system, users can globally toggle the modification on or off by tapping or selecting a single face being modified and displayed within the GUI. In some examples, individual faces within a group of multiple faces can be modified separately, or such modifications can be toggled individually by tapping or selecting a single face or a series of faces displayed within the GUI.

[0085] Story table 314 stores data about collections of messages, along with associated image, video, or audio data, compiled into collections (e.g., stories or libraries). The creation of a specific collection can be initiated by a specific user (e.g., each user maintaining records in entity table 306). A user can create a "personal story" in the form of a collection of content that has been created and sent / broadcast by that user. For this purpose, the user interface of messaging client 104 can include user-selectable icons that allow the sending user to add specific content to his or her personal story.

[0086] Collections can also constitute "live stories" as a collection of content from multiple users, created manually, automatically, or using a combination of manual and automatic techniques. For example, a "live story" can constitute a curated flow of user-submitted content from various locations and events. Users whose client devices have location services enabled and are at a co-location event at a specific time can be presented with the option to contribute content to a specific live story, for example, through the user interface of messaging client 104. The live story can be identified to the user by messaging client 104 based on their location. The end result is a "live story" told from a community perspective.

[0087] Another type of content collection is called a "location story," which allows users whose client devices 102 are located in a specific geographic location (e.g., on a college or university campus) to contribute to a specific collection. In some implementations, contributing to a location story may require secondary authentication to verify that the end user belongs to a specific organization or other entity (e.g., a student on a university campus).

[0088] As mentioned above, video table 304 stores video data, which in one example is associated with a message whose record is stored in message table 302. Similarly, image table 312 stores image data associated with messages whose message data is stored in entity table 306. Entity table 306 can associate various enhancements from enhancement table 310 with various images and videos stored in image table 312 and video table 304.

[0089] The trained machine learning technique 307 stores parameters that have been trained during the training of the segmentation estimation system 224. For example, the trained machine learning technique 207 stores trained parameters of one or more neural network machine learning techniques.

[0090] Segmentation training images 309 store multiple images depicting a user's real-world body. The multiple images stored in segmentation training images 309 include various depictions of real-world body poses and body segmentations, the segmentations indicating which pixels in the images correspond to the body and which pixels correspond to the background in the image. These segmentation training images 309 are used by segmentation estimation system 224 to train a first machine learning technique for generating segments of one or more bodies depicted in received RGB monocular images. In some cases, segmentation training images 309 include ground truth skeletal keypoints of one or more bodies depicted in the corresponding training monocular images. In some cases, segmentation training images 309 include multiple image resolutions of the bodies depicted in the images. Segmentation training images 309 may include labeled and unlabeled image and video data. Segmentation training images 309 may include depictions of the entire body of a particular user, images lacking depictions of any user (e.g., negative images), depictions of multiple users and the entire body of a user, and depictions of users at different distances from the image capture device.

[0091] Body pose training images 309 store multiple videos (1- to 2-second video segments) depicting the user's real-world body. The multiple videos stored in segmentation training images 309 include various depictions of the real-world body. The multiple videos also include ground truth information identifying body segmentation depicted in subsequent frames relative to the current or previous frame in each of the multiple videos. These segmentation training images 309 are used by segmentation estimation system 224 to train a second machine learning technique for predicting segmentation of subsequent frames based on received RGB monocular videos of the user's body.

[0092] Data communication architecture

[0093] Figure 4 This is a schematic diagram illustrating the structure of a message 400 according to some examples, generated by a message client 104 for transmission to another message client 104 or a message server 118. The content of a particular message 400 is used to populate a message table 302 stored in a database 126, which is accessible by the message server 118. Similarly, the content of message 400 is stored in memory as "in transit" or "in flight" data for client device 102 or application server 114. Message 400 is shown to include the following example components:

[0094] • Message Identifier 402: A unique identifier that identifies message 400.

[0095] • Message text payload 404: The text to be generated by the user via the user interface of the client device 102 and included in message 400.

[0096] • Message image payload 406: Image data captured by the camera component of the client device 102 or retrieved from the memory component of the client device 102 and included in the message 400. The image data used to send or receive the message 400 may be stored in the image table 312.

[0097] • Message video payload 408: Video data captured by the camera device component or retrieved from the memory component of the client device 102 and included in message 400. The video data used to send or receive message 400 may be stored in video table 304.

[0098] • Message audio payload 410: Audio data captured by the microphone or retrieved from the memory component of the client device 102 and included in message 400.

[0099] • Message enhancement data 412: Enhancement data (e.g., filters, labels, or other annotations or enhancements) representing enhancements to be applied to the message image payload 406, message video payload 408, or message audio payload 410 of message 400. Enhancement data for the sent or received message 400 can be stored in enhancement table 310.

[0100] • Message duration parameter 414: A parameter value in seconds indicating the amount of time, in which the content of the message (e.g., message image payload 406, message video payload 408, message audio payload 410) will be presented to the user via the message client 104 or made accessible to the user.

[0101] • Message geolocation parameter 416: Geographic location data (e.g., latitude and longitude coordinates) associated with the message's content payload. The payload may include multiple message geolocation parameter 416 values, each of which is associated with a content item included in the content (e.g., a specific image within the message image payload 406, or a specific video within the message video payload 408).

[0102] • Message Story Identifier 418: An identifier value that identifies one or more sets of content (e.g., “Stories” identified in Story Table 314) associated with a specific content item in the message image payload 406 of message 400. For example, multiple images within the message image payload 406 may each be associated with multiple sets of content using their respective identifier values.

[0103] • Message Tag 420: Each message 400 can be labeled with multiple tags, each of which indicates the subject of the content included in the message payload. For example, in the case where a specific image included in the message image payload 406 depicts an animal (e.g., a lion), the tag value can be included within the message tag 420 indicating the relevant animal. The tag value can be manually generated based on user input, or it can be automatically generated using, for example, image recognition.

[0104] • Message sender identifier 422: An identifier (e.g., a messaging system identifier, email address, or device identifier) ​​that indicates the user of the client device 102 on which message 400 is generated and from which message 400 is sent.

[0105] • Message recipient identifier 424: An identifier (e.g., message system identifier, email address, or device identifier) ​​indicating the user of the client device 102 to which message 400 is addressed.

[0106] The content (e.g., values) of each component of message 400 can be pointers to locations of stored content data values ​​in tables. For example, an image value in message image payload 406 can be a pointer to a location (or an address of a location) within image table 312. Similarly, a value in message video payload 408 can point to data stored in video table 304, a value stored in message enhancement data 412 can point to data stored in enhancement table 310, a value stored in message story identifier 418 can point to data stored in story table 314, and values ​​stored in message sender identifier 422 and message receiver identifier 424 can point to user records stored in entity table 306.

[0107] Segmentation estimation system

[0108] Figure 5 This is a block diagram illustrating an example segmentation estimation system 224 according to an example. The segmentation estimation system 224 includes a set of components 510 that operate on a set of input data (e.g., monocular images 501 depicting a user's real body, segmentation training image data 502, monocular video 403 depicting the user's body, and segmentation training video data 504). This set of input data is used during the training phase from body pose training images 309 stored in a database. Figure 3 The image is obtained from the RGB camera device of the client device 102 while the AR / VR application is being used, for example, by the messaging client 104. The segmentation estimation system 224 includes a first machine learning technology module 512, a segmentation module 514, a second machine learning technology module 517, a smoothing segmentation module 516, an image modification module 518, a visual effects selection module 519, and an image display module 520.

[0109] During training, the segmentation estimation system 224 receives given training images from segmentation training image data 502 (e.g., monocular images 501 depicting real-world bodies, such as images of a user's entire body including face, arms, torso, hips, and legs, or images depicting multiple real-world bodies of multiple users simultaneously). The segmentation estimation system 224 applies one or more machine learning techniques to the given training images using a first machine learning technique module 512. The first machine learning technique module 512 extracts one or more features from the given training images to estimate the segmentation of one or more bodies of the user depicted in the images. For example, the first machine learning technique module 512 acquires given training images depicting a user's face, arms, torso, hips, and legs. The first machine learning technique module 512 extracts features corresponding to the user's face and arms from the images to identify one or more skeletal joints and to segment or specify which pixels in the images correspond to the user's body and which pixels correspond to the background (or not to the user's body).

[0110] The first machine learning module 512 retrieves segmentation information associated with a given training image. The first machine learning module 512 compares the estimated segmentation (which, in the case of multiple users in the image, may include the identification of multiple bodies in the image) with the ground truth segmentation provided as part of the segmentation training image data 502. Based on a difference threshold, the first machine learning module 512 updates one or more coefficients and obtains one or more additional segmentation training images. After processing a specified number of epochs or batches of training images and / or when the difference threshold reaches a specified value, the first machine learning module 512 completes training, and the parameters and coefficients of the first machine learning module 512 are stored in the trained machine learning module 307.

[0111] In some examples, the first machine learning technique module 512 implements multiple segmentation models of the first machine learning technique. Each segmentation model of the first machine learning technique can be trained on different sets of training images associated with a specific resolution. That is, one segmentation model in the segmentation model can be trained to estimate the segmentation of an image with a first resolution (or a first resolution range). A second segmentation model in the segmentation model can be trained to estimate the segmentation of an image with a second resolution (or a second resolution range different from the first resolution range). In this way, different complexities of the first machine learning technique can be trained and stored. When a given device with certain capabilities uses an AR / VR application, a corresponding model among the various segmentation models can be provided to perform segmentation matching the capabilities of the given device. In some cases, multiple segmentation models of each machine learning technique implemented by the segmentation estimation system 224 can be provided, each segmentation model being configured to operate at a different level of complexity. The appropriate segmentation model with the appropriate level of complexity can then be provided to the client device 102 for segmenting one or more images.

[0112] During training, the segmentation estimation system 224 receives a given training video (e.g., a monocular video 503 depicting a real-world body or multiple bodies of multiple users simultaneously depicted in a video, such as images of a user's face, arms, torso, hips, and legs) from the segmentation training image data 502. The segmentation estimation system 224 applies one or more machine learning techniques to the given training video using a second machine learning technique module 517. The second machine learning technique module 517 extracts one or more features from the given training video to predict segmentation of the current frame or frames following previous frames of the video. For example, the second machine learning technique module 517 acquires a given training video depicting the movement of a user's face, arms, torso, hips, and legs across a set of frames spanning 1 to 2 seconds of video. The second machine learning technique module 517 extracts features corresponding to the user's face and arms from the video to predict segmentation of the user or multiple users in the current frame or frames following previous frames of the video.

[0113] The second machine learning module 517 predicts segmentation for one or more subsequent frames following a given training video frame. For example, the second machine learning module 517 may process frames 2 through 25 of a given video to predict the segmentation of a body depicted in frame 26 of the same video. The second machine learning module 517 compares the determined / predicted segmentation with a ground truth segmentation provided as part of the segmentation training image data 502. The ground truth segmentation may provide the ground truth segmentation for frame 26 for the movement of the body depicted in frames 2 through 25. Based on a difference threshold for the comparison, the second machine learning module 517 updates one or more coefficients and obtains one or more additional segmentation training videos. After processing a specified number of periods or batches of training videos and / or when the difference threshold reaches a specified value, the second machine learning module 517 completes training, and the parameters and coefficients of the second machine learning module 517 are stored in the trained machine learning module 307.

[0114] Specifically, the second machine learning module 517 processes a sequence of video frames that are 1 to 2 seconds immediately preceding the current frame. The second machine learning module 517 analyzes the movement of the segmentation sequence across video frames to predict the estimated segmentation in the current frame or frames following the current frame.

[0115] After training, the segmentation estimation system 224 receives input image 501 (e.g., a monocular image depicting a real-world body or multiple bodies, such as an image of a user's face, arms, torso, hips, and legs) as a single RGB image from client device 102. The segmentation estimation system 224 applies a first trained machine learning technique module 512 to the received input image 501 to extract one or more features representing the segmentation of one or more bodies depicted in image 501. The segmentation estimation system 224 applies a second trained machine learning technique module 517 to the received monocular video 503 to extract one or more features representing one or more bodies depicted in video 503 and to generate predictions or estimates of segmentation in subsequent frames.

[0116] The smoothing segmentation module 516 compares the estimated segmentation of the current frame generated by the first machine learning technique module 512 with the predicted segmentation generated by the second machine learning technique module 517. The smoothing segmentation module 516 adjusts, smooths, or filters any discrepancies in the segmentation to generate a smoothed segmentation of the current frame. In some cases, the smoothing segmentation module 516 generates segmentation boundaries based on the smoothed segmentation. Segmentation boundaries indicate a set of pixels located at the boundaries or edges of the segmentation. That is, segmentation boundary pixels correspond to the pixels between the background depicted in the image and the user's body. In some cases, the segmentation boundary pixels have a specified width (e.g., 3 to 4 pixels), in which case the segmentation boundary represents a segmentation edge of a specified width. In some cases, the smoothing segmentation module 516 applies a guided filter to the smoothed segmentation to improve the segmentation quality of the smoothed segmented portion within a specified number of pixels of the smoothed segmentation edge.

[0117] The number of previous video frames analyzed by the second machine learning module 517, or the duration of previously received video segments, can be set by the user, can be predetermined, or can be dynamically adjusted. In some cases, if the amount of segmentation filtering or correction determined by the first machine learning module 512 exceeds a specified threshold, the number of previous video frames analyzed can be increased (e.g., from 1 second video to 2 seconds video). In some cases, the number of previous video frames analyzed can be increased (e.g., from 1 second video to 2 seconds video) based on the distance between the user and the camera device exceeding a specified threshold.

[0118] The visual effects selection module 519 receives a selection of a virtualization mode from the client device 102. For example, a list of mode options may be presented to a user of an AR / VR application. In response to receiving a user selection of a given mode option from the list, the given mode is provided to the visual effects selection module 519 as a selection of the virtualization mode. The mode options may include: background removal options (e.g., replacing a real-world background with a virtual background); occlusion options (e.g., adding one or more augmented reality elements to a user's segment or body); cloning options (e.g., copying and pasting one or more images of a user by copying segments at one or more design locations in an image); video trimming options (e.g., removing one or more parts of a user's body); contouring effect options (e.g., rendering one or more augmented reality elements around segment boundaries, such as glow or shadow); animation frame options; body masking options; recoloring options (e.g., changing the color of parts of a user's body, such as replacing clothing worn by the user); ripple, grain, or flickering options (e.g., displaying one or more augmented reality elements in an image background); disappearance options; and body part cutting options. The virtualization mode selection controls how the segmentation of the user's body affects how visual elements in the image are displayed relative to the user. Figures 6 to 9 The schematic output shows one or more options that can be selected by the visual effects selection module 519 and discussed below.

[0119] Image modification module 518 can adjust the image captured by the camera device based on the mode selected by visual effects selection module 519 and the smoothed segmentation received from smoothing segmentation module 516. Image modification module 518 adjusts the way the background or user is presented in the image, for example, by changing the background, parts of the user, the user's visual attributes, and / or position. Image display module 520 combines the adjustments made by image modification module 518 into the received monocular image depicting the user's body. This image is provided by image display module 520 to client device 102, and can then be sent to another user or stored for later access and display.

[0120] Figures 6 to 9 This is a graphical representation of the output of a segmentation estimation system based on some examples. For example, such as Figure 6 As shown, the segmentation estimation system 224 generates a smoothed segment 610. The segmentation estimation system 224 can also generate a segmentation boundary 620 based on the smoothed segment 610. Based on the smoothed segment 610 and / or the segmentation boundary 620, the segmentation estimation system 224 can apply one or more visual effects to a monocular image or video.

[0121] In one example, such as Figure 7As shown, the segmentation estimation system 224 can modify the background of a monocular image or video. Specifically, the segmentation estimation system 224 can receive a monocular image 710. As discussed above, the segmentation estimation system 224 can generate a smoothed segmentation (e.g., smoothed segmentation 610). The segmentation estimation system 224 can determine that the user's entire body corresponds to pixel set 712 and the background corresponds to pixel set 716. The segmentation estimation system 224 can receive user input that navigates the user interface element 714 to modify the background of the monocular image 710. In response, the segmentation estimation system 224 generates an image 720 in which the pixel set 716 corresponding to the background has been replaced by another image or video 722. The image or video 722 can be selected by the user through the user interface element 714.

[0122] Specifically, such as Figure 7 As shown, the visualization mode selected by the user may include a selection of a background removal (replacement option). In response to receiving a selection of this option, the segmentation estimation system 224 identifies pixels in the monocular image 710 that correspond to the background (e.g., pixel set 716) of the monocular image 710 based on a segmentation (e.g., segmentation 610). To generate image 720, the segmentation estimation system 224 replaces the pixel set 716 corresponding to the background in the monocular image 710 with a different image or video 722.

[0123] In some cases, the visualization mode selected by the user may also include a recoloring option. In this case, in addition to replacing background pixels or as an alternative to replacing background pixels, the segmentation estimation system 224 also replaces pixels depicting the entire body in the image. Specifically, as Figure 7 As shown, segmentation estimation system 224 identifies a set of pixels 712 in monocular image 710 that corresponds to the user's entire body based on segmentation (e.g., segmentation 610). Segmentation estimation system 224 alters the color or attributes of one or more portions of a set of pixels, such as pixels corresponding to specific body parts of the user (e.g., an arm). Specifically, as shown in image 730, segmentation estimation system 224 replaces a set of pixels 716 in monocular image 710 corresponding to the background with a different image or video 732, and alters the color or attributes of one or more portions 734 of the set of pixels corresponding to the user's arm depicted in the image. In some cases, the color or attribute of the portion of the pixel set to be altered is selected by the user, for example, through navigation user interface element 714.

[0124] In some cases, the visualization mode selected by the user may also include a body part segmentation option. In this case, in addition to replacing background pixels or as an alternative to replacing background pixels, the segmentation estimation system 224 also replaces pixels of some parts or portions of the entire body depicted in the image. For example, the segmentation estimation system 224 identifies a set of pixels 712 of the monocular image 710 corresponding to the user's entire body based on a segmentation (e.g., segmentation 610). The segmentation estimation system 224 changes the color or attribute of one or more portions of the set of pixels, such as pixels corresponding to a specific body part of the user (e.g., an arm). The color or attribute of the pixels used to replace the portion of the pixel set may be selected based on background pixels. Specifically, the segmentation estimation system 224 replaces the color or attribute of one or more portions 734 of the set of pixels corresponding to the user's arm depicted in the image with pixel values ​​that match those of pixels in the background. In this way, one or more portions 734 of the pixel set appear in the image as if they have been removed from the user's entire body.

[0125] In some cases, user input is received to select bone regions to be removed (e.g., arm and leg regions). In response to this input, the segmentation estimation system 224 accesses a skeletal model that specifies the skeletal keypoints corresponding to the selected bone region. The segmentation estimation system 224 then selects portions of the pixel set corresponding to the skeletal keypoints for recoloring to match the background pixels surrounding the pixel set.

[0126] In some cases, the visualization mode selected by the user may also include a disappearance option. In this case, in addition to replacing background pixels or as an alternative to replacing background pixels, the segmentation estimation system 224 also replaces or removes pixels depicting the entire body in the image. For example, the segmentation estimation system 224 identifies the set of pixels 712 of the monocular image 710 corresponding to the user's entire body based on a segmentation (e.g., segmentation 610). The segmentation estimation system 224 changes the color or attributes of the pixel set to match the background image pixels. In this way, the set of pixels of segmentation 610 corresponding to the user's entire body appears to have been removed from the image, leaving only the background in the modified image.

[0127] In some cases, the visualization mode selected by the user may also include a cloning option. In this case, in addition to replacing the background pixels or as a substitute for the background pixels, the segmentation estimation system 224 also copies the portion of the image corresponding to segmentation 610 once or more. The copied portion can then be displayed at one or more user-specified or automatically determined locations, such as next to and / or behind the user depicted in the image. Specifically, as Figure 8As shown, the segmentation estimation system 224 identifies the set of pixels 810 in the monocular image 800 that correspond to the user's entire body based on segmentation (e.g., segmentation 610). Figure 8 As shown, the segmentation estimation system 224 copies the pixel set 810 of the monocular image 800. The segmentation estimation system 224 adds the copied pixel set 820 to other parts of the monocular image so that it is displayed adjacent to or opposite to the pixel set 810 in the monocular image 800 that corresponds to the entire body. The copied pixel set 820 can be added to the image 800 any number of times, such that multiple instances or copies of the pixel set 810 corresponding to the user appear simultaneously in the modified image 800.

[0128] In some cases, the user-selected visualization mode may also include an occlusion option. In this case, in addition to replacing background pixels or as an alternative to background pixels, the segmentation estimation system 224 adds one or more graphic elements to the pixels depicting the entire body in the image. Specifically, the segmentation estimation system 224 identifies a set 712 of pixels in the monocular image 710 corresponding to the user's entire body based on a segmentation (e.g., segmentation 610). The segmentation estimation system 224 retrieves graphic elements (e.g., augmented reality wings, horns, or equipment, or other user-selected graphic elements). The segmentation estimation system 224 selects a display position for the graphic elements based on user input or based on the type of the retrieved graphic elements. The segmentation estimation system 224 identifies a set of pixels in the set of pixels corresponding to the user's entire body that match the body part associated with the graphic element. The segmentation estimation system 224 adds the retrieved graphic element to the vicinity of the identified set of pixels or replaces the identified set of pixels. For example, the segmentation estimation system 224 adds wings to a set of pixels associated with the shoulders of the entire body.

[0129] In some cases, in response to receiving a contour option, the segmentation estimation system 224 accesses the segmentation boundary 620 of the entire body depicted in the image. In this case, the segmentation estimation system 224 can add graphical elements extending from the segmentation boundary 620. For example, as Figure 9 As shown, the segmentation estimation system 224 adds a shadow or glow effect 920 around the segmentation boundaries of the user 910 depicted in image 900. This results in a glow effect or shadow appearing around or behind the edges of the user 910 depicted in the image. Specifically, the segmentation estimation system 224 identifies the boundaries of the user's entire body based on the edges of the pixel set of segmentation 610. The segmentation estimation system 224 adds glowing or shadowing graphic elements along the boundaries of the user's entire body.

[0130] Figure 10AThis is a flowchart of a process 1000 for generating a segmentation of a user depicted in an image, based on some examples. Although a flowchart can describe operations as a sequential process, many of these operations can be performed in parallel or simultaneously. Furthermore, the order of operations can be rearranged. A process terminates when its operations are completed. A process can correspond to a method, a program, etc. The steps of a method can be performed in whole or in part, can be combined with some or all of the steps from other methods, and can be performed by any number of different systems or any part thereof (e.g., a processor included in any system).

[0131] At operation 1001, as discussed above, client device 102 receives a monocular image that includes a depiction of the user's entire body. For example, segmentation estimation system 224 may capture images depicting one or more entire bodies of one or more users (e.g., multiple users).

[0132] At operation 1002, as discussed above, client device 102 generates a segmentation of the user's entire body based on a monocular image. As an example, segmentation estimation system 224 can generate multiple segments of the entire body by applying a first machine learning technique to the image.

[0133] At operation 1003, as discussed above, segmentation estimation system 102 accesses a video feed comprising multiple monocular images received prior to the monocular image. For example, segmentation estimation system 224 may apply a second machine learning technique to the multiple previously received images depicting multiple whole bodies to predict segmentation of the multiple whole bodies in the currently received image.

[0134] At operation 1004, as discussed above, client device 102 uses a video feed to smooth the segmentation of the whole body generated based on the monocular image to provide a smoothed segmentation. For example, segmentation estimation system 224 can calculate the deviation between the segmentation of multiple whole bodies generated based on a first machine learning technique and the predicted segmentation generated by a second machine learning technique. Segmentation estimation system 224 can modify the segmentation generated by the first machine learning technique based on the deviation.

[0135] At operation 1005, as discussed above, client device 102 applies one or more visual effects to the monocular image based on the smoothed segmentation. For example, segmentation estimation system 224 may replace the background of multiple segments of an image depicting the user's entire body.

[0136] Figure 10BThis is a flowchart of a process 1010 for generating a segmentation of a user depicted in an image, based on some examples. Although a flowchart can describe operations as a sequential process, many of these operations can be performed in parallel or simultaneously. Furthermore, the order of operations can be rearranged. A process terminates when its operations are completed. A process can correspond to a method, a program, etc. The steps of a method can be performed in whole or in part, can be combined with some or all of the steps from other methods, and can be performed by any number of different systems or any part thereof (e.g., a processor included in any system).

[0137] At operation 1011, as discussed above, client device 102 receives a monocular image that includes a depiction of the user's entire body.

[0138] At operation 1012, as discussed above, client device 102 generates a segmentation of the user's entire body based on the monocular image. For example, segmentation estimation system 224 may apply a first machine learning technique and / or a second machine learning technique to the monocular image to segment the entire body of one or more users.

[0139] At operation 1013, as discussed above, client device 102 receives input to select a visualization mode.

[0140] At operation 1014, as discussed above, client device 102 applies one or more visual effects corresponding to the visualization mode to the monocular image based on segmentation.

[0141] Machine architecture

[0142] Figure 11This is a schematic representation of machine 1100, within which instructions 1108 (e.g., software, programs, applications, applets, apps, or other executable code) can be executed to cause machine 1100 to perform any or more of the methods discussed herein. For example, instructions 1108 can cause machine 1100 to perform any or more of the methods described herein. Instructions 1108 transform the general, unprogrammed machine 1100 into a specific machine 1100 programmed to perform the described and illustrated functions in the described manner. Machine 1100 can operate as a standalone device or can be coupled (e.g., networked) to other machines. In a networked deployment, machine 1100 can operate as a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. Machine 1100 may include, but is not limited to: server computers, client computers, personal computers (PCs), tablet computers, laptop computers, netbooks, set-top boxes (STBs), personal digital assistants (PDAs), entertainment media systems, cellular phones, smartphones, mobile devices, wearable devices (e.g., smartwatches), smart home devices (e.g., smart appliances), other smart devices, web devices, network routers, network switches, network bridges, or any machine capable of sequentially or otherwise executing instructions 1108 specifying actions to be taken by machine 1100. Furthermore, although only a single machine 1100 is shown, the term "machine" should also be considered to include a collection of machines that individually or jointly execute instructions 1108 to perform any one or more of the methods discussed herein. For example, machine 1100 may include client device 102 or any of several server devices forming part of message server system 108. In some examples, machine 1100 may also include both client and server systems, wherein certain operations of a particular method or algorithm are performed on the server side and certain operations of said particular method or algorithm are performed on the client side.

[0143] Machine 1100 may include a processor 1102, a memory 1104, and an input / output (I / O) unit 1138 that can be configured to communicate with each other via a bus 1140. In the example, processor 1102 (e.g., a central processing unit (CPU), a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a radio frequency integrated circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, processor 16016 and processor 1110 that execute instruction 1108. The term "processor" is intended to include multi-core processors, which may include two or more independent processors (sometimes referred to as "cores") capable of executing instructions simultaneously. Although Figure 11 Multiple processors 1102 are shown, but machine 1100 may include a single processor with a single core, a single processor with multiple cores (e.g., a multi-core processor), multiple processors with a single core, multiple processors with multiple cores, or any combination thereof.

[0144] Memory 1104 includes main memory 1112, static memory 1114, and memory cells 1116, all of which are accessible by processor 1102 via bus 1140. Main memory 1104, static memory 1114, and memory cells 1116 store instructions 1108 embodying any one or more of the methods or functions described herein. Instructions 1108 may also reside wholly or partially in main memory 1112, in static memory 1114, in machine-readable medium 1118 within memory cell 1116, in at least one processor of processor 1102 (e.g., in the processor's cache memory), or in any suitable combination thereof during execution by machine 1100.

[0145] I / O component 1138 may include various components for receiving input, providing output, generating output, sending information, exchanging information, capturing measurement results, etc. The specific I / O component 1138 included in a particular machine will depend on the type of machine. For example, a portable machine such as a mobile phone may include a touch input device or other such input mechanism, while a headless server machine may not include such a touch input device. It should be recognized that I / O component 1138 may include... Figure 11Many other components are not shown. In various examples, I / O component 1138 may include user output component 1124 and user input component 1126. User output component 1124 may include visual components (e.g., displays such as plasma display panels (PDPs), light-emitting diode (LED) displays, liquid crystal displays (LCDs), projectors, or cathode ray tube (CRT) displays), acoustic components (e.g., speakers), haptic components (e.g., vibration motors, resistance mechanisms), other signal generators, etc. User input component 1126 may include alphanumeric input components (e.g., keyboards, touchscreens configured to receive alphanumeric input, photoelectric keyboards, or other alphanumeric input components), point-based input components (e.g., mice, touchpads, trackballs, joysticks, motion sensors, or other pointing instruments), haptic input components (e.g., physical buttons, touchscreens or other haptic input components that provide the position and force of a touch or touch gesture), audio input components (e.g., microphones), etc.

[0146] In other examples, I / O component 1138 may include biometric component 1128, motion component 1130, environmental component 1132, or position component 1134, as well as various other components. For example, biometric component 1128 includes components for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body posture, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, sweating, or brain waves), and identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition). Motion component 1130 includes accelerometer components (e.g., accelerometers), gravity sensor components, and rotation sensor components (e.g., gyroscopes).

[0147] The environmental component 1132 includes, for example, one or more camera devices (with still image / photograph and video capabilities), lighting sensor components (e.g., photometers), temperature sensor components (e.g., one or more thermometers for detecting ambient temperature), humidity sensor components, pressure sensor components (e.g., barometers), acoustic sensor components (e.g., one or more microphones for detecting background noise), proximity sensor components (e.g., infrared sensors for detecting nearby objects), gas sensors (e.g., gas detection sensors for detecting the concentration of hazardous gases or measuring pollutants in the atmosphere for safety purposes), or other components that can provide indications, measurements, or signals corresponding to the surrounding physical environment.

[0148] Regarding the camera device, client device 102 may have a camera device system including, for example, a front-facing camera on the front surface of client device 102 and a rear-facing camera on the rear surface of client device 102. The front-facing camera may be used, for example, to capture still images and videos (e.g., "selfies") of the user of client device 102, and then the still images and videos may be enhanced using the aforementioned enhancement data (e.g., filters). The rear-facing camera may be used, for example, to capture still images and videos in a more conventional camera device mode, and similarly enhance these images using enhancement data. In addition to the front-facing and rear-facing cameras, client device 102 may also include a 360° camera for capturing 360° photos and videos.

[0149] Furthermore, the camera system of the client device 102 may include dual rear cameras (e.g., a main camera and a depth-sensing camera), or even include triple, quadruple, or quintuple rear camera configurations on the front and rear sides of the client device 102. For example, these multi-camera systems may include wide-angle cameras, ultra-wide-angle cameras, telephoto cameras, macro cameras, and depth sensors.

[0150] The position component 1134 includes a positioning sensor component (e.g., a GPS receiver component), an altitude sensor component (e.g., an altimeter or barometer that detects air pressure to obtain altitude), an orientation sensor component (e.g., a magnetometer), etc.

[0151] A wide variety of technologies can be used to implement communication. I / O component 1138 also includes communication component 1136, which is operable to couple machine 1100 to network 1120 or device 1122 via a corresponding coupling or connection. For example, communication component 1136 may include a network interface component or other suitable device that interfaces with network 1120. In further examples, communication component 1136 may include wired communication components, wireless communication components, cellular communication components, near field communication (NFC) components, etc. Components (e.g.) (low power consumption) Components and other communication components that provide communication via other modes. Device 1122 can be any peripheral device from another machine or various peripheral devices (e.g., a peripheral device coupled via USB).

[0152] Furthermore, communication component 1136 may detect identifiers or include components capable of operating to detect identifiers. For example, communication component 1136 may include a radio frequency identification (RFID) tag reader component, an NFC smart tag detection component, an optical reader component (e.g., an optical sensor for detecting one-dimensional barcodes such as Universal Product Code (UPC) barcodes, multi-dimensional barcodes such as Quick Response (QR) codes, Aztec codes, Data Matrix, Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2D barcodes, and other optical codes), or an acoustic detection component (e.g., a microphone for identifying audio signals from tags). Additionally, various information can be derived via communication component 1116, such as location derived via Internet Protocol (IP) geolocation, etc. Locations obtained through signal triangulation, locations obtained by detecting NFC beacon signals that can indicate a specific location, etc.

[0153] Various memories (e.g., main memory 1112, static memory 1114, and the memory of processor 1102) and storage units 1116 may store one or more sets of instructions and data structures (e.g., software) implemented or used by any or more of the methods or functions described herein. When executed by processor 1102, these instructions (e.g., instruction 1108) enable various operations to implement the disclosed examples.

[0154] Instructions 1108 can be sent or received over network 1120 via a network interface device (e.g., the network interface component included in communication component 1136), using a transmission medium and employing any of several known transmission protocols (e.g., Hypertext Transfer Protocol (HTTP)). Similarly, instructions 1108 can be sent or received via a transmission medium coupled to device 1122 (e.g., peer-to-peer coupling).

[0155] Software Architecture

[0156] Figure 12This is a block diagram 1200 illustrating a software architecture 1204 that can be installed on any one or more of the devices described herein. The software architecture 1204 is supported by hardware, such as a machine 1202 including a processor 1220, memory 1226, and I / O components 1238. In this example, the software architecture 1204 can be conceptualized as a stack of layers, where each layer provides a specific function. The software architecture 1204 includes layers such as an operating system 1212, libraries 1210, frameworks 1208, and applications 1206. Operationally, application 1206 activates API calls 1250 via the software stack and receives messages 1252 in response to API calls 1250.

[0157] Operating system 1212 manages hardware resources and provides public services. Operating system 1212 includes, for example, a kernel 1214, services 1216, and drivers 1222. Kernel 1214 serves as an abstraction layer between hardware and other software layers. For example, kernel 1214 provides functions such as memory management, processor management (e.g., scheduling), component management, networking, and security settings. Services 1216 can provide other public services to other software layers. Driver 1222 is responsible for controlling the underlying hardware or interfacing with the underlying hardware. For example, driver 1222 may include a display driver, a camera driver, etc. or Low-power drives, flash drives, serial communication drives (e.g., USB drives), Drivers, audio drivers, power management drivers, etc.

[0158] Library 1210 provides a common low-level infrastructure used by application 1206. Library 1210 may include system library 1218 (e.g., the C standard library) that provides functions such as memory allocation, string manipulation, and mathematical functions. Furthermore, library 1210 may include API library 1224, such as media libraries (e.g., libraries for supporting the rendering and manipulation of various media formats, such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Coding (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Picture Experts Group (JPEG or JPG) or Portable Web Graphics (PNG)), graphics libraries (e.g., the OpenGL framework for rendering graphic content on a display in two-dimensional (2D) and three-dimensional (3D) formats), database libraries (e.g., SQLite providing various relational database functions), web libraries (e.g., WebKit providing web browsing capabilities), etc. Library 1210 may also include various other libraries 1228 to provide many other APIs to application 1206.

[0159] Framework 1208 provides a common high-level infrastructure used by application 1206. For example, framework 1208 provides a variety of graphical user interface (GUI) functions, advanced resource management, and advanced location services. Framework 1208 can provide a wide range of other APIs that can be used by application 1206, some of which may be specific to a particular operating system or platform.

[0160] In the example, application 1206 may include home application 1236, contact application 1230, browser application 1232, book reader application 1234, location application 1242, media application 1244, messaging application 1246, game application 1248, and a wide variety of other applications such as external application 1240. Application 1206 is a program that performs the functions defined in the program. One or more applications 1206 can be created using various programming languages, such as object-oriented programming languages ​​(e.g., Objective-C, Java, or C++) or procedural programming languages ​​(e.g., C or assembly language). In a particular example, external application 1240 (e.g., an application developed by an entity other than a vendor of a particular platform using an ANDROID™ or IOS™ software development kit (SDK)) may be an application developed using an ANDROID™ or IOS™ software development kit. Mobile software running on a phone's mobile operating system or another mobile operating system. In this example, external application 1240 can activate API calls 1250 provided by operating system 1212 to facilitate the functions described herein.

[0161] Glossary

[0162] "Carrier signal" refers to any intangible medium or other intangible medium capable of storing, encoding, or carrying machine-executable instructions and including digital or analog communication signals. Instructions can be sent or received over a network using a transmission medium via a network interface device.

[0163] "Client device" refers to any machine that interfaces with a communication network to obtain resources from one or more server systems or other client devices. Client devices can be, but are not limited to, mobile phones, desktop computers, laptop computers, portable digital assistants (PDAs), smartphones, tablet computers, ultrabooks, netbooks, laptop computers, multiprocessor systems, microprocessor-based or programmable consumer electronics, game consoles, set-top boxes, or any other communication device that a user can use to access the network.

[0164] "Communication network" refers to one or more parts of a network, which can be an ad hoc network, intranet, extranet, virtual private network (VPN), local area network (LAN), wireless LAN (WLAN), wide area network (WAN), wireless WAN (WWAN), metropolitan area network (MAN), the Internet, a part of the Internet, a part of the Public Switched Telephone Network (PSTN), a POTS (Plain Old-Style Telephone Service) network, a cellular telephone network, a wireless network, etc. A network, other types of networks, or a combination of two or more such networks. For example, a network or part of a network may include a wireless network or a cellular network, and the coupling may be a Code Division Multiple Access (CDMA) connection, a Global System for Mobile Communications (GSM) connection, or other types of cellular or wireless coupling. In this example, the coupling can implement any data transmission technology of various types, such as Single Carrier Radio Transmission (1xRTT), Evolved Data Optimization (EVDO), General Packet Radio Service (GPRS), Enhanced Data Rate Evolution of GSM (EDGE), the 3rd Generation Partnership Project (3GPP) including 3G, fourth-generation wireless (4G) networks, Universal Mobile Telecommunications System (UMTS), High-Speed ​​Packet Access (HSPA), Global Microwave Access Interoperability (WiMAX), Long Term Evolution (LTE) standards, other data transmission technologies defined by various standards setting organizations, other long-distance protocols, or other data transmission technologies.

[0165] A "component" is a logical, device, or physical entity that has boundaries defined by functional or subroutine calls, branch points, APIs, or other technologies that provide partitioning or modularity for specific processing or control functions. Components can be combined with other components via their interfaces to perform machine processing. A component can be an encapsulated functional hardware unit designed for use with other components and can be part of a program that typically performs a specific function within a related function.

[0166] Components can constitute software components (e.g., code implemented on a machine-readable medium) or hardware components. A “hardware component” is a tangible unit capable of performing certain operations and which can be configured or arranged in a physical manner. In various example implementations, one or more computer systems (e.g., standalone computer systems, client computer systems, or server computer systems) or one or more hardware components (e.g., processors or processor groups) of a computer system can be configured by software (e.g., an application or application portion) to operate to perform certain operations described herein.

[0167] Hardware components can also be implemented mechanically, electronically, or in any suitable combination thereof. For example, a hardware component may include dedicated circuitry or logic permanently configured to perform certain operations. A hardware component may be a dedicated processor, such as a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). A hardware component may also include programmable logic or circuitry systems that are temporarily configured by software to perform certain operations. For example, a hardware component may include software executed by a general-purpose processor or other programmable processor. Once configured by such software, the hardware component becomes a specific machine (or a specific part of a machine) uniquely tailored to perform the configured function, and is no longer a general-purpose processor. It should be recognized that the decision to implement a hardware component mechanically in a dedicated and permanently configured circuitry system or in a temporarily configured (e.g., software-configured) circuitry system may be made for cost and time considerations. Therefore, the phrase “hardware component” (or “hardware-implemented component”) should be understood to include tangible entities, i.e., entities physically constructed, permanently configured (e.g., hardwired), or temporarily configured (e.g., programmed) to operate or perform certain operations described herein.

[0168] Consider an example where hardware components are temporarily configured (e.g., programmed), without requiring each of the hardware components to be configured or instantiated at any given time. For instance, in a case where the hardware components include a general-purpose processor that is configured by software to become a dedicated processor, the general-purpose processor can be configured at different times as its own distinct dedicated processor (e.g., including different hardware components). The software accordingly configures one or more specific processors to constitute a particular hardware component at one time and different hardware components at different times.

[0169] Hardware components can provide information to and receive information from other hardware components. Therefore, the described hardware components can be considered communicatively coupled. In the presence of multiple hardware components, communication can be achieved through signal transmission between two or more hardware components (e.g., via appropriate circuitry and buses). In examples where multiple hardware components are configured or instantiated at different times, such communication between hardware components can be achieved, for example, by storing information in a memory structure accessible to the multiple hardware components and retrieving information from that memory structure. For example, one hardware component can perform an operation and store the output of that operation in a memory device to which it is communicatively coupled. Another hardware component can then access that memory device at a subsequent time to retrieve and process the stored output. Hardware components can also initiate communication with input or output devices and can operate on resources (e.g., collections of information).

[0170] Various operations of the example methods described herein can be performed, at least in part, by one or more processors configured, either temporarily (e.g., by software) or permanently, to perform the relevant operations. Whether temporarily or permanently configured, such processors can constitute components of a processor implementation that operate to perform one or more operations or functions described herein. As used herein, "processor-implemented component" refers to a hardware component implemented using one or more processors. Similarly, the methods described herein can be implemented, at least in part, by processors, where a particular processor or one or more processors are examples of hardware. For example, at least some operations of the methods can be performed by one or more processors 1102 or processor-implemented components. Furthermore, the one or more processors can also operate to support the execution of relevant operations in a "cloud computing" environment or as a "Software as a Service" (SaaS) operation. For example, at least some operations can be performed by a group of computers (as an example of a machine including processors), where these operations are accessible via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., APIs). The execution of certain operations can be distributed among processors, not residing solely within a single machine, but deployed across several machines. In some examples, the processor or processor-implemented components may be located in a single geographic location (e.g., within a home environment, an office environment, or a server cluster). In other examples, the processor or processor-implemented components may be distributed across several geographic locations.

[0171] "Computer-readable storage medium" refers to both machine-readable storage media and transmission media. Therefore, these terms include both storage devices / media and carrier / modulated data signals. The terms "machine-readable medium," "computer-readable medium," and "device-readable medium" refer to the same thing and may be used interchangeably in this disclosure.

[0172] A "brief message" is a message that is accessible for a limited time. Brief messages can be text, images, videos, etc. The access time for a brief message can be set by the message sender. Alternatively, the access time can be a default setting or a setting specified by the recipient. Regardless of the setting method, the message is transient.

[0173] "Machine storage medium" refers to one or more storage devices and media (e.g., centralized or distributed databases, and associated caches and servers) that store executable instructions, routines, and data. Therefore, this term should be considered to include, but is not limited to, solid-state memory and optical and magnetic media, including memory internal or external to the processor. Specific examples of machine storage media, computer storage media, and device storage media include: non-volatile memory, including, for example, semiconductor memory devices such as erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), FPGAs, and flash memory devices; disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms "machine storage medium," "device storage medium," and "computer storage medium" mean the same thing and may be used interchangeably in this disclosure. The terms "machine storage medium," "computer storage medium," and "device storage medium" expressly exclude carrier waves, modulated data signals, and other such media (at least some of which are covered by the term "signal medium").

[0174] "Non-transitory computer-readable storage medium" refers to a tangible medium capable of storing, encoding, or carrying instructions that can be executed by a machine.

[0175] "Signal medium" means any intangible medium capable of storing, encoding, or carrying machine-executable instructions and including digital or analog communication signals, or other intangible medium that facilitates the communication of software or data. The term "signal medium" should be considered to include any form of modulated data signal, carrier wave, etc. The term "modulated data signal" refers to a signal whose various characteristics are set or altered in a manner that encodes information in the signal. The terms "transmission medium" and "signal medium" refer to the same thing and may be used interchangeably in this disclosure.

[0176] Changes and modifications may be made to the disclosed examples without departing from the scope of this disclosure. Such and other changes or modifications are intended to be included within the scope of this disclosure as set forth in the appended claims.

Claims

1. A method for generating segmentation of a user depicted in an image, comprising: Monocular images, including a depiction of the user's entire body, are received by one or more processors. The one or more processors generate a segmentation of the user's entire body based on the monocular image; Access includes a video feed of multiple monocular images received prior to the monocular image; Using the video feed, the segmentation of the entire body generated based on the monocular images is smoothed to provide a smoothed segmentation, wherein smoothing the segmentation includes: applying the video feed to a second machine learning technique to predict one or more segments based on the depiction of the entire body in the plurality of monocular images; and Based on the smoothed segmentation, one or more visual effects are applied to the monocular image.

2. The method according to claim 1, wherein, The user's entire body includes a specified combination of the user's skeletal joints, and wherein the monocular image includes a depiction of multiple bodies of multiple users including the user, the method further including: generating multiple segments of the multiple bodies of the multiple users.

3. The method according to any one of claims 1 to 2, wherein, The monocular image is the first frame of the video, and the method further includes: The segmentation is generated using a first machine learning technique, wherein smoothing the segmentation of the entire body includes comparing the generated segmentation with a previous segmentation generated using the first machine learning technique based on the plurality of monocular images.

4. The method according to claim 3, wherein, The first machine learning technique includes a first deep neural network.

5. The method according to claim 4, further comprising: The first deep neural network is trained by performing the following operations: Receive training data, which includes multiple training monocular images and ground truth segmentation for each of the multiple training monocular images; The first deep neural network is applied to the first training monocular image among the plurality of training monocular images to estimate the segmentation of a given body depicted in the first training monocular image; Calculate the deviation between the ground truth segmentation associated with the first training monocular image and the estimated segmentation; The parameters of the first deep neural network are updated based on the calculated deviation; as well as The application steps, the calculation steps, and the update steps are repeated for each of the plurality of training monocular images.

6. The method according to claim 5, wherein, The plurality of training monocular images include ground truth skeletal keypoints of one or more bodies depicted in each training monocular image, wherein the first deep neural network estimates the skeletal keypoints of a given body depicted in the first training monocular image, and the method further includes updating the parameters of the first deep neural network based on the deviation between the estimated skeletal keypoints and the ground truth skeletal keypoints.

7. The method according to claim 5, wherein, The plurality of training monocular images include a plurality of image resolutions, and the method further includes generating a plurality of segmentation models based on the first deep neural network, wherein a first segmentation model among the plurality of segmentation models is trained based on a training monocular image having a first image resolution among the plurality of image resolutions, and a second segmentation model among the plurality of segmentation models is trained based on a training monocular image having a second image resolution among the plurality of image resolutions.

8. The method according to claim 5, wherein, The multiple training monocular images include multiple labeled image and video data and multiple unlabeled image and video data.

9. The method according to claim 5, wherein, The multiple training monocular images include depictions of the entire body of a specific user, images lacking depictions of any user, depictions of multiple users, and depictions of users at different distances from the image capture device.

10. The method according to claim 1, wherein, The second machine learning technique includes a second deep neural network, and wherein smoothing the segmentation includes comparing one or more segments of the whole body predicted by the second deep neural network with segments of the whole body generated by the first machine learning technique in a received monocular image.

11. The method of claim 10, further comprising: The second deep neural network is trained by performing the following operations: Receive training data including multiple training videos and ground truth segmentation for each of the multiple training videos; The second deep neural network is applied to the first training video among the plurality of training videos to predict the segmentation of the body in frames following the first training video; Calculate the deviation between the predicted segmentation of the body and the ground truth segmentation of the body depicted in frames following the first training video; The parameters of the second deep neural network are updated based on the calculated deviation; as well as The application steps, the calculation steps, and the update steps are repeated for each of the plurality of training videos.

12. The method according to any one of claims 1, 2, and 10, wherein, The plurality of monocular images are received within a threshold second prior to receiving the monocular image.

13. The method according to any one of claims 1, 2, and 10, further comprising: Calculate the segmentation boundaries of the user's entire body.

14. The method according to any one of claims 1, 2, and 10, further comprising: Determine the capabilities of one or more client devices used to capture the monocular images; as well as The segmentation model is selected based on the capabilities of one or more devices to generate the segmentation.

15. The method according to any one of claims 1, 2, and 10, further comprising: Based on the segmentation boundaries associated with the smoothed segmentation, one or more visual effects are applied to the monocular image.

16. The method according to any one of claims 1, 2, and 10, further comprising: A guided filter is applied to improve the segmentation quality of the following portion of the smoothed segmentation, which is located within a specified number of pixels of the smoothed segmentation edges.

17. The method according to any one of claims 1, 2, and 10, wherein, Applying one or more visual effects to the monocular image includes: replacing the background of the monocular image with a different background, or replacing the portion of the user depicted in the monocular image with a different visual element.

18. A system comprising: processor, and A memory component storing instructions that, when executed by the processor, cause the processor to perform operations including: Receive a monocular image, the monocular image including a depiction of the user's entire body; Based on the monocular image, a segmentation of the user's entire body is generated; Access includes a video feed of multiple monocular images received prior to the monocular image; Using the video feed, the segmentation of the entire body generated based on the monocular images is smoothed to provide a smoothed segmentation, wherein smoothing the segmentation includes: applying the video feed to a second machine learning technique to predict one or more segments based on the depiction of the entire body in the plurality of monocular images; and Based on the smoothed segmentation, one or more visual effects are applied to the monocular image.

19. A non-transitory computer-readable storage medium having instructions stored thereon, the instructions, when executed by a processor, causing the processor to perform operations including: Receive a monocular image, the monocular image including a depiction of the user's entire body; Based on the monocular image, a segmentation of the user's entire body is generated; Access includes a video feed of multiple monocular images received prior to the monocular image; Using the video feed, the segmentation of the entire body generated based on the monocular image is smoothed to provide a smoothed segmentation, wherein... Smoothing the segmentation includes applying the video feed to a second machine learning technique to predict one or more segments based on a depiction of the entire body in the plurality of monocular images; as well as Based on the smoothed segmentation, one or more visual effects are applied to the monocular image.