Deformation of real-world objects using image warping

By estimating the distorted fields and segmentation masks of real-world objects in AR systems using machine learning models, the problem of difficulty in accurately identifying and modifying the whole body of real-world objects in images in the prior art is solved, and an efficient and realistic AR experience is achieved.

CN119856197APending Publication Date: 2025-04-18SNAP INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202380064948.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-10-25
Filing Date
2023-09-07
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Existing augmented reality (AR) systems have difficulty accurately identifying and modifying the entire body of real-world objects depicted in images without using depth sensors, resulting in image quality degradation and unrealistic visual effects.

Method used

Deformation, transformation, change, or mixing of real-world objects to generate modified images by estimating or predicting distorted fields and/or segmentation masks of real-world objects depicted in images using machine learning models.

Benefits of technology

It enables efficient application of visual effects to real-world objects depicted in images or videos without the need for depth sensors, improving the authenticity and image quality of the AR experience, and reducing processing complexity and resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119856197A_ABST
    Figure CN119856197A_ABST
Patent Text Reader

Abstract

Methods and systems for performing real-time morphing operations are disclosed. The system receives an image including a depiction of a real-world object. The system applies a machine learning model to the image to generate a twist field and a segmentation mask, the machine learning model being trained to establish a relationship between a plurality of training images depicting the real-world object and corresponding real twist fields and segmentation masks associated with the target shape. The system applies the generated warping field and segmentation mask to the image to warp a real-world object depicted in the image into a target shape.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority declaration

[0002] This application claims the benefit of priority to Greek patent application serial number 20220100738 filed on September 12, 2022 and U.S. patent application serial number 17 / 973,295 filed on October 25, 2022, which are incorporated herein by reference in their entirety. Technical Field

[0003] The present disclosure generally relates to providing an augmented reality experience using a messaging application. Background Art

[0004] Augmented reality (AR) is a modification of a virtual environment. For example, in virtual reality (VR), the user is completely immersed in a virtual world, while in AR, the user is immersed in a world that combines virtual objects with the real world or superimposes virtual objects on the real world. AR systems are designed to generate and present virtual objects that realistically interact with the real world environment and with each other. Examples of AR applications can include single-player or multi-player video games, instant messaging systems, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] In the drawings, which are not necessarily drawn to scale, similar reference numerals may describe similar components in different views. To easily identify the discussion of any particular element or action, the highest digit or digits in the reference numeral refer to the figure number in which the element is first introduced. Some non-limiting examples are shown in the figures of the accompanying drawings, in which:

[0006] Figure 1 is a pictorial representation of a networked environment in which the present disclosure may be deployed, according to some examples.

[0007] Figure 2 is a graphical representation of a messaging client application according to some examples.

[0008] Figure 3 is a graphical representation of data structures maintained in a database according to some examples.

[0009] Figure 4 is a graphical representation of the message according to some examples.

[0010] Figure 5 is a block diagram illustrating an example image warping system according to an example.

[0011] Figure 6 , Figure 7 and Figure 8 is a graphical representation of the output of an image warping system according to some examples.

[0012] Fig. 9 is a flow diagram illustrating example operation of an image warping system according to some examples.

[0013] Fig.10 is a diagrammatic representation of a machine in the form of a computer system according to some examples within which a set of instructions may be executed for causing the machine to perform any one or more of the methodologies discussed herein.

[0014] Fig.11 is a block diagram illustrating a software architecture in which examples may be implemented. DETAILED DESCRIPTION

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

[0016] Typically, VR and AR systems display an image representing a given user by capturing an image of the given 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, the VR and AR systems can detect the positioning of the user in the image and can modify the user or background in the image appropriately. While such systems work well, the need for a depth sensor limits their scope of application. This is because adding a depth sensor to a user device for the purpose of modifying the image increases the overall cost and complexity of the device, making these devices less attractive.

[0017] Some systems do not require the use of a depth sensor to modify an image. For example, some systems allow a user to replace the background in a video conference in which the user's face is detected. Specifically, such a system can use specialized techniques optimized for recognizing the user's face to identify the background in an image depicting the user's face. Then, these systems can replace only those pixels that depict the background, so that the real-world background is replaced with an alternative background in the image. However, such systems are generally unable to recognize the user's whole body. Therefore, if the user is greater than a threshold distance from the camera so that more than just the user's face is captured by the camera, replacing the background 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 removed unintentionally by the system because the system mistakenly identifies such parts as belonging to the background of the image rather than the foreground. In addition, when more than one user is depicted in an image or video feed, such a system cannot properly replace the background. Because such systems are generally unable to distinguish the user's whole body from the background in the image, these systems are also unable to apply visual effects to certain parts of the user's body, such as converting, mixing, transforming, changing or deforming body parts (e.g., faces) into AR graphics.

[0018] Some AR systems allow AR graphics or AR elements to be added to images or videos to provide an attractive AR experience. Such a system can receive AR graphics from a designer, and can scale and position the AR graphics within an image or video. In order to improve the placement and positioning of AR graphics on people depicted in an image or video, such a system detects the people depicted in the image or video, and generates a skeleton representing the skeleton of the person. Then, the skeleton is used to adjust the AR graphics based on the movement changes of the skeleton. Although such methods usually work well, the need to generate a human skeleton in real time to adjust the placement of AR graphics increases processing complexity and power and memory requirements. This makes such a system inefficient or unable to run on small-scale mobile devices without sacrificing computing resources or processing speed. In addition, the skeleton only represents the movement of the skeletal structure or bone structure of the person in the image or video, without considering any kind of external physical properties of the person, such as density, weight, skin properties, etc. Therefore, any AR graphics in these systems can be adjusted in scale and positioning, but cannot be deformed based on other physical properties of the person. In addition, AR graphics designers usually need to create compatible skeletons for their AR graphics.

[0019] Some typical systems use mesh-based reconstruction to modify parts of a face depicted in an image. These systems typically receive a mesh that defines aspects of the face to be modified. The mesh is then applied to a live image to modify the face depicted in the image. These systems are typically limited in functionality in that they can only realistically modify the face depicted in the image, and they do not function correctly when the user's full body is depicted in the image. Such systems typically adjust body parts disproportionately, resulting in unrealistic modifications being applied in the image.

[0020] The disclosed technology improves the efficiency of using electronic devices by using a machine learning model to estimate or predict a distortion field and / or segmentation mask of a real-world object (e.g., a person or an animal) depicted in a received image or video. The distortion field and / or segmentation mask is then applied to the portion of the image depicting the real-world object to deform, deform, or distort the real-world object. For example, the distortion field corresponds to a target shape or a blended shape, and the real-world object can be modified in size, height, and / or dimensions to provide a distorted real-world object. The distorted real-world object can then be recombined with the background of the received image, a new background, and / or one or more AR objects to generate a modified image. By generating a distortion field using a trained machine learning model, the disclosed technology can apply one or more visual effects to an image or video associated with a real-world object depicted in an image or video in a more efficient and realistic manner. This can be done without generating a skeleton or bone structure of the depicted object or performing any time-consuming manual adjustments or picture editing techniques. In particular, the disclosed technology can deform, transform, change, or blend one or more body parts of a person depicted in an image or video into one or more AR elements while taking into account the person's movement and posture information.

[0021] This simplifies the process of adding AR graphics to images or videos, thereby significantly reducing the design constraints and costs when generating such AR graphics, and reducing processing complexity, power, and memory requirements. This also improves the illusion that the AR graphics are part of the real-world environment depicted in the image or video depicting the object. This enables AR graphics to be seamlessly and efficiently added to the underlying image or video in real time on a small mobile device. The disclosed technology can be applied exclusively or primarily to mobile devices without the need for the mobile device to send images / videos to a server. In other examples, the disclosed technology is applied exclusively or primarily to a remote server, or can be distributed between a mobile device and a server.

[0022] In addition, the disclosed technology enables AR graphics designers to generate target shapes (e.g., blend shapes) for AR graphics without creating compatible skeletons for AR graphics, which saves time, effort and reduces the complexity of creation. The disclosed technology uses the target shape to modify or deform one or more training images depicting real-world objects to generate a set of training data for training a machine learning model to learn or estimate the distortion field of the target shape. Specifically, the disclosed technology can generate a set of training data by using the target shape to generate a deformed 3D scan of an object whose three-dimensional (3D) scan has been received or deform the deformed 3D scan. The deformed 3D scan can be used together with the 3D scan to generate an inverse distortion field (as the real distortion field of the training image), which can be used to deform or deform the training image depicting the object. The machine learning model can then be trained to establish a relationship between the training image depicting the object, the real distortion field of the object, and the segmentation of the object. After training, this machine learning model can be operated in real time to generate or predict the distortion field and segmentation of the real-world object depicted in the received real-time image or video. The generated or predicted warp fields and segmentations can be applied to real-time images or videos to produce desired effects in which depicted real-world objects are deformed or modified to have a size, height, scale, and / or appearance corresponding to the target shape used to train the machine learning model.

[0023] Thus, a realistic display showing the user moving around in the video in 3D (including changes in body shape, body state, body properties, position, and rotation) while morphing into an AR graphic can be provided in a manner that is intuitive for the user to interact with and select. This improves the overall experience of the user when using the electronic device. In addition, by providing such an AR experience without the use of a depth sensor, the total amount of system resources required to complete the task is reduced.

[0024] Networked computing environment

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

[0026] The messaging client 104 is capable of communicating and exchanging data with other messaging clients 104 and messaging server systems 108 via the network 112. The data exchanged between the messaging clients 104 and between the messaging clients 104 and messaging server systems 108 includes functions (e.g., commands for activating functions) and payload data (e.g., text, audio, video, or other multimedia data). In some examples, the client device 102 includes an eyewear device that is configured to generate an augmented reality object within a lens of the eyewear device to provide the augmented reality experience discussed herein.

[0027] The messaging server system 108 provides server-side functionality to certain messaging clients 104 via the network 112. Although certain functionality of the messaging system 100 is described herein as being performed by the messaging client 104 or by the messaging server system 108, the location of certain functionality within the messaging client 104 or within the messaging server system 108 may be a design choice. For example, it may be technically preferable to initially deploy certain technologies and functionality within the messaging server system 108, but to later migrate the technologies and functionality to the messaging client 104 in which the client device 102 has sufficient processing power.

[0028] The messaging server system 108 supports various services and operations provided to the messaging clients 104. Such operations include sending data to the messaging clients 104, receiving data from the messaging clients 104, and processing data generated by the messaging clients 104. As examples, the data may include message content, client device information, geographic location information, media enhancements and overlays, message content persistence conditions, social network information, and live event information. The exchange of data within the messaging system 100 is activated and controlled by functions available via the user interface (UI) of the messaging client 104.

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

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

[0031] The application server 114 hosts multiple server applications and subsystems, including, for example, a messaging server 118, an image processing server 122, and a social network server 124. The messaging server 118 implements multiple 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 the messaging 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., called stories or galleries). These collections are then made available to the messaging client 104. Given the hardware requirements for other processor- and memory-intensive data processing, such processing can also be performed on the server side by the messaging server 118.

[0032] The application server 114 also includes an image processing server 122 that is dedicated to performing various image processing operations, typically on images or videos within the payload of messages sent from or received at the messaging server 118 .

[0033] The image processing server 122 is used to implement ( Figure 2) enhanced system 208. The scanning function includes activating and providing one or more AR experiences on the client device 102 when an image is captured by the client device 102. Specifically, the messaging client 104 on the client device 102 can be used to activate the camera. The camera displays one or more real-time images or videos and one or more icons or identifiers of one or more AR experiences to the user. The user can select a given identifier in the identifier to start the corresponding AR experience or perform the desired image modification (for example, replace the clothing worn by the user in the video or deform, change, mix or transform a person or a part of the user's body into an AR graphic such as an AR werewolf or an AR bat).

[0034] The social network server 124 supports various social networking functions and services and makes them available to the messaging server 118. To this end, the social network server 124 maintains and accesses an entity graph 308 (e.g., Figure 3 ). Examples of functions and services supported by the social networking server 124 include identifying other users of the messaging system 100 that have relationships with a particular user or that the particular user is "following," and also include identifying interests and other entities of a particular user.

[0035] Returning to the messaging client 104, the features and functions of the external resource (e.g., a third-party application 109 or a mini-program) are available to the user via the interface of the messaging client 104. The messaging client 104 receives a user selection of an option for launching or accessing an external resource (e.g., a third-party resource) such as a feature of an external application 109. The external resource can be a third-party application (external application 109) installed on the client device 102 (e.g., a "local application"), or a small-scale version of a third-party application (e.g., a "mini-program") hosted on the client device 102 or away from the client device 102 (e.g., on a third-party server 110). The small-scale version of the third-party application includes a subset of the features and functions of the third-party application (e.g., a full-scale, local version of a third-party standalone application) and is implemented using a markup language document. In one example, the small-scale version of the third-party application (e.g., a "mini-program") is a web-based markup language version of the third-party application and is embedded in the messaging client 104. In addition to using markup language documents (eg, *ml files), applets may include scripting languages ​​(eg, .*js files or .json files) and style sheets (eg, .*ss files).

[0036] In response to receiving a user selection of an option for launching or accessing a feature of 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, an external application 109 installed locally on the client device 102 can be launched independently of the messaging client 104 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 small-scale version of such an external application can be launched or accessed via the messaging client 104, and in some examples, any portion or limited portion of the small-scale external application cannot be accessed outside the messaging client 104. The small-scale external application can be launched by the messaging client 104 receiving a markup language document associated with the small-scale external application from the external application server 110 and processing such a document.

[0037] 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 the 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.

[0038] The messaging client 104 may notify the user of the client device 102 or other users (e.g., "friends") associated with such a user of activities occurring in one or more external resources. For example, the messaging client 104 may provide a notification to a participant in a conversation (e.g., a chat session) in the messaging client 104 about the current or recent use of an external resource by one or more members of a group of users. One or more users may be invited to join an active external resource or to launch an external resource that was recently used but is currently inactive (in the friend group). The external resource may provide the participants in the conversation, each using a corresponding messaging client 104, with the ability to share items, conditions, states, or locations in the external resource with one or more members of the user group entering the chat session. The shared item may be an interactive chat card that members of the chat may interact with, for example, to launch a corresponding external resource, view specific information within an external resource, or bring members of the chat to a specific location or state within an external resource. Within a given external resource, a response message may be sent to a user on the messaging client 104. The external resource may selectively include different media items in the response based on the current context of the external resource.

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

[0040] The messaging client 104 may present one or more AR experiences to the user. As an example, the messaging client 104 may detect a person or user in an image or video captured by the client device 102. The messaging client 104 may apply a machine learning model (associated with a target shape) to generate or estimate a distortion field and a segmentation mask for the person or object depicted in the image. The messaging client 104 may then apply the distortion field and the segmentation mask to deform the person or object depicted in the image into the target shape and generate a modified image depicting the deformed person or object. Although the disclosed examples are discussed with respect to modifying a person or user depicted in an image or video, similar techniques may also be applied to modify any other real-world objects, such as animals, furniture, buildings, and the like.

[0041] A blend shape or target shape associated with a warp field can control how a portion of a real-world object is deformed, blended, altered, or transformed into a modified AR graphic representing a person or user depicted in an image or video. The warp field, blend shape, and / or target shape may include a linear or nonlinear function that controls the speed at which a portion of a real-world object is blended into an AR graphic. For example, a warp field, blend shape, and / or target shape may specify that the head of an object, person, or user is transformed into the head of an AR graphic without changing or affecting other parts of the object, person, or user (e.g., arms, legs, hands, and torso). This provides an illusion that the deformed real-world object or person is actually included in the real-world environment depicted in the modified image or video, which improves the overall user experience.

[0042] System Architecture

[0043] Figure 21 is a block diagram showing additional details about the messaging system 100 according to some examples. Specifically, the messaging system 100 is shown to include a messaging client 104 and an application server 114. The messaging system 100 contains a number of subsystems that are 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 transient 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.

[0044] The transient timer system 202 is responsible for implementing temporary or time-limited access to content by the messaging client 104 and the messaging server 118. The transient timer system 202 includes a plurality of timers that selectively enable access to messages and associated content (e.g., for presentation and display) via the messaging client 104 based on duration and display parameters associated with a message or a collection of messages (e.g., a story). Additional details regarding the operation of the transient timer system 202 are provided below.

[0045] The collection management system 204 is responsible for managing collections and collections of media (e.g., collections of text, image video, and audio data). Collections of content (e.g., messages, including images, videos, text, and audio) can be organized into "event galleries" or "event stories." Such collections can be made available for a specified time period (such as 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 an icon that provides notification of the existence of a particular collection to the user interface of the messaging client 104.

[0046] In addition, the collection management system 204 also includes a curation interface 206, which allows the collection manager to manage and curate specific content collections. For example, the curation interface 206 enables an event organizer to curate a collection of content related to a specific event (e.g., to delete inappropriate content or redundant messages). In addition, the collection management system 204 uses machine vision (or image recognition technology) and content rules to automatically curate content collections. In some examples, compensation can be paid to users to include user-generated content in a collection. In such a case, the collection management system 204 operates to automatically pay such users to use their content.

[0047] The enhancement system 208 provides various functions that enable users to enhance (e.g., annotate or otherwise modify or edit) media content associated with a message. For example, the enhancement system 208 provides functions related to generating and publishing media overlays for messages processed by the messaging system 100. The enhancement system 208 is operable to supply media overlays or enhancements (e.g., image filters) to the messaging client 104 based on the geographic location of the client device 102. In another example, the enhancement system 208 is operable to supply media overlays to the messaging client 104 based on other information such as social network information of the user of the client device 102. The media overlay can include audio content and visual content and visual effects. Examples of audio content and visual content include pictures, text, logos, animations, and sound effects. Examples of visual effects include color overlays. Audio content and visual content or visual effects can be applied to media content items (e.g., photos) at the client device 102. For example, the media overlay can include text, graphic elements, or images that can be superimposed on photos taken by the client device 102. In another example, the media overlay includes a location identifier (e.g., Venice Beach) overlay, the name of a live event, or a business name (e.g., Beach Cafe) overlay. In another example, the enhancement system 208 uses the geographic location of the client device 102 to identify a media overlay that includes a business name at the geographic location of the client device 102. The media overlay may include other logos associated with the business. The media overlay may be stored in the database 126 and accessed through the database server 120.

[0048] In some examples, the enhancement system 208 provides a user-based publishing platform that enables a user to select a geographic location on a map and upload content associated with the selected geographic location. The user can also specify the environment in which a particular media overlay should be provided to other users. The enhancement system 208 generates a media overlay including the uploaded content and associates the uploaded content with the selected geographic location.

[0049] In other examples, the augmentation system 208 provides a merchant-based publishing platform that enables merchants to select specific media overlays associated with a geographic location via a bidding process. For example, the augmentation system 208 associates the media overlay of the highest bidding merchant with the corresponding geographic location for a predefined amount of time. The augmentation system 208 communicates with the image processing server 122 to obtain an augmented reality experience, and presents an identifier of such an experience in one or more user interfaces (e.g., as an icon on a real-time image or video, or as a thumbnail or icon in an interface dedicated to the identifier of the augmented reality experience presented). Once the AR experience is selected, one or more images, videos, or AR graphical elements are retrieved and presented as an overlay on top of the image or video captured by the client device 102. In some cases, the camera is switched to a front-facing perspective (e.g., the front-facing camera of the client device 102 is activated in response to activation of a particular AR experience), and an image from the front-facing camera of the client device 102, rather than the rear-facing camera of the client device 102, begins to be displayed on the client device 102. One or more images, videos, or AR graphical elements are retrieved and rendered as an overlay on top of the image captured and displayed by the front-facing camera of the client device 102 .

[0050] In other examples, the augmentation system 208 can communicate and exchange data with another augmentation system 208 on another client device 102 and a server via the network 112. The exchanged data may include: a session identifier identifying the shared AR session; a transformation between the first client device 102 and the second client device 102 (e.g., a plurality of client devices 102 including the first device and the second device), the transformation being used to align the shared AR session to a common origin; a common coordinate system; functionality (e.g., a command to activate the functionality), and other payload data (e.g., text, audio, video, or other multimedia data).

[0051] The augmentation system 208 sends the transformation to the second client device 102 so that the second client device 102 can adjust the AR coordinate system based on the transformation. In this way, the first client device 102 and the second client device 102 synchronize their coordinate systems to display the content in the AR session. Specifically, the augmentation system 208 calculates the origin of the second client device 102 in the coordinate system of the first client device 102. The augmentation system 208 can then determine an offset in the coordinate system of the second client device 102 based on the position of the origin in the coordinate system of the second client device 102 from the perspective of the second client device 102. The offset is used to generate a transformation so that the second client device 102 generates AR content according to a common coordinate system with the first client device 102.

[0052] The augmentation system 208 can communicate with the client device 102 to establish a separate or shared AR session. The augmentation system 208 can also be coupled to the messaging server 118 to establish an electronic group communication session (e.g., group chat, instant messaging) for the client device 102 in the shared AR session. The electronic group communication session can be associated with a session identifier provided by the client device 102 to obtain access to the electronic group communication session and to the shared AR session. In one example, the client device 102 first obtains access to the electronic group communication session and then obtains a session identifier in the electronic group communication session that allows the client device 102 to access the shared AR session. In some examples, the client device 102 is able to access the shared AR session without the assistance of the augmentation system 208 in the application server 114 or without communicating with the augmentation system 208 in the application server 114.

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

[0054] The gaming system 212 provides various gaming functions within the context of the messaging client 104. The messaging client 104 provides a gaming interface that provides a list of available games (e.g., web-based games or web-based applications) that can be launched by a user within the context of the messaging client 104 and played with other users of the messaging system 100. The messaging system 100 also enables a particular user to invite other users to participate in playing a particular game by sending an invitation to such other users from the messaging client 104. The messaging client 104 also supports both voice messaging and text messaging (e.g., chatting) within the context of game play, provides leaderboards for games, and supports providing in-game rewards (e.g., game coins and items).

[0055] The external resource system 220 provides an interface for communicating with an external application server 110 to start or access external resources to the messaging client 104. Each external resource (application) server 110 hosts, for example, a small-scale version of an application based on a markup language (e.g., HTML5) or an external application (e.g., a game, utility, payment, or ride-sharing application outside the messaging client 104). The messaging client 104 can start the web-based resource (e.g., application) by accessing an HTML5 file from an external resource (application) server 110 associated with a web-based resource. In some examples, the application hosted by the external resource server 110 is programmed in JavaScript using a software development kit (SDK) provided by the messaging server 118. The SDK includes APIs that have functions that can be called or activated by web-based applications. In some examples, the messaging server 118 includes a JavaScript library that provides access to certain user data of the 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.

[0056] In order to integrate the functionality of the SDK into the web-based resource, the SDK is downloaded from the messaging server 118 by the external resource (application) server 110 or received in other ways by the external resource (application) server 110. 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 messaging client 104 into the web-based resource.

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

[0058] By using the SDK, not all information from the messaging client 104 is shared with the 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 an HTML5 file corresponding to a web-based external resource to the messaging server 118. The messaging server 118 can add a visual representation (e.g., box art or other graphics) of the web-based external resource in the messaging client 104. Once the user selects the visual representation through the GUI of the messaging client 104 or instructs the messaging client 104 to access the features of the web-based external resource, the messaging client 104 obtains the HTML5 file and instantiates the resources required to access the features of the web-based external resource.

[0059] The messaging client 104 presents a graphical user interface (e.g., a login page or title screen) for the external resource. During, before, or after presenting the login page or title screen, the messaging client 104 determines whether the launched external resource has been previously authorized to access the user data of the messaging client 104. In response to determining that the launched external resource has been previously authorized to access the user data of the messaging client 104, the messaging client 104 presents another graphical user interface of the external resource including the functions and features of the external resource. In response to determining that the launched external resource has not been previously 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., animating the menu to emerge from the bottom of the screen to the middle or other portion of the screen) for authorizing the external resource to access the user data. The menu identifies the type of user data that the external resource will be authorized to use. In response to receiving the user selection of the accept option, the messaging client 104 adds the external resource to the list of authorized external resources and allows the external resource to access the user data from the messaging client 104. In some examples, the external resource is authorized by the messaging client 104 to access the user data according to the OAuth 2 framework.

[0060] The messaging client 104 controls the type of user data shared with the external resource based on the type of external resource that is authorized. For example, an external resource including a full-scale external application (e.g., a third party or external application 109) is provided with access to a first type of user data (e.g., only a 2D avatar of a user with or without different avatar characteristics). As another example, an external resource including a small-scale version of an external application (e.g., a web-based version of a third-party application) is provided with access to a second type of user data (e.g., payment information, a 2D avatar of a user, a 3D avatar of a user, and an avatar with various avatar characteristics). Avatar characteristics include different ways to customize the look and feel of an avatar (such as different poses, facial features, clothing, etc.).

[0061] The image warping system 224 receives an image that includes a depiction of a real-world object (e.g., a person, an animal, or other animate or inanimate object). The image warping system 224 applies a machine learning model to the image to generate a warp field and a segmentation mask. The machine learning model can be trained to establish a relationship between a plurality of training images depicting real-world objects and corresponding real warp fields and segmentation masks associated with a target shape. The image warping system 224 applies the generated warp field and segmentation mask to the image to warp the real-world object depicted in the image to the target shape and generates a modified image depicting the warped real-world object. In some cases, the image warping system 224 crops or extracts the real-world object from the received image and then generates a warp field and a segmentation mask for the cropped real-world object. After generating the warp field, the image warping system 224 warps the real-world object and then recombines the deformed real-world object with the same background or a completely new background in the received image to create a modified image.

[0062] In some examples, the image warping system 224 is a component accessed by an AR / VR application implemented on the client device 102. The AR / VR application uses an RGB camera to capture a monocular image of a user or person. The AR / VR application applies various trained machine learning techniques to the captured image of the user to generate a warp field, and applies one or more AR visual effects to the captured image by deforming the real-world object using the warp field to generate a modified image including the AR visual effect. In some implementations, the AR / VR application continuously captures the image of the user, and updates the warp field and / or segmentation mask in real time or periodically to continuously or periodically update the applied one or more visual effects. This enables the user to move around in the real world and see one or more visual effects update in real time.

[0063] In training, the image warping system 224 obtains a first plurality of input training images depicting training real-world objects and corresponding true warp fields and segmentation masks. A machine learning technique (e.g., a deep neural network) is trained based on features of the plurality of training images. Specifically, the machine learning technique is applied to a first set of training data including a first training image to generate an estimated warp field and an estimated segmentation mask. The machine learning technique obtains true information about the true warp field and segmentation including the first set of training data, and adjusts or updates one or more coefficients or parameters, such as based on a calculated deviation between the estimated warp field and the estimated segmentation mask and the true warp field and segmentation mask corresponding to the first training image in the first set of training data, to improve subsequent estimates of the warp field and segmentation mask.

[0064] Data Architecture

[0065] Figure 3 is a diagram illustrating a data structure 300 that may be stored in a database 126 of a messaging server system 108 according to some examples. Although the contents of the database 126 are illustrated as including a plurality of tables, it should be understood that data may be stored in other types of data structures (e.g., object-oriented databases).

[0066] The database 126 includes message data stored in the message table 302. For any particular message, the message data includes at least message sender data, message receiver (or recipient) data, and payload. Figure 4 Additional details regarding information that may be included in a message and included within the message data stored in message table 302 are described.

[0067] The entity table 306 stores entity data and is linked (e.g., by reference) to the entity graph 308 and profile data 316. The entities whose records are maintained within the entity table 306 may include individuals, corporate entities, organizations, objects, places, events, etc. Regardless of the entity type, any entity about which the messaging server system 108 stores data may be an identified entity. Each entity is provided with a unique identifier as well as an entity type identifier (not shown).

[0068] The entity graph 308 stores information about relationships and associations between entities. By way of example only, such relationships may be social, professional (e.g., working in a common company or organization), interest-based, or activity-based.

[0069] Profile data 316 stores multiple types of profile data about a particular entity. Based on the privacy settings specified by the particular entity, profile data 316 can be selectively used and presented to other users of the messaging system 100. In the case where the entity is a person, profile data 316 includes, for example, a user name, phone number, address, settings (e.g., notification and privacy settings), and an avatar representation (or a collection of such avatar representations) selected by the user. The particular user can then selectively include one or more of these avatar representations within the content of messages transmitted via the messaging system 100 and on a map interface displayed to other users by the messaging client 104. The collection of avatar representations can include a "status avatar" that presents a graphical representation of a status or activity that a user can choose to transmit at a particular time.

[0070] Where the entity is a group, the profile data 316 for the group may similarly include one or more avatar representations associated with the group, in addition to the group name, members, and various settings (eg, notifications) of the relevant group.

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

[0072] The database 126 may also store data related to individual AR sessions and shared AR sessions. The data may include data transmitted between an AR session client controller of a first client device 102 and another AR session client controller of a second client device 102, and data transmitted between an AR session client controller and an augmented system 208. The data may include data for: establishing a common coordinate system for a shared AR scene; transformations between devices; session identifiers; images depicting the body, skeletal joint positions, wrist joint positions, and feet, etc.

[0073] In one example, a filter is an overlay displayed as an overlay on an image or video during presentation to a recipient user. The filter can be of various types, including filters selected by a user from a set of filters presented to a sending user by the messaging client 104 when the sending user is composing a message. Other types of filters include geolocation filters (also referred to as geofilters), which can be presented to a sending user based on a geographic location. For example, the messaging client 104 can present a geolocation filter specific to a nearby or particular location within a user interface based on geographic location information determined by a global positioning system (GPS) unit of the client device 102.

[0074] Another type of filter is a data filter, which may be selectively presented to the sending user by the messaging client 104 based on other input or information collected by the client device 102 during the message creation process. Examples of data filters include the current temperature at a particular location, the current speed at which the sending user is traveling, the battery life of the client device 102, or the current time.

[0075] Other augmented data that may be stored in the image table 312 include AR content items (eg, corresponding to an application augmented reality experience). AR content items or AR projects may be real-time special effects and sounds that may be added to an image or video.

[0076] As described above, augmented data includes AR content items, overlays, image transformations, AR images, AR logos or badges, and similar items involving modifications that can be applied to image data (e.g., videos or images). This includes real-time modifications that modify images when they are captured using a device sensor (e.g., one or more cameras) of the client device 102 and then display the image with the modifications on the screen of the client device 102. This also includes modifications to stored content (e.g., video clips in a library that can be modified). For example, in a client device 102 that can access multiple AR content items, a user can use a single video clip with multiple AR content items to see how different AR content items will modify the stored clips. For example, by selecting different AR content items for the content, multiple AR content items that apply different pseudo-random movement models can be applied to the same content. Similarly, real-time video capture can be used with the modifications shown to show how the video image currently captured by the sensor of the client device 102 will modify the captured data. Such data can be displayed only on the screen without being stored in the memory, or the content captured by the device sensor can be recorded and stored in the memory with or without modification (or both). In some systems, the preview feature can simultaneously show how different AR content items will look in different windows in the display. For example, this can enable viewing multiple windows with different pseudo-random animations on the display at the same time.

[0077] Thus, data and various systems using AR content items or other such transformation systems using the data to modify content may involve: detecting real-world objects (e.g., faces, hands, bodies, cats, dogs, surfaces, objects, etc.); tracking such objects in video frames as they leave, enter, and move around the field of view; and modifying or transforming such objects as they are tracked. In various examples, different methods for implementing such transformations may be used. Some examples may involve: generating a 3D mesh model of one or more objects, and using transformations and animated textures of the models within a video to implement the transformations. In other examples, tracking of points on an object may be used to place an image or texture (which may be 2D or 3D) at a tracked location. In another example, neural network analysis of video frames may be used to place an image, model, or texture in content (e.g., a frame of an image or video). Thus, an AR content item or element involves both: images, models, and textures used to create transformations in the content, and additional modeling and analysis information required to implement such transformations using object detection, tracking, and placement.

[0078] Real-time video processing can be performed with any kind of video data (e.g., video streams, video files, etc.) stored in the memory of any kind of computerized system. For example, a user can load video files and store them in the memory of the device, or a sensor of the device can be used to generate a video stream. In addition, computer animation models can be used to process any object, such as human faces and body parts, animals, or non-living things such as chairs, cars, or other objects.

[0079] In some examples, when a specific modification is selected together with the content to be transformed, the element to be transformed is identified by the computing device, and then if the element exists in the frame of the video, the element to be transformed is detected and tracked. The elements of the object are modified according to the request for modification, so the frame of the video stream is transformed. For different types of transformations, the transformation of the frame of the video stream can be performed by different methods. For example, for a frame transformation that mainly involves changing the form of the elements of the object, (for example, using an active shape model (ASM) or other known methods) characteristic points for each element of the object are calculated. Then, for each of at least one element of the object, a grid based on the characteristic points is generated. The grid is used for the subsequent stage of tracking the elements of the object in the video stream. During the tracking process, the grid mentioned for each element is aligned with the position of each element. Then, additional points are generated on the grid. A first set of first points is generated for each element based on the modification request, and a set of second points is generated for each element based on the set of first points and the modification request. Then, the frame of the video stream can be transformed by modifying the elements of the object based on the set of first points and second points and the grid. In such an approach, the background of the modified object may also be changed or distorted by tracking and modifying the background.

[0080] In some examples, a transformation that changes some areas of an object using elements of an object can be performed by calculating characteristic points for each element of the object and generating a grid based on the calculated characteristic points. Points are generated on the grid, and then various areas are generated based on these points. Then, the elements of the object are tracked by aligning the area of ​​each element with the position of each element of at least one element, and the properties of the area can be modified based on the modification request, thereby transforming the frame of the video stream. Depending on the specific modification request, the properties of the mentioned area can be transformed in different ways. Such modifications may involve: changing the color of the area; removing at least some parts of the area from the frame of the video stream; including one or more new objects into the area based on the modification request; and modifying or distorting the elements of the area or object. In various examples, any combination of such modifications or other similar modifications may be used. For certain models to be animated, some feature points may be selected as control points for determining the entire state space of options for model animation.

[0081] In some examples of computer animation models for transforming image data using body / person detection, a body / person is detected on an image using a specific body / person detection algorithm (e.g., 3D human pose estimation and mesh reconstruction process). Then, an ASM algorithm is applied to the body / person region of the image to detect body / person feature reference points.

[0082] Other methods and algorithms suitable for body / person 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 body / person landmarks, the position of the left arm can be used. If the initial landmark is not recognizable, a secondary landmark can be used. Such a landmark recognition process can be used for any such object. In some examples, a collection of landmarks forms a shape. The shape can be represented as a vector using the coordinates of the points in the shape. A similarity transformation (which allows translation, scaling, and rotation) that minimizes the average Euclidean distance between shape points is used to align one shape with another shape. The average shape is the average value of the aligned training shapes.

[0083] In some examples, the landmark search begins with an average shape that is aligned with the position and size of the body / person determined by the global body / person detector. Such a search then repeats the following steps: tentative shapes are proposed by template matching the image texture around each point to adjust the position of the shape points, and then the tentative shapes are conformed to the global shape model until convergence occurs. In some systems, individual template matches are unreliable, and the shape model pools the results of weak template matches to form a stronger overall classifier. The entire search is repeated at each level of the image pyramid from coarse resolution to fine resolution.

[0084] The transformation system can capture an image or video stream on a client device (e.g., client device 102) and perform complex image manipulations locally on the client device 102 while maintaining an appropriate user experience, computation time, and power consumption. Complex image manipulations can include size and shape changes, emotion transitions (e.g., changing a face from a frown to a smile), state transitions (e.g., aging a subject, reducing apparent age, changing gender), style transitions, application of graphical elements, 3D human pose estimation, 3D body mesh reconstruction, and any other suitable image or video manipulation enabled by a convolutional neural network that has been configured to execute efficiently on the client device 102.

[0085] In some examples, the computer animation model for transforming image data can be used by the following system: in the system, 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), where the neural network operates as part of a messaging client 104 operating on the client device 102. The transformation system operating within the messaging client 104 determines the presence of a body / person within the image or video stream and provides a modification icon associated with the computer animation model for transforming the image data, or the computer animation model can be presented as associated with the interface described herein. The modification icon includes the following changes, which can be the basis for modifying the user's body / person within the image or video stream as part of the modification operation. Once the modification icon is selected, the transformation system initiates the process of transforming 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 is captured and the specified modification is 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 perform a complex convolutional neural network on a portion of the image or video stream to generate and apply the selected modification. That is, a user can capture an image or video stream, and once a modification icon is selected, the modified result can be presented to the user in real time or near real time. Furthermore, the modification can be persistent while the video stream is being captured and the selected modification icon remains toggled. Machine-taught neural networks can be used to implement such modifications.

[0086] The graphical user interface presenting the modifications performed by the transformation system can provide additional interactive options to the user. Such options can be based on an interface for initiating content capture and selection of a specific computer animation model (e.g., initiated from a content creator user interface). In various examples, after the initial selection of the modification icon, the modification can be persistent. The user can switch the modification on or off by tapping or otherwise selecting to modify the body / person by the transformation system, and store it for later viewing or browsing to other areas of the imaging application. In the case where multiple faces are modified by the transformation system, the user can globally switch the modification on or off by tapping or selecting a single body / person modified and displayed in the graphical user interface. In some examples, each body / person in a group of multiple bodies / persons can be modified individually, or such modifications can be switched individually by tapping or selecting a single body / person or a series of separate bodies / persons displayed in the graphical user interface.

[0087] The story table 314 stores data about a collection of messages and associated image, video, or audio data that are compiled into a collection (e.g., a story or library). The creation of a particular collection can be initiated by a particular user (each user whose record is saved in the entity table 306). A user can create a "personal story" in the form of a collection of content that has been created and sent / broadcasted by the user. To this end, the user interface of the messaging client 104 may include an icon that is user-selectable to enable the sending user to add specific content to his or her personal story.

[0088] A collection may also constitute a "live story," which is a collection of content from multiple users created manually, automatically, or using a combination of manual and automatic techniques. For example, a "live story" may constitute a curated stream of user-submitted content from various locations and events. Users whose client devices have location services enabled and who are at a common location event at a particular time may be presented with the option of contributing content to a particular live story, for example, via the user interface of the messaging client 104. Live stories may be identified to the user by the messaging client 104 based on his or her location. The end result is a "live story" told from a group perspective.

[0089] Another type of content collection is referred to as a "location story," which enables users whose client devices 102 are located within a particular geographic location (e.g., on a college or university campus) to contribute to a particular collection. In some examples, contributions to location stories may require secondary authentication that verifies that the end user belongs to a particular organization or other entity (e.g., is a student on a university campus).

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

[0091] The trained machine learning technique 307 stores parameters trained during the training of the image warping system 224. For example, the trained machine learning technique 307 stores trained parameters of one or more neural network machine learning techniques.

[0092] Data communication architecture

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

[0094] ●Message identifier 402: a unique identifier that identifies the message 400.

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

[0096] • Message Image Payload 406 : Image data captured by a camera component of the client device 102 or retrieved from a memory component of the client device 102 and included in the message 400 . The image data for a sent or received message 400 may be stored in the image table 312 .

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

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

[0099] Message enhancement data 412: Enhancement data (e.g., filters, stickers, 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 the message 400. The enhancement data 412 for a sent or received message 400 may be stored in the enhancement table 310.

[0100] ●Message duration parameter 414: A parameter value indicating the amount of time in seconds that 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 messaging client 104 or made accessible to the user.

[0101] Message geolocation parameters 416: Geolocation data (e.g., latitude and longitude coordinates) associated with the content payload of the message. Multiple message geolocation parameter 416 values ​​may be included in the payload, each of which is associated with a content item included in the content (e.g., a specific image within a message image payload 406 or a specific video in a message video payload 408).

[0102] Message story identifier 418: An identifier value that identifies one or more content collections (e.g., a "story" identified in story table 314) associated with a particular content item in message image payload 406 of message 400. For example, multiple images within message image payload 406 may each be associated with multiple content collections using an identifier value.

[0103] Message tags 420: Each message 400 may be tagged with a plurality of tags, each of which indicates the subject of the content included in the message payload. For example, where a particular image included in the message image payload 406 depicts an animal (e.g., a lion), a tag value indicating the relevant animal may be included within the message tags 420.

[0104] Tag values ​​may be manually generated based on user input or may be automatically generated using, for example, image recognition.

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

[0106] • Message recipient identifier 424: An identifier (eg, a messaging system identifier, an email address, or a device identifier) ​​that indicates the user of the client device 102 to which the message 400 is addressed.

[0107] The content (e.g., value) of each component of message 400 may be a pointer to a location in a table in which the content data value is stored. For example, the image value in message image payload 406 may be a pointer to a location in image table 312 (or the address of a location in image table). Similarly, the value in message video payload 408 may point to data stored in video table 304, the value stored in message enhancement 412 may point to data stored in enhancement table 310, the value stored in message story identifier 418 may point to data stored in story table 314, and the values ​​stored in message sender identifier 422 and message recipient identifier 424 may point to user records stored in entity table 306.

[0108] Image Warping System

[0109] Figure 5 is a block diagram illustrating an example image warping system 224 according to an example embodiment. The image warping system 224 includes a set of components 510 that operate on a set of input data, the set of input data including, for example, training data 501 of a monocular image or an image 502 depicting a real-world object, such as a person or one or more images depicting a real-world object captured or received by a client device 102. The set of input data (e.g., training data 501) is obtained from one or more databases ( Figure 3 ) is obtained, and the input data (e.g., one or more images 502) is obtained from the RGB camera of the client device 102 when using the AR / VR application, for example, through the messaging client 104. The image warping system 224 includes a machine learning technique module 512, a blend shape module 530, an object deformation module 514, an AR effect module 519, an image modification module 518, an image display module 520, a 3D body tracking module 513, and a full body segmentation module 515.

[0110] In some examples, the image warping system 224 receives an image 502 that includes a depiction of a real-world object. The image warping system 224 applies a machine learning model to the image 502 to generate a warp field and a segmentation mask. The machine learning model may be trained to establish a relationship between a plurality of training images depicting real-world objects and corresponding real warp fields and segmentation masks associated with a target shape. The image warping system 224 may apply the generated warp fields and segmentation masks to the image 502 to warp the real-world object depicted in the image 502 to the target shape. In some examples, the client device 102 and / or the messaging client 104 may implement different sets of machine learning models. Each of the machine learning models may be trained to generate a respective warp field based on a different respective target shape or blend shape. In some examples, the image 502 is a frame of a video, and the generated warp fields and segmentation masks are applied to the video in real time.

[0111] Machine learning is a field of study that gives computers the ability to learn without being explicitly programmed. Machine learning explores the study and construction of algorithms (also referred to herein as tools) that can learn from existing data and make predictions about new data. Such machine learning tools operate by building models based on example training data to make data-driven predictions or decisions represented as outputs or evaluations. Although examples are presented with respect to some machine learning tools, the principles presented herein can be applied to other machine learning tools.

[0112] In some examples, different machine learning tools can be used. For example, logistic regression (LR), naive Bayes, random forest (RF), neural network (NN), deep NN (DNN), matrix factorization, and support vector machine (SVM) tools can be used to classify or score videos.

[0113] Two common types of problems in machine learning are classification problems and regression problems. Classification problems (also called categorization problems) aim to classify an item into one of several category values ​​(e.g., is this object an apple or an orange?). Regression algorithms aim to quantify some item (e.g., by providing values ​​as real numbers).

[0114] Machine learning algorithms use features to analyze data to generate estimates. Each of the features is a separate measurable property of the observed phenomenon. The concept of a feature is related to the concept of explanatory variables used in statistical techniques such as linear regression. The selection of informative, discriminative, and independent features is important for the efficient operation of MLPs in pattern recognition, classification, and regression. Features can be of different types, such as numeric features, strings, and graphics.

[0115] In one example, features may be of different types and may include, by way of example only, one or more of content, concepts, attributes, historical data, and / or user data. The machine learning algorithm uses training data to discover correlations between identified features that influence an outcome or evaluation. In some examples, the training data includes labeled data, which is known data for one or more identified features and one or more outcomes, such as detecting communication patterns, detecting the meaning of a message, generating a summary of a message, detecting action items in a message, detecting urgency in a message, detecting a user's relationship to a sender, calculating score attributes, calculating message scores, and the like.

[0116] Using the training data and the identified features, the machine learning tool is trained by machine learning program training. The machine learning tool estimates the value of the feature when the feature is related to the training data. The result of the training is a trained machine learning program. When performing an evaluation using the trained machine learning program, new data is provided as input to the trained machine learning program, and the trained machine learning program generates an evaluation as output.

[0117] The machine learning program supports two types of phases, namely, a training phase and a prediction phase. In the training phase, supervised learning, unsupervised learning, or reinforcement learning can be used. For example, the machine learning program (1) receives features (e.g., as structured data or labeled data in supervised learning) and / or (2) identifies features in the training data (e.g., unstructured data or unlabeled data for unsupervised learning). In the prediction phase, the machine learning program uses these features to analyze the video frames to generate results or predictions or classifications of warp fields and / or segmentation masks associated with target shapes, as examples for evaluation.

[0118] In the training phase, feature engineering is used to identify features and can include identifying informative, discriminative, and independent features for effective operation of machine learning programs in pattern recognition, classification, and regression. In some examples, the training data includes labeled data, which is known data of pre-identified features and one or more results. Each of the features can be a variable or attribute, such as a measurable characteristic of a process, item, system, or phenomenon represented by a data set (e.g., training data).

[0119] During the training phase, the machine learning program uses the training data to find correlations between features that affect the prediction results or estimates. The machine learning program is trained during the training phase of machine learning program training using the training data and the identified features. The machine learning program estimates the value of the feature when the feature is correlated with the training data. The result of the training is a trained machine learning program (e.g., a trained or learned model).

[0120] In addition, the training phase may involve machine learning, in which the training data is structured (e.g., labeled during preprocessing operations), and the trained machine learning program implements a relatively simple neural network capable of performing, for example, classification and clustering operations. In other examples, the training phase may involve deep learning, in which the training data is unstructured, and the trained machine learning program implements a DNN capable of performing both feature extraction and classification / clustering operations.

[0121] The neural network generated during the training phase and implemented within the trained machine learning program can include a hierarchical (e.g., layered) organization of neurons. For example, neurons (or nodes) can be hierarchically arranged into multiple layers, including an input layer, an output layer, and multiple hidden layers. Each of the layers within the neural network can have one or more neurons, and each of these neurons calculates a small function (e.g., an activation function) in operation. For example, if the activation function generates a result that exceeds a specific threshold, the output can be transmitted from the neuron (e.g., a transmitting neuron) to a connected neuron (e.g., a receiving neuron) in the next layer. The connection between neurons also has an associated weight that defines the influence of the input from the transmitting neuron to the receiving neuron. In some cases, these neurons implement one or more encoder or decoder networks.

[0122] In some examples, the neural network may also be one of multiple different types of neural networks, including, by way of example only, a single-layer feedforward network, an artificial neural network (ANN), a recurrent neural network (RNN), a symmetrically connected neural network and an unsupervised pre-trained network, a convolutional neural network (CNN), or a recurrent neural network (RNN).

[0123] During the prediction phase, a trained machine learning program is used to perform the evaluation. In response to receiving the video data, the video data is provided as input to the trained machine learning program, and the trained machine learning program generates the evaluation as output.

[0124] In some examples, messaging client 104 may receive input selecting a first AR experience associated with a first target shape. In response, a first machine learning model in the machine learning models is accessed and used to generate a first warp field associated with the first target shape. The first warp field may be used to modify a real-world object depicted in an input image or video to deform one or more portions of the real-world object and generate a modified image or video depicting the deformed real-world object.

[0125] In another example, the messaging client 104 receives input selecting a second AR experience associated with a second target shape. In response, a second machine learning model in the machine learning model is accessed and used to generate a second warp field associated with the second target shape. The second warp field can be used to modify a real-world object depicted in an input image or video to deform one or more portions of the real-world object and generate a modified image or video depicting the deformed real-world object.

[0126] In some examples, the real-world object includes a person. In some examples, the machine learning model includes a deep neural network. In some examples, the image warping system 224 applies the generated warp field and segmentation mask by mapping values ​​of a first set of pixels of a first portion of the image depicting the real-world object to a second set of pixels of a second portion of the image. In some examples, the warp field defines an offset to one or more vertices of the human body model, and the values ​​are mapped based on the offset to the one or more vertices.

[0127] In some examples, the warp field includes a predicted blend shape. In some examples, the machine learning model is trained by performing the following training operations, the training operations including: accessing training data including multiple training images depicting real-world objects and corresponding true warp fields and segmentation masks; applying the machine learning model to a first set of training data including a first training image to generate an estimated warp field and an estimated segmentation mask; calculating the deviation between the estimated warp field and the estimated segmentation mask and the true warp field and segmentation mask corresponding to the first training image in the first set of training data; and updating one or more parameters of the machine learning model based on the deviation between the estimated warp field and the estimated segmentation mask and the true warp field and segmentation mask of the first training image.

[0128] In some examples, the image warping system 224 generates a first set of training data by rendering a first training image using a synthetic background. The image warping system 224 generates a realistic warp field for a real-world object depicted in the first training image by projecting a target shape including a blend shape onto the real-world object. In some examples, the image warping system 224 warps the real-world object depicted in the first training image using the realistic warp field to generate a modified training image, and generates a realistic segmentation of the warped real-world object depicted in the modified training image. In some examples, the image warping system 224 may obtain a 3D scan of the real-world object depicted in the first training image, and apply the target shape to the 3D scan to generate a deformed 3D scan of the real-world object.

[0129] In some examples, the image warping system 224 generates an inverse warp field that includes the true warp field. The inverse warp field may define a relationship between a 3D scan of a real-world object depicted in the first training image and a deformed 3D scan of the real-world object. In some examples, the image warping system 224 generates a modified training image using the inverse warp field. In some aspects, a machine learning model is trained to estimate the inverse warp field for a new image or video.

[0130] In some examples, the image warping system 224 crops or extracts a portion of an image or video depicting a real-world object. In such a case, a machine learning model is applied to the cropped portion of the image or video. In some examples, the image warping system 224 combines the distorted real-world object with the background depicted in the received image. In some examples, the image warping system 224 applies a backwards mapping function to pixels corresponding to the real-world object using the generated warp field. Specifically, the image warping system 224 can select a first pixel position in the generated warp field corresponding to the distorted real-world object, and determine the value of the first pixel position based on the pixel value in the second pixel position of the received image. The second pixel position can be calculated using the backward mapping function.

[0131] In order to train the machine learning technique module 512, a set of training data 501 may be generated. The set of training data may include a set of images and / or videos and corresponding real distortion field information. In some cases, a given image depicting a real-world object may be received. The given image may be associated with a 3D scan of the real-world object. The real-world object and the 3D scan of the real object may be combined with a synthetic background to generate a training image. In some cases, the real-world object and the 3D scan of the real-world object may be combined with multiple synthetic backgrounds to generate multiple training images.

[0132] The blend shape module 530 is used to generate and / or access a given blend shape that defines a deformation to be applied to a given real-world object. For example, a 3D graphics designer uses the blend shape module 530 to design or input a blend shape or target shape. Figure 6 A target shape 600 is shown as an example that can be received from a 3D graphics designer and defines a deformation pattern to be applied to a 3D scan of a real-world object. This creates a deformed 3D scan of the real-world object. The deformed 3D scan of the real-world object is applied to a training image to generate an inverse warp field associated with the training image. The inverse warp field defines or represents the relationship between the 3D scan of the real-world object and the deformed 3D scan of the real-world object. The inverse warp field defines a mapping of pixels in a new or modified image depicting the deformed real-world object. Specifically, the inverse warp field is used to remap pixels of the real-world object depicted in the training image to the new image. In this way, the real-world object can be stretched or deformed according to the target shape 600. A segmentation mask of the real-world object in the modified or new image can also be generated based on the deformed 3D scan. The segmentation mask and the inverse warp field can be stored as real information associated with the training image. The process can be repeated for a set of multiple training images to generate a set of training data.

[0133] For example, Figure 7 As shown, various images 700 representing stages in a training image generation process are provided according to some examples. Specifically, a first training image 710 is received. In this example, the first training image 710 depicts a real-world object and a synthetic background. The first training image 710 is processed to crop the real-world object from the first training image 710, for example using a 3D scan associated with the real-world object. The target shape 600 can be retrieved from the blend shape module 530 and used to generate a deformed 3D scan 720 of the real-world object. Then, an inverse warp field 730 is generated to represent the relationship between the pixels of the undeformed 3D scan of the real-world object and the pixels of the deformed 3D scan of the real-world object. The inverse warp field 730 is used to modify the first training image 710 to generate a new image 740 in which the real-world object is depicted as deformed based on the target shape 600. The deformed 3D scan is used to generate a segmentation mask of the deformed real-world object depicted in the new image, and is used to combine the deformed real-world object with one or more real or synthetic backgrounds. The segmentation mask and the inverse warp field 730 may be stored as ground truth information associated with the first training image 710 .

[0134] In some examples, during training, the image warping system 224 receives a given training image or video from the training data 501. The image warping system 224 applies one or more machine learning techniques to the given training image or video using the machine learning technique module 512. The machine learning technique module 512 extracts one or more features from the given training image or video to estimate a distortion field and / or a segmentation mask of a real-world person, object, or user depicted in the image or video. For example, the machine learning technique module 512 applies one or more other machine learning models to crop or extract the real-world object depicted in the given training image. The machine learning technique module 512 is then applied to the extracted real-world object to estimate or predict the distortion field of the real-world object and the segmentation mask of the distorted object.

[0135] The machine learning technique module 512 retrieves the true warp field and segmentation mask associated with a given training image or video. The machine learning technique module 512 compares the estimated or predicted warp field and the estimated and / or predicted segmentation mask for the real-world object with the true warp field and / or segmentation mask provided as part of the training data 501. Based on a difference threshold or deviation of the comparison, the machine learning technique module 512 updates one or more coefficients or parameters and obtains one or more additional training images or videos. After a specified number of epochs or batches of training images have been processed and / or when a difference threshold or deviation reaches a specified value, the machine learning technique module 512 completes training and the parameters and coefficients of the machine learning technique module 512 are stored in the trained machine learning technique 307.

[0136] After training, the machine learning technique module 512 may receive real-time or one or more images 502 from the client device 102. The machine learning technique module 512 may be activated in response to the AR effects module 519 receiving input from a user selecting a particular target shape to be applied to the one or more images 502. The machine learning technique module 512 is applied to crop out or extract the real-world objects depicted in the one or more images 502. The machine learning technique module 512 is then applied to the cropped or extracted real-world objects to estimate or predict a warp field and / or segmentation mask of the real-world object corresponding to the target shape 600. The warp field and / or segmentation mask is provided to the object deformation module 514.

[0137] The object deformation module 514 uses the estimated warp field to determine a mapping function that remaps pixels of the one or more images 502 to new pixel values. In some cases, the object deformation module 514 uses the warp field to generate an inverse mapping function. In such a case, the object deformation module 514 determines a new pixel value for a first pixel position in a new image based on the current pixel value of a second pixel position in the one or more images 502. Specifically, the object deformation module 514 selects a first pixel position in the new image. The object deformation module 514 uses the inverse mapping function to identify pixel values ​​for different pixel positions in the one or more images 502. The object deformation module 514 then copies the pixel values ​​for the different pixel positions to the first pixel position in the new image. Once all pixel values ​​are generated, the object deformation module 514 outputs the deformed real-world object in the new image. The object deformation module 514 can use a segmentation mask to overlay or combine the deformed real-world object with a new or pre-existing background (e.g., the background of the one or more images 502).

[0138] In an example, the AR effects module 519 selects and applies one or more AR elements or graphics to the object depicted in the image or video (e.g., the deformed object) based on the segmentation mask associated with the deformed object estimated by the machine learning technique module 512. These AR graphics combined with the real-world object depicted in the image or video are provided to the image modification module 518 to render an image or video depicting a deformed or deformed person wearing an AR object, such as an AR wallet or earrings.

[0139] The image modification module 518 adjusts the image captured by the camera based on the AR effect selected by the AR effect module 519. The image modification module 518 adjusts the way in which AR elements placed above the deformed user or person depicted in the image or video are presented in the image or video. The image display module 520 combines the adjustments made by the image modification module 518 into the received monocular image or video depicting the user's body. The image or video is provided to the client device 102 by the image display module 520 and can then be sent to another user or stored for later access and display.

[0140] In some examples, the image modification module 518 receives 3D body tracking information representing the 3D position of the user depicted in the image from the 3D body tracking module 513. The 3D body tracking module 513 generates the 3D body tracking information by processing the training data 501 using additional machine learning techniques. The image modification module 518 may also receive a full body segmentation representing which pixels in the image correspond to the user's entire body through another machine learning technique. The full body segmentation may be received from the full body segmentation module 515. The full body segmentation module 515 generates the full body segmentation by processing the training data 501 using machine learning techniques.

[0141] Figure 8 A process 800 for deforming a real-world object using a machine learning technique module 512 is shown according to some examples. Specifically, an input image 810 is received, such as from a client device 102. The machine learning technique module 512 crops out a real-world object (e.g., a person) depicted in the input image 810. The machine learning technique module 512 generates a warp field 820 that defines a reverse mapping function 830. The reverse mapping function 830 is used to generate a new image 840 that depicts a deformed version of the real-world object depicted in the input image 810. For example, the reverse mapping function 830 is used to determine the pixel value in a new image position g(x,y) based on the pixel value in the previous image f(x,y). In this manner, the image warping system 224 can select a particular pixel position corresponding to g(x,y) and determine the pixel value for the particular pixel position based on the pixel value defined by the function f(x,y) (corresponding to the pixel value in the input image 810).

[0142] That is, the pixel values ​​of the deformed real-world object at the second position are determined and set by copying the pixel values ​​of the real-world object at the first position in the input image 810. The second position may be a position in the input image 810 where no portion of the real-world object is depicted. In this manner, the real-world object is deformed to appear stretched and enlarged in the modified image depicting the deformed real-world object. For example, the pixel values ​​at coordinates 50, 50 of the input image 810 may be copied to coordinates 100, 55 in the new image 840 to render a deformed version of the object depicted in the input image 810. The new image 840 may be combined with a synthetic or real background using an estimated segmentation mask associated with the deformed object. That is, pixels that fall outside the segmentation mask may be replaced with pixels of the background, and no portion of the background may appear within the area defined by the segmentation mask.

[0143] Fig. 9 is a flow chart of a process 900 performed by the image warping system 224 according to some examples. Although the flow chart may describe the operations as a sequential process, many of the operations may be performed in parallel or simultaneously. In addition, the order of the operations may be rearranged. A process is terminated when its operations are completed. A process may correspond to a method, procedure, etc. The steps of a method may be performed in whole or in part, may be performed in combination with some or all of the steps in other methods, and may be performed by any number of different systems or any portion thereof (e.g., a processor included in any system).

[0144] At operation 901 , as described above, the image warping system 224 (eg, the client device 102 or a server) receives an image that includes a depiction of a real-world object.

[0145] At operation 902, as described above, the image warping system 224 applies a machine learning model to the image to generate a warp field and a segmentation mask, the machine learning model being trained to establish a relationship between a plurality of training images depicting real-world objects and corresponding real warp fields and segmentation masks associated with the target shape.

[0146] At operation 903 , the image warping system 224 applies the generated warp field and segmentation mask to the image to warp the real-world object depicted in the image into a target shape, as described above.

[0147] Machine Architecture

[0148] Fig.101000 within which instructions 1008 (e.g., software, programs, applications, applet, applications, or other executable code) may be executed to cause the machine 1000 to perform any one or more of the methods discussed herein. For example, the instructions 1008 may cause the machine 1000 to perform any one or more of the methods described herein. The instructions 1008 transform a general purpose, unprogrammed machine 1000 into a specific machine 1000 that is programmed to perform the functions described and illustrated in the manner described. The machine 1000 may operate as a standalone device or may be coupled (e.g., networked) to other machines. In a networked deployment, the machine 1000 may 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. The machine 1000 may include, but is not limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a laptop computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular phone, a smart phone, a mobile device, a wearable device (e.g., a smart watch), a smart home device (e.g., a smart appliance), other smart devices, a web device, a network router, a network switch, a network bridge, or any machine capable of sequentially or otherwise executing instructions 1008 specifying actions to be taken by the machine 1000. In addition, although only a single machine 1000 is shown, the term "machine" should also be construed to include a collection of machines that individually or jointly execute instructions 1008 to perform any one or more of the methods discussed herein. For example, the machine 1000 may include any of the client device 102 or a plurality of server devices that form part of the messaging server system 108. In some examples, the machine 1000 may also include both a client system and a server system, wherein certain operations of a particular method or algorithm are performed on the server side and certain operations of the particular method or algorithm are performed on the client side.

[0149] The machine 1000 may include a processor 1002, a memory 1004, and an input / output (I / O) component 1038 that may be configured to communicate with each other via a bus 1040. In an example, the processor 1002 (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), other processors, or any suitable combination thereof) may include, for example, a processor 1006 that executes instructions 1008 and a processor 1010. The term "processor" is intended to include multi-core processors, which may include two or more independent processors (sometimes referred to as "cores") that may execute instructions simultaneously. Although Fig.10 Multiple processors 1002 are shown, but the machine 1000 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.

[0150] The memory 1004 includes a main memory 1012, a static memory 1014, and a storage unit 1016, all of which are accessible to the processor 1002 via the bus 1040. The main memory 1004, the static memory 1014, and the storage unit 1016 store instructions 1008 that embody any one or more of the methods or functions described herein. The instructions 1008 may also reside, completely or partially, within the main memory 1012, within the static memory 1014, within the machine-readable medium 1018 within the storage unit 1016, within at least one of the processors 1002 (e.g., within a cache memory of a processor), or within any suitable combination thereof during execution of the instructions 1008 by the machine 1000.

[0151] The I / O components 1038 may include various components that receive input, provide output, generate output, send information, exchange information, capture measurements, etc. The specific I / O components 1038 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 appreciated that the I / O components 1038 may include Fig.101024 and 1026. In various examples, the I / O components 1038 may include a user output component 1024 and a user input component 1026. The user output component 1024 may include a visual component (e.g., a display such as a plasma display panel (PDP), a light emitting diode (LED) display, a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)), an acoustic component (e.g., a speaker), a tactile component (e.g., a vibration motor, a resistance mechanism), other signal generators, etc. The user input component 1026 may include an alphanumeric input component (e.g., a keyboard, a touch screen configured to receive alphanumeric input, an optical keyboard, or other alphanumeric input component), a pointing-based input component (e.g., a mouse, a touch pad, a trackball, a joystick, a motion sensor, or other pointing instrument), a tactile input component (e.g., a physical button, a touch screen or other tactile input component that provides the location and force of a touch or touch gesture), an audio input component (e.g., a microphone), etc.

[0152] In other examples, I / O component 1038 may include biometric component 1028, motion component 1030, environment component 1032, or position component 1034, as well as various other components. For example, biometric component 1028 includes components for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body postures, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, perspiration, or brain waves), identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition), etc. Motion component 1030 includes acceleration sensor components (e.g., accelerometers), gravity sensor components, and rotation sensor components (e.g., gyroscopes).

[0153] Environmental components 1032 include, for example, one or more cameras (with still image / photo and video capabilities), lighting sensor components (e.g., photometers), temperature sensor components (e.g., one or more thermometers that detect ambient temperature), humidity sensor components, pressure sensor components (e.g., barometers), acoustic sensor components (e.g., one or more microphones that detect background noise), proximity sensor components (e.g., infrared sensors that detect nearby objects), gas sensors (e.g., gas detection sensors that detect concentrations of hazardous gases for safety or measure pollutants in the atmosphere), or other components that can provide indications, measurements, or signals corresponding to the surrounding physical environment.

[0154] With respect to cameras, client device 102 may have a camera system including, for example, a front-facing camera on a front surface of client device 102 and a rear-facing camera on a rear surface of client device 102. The front-facing camera may, for example, be used to capture still images and videos of a user of client device 102 (e.g., a "selfie"), which may then be enhanced using the enhancement data (e.g., filters) described above. The rear-facing camera may, for example, be used to capture still images and videos in a more traditional camera mode, which may similarly be enhanced using the enhancement data. In addition to the front-facing camera and the rear-facing camera, client device 102 may also include a 360° camera for capturing 360° photos and videos.

[0155] Additionally, 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 triple, quad, or quintuple rear camera configurations on the front and back sides of the client device 102. For example, these multiple camera systems may include a wide-angle camera, an ultra-wide-angle camera, a telephoto camera, a macro camera, and a depth sensor.

[0156] The position component 1034 includes a position sensor component (eg, a GPS receiver component), an altitude sensor component (eg, an altimeter or a barometer that detects air pressure, from which the altitude can be obtained), an orientation sensor component (eg, a magnetometer), and the like.

[0157] Various technologies may be used to implement communications. The I / O components 1038 also include a communication component 1036 that is operable to couple the machine 1000 to the network 1020 or device 1022 via a corresponding coupling or connection. For example, the communication component 1036 may include a network interface component or other suitable device to connect to the network 1020. In other examples, the communication component 1036 may include a wired communication component, a wireless communication component, a cellular communication component, a near field communication (NFC) component, Parts (e.g. Low energy consumption), Device 1022 may be another machine or any of a variety of peripheral devices (eg, a peripheral device coupled via USB).

[0158] In addition, the communication component 1036 can detect an identifier or include a component operable to detect an identifier. For example, the communication component 1036 can 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 bar codes such as universal product codes (UPC) bar codes, multi-dimensional bar codes such as quick response (QR) codes, Aztec codes, data matrix, data symbols (Dataglyph), MaxiCode, PDF417, Ultra Code, UCC RSS-2D bar codes and other optical codes) or an acoustic detection component (e.g., a microphone for identifying an audio signal of a tag). In addition, various information can be derived via the communication component 1036, such as location via Internet Protocol (IP) geolocation, ... Signal triangulation to derive location, location via detection of NFC beacon signals that can indicate a specific location, etc.

[0159] Various memories (e.g., main memory 1012, static memory 1014, and memory of processor 1002) and storage unit 1016 may store one or more sets of instructions and data structures (e.g., software) used by or implementing any one or more of the methods or functions described herein. These instructions (e.g., instructions 1008) when executed by processor 1002 cause various operations to implement the disclosed examples.

[0160] The instructions 1008 may be sent or received over the network 1020 using a transmission medium via a network interface device (e.g., a network interface component included in the communication component 1036) and using any of a number of well-known transmission protocols (e.g., Hypertext Transfer Protocol (HTTP)). Similarly, the instructions 1008 may be sent or received via a coupling (e.g., a peer-to-peer coupling) with the device 1022 using a transmission medium.

[0161] Software Architecture

[0162] Fig.111100 is a block diagram illustrating a software architecture 1104 that can be installed on any one or more of the devices described herein. The software architecture 1104 is supported by hardware, such as a machine 1102 including a processor 1120, a memory 1126, and an I / O component 1138. In this example, the software architecture 1104 can be conceptualized as a stack of layers, each of which provides specific functionality. The software architecture 1104 includes layers such as an operating system 1112, a library 1110, a framework 1108, and an application 1106. In operation, the application 1106 invokes an API call 1150 through the software stack and receives a message 1152 in response to the API call 1150.

[0163] The operating system 1112 manages hardware resources and provides public services. The operating system 1112 includes, for example, a kernel 1114, services 1116, and drivers 1122. The kernel 1114 acts as an abstraction layer between the hardware layer and other software layers. For example, the kernel 1114 provides functions such as memory management, processor management (e.g., scheduling), component management, networking, and security settings. Services 1116 can provide other public services to other software layers. Drivers 1122 are responsible for controlling or connecting to the underlying hardware. For example, drivers 1122 may include display drivers, camera drivers, or Low-power drivers, Flash drivers, Serial communication drivers (e.g., USB drivers), Drivers, audio drivers, power management drivers, etc.

[0164] The libraries 1110 provide a common low-level infrastructure used by the applications 1106. The libraries 1110 may include system libraries 1118 (e.g., C standard libraries) that provide functions such as memory allocation functions, string manipulation functions, mathematical functions, etc. In addition, the libraries 1110 may include API libraries 1124, such as media libraries (e.g., libraries for supporting presentation 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 Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), graphics libraries (e.g., OpenGL framework for presentation in 2D and 3D in graphics content on a display), database libraries (e.g., SQLite providing various relational database functions), web libraries (e.g., WebKit providing web browsing functions), etc. The library 1110 may also include various other libraries 1128 for providing many other APIs to the application 1106 .

[0165] The framework 1108 provides a common high-level infrastructure used by the applications 1106. For example, the framework 1108 provides various graphical user interface functions, advanced resource management, and advanced location services. The framework 1108 can provide a wide range of other APIs that can be used by the applications 1106, some of which can be specific to a specific operating system or platform.

[0166] In an example, applications 1106 may include a home application 1136, a contacts application 1130, a browser application 1132, a book reader application 1134, a location application 1142, a media application 1144, a messaging application 1146, a game application 1148, and a variety of other applications such as external applications 1140. Applications 1106 are programs that execute functions defined in the program. Various programming languages ​​may be used to create one or more of the applications 1106 constructed in various ways, such as an object-oriented programming language (e.g., Objective-C, Java, or C++) or a procedural programming language (e.g., C language or assembly language). In a specific example, external applications 1140 (e.g., those created by an entity other than the vendor of a particular platform using ANDROID TM or IOS TM SDK developed applications) can be mobile operating systems such as IOS TM ANDROID TM , Phone, or other mobile operating system running on the mobile software. In this example, the external application 1140 can activate the API call 1150 provided by the operating system 1112 to facilitate the functions described herein.

[0167] Glossary

[0168] "Carrier signal" refers to any intangible medium that can store, encode or carry instructions for execution by a machine, and includes digital or analog communications signals or other intangible media that facilitates transmission of such instructions. Instructions may be sent or received over a network using a transmission medium via a network interface device.

[0169] "Client Device" refers to any machine that connects to a communications network to obtain resources from one or more server systems or other client devices. A client device may be, but is not limited to, a mobile phone, a desktop computer, a laptop computer, a portable digital assistant (PDA), a smart phone, a tablet computer, an ultrabook, a netbook, a laptop computer, a multiprocessor system, a microprocessor-based or programmable consumer electronics product, a game console, a set-top box, or any other communications device that a user may use to access a network.

[0170] "Communications network" means one or more parts of a network, which may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless LAN (WLAN), a wide area network (WAN), a wireless WAN (WWAN), a metropolitan area network (MAN), the Internet, a part of the Internet, a part of the public switched telephone network (PSTN), a plain old telephone service (POTS) network, a cellular telephone network, a wireless network, A network, another type of network, or a combination of two or more such networks. For example, the network or a portion of the 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 type of cellular or wireless coupling. In this example, the coupling may implement any of various types of data transmission technologies, such as single carrier radio transmission technology (1xRTT), evolution data optimized (EVDO) technology, general packet radio service (GPRS) technology, enhanced data rates for GSM evolution (EDGE) technology, the third generation partnership project (3GPP) including 3G, fourth generation wireless (4G) networks, universal mobile telecommunications system (UMTS), high speed packet access (HSPA), world wide interoperability for microwave access (WiMAX), long term evolution (LTE) standards, other data transmission technologies defined by various standard setting organizations, other long distance protocols, or other data transmission technologies.

[0171] "Component" means a device, physical entity, or logic having boundaries defined by function or subroutine calls, branch points, APIs, or other techniques that provide partitioning or modularization of specific processing or control functions. A component may be combined with other components via its interfaces to perform a machine process. A component may be a packaged functional hardware unit designed for use with other components and as part of a program that typically performs specific functions of related functions.

[0172] Components may constitute software components (e.g., code implemented on a machine-readable medium) or hardware components. A "hardware component" is a tangible unit that is capable of performing certain operations and may be configured or arranged in some physical manner. In various examples, one or more computer systems (e.g., stand-alone computer systems, client computer systems, or server computer systems) or one or more hardware components of a computer system (e.g., a processor or group of processors) may be configured by software (e.g., an application or application portion) as hardware components that operate to perform certain operations as described herein.

[0173] Hardware components may also be implemented mechanically, electronically, or in any suitable combination thereof. For example, a hardware component may include a dedicated circuit system or logic that is 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 a programmable logic or circuit system that is temporarily configured to perform certain operations by software. 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 component of a machine) that is uniquely customized to perform the configured function, rather than a general-purpose processor. It will be understood that the decision to mechanically implement a hardware component in a dedicated and permanently configured circuit system or in a temporarily configured (e.g., configured by software) circuit system may be driven for cost and time considerations. Therefore, the phrase "hardware component" (or "hardware-implemented component") should be understood to include a tangible entity, i.e., an entity that is physically constructed, permanently configured (e.g., hardwired) or temporarily configured (e.g., programmed) to operate in some way or perform certain operations described herein.

[0174] Consider an example where hardware components are temporarily configured (e.g., programmed), without configuring or instantiating each of the hardware components at any one time. For example, where the hardware components include a general-purpose processor that is configured by software to be a special-purpose processor, the general-purpose processor can be configured as different special-purpose processors (e.g., including different hardware components) at different times. For example, software configures one or more specific processors accordingly to constitute a specific hardware component at one time and to constitute different hardware components at different times.

[0175] Hardware components can provide information to other hardware components and receive information from other hardware components. Therefore, the described hardware components can be considered to be communicatively coupled. In the case of multiple hardware components simultaneously, communication can be achieved by signal transmission between or among two or more hardware components in the hardware components (e.g., by appropriate circuits and buses). In an example where multiple hardware components are configured or instantiated at different times, communication between such hardware components can be achieved, for example, by storing information in a memory structure accessed by multiple hardware components and retrieving information in the memory structure. For example, a hardware component can perform an operation and store the output of the operation in a memory device communicatively coupled thereto. Then, other hardware components can access the memory device at a subsequent time to retrieve the stored output and process it. The hardware component can also initiate communication with an input or output device, and can operate on a resource (e.g., a collection of information).

[0176] The various operations of the example methods described herein may be performed at least in part by one or more processors that are temporarily configured (e.g., configured by software) or permanently configured to perform related operations. Whether temporarily or permanently configured, such a processor may constitute a processor-implemented component that operates to perform one or more operations or functions described herein. As used herein, a "processor-implemented component" refers to a hardware component implemented using one or more processors. Similarly, the methods described herein may be implemented at least in part by a processor, wherein a specific one or more processors are examples of hardware. For example, at least some of the operations of the method may be performed by one or more processors 1002 or a processor-implemented component. In addition, one or more processors may also operate to support the execution of related operations in a "cloud computing" environment or as a "software as a service" (SaaS) operation. For example, at least some of the operations may be performed by a group of computers (as an example of a machine including a processor), wherein these operations may be accessed via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., APIs). The execution of certain operations may be distributed among processors, not just residing in a single machine, but deployed across multiple machines. In some examples, the processor or processor-implemented components may be located in a single geographic location (e.g., in a home environment, an office environment, or a server farm). In other examples, the processor or processor-implemented components may be distributed across multiple geographic locations.

[0177] "Computer-readable storage media" refers to both machine storage media and transmission media. Thus, the term includes both storage devices / media as well as carrier / modulated data signals. The terms "machine-readable medium," "computer-readable medium," and "device-readable medium" mean the same thing and are used interchangeably in this disclosure.

[0178] "Short-lived messages" are messages of a limited duration of time that can be accessed. Short-lived messages can be text, images, videos, etc. The access time for short-lived messages can be set by the sender of the message. Alternatively, the access time can be a default setting or a setting specified by the recipient. Regardless of the setting technique, the message is temporary.

[0179] "Machine storage media" refers to a single or multiple storage devices and media (e.g., centralized or distributed databases, and associated caches and servers) that store executable instructions, routines, and data. Therefore, these terms should be considered to include, but are 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), FPGA, and flash memory devices; magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms "machine storage media", "device storage media", "computer storage media" mean the same thing and can be used interchangeably in this disclosure. The terms "machine storage media", "computer storage media", and "device storage media" explicitly exclude carrier waves, modulated data signals, and other such media, at least some of which are covered under the term "signal media".

[0180] “Non-transitory computer-readable storage medium” refers to tangible media capable of storing, encoding, or carrying instructions to be executed by a machine.

[0181] "Signal medium" refers to any intangible medium that is capable of storing, encoding or carrying instructions executed by a machine, and includes digital or analog communication signals or other intangible media that facilitate the transmission of software or data. The term "signal medium" should be deemed to include any form of modulated data signals, carrier waves, etc. The term "modulated data signal" means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. The terms "transmission medium" and "signal medium" mean the same thing and may be used interchangeably in this disclosure.

[0182] Changes and modifications may be made to the disclosed examples without departing from the scope of the present disclosure. These and other changes or modifications are intended to be included within the scope of the present disclosure as expressed in the appended claims.

Claims

1. A method comprising: receiving, by one or more processors, an image, the image comprising a depiction of a real-world object; applying, by the one or more processors, a machine learning model to the images to generate a warp field and a segmentation mask, the machine learning model being trained to establish a relationship between a plurality of training images depicting real-world objects and corresponding true warp fields and segmentation masks associated with target shapes; as well as The generated warp field and segmentation mask are applied to the image to warp the real-world object depicted in the image into the target shape.

2. The method according to claim 1, wherein: The real-world objects include people.

3. The method according to any one of claims 1 to 2, wherein: The machine learning model includes a deep neural network.

4. The method according to any one of claims 1 to 3, wherein: Apply the resulting warp fields and segmentation masks including: The values ​​of a first set of pixels of a first portion of the image depicting the real-world object are mapped to a second set of pixels of a second portion of the image.

5. The method according to claim 4, wherein: The warp field defines an offset to one or more vertices of the human body model, and wherein the values ​​are mapped based on the offset to the one or more vertices.

6. The method according to any one of claims 1 to 5, wherein: The warp field includes a predicted blend shape.

7. The method according to any one of claims 1 to 6, further comprising training the machine learning model by performing a training operation, the training operation comprising: accessing training data, the training data comprising the plurality of training images depicting the real-world object and the corresponding real distortion fields and segmentation masks; applying the machine learning model to a first set of training data including a first training image to generate an estimated warp field and an estimated segmentation mask; calculating deviations between the estimated warp field and the estimated segmentation mask and true warp field and segmentation mask corresponding to the first training image in the first set of training data; as well as One or more parameters of the machine learning model are updated based on the deviation between the estimated warp field and the estimated segmentation mask and the true warp field and segmentation mask of the first training image.

8. The method according to claim 7, further comprising generating the first set of training data by: rendering the first training image using a synthetic background; and The realistic distortion field of the real-world object depicted in the first training image is generated by projecting the target shape including blend shapes onto the real-world object.

9. The method according to claim 8, further comprising: distorting the real-world object depicted in the first training image using the real distortion field to generate a modified training image, and A true segmentation mask of the distorted real-world object depicted in the modified training image is generated.

10. The method according to claim 9, further comprising: obtaining a three-dimensional (3D) scan of the real-world object depicted in the first training image; as well as The target shape is applied to the 3D scan to generate a deformed 3D scan of the real-world object.

11. The method of claim 10, further comprising generating an inverse warp field comprising the true warp field, the inverse warp field defining a relationship between the 3D scan of the real-world object depicted in the first training image and the deformed 3D scan of the real-world object.

12. The method of claim 11, further comprising generating the modified training image using the inverse warp field.

13. The method according to claim 11, wherein: The machine learning model is trained to estimate the inverse warp field for new images.

14. The method of any one of claims 1 to 13, further comprising cropping a portion of the image depicting the real-world object, wherein The machine learning model is applied to the cropped portion of the image.

15. The method of claim 14, further comprising combining the distorted real-world object with a background depicted in the received image.

16. The method of any one of claims 1 to 15, further comprising applying an inverse mapping function to pixels corresponding to the real-world object using the generated warp field.

17. The method according to claim 16, further comprising: selecting a first pixel position in the generated warped field corresponding to the warped real-world object, and A value of the first pixel position is determined based on a pixel value in a second pixel position of the received image, the second pixel position being calculated using the inverse mapping function.

18. The method according to any one of claims 1 to 17, wherein: The images are frames of a video, and wherein the generated warp field and segmentation mask are applied to the video in real time.

19. A system comprising: processor; as well as A memory component having instructions stored thereon, which when executed by the processor cause the processor to perform operations including: receiving an image, the image comprising a depiction of a real-world object; applying a machine learning model to the images to generate a warp field and a segmentation mask, the machine learning model being trained to establish a relationship between a plurality of training images depicting real-world objects and corresponding true warp fields and segmentation masks associated with target shapes; as well as The generated warp field and segmentation mask are applied to the image to warp the real-world object depicted in the image into the target shape.

20. A non-transitory computer-readable storage medium having instructions stored thereon, which when executed by a processor cause the processor to perform operations comprising: receiving an image, the image comprising a depiction of a real-world object; applying a machine learning model to the images to generate a warp field and a segmentation mask, the machine learning model being trained to establish a relationship between a plurality of training images depicting real-world objects and corresponding true warp fields and segmentation masks associated with target shapes; as well as The generated warp field and segmentation mask are applied to the image to warp the real-world object depicted in the image into the target shape.

Citation Information

Patent Citations

  • Automatic generation of an efficient rule set implementation

    US20220100738A1