Real-time true size eyewear device

By generating and processing facial landmarks in VR/AR systems, calculating real-world proportions, and adjusting the position and size of augmented reality elements in real time, the burden and resource consumption caused by calibration operations in existing technologies are solved, thereby improving user experience and efficiency.

CN117043829BActive Publication Date: 2026-03-17SNAP INC
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing VR/AR systems require users to perform calibration to determine facial proportions, resulting in additional burden and resource consumption, which affects the user experience.

Method used

By receiving user facial images, multiple facial landmarks are generated, interfering landmarks are removed, depth maps are used to calculate the real-world proportions, the size and position of augmented reality elements are adjusted, and facial proportions are updated in real time to adapt to facial movement.

Benefits of technology

The size and position of augmented reality elements can be accurately adjusted in AR/VR systems without calibration, improving user experience efficiency and reducing system resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117043829B_ABST
    Figure CN117043829B_ABST
Patent Text Reader

Abstract

A method and system are disclosed for performing operations including: receiving an image including a depiction of a user's face; generating multiple landmarks of the face based on the received image; removing a set of interfering landmarks from the multiple landmarks to obtain a remaining set of landmarks; obtaining a depth map of the user's face; and calculating a real-world scale of the user's face based on the depth map and the remaining set of landmarks.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references to related applications

[0002] This application claims the benefit of priority to U.S. Patent Application Serial No. 17 / 208,159, filed March 22, 2021, the entire contents of which are incorporated herein by reference. Technical Field

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

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

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

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

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

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

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

[0010] Figure 5 This is a block diagram illustrating an example true size estimation system based on some examples.

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

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

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

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

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

[0016] Typically, virtual reality (VR) and augmented reality (AR) systems allow users to add augmented reality elements, such as augmented reality eyewear, to a captured image depicting the user's face. To do this, typical VR / AR systems use specialized techniques that require calibration to determine the proportions of the user's face in the image. For example, these systems instruct the user to place a reference object, such as a credit card, on or next to their face so that the facial proportions can be calculated. The system can then display the augmented reality eyewear on the user's face based on the calibration. While such systems generally function well, the need for a calibration system places an additional burden on the user and impacts the enjoyment of the experience. Moreover, calculating proportions through a calibration system requires additional time and resources, making such systems less efficient for general applications.

[0017] The disclosed technique improves the efficiency of using electronic devices that implement or otherwise access AR / VR systems by calculating the real-world or real-world scale of a user's face by combining a selected set of facial landmarks with a depth map of the user's face. Specifically, the disclosed technique receives an image including a depiction of a user's face and generates multiple facial landmarks based on the received image. The facial landmarks (or landmarks on the face) may correspond to predetermined areas of a person's face, such as the nose, mouth, and eyes. The disclosed technique removes a set of interfering facial landmarks from the multiple facial landmarks, resulting in the remaining set of landmarks. The disclosed technique obtains a depth map of the user's face and calculates the real-world scale of the user's face based on the depth map and the remaining set of landmarks. The real-world scale of the face is then used to adjust the size of augmented reality elements (e.g., augmented reality glasses (e.g., eyewear) or augmented reality hats). The real-world scale, along with facial topology, is also used to identify the appropriate locations for adding or displaying augmented reality elements on the user's face. As the user's face moves in the video, the positioning of the augmented reality elements is continuously changed to remain fixed to the identified facial position. In a similar manner, when new images of videos depicting a user's face are received and processed, the real-world proportions of the face are continuously updated.

[0018] In this way, the disclosed technology can apply one or more visual effects to a user's face in a current image without performing any calibration or pre-capture operations. This improves the overall user experience when using electronic devices and reduces the total amount of system resources required to complete the task.

[0019] Networked computing environment

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

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

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

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

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

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

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

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

[0028] Image processing server 122 is used to implement the scanning function of augmented reality system 208. The scanning function includes activating and providing one or more augmented reality experiences on client device 102 when an image is captured by client device 102. Specifically, messaging client 104 on client device 102 can be used to activate a camera device. The camera device displays one or more real-time images or videos along with one or more icons or identifiers of the augmented reality experiences to the user. The user can select a given identifier from the identifiers to initiate the corresponding augmented reality experience or perform desired image modifications (e.g., adding an augmented reality headset or hat to a face depicted in the image).

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

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

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

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

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

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

[0035] System Architecture

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

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

[0038] The collection management system 204 is responsible for managing groups or 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 libraries" or "event stories." Such collections can be made available for a specified time period (e.g., the duration of the event the content relates to). For example, content related to a concert can be made available as a "story" for the duration of the concert. The collection management system 204 can also be responsible for publishing icons that provide notifications about the existence of specific collections to the user interface of the messaging client 104.

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

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

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

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

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

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

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

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

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

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

[0049] To integrate the functionality of the SDK into the web-based resource, the SDK is downloaded from the message server 118 by the external resource (application) server 110 or otherwise received 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 message client 104 into the web-based resource.

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

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

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

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

[0054] The real-world size estimation system 224 calculates the real-world scale of a user's face depicted in an image, for example, based on facial landmarks (or a subset of facial landmarks) and data received from a depth sensor. For example, the real-world size estimation system 224 may perform object recognition on a captured video feed to generate multiple landmarks representing the face depicted in the received image. In response to generating multiple landmarks, the real-world size estimation system 224 removes a set of interfering landmarks (e.g., by removing hair or chin landmarks) from the multiple landmarks, resulting in a remaining set of landmarks. In some cases, the real-world size estimation system 224 removes landmarks with visibility or stability parameters below a specified value. In some cases, the real-world size estimation system 224 sorts the landmarks based on the individual visibility and stability parameters to generate the remaining set of landmarks. The real-world size estimation system 224 acquires a depth map and then calculates the real-world scale of the user's face based on the depth map and the remaining set of landmarks. The following is combined with... Figure 5 An illustrative implementation of the true size estimation system 224 is shown and described.

[0055] Specifically, the true size estimation system 224 is a component accessible to an AR / VR application implemented on client device 102. The AR / VR application uses an RGB camera to capture a monocular image of the user's real-world face. The AR / VR application applies various trained machine learning techniques to the captured facial image and obtains a depth map, and applies one or more visual effects to the captured image. In some implementations, the AR / VR application continuously captures images of the user's face in real-time or periodically to continuously or periodically update one or more applied visual effects (e.g., augmented reality headsets or hats). This allows the user to move around in the real world and see one or more visual effects updated in real time.

[0056] Data Architecture

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0071] In some examples, when a specific modification is selected along with the content to be transformed, the computing device identifies the elements to be transformed and then detects and tracks them if they exist in the video frames. The elements of the object are modified according to the modification request, thereby transforming the frames of the video stream. Different methods can be used to perform the transformation of the video stream frames for different types of transformations. For example, for frame transformations that primarily refer to changes in the form of the object's elements, feature points of each element of the object are calculated (e.g., using an Active Shape Model (ASM) or other known methods). A feature point-based mesh is then generated for each of at least one element of the object. This mesh is used for subsequent stages of tracking the elements of the object in the video stream. During tracking, the mesh for each mentioned element is aligned with the position of each element. Additional points are then generated on the mesh. A first set of first points is generated for each element based on the modification request, and a second set of points is generated for each element based on the first set of points and the modification request. The frames of the video stream can then be transformed by modifying the elements of the object based on this set of first and second points and the mesh. In this method, the background of the modified object can also be changed or deformed by tracking and modifying the background.

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

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

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

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

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

[0077] In some examples, a computer animation model for transforming image data can be used by a system in which a user can use a client device 102 with a neural network to capture an image or video stream of the user (e.g., a selfie), the neural network operation being part of a messaging client 104 operating on the client device 102. A transformation system operating within the messaging client 104 determines the presence of a face within the image or video stream and provides a modification icon associated with the computer animation model to transform the data image, or the computer animation model may exist in association with the interface described herein. The modification icon includes changes, which may be the basis for modifying the user's face within the image or video stream as part of a modification operation. Once a modification icon is selected, the transformation system initiates a 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 may implement a complex convolutional neural network on a portion of the image or video stream to generate and apply the selected modification. In other words, users can capture image or video streams, and once an edit icon is selected, the changes can be displayed in real-time or near real-time. Furthermore, the changes can be persistent while the video stream is captured and the selected edit icon continues to toggle. Machine learning neural networks can be used to achieve this type of modification.

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

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

[0080] The collection can 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 technologies. For example, a "live story" can constitute a curated flow of user-submitted content from various locations and events. Users whose client devices have location services enabled and are at a co-location event at a specific time can be presented with options, for example, via the user interface of messaging client 104, to contribute content to a specific live story. The live story can be identified to the user by messaging client 104 based on their location. The end result is a "live story" told from a community perspective.

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

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

[0083] Data communication architecture

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

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

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

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

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

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

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

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

[0092] • Message geolocation parameter 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 in the message image payload 406, or a specific video in the message video payload 408).

[0093] • Message Story Identifier 418: An identifier value that identifies one or more sets of content (e.g., “Stories” identified in Story Table 314) associated with a specific content item in the message image payload 406 of message 400. For example, the identifier value can be used to associate multiple images within the message image payload 406 with multiple sets of content, respectively.

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

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

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

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

[0098] True size estimation system

[0099] Figure 5This is a block diagram illustrating an example real-size estimation system 224 according to some examples. The real-size estimation system 224 includes a set of components 510 that operate on a set of input data (e.g., a monocular image 501 depicting a user's face, depth map data 502, and eye-wearing device data 503). The real-size estimation system 224 includes a landmark generation module 512, a landmark selection module 514, a depth map module 517, a real-world scale calculation module 516, an image modification module 518, an eye-wearing device generation module 519, and an image display module 520. All or some of the components of the real-size estimation system 224 can be implemented by a server, in which case the monocular image 501 depicting the user's face and the depth map data 502 are provided to the server by a client device 102. In some cases, some or all of the components of the real-size estimation system 224 can be implemented by the client device 102.

[0100] The landmark generation module 512 receives a monocular image 501 depicting a user's face. This image may be received as part of a new image captured by the camera device of the client device 102, a previously captured video stream, or a live video stream. The landmark generation module 512 applies one or more machine learning techniques to identify and segment the user's face from the background of the monocular image 501 depicting the user's face. The landmark generation module 512 may then apply one or more machine learning techniques to identify one or more landmarks on the identified face. For example, such as... Figure 6 As shown, the landmark generation module 512 can generate an output image 610, which provides multiple landmarks 616, 612, and 614. Each landmark uniquely and specifically identifies facial areas such as eyebrows, eyes, nose, temples, bridge of the nose, mouth, nose, ears, hair, cheeks, and forehead.

[0101] The landmark generation module 512 can calculate a visibility parameter and a stability parameter for each of the identified landmarks. The visibility parameter specifies the score, rank, or quantity of a given landmark visible in the monocular image 501 depicting the user's face. In this example, the landmark generation module 512 calculates the visibility parameter by retrieving a general three-dimensional (3D) facial model representation. The landmark generation module 512 identifies a set of landmarks on the 3D facial model representation. The landmark generation module 512 selects a given landmark from the identified landmarks of the user's face and matches the given landmark to the corresponding landmark on the 3D facial model. For example, the landmark generation module 512 selects an ear landmark and matches the ear landmark to the ear portion of the 3D facial model. The landmark generation module 512 calculates the degree of matching between the ear landmark and the ear portion of the 3D facial model to determine the visibility level or visibility parameter. In this implementation, the visibility parameter is set to 60% if 60% of the ear landmarks match the ear portion. In other words, the visibility parameter is proportional to the amount by which the landmark matches or overlaps with the corresponding part of the 3D facial model.

[0102] The landmark generation module 512 continues to use the 3D facial model to calculate the visibility parameters of the remaining landmarks identified in the received image in a similar manner. After obtaining the visibility parameters of each landmark identified in the face, the landmark generation module 512 determines the visibility parameter of each landmark based on the number of the remaining set of landmarks that match the general 3D facial model representation. Specifically, the landmark generation module 512 calculates how many landmarks have a visibility score greater than a certain threshold (e.g., greater than 75%). The landmark generation module 512 then calculates the total visibility parameter of the identified landmarks based on the number of landmarks with visibility scores greater than the threshold. The larger the number of landmarks with visibility scores greater than the threshold, the larger the total visibility parameter.

[0103] The landmark generation module 512 can also calculate a stability parameter for each of the identified landmarks. The stability parameter indicates how much each given landmark moves across a threshold number of frames. For example, the landmark generation module 512 can receive a sequence of frames from a video including a monocular image 501 depicting a user's face. After recognizing landmarks on the face, the landmark generation module 512 can determine the 3D or 2D position of the landmarks in the image. The landmark generation module 512 detects changes in the 3D or 2D position of each landmark. Based on the change or amount of movement in the 3D or 2D position, the landmark generation module 512 generates and calculates a corresponding stability parameter for each given landmark. Landmarks with smaller amounts of movement are assigned a larger stability parameter score compared to landmarks determined to have moved more than a threshold amount per threshold number of frames (e.g., on 40 frames).

[0104] In some cases, the landmark generation module 512 calculates the stability parameter for each landmark based on the frame rate associated with the client device 102 used to capture video depicting a user's face. That is, a client device 102 with a first frame rate can be associated with a larger number of frames on which the stability parameter is calculated, compared to another client device with a lower second frame rate. In other words, the threshold number of frames can vary based on the frame rate of the client device 102. After calculating the stability parameter and visibility parameter for each landmark, the landmark generation module 512 ranks and sorts the landmarks based on their respective stability and visibility parameters.

[0105] In some cases, before performing visibility parameter calculation and stability parameter calculation, the landmark generation module 512 can remove a set of interfering landmarks from the identified set of facial landmarks. That is, the landmark generation module 512 can access a predetermined list of known or predetermined interfering landmarks (e.g., hair areas, facial clothing (e.g., masks or glasses), neck areas). In response to determining that one of the identified landmarks corresponds to or is included in a predetermined set of interfering landmarks, the landmark generation module 512 can remove, discard, or disregard such identified landmarks. After removing a set of interfering landmarks from multiple landmarks, the landmark generation module 512 provides the landmark selection module 514 with the resulting set of remaining landmarks from the total number of identified landmarks. In some cases, the removal of interfering landmarks can be performed after calculating the visibility and stability parameters of all landmarks among the multiple landmarks on the identified face, and before selecting the foremost landmark. Thus, even if a given landmark (e.g., face clothing) is associated with the highest visibility and stability parameters compared to all other landmarks (e.g., eyes and nose), the given landmark will not be included or selected by the landmark selection module 514 as the foremost landmark, because the given landmark is considered an interfering landmark.

[0106] The landmark generation module 512 provides the identified landmarks and their respective visibility and stability parameters to the landmark selection module 514. The landmark selection module 514 selects a set of leading landmarks that are associated with larger visibility and stability parameters compared to the remaining set of landmarks. In some cases, the landmark selection module 514 may receive instructions on augmented reality elements to be included in an image depicting a user's face. Based on the type of augmented reality element (e.g., an eye-wearing augmented reality element), the landmark generation module 512 obtains a threshold amount or number of landmarks to be selected as leading landmarks. For example, if an eye-wearing augmented reality element is selected, the threshold number of leading landmarks includes the two leading landmarks that need to be selected. In this case, the landmark selection module 514 obtains and tracks these two landmarks, which rank higher than all other identified landmarks (based on their respective visibility and stability parameters (or metrics)). The threshold number of leading landmarks can also be specified by the user.

[0107] In some implementations, the landmark selection module 514 randomly selects the foremost landmarks. For example, for the first frame sequence or the first duration of a video, the landmark selection module 514 can select a first set of landmarks (e.g., eyes and nose) with visibility and stability parameters exceeding specified values. Then, for the second frame sequence or the second duration of the video, the landmark selection module 514 can select a second set of landmarks (e.g., eyes and ears) with visibility and stability parameters exceeding specified values. That is, the landmark selection module 514 can identify a set of landmarks with visibility and stability parameters greater than specified values ​​or satisfying one or more criteria (e.g., the foremost landmarks exceeding a threshold number). The landmark selection module 514 can then alternately and randomly change which subset of the set of landmarks (e.g., which two of the multiple sets of landmarks) is included in the foremost landmarks of the threshold number.

[0108] In this implementation, based on tracking two landmarks, the landmark selection module 514 can provide information related to the two landmarks to the real-world scale calculation module 516 to calculate the real-world scale of the user depicted in the image. Thus, the real-world scale calculation module 516 can calculate the real-world scale of the user in the video or image based on a first set of landmarks at a first time point (e.g., during the first part of the video), and can calculate the real-world scale of the user in the video or image based on a different second set of landmarks at a second time point. The operations of identifying facial landmarks, removing certain landmarks, and calculating stability and visibility parameters of facial landmarks are repeated for each video frame or subset of video frames to update the stability and visibility parameters. The updated stability and visibility parameters are provided to the landmark selection module 514 to update the landmarks selected as the foremost landmarks, and the real-world scale of the face is iteratively corrected based on the updated multiple landmarks.

[0109] Depth map module 517 receives depth map data 502 from the depth sensor or depth camera device of client device 102. Depth map data 502 is associated with an image or video processed by landmark generation module 512 and landmark selection module 514. For example, depth map module 517 receives a facial segmentation mask of a face depicted in a monocular image 501 depicting a user's face from landmark generation module 512. Depth map module 517 applies momentum smoothing to depth map data 502 based on the facial segmentation mask. Depth map module 517 provides the smoothed depth map to real-world scale calculation module 516. Real-world scale calculation module 516 calculates the real-world scale of the user's face depicted in the image based on the foremost landmark provided by landmark selection module 514 and the smoothed depth map received from depth map module 517. For example, real-world scale calculation module 516 can determine the distance from client device 102 to a given landmark based on the smoothed depth map. Based on this distance, the real-world scale calculation module 516 can calculate the real-world facial measurements of the landmarks identified in the image received from the client device 102. In other words, the real-world scale calculation module 516 can use heuristics or machine learning techniques to calculate the real-world physical size and measurements of the user's face when the landmark appears at a certain size and is a certain distance from the client device 102. Using this information, the real-world scale calculation module 516 can determine a scale that converts the real-world physical measurements into the dimensions of the face and landmarks depicted in the image captured by the client device 102.

[0110] The real-world scale calculation module 516 provides the scale to the image modification module 518 and the eyewear generation module 519. The eyewear generation module 519 obtains augmented reality graphic elements including the augmented reality eyewear. In the example, the real-world scale calculation module 516 receives eyewear data 503. Eyewear data 503 defines the physical material and rigidity properties of the physical sunglasses or glasses. Eyewear data 503 also includes physical measurements of the physical sunglasses or glasses. Eyewear data 503 also provides augmented reality elements that represent the size, dimensions, and behavior (deformation properties) of the physical sunglasses or glasses. Eyewear data 503 may include information from the physical glasses designer that specifies the physical properties of the glasses, such as physical measurements, the style of the physical glasses, lens shape and color, and frame style and color.

[0111] The eye-wearing device generation module 519 can increase or decrease the size of augmented reality elements based on the real-world proportions of the user's face provided by the real-world proportion calculation module 516. For example, if the user's face in the image is located at a first distance from the client device 102, the proportion can be determined as a first value based on landmark and smoothing depth data. In this case, the eye-wearing device generation module 519 adjusts the size of the augmented reality elements based on the first value. If the user's face moves away from the client device 102, the face becomes smaller and is located at a second distance further away. In this case, the proportion can be determined as a second value smaller than the first value. In this case, the eye-wearing device generation module 519 reduces the size of the augmented reality elements to a smaller size based on the second value.

[0112] The eye-wearing device generation module 519 provides an augmented reality element with an adjusted scale to the image modification module 518. The image modification module 518 positions the scaled augmented reality element onto the user's face depicted in the image or video. In some cases, the image modification module 518 identifies a nose bridge landmark based on the output of the landmark generation module 512. The image modification module 518 then identifies the nose bridge portion of the augmented reality element and centers it at the top of the nose bridge landmark. In some implementations, the image modification module 518 identifies the start and end points of the nose bridge landmark. The image modification module 518 selects a point between the start and end points of the nose bridge landmark and positions the nose bridge portion of the augmented reality element at that point. The point between the start and end points can be heuristically determined, set by the user, or learned through machine learning techniques. In some cases, the image modification module 518 initially places the augmented reality element at a midpoint between the start and end points. For example, the image modification module 518 may determine the topology of the user's face based on the landmarks generated by the landmark generation module 512. Then, the image modification module 518 can position the scaled augmented reality graphic element within the image or video based on the topology of the user's face. In the example, the image modification module 518 positions the bridge of the nose of the augmented reality graphic element at a predetermined distance above a topological bridge of the nose marker.

[0113] For example, such as Figure 7 As shown, the image modification module 518 places the augmented reality headset 720 onto the image 710 depicting the user's face. The bridge of the nose portion 722 of the augmented reality headset 720 is placed and positioned on the bridge of the nose marker of the user's face.

[0114] Image modification module 518 can detect the user's finger in the video stream received from the client device. Image modification module 518 can determine that the user's finger overlaps with the bridge of the nose of the augmented reality element. Then, image modification module 518 can determine that the finger is moving vertically toward the eyebrow. In response, image modification module 518 adjusts the point where the augmented reality element is positioned on the bridge of the nose by a specified amount (depending on the amount of finger movement) to bring it closer to the eyebrow. Then, image modification module 518 can determine that the finger is moving vertically toward the mouth. In response, image modification module 518 adjusts the point where the augmented reality element is positioned on the bridge of the nose by a specified amount (depending on the amount of finger movement) to move it away from the eyebrow and closer to the mouth. Image modification module 518 can record or store the position of the bridge of the nose along the bridge of the nose marker where it is placed. Image modification module 518 can place subsequent or other eye-wearing augmented reality elements so that their respective bridge of the nose is positioned at the stored position on the bridge of the nose marker.

[0115] The image modification module 518 can adjust the image captured by the camera device based on the output of the eye-wearing device generation module 519. The image modification module 518 adjusts how the augmented reality glasses or hat are positioned on the user depicted in the image. The image display module 520 combines the adjustments made by the image modification module 518 with the received monocular image depicting the user's face. This image is provided by the image display module 520 to the client device 102 and can then be sent to other users or stored for later access and display.

[0116] In the example, the eyewear generation module 519 can recommend or automatically select augmented reality eyewear elements to be displayed on a user's face based on a fit factor calculated for multiple augmented reality eyewear elements. For example, the eyewear generation module 519 can receive multiple physical measurements of multiple physical glasses as part of eyewear data 503. The physical glasses can be associated with a specific manufacturer, or can be a specified set of popular glasses, or can include all physical glasses with associated eyewear data 503. The eyewear generation module 519 can select a subset of physical glasses for which a fit factor is calculated based on style and one or more attributes associated with the user (e.g., user age, user gender, user preferences, and the calculated real-world proportions of the face). That is, the eyewear generation module 519 can determine the physical dimensions of the user's face as a specified value and select a subset of physical glasses that match the specified value. In another example, the eyewear generation module 519 can determine that the user in the image is a child and can select a set of child-friendly glasses for which a fit factor is calculated.

[0117] The eyewear generation module 519 calculates the fit factor for each pair of physical glasses based on the physical measurements of the glasses provided by the eyewear data 503 and the real-world proportions of the user's face. In this implementation, the eyewear generation module 519 calculates the fit factor for each pair of glasses by determining a first distance between the bridge of the nose of each of the plurality of physical glasses and the temple of the corresponding one of the plurality of physical glasses.

[0118] The eyewear generation module 519 calculates a second distance in the calculated real-world proportion of the user's face between the bridge of the nose and the cheekbone or temple. That is, the eyewear generation module 519 determines the real-world physical measurements and smoothed depth map of the landmarks depicted in the image of the user's face, and calculates the distance between the cheekbone or temple landmark and the bridge of the nose landmark based on the physical measurements of the user's face. The eyewear generation module 519 then calculates a fit factor for each pair of glasses based on the first and second distances. In the example, the fit factor represents the difference between the first and second distances, such that a smaller fit factor indicates a better fit for the user. In some cases, the value of the fit factor is inversely correlated with the difference between the first and second distances, such that a larger fit factor indicates a better fit for the user. In other words, the eyewear generation module 519 calculates the fit factor for a given pair of glasses based on how close the distance between the bridge of the nose and the temple of the given eyewear is to the distance between the cheekbone or temple landmark and the bridge of the nose landmark on the user's face. The eyewear generation module 519 ranks and sorts all physical glasses based on the calculated fit factor, and automatically selects one or a subset of physical glasses with the highest fit factor (e.g., better fit factor than the others) to present to the user.

[0119] As another example, the eyewear generation module 519 calculates the fit factor for each pair of glasses by determining the lens size of each of a plurality of physical glasses. For example, as Figure 8 As shown, the eyewear generation module 519 determines the lens size 830 of the augmented reality glasses 820. Figure 8 The lens size 830 shown in image 810 is generated by scaling the lens size of the physical glasses based on a real-world scaling factor of the user's face. That is, the lens size 830 is adjusted to a value determined based on the real-world scaling factor of the user's face before being placed on the image 810 depicting the user's face. The eyewear generation module 519 determines the real-world physical measurements of the landmarks depicted in the image of the user's face and a smoothed depth map, and then calculates a fit factor for each pair of glasses based on the lens size and the real-world physical measurements of the landmarks. The eyewear generation module 519 ranks and sorts all the physical glasses based on the calculated fit factors and automatically selects one or a subset of the physical glasses with the highest fit factor (e.g., a better fit factor than the rest) to present to the user.

[0120] In some examples, in response to determining that the fit factor for each of the multiple physical glasses fails to meet, the eyewear generation module 519 displays a warning message. For example, if the user's face size exceeds the measurement of each of the glasses (e.g., too small or too large) (e.g., the distance between the bridge of the user's nose and temple is a specified amount larger than the distance between the bridge of the glasses and the temples), the eyewear generation module 519 displays a warning message.

[0121] In some examples, the eye-wearing device generation module 519 shows, for example... Figure 9 The prompt shown lists the top-ranked eyeglasses. That is, the eyewear generation module 519 selects a specified number of eyeglasses (e.g., three pairs) that have a better associated fit factor than the remaining set of eyeglasses. The eyewear generation module 519 can receive a user selection of physical eyeglasses from the listed set. In response, the eyewear generation module 519 scales the augmented reality elements representing the physical eyeglasses selected by the user and positions the scaled augmented reality elements within an image or video feed depicting the user's face.

[0122] In some implementations, the image modification module 518 can deform augmented reality elements placed on the user's face in an image or video based on the movement of the user's face. For example, the image modification module 518 can obtain the rigidity material properties associated with the augmented reality graphic element, for example, by accessing the eyewear data 503. In response to determining that the rigidity material property corresponds to a first rigidity amount, the image modification module 518 deforms a first portion of the augmented reality graphic element. In response to determining that the rigidity material property corresponds to a second rigidity amount, the image modification module 518 deforms multiple portions of the augmented reality graphic element. In some cases, the first rigidity amount is less than the second rigidity amount. For example, if the glasses are more rigid, the image modification module 518 can bend or deform the bridge portion and temple portion of the augmented reality element when positioned on the user's face relative to the default formation of the augmented reality element when not placed on the user's face. As another example, if the glasses are more flexible, the image modification module 518 can bend or deform only the temple portion of the augmented reality element when positioned on the user's face relative to the default formation of the augmented reality element when not placed on the user's face.

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

[0124] At operation 1001, as described above, client device 102 receives an image including a depiction of a user's face. For example, true size estimation system 224 may capture images depicting one or more faces of one or more users (e.g., multiple users).

[0125] At operation 1002, as described above, client device 102 generates multiple landmarks for the face based on the received image. As an example, true size estimation system 224 can generate landmarks by applying machine learning techniques to the image.

[0126] At operation 1003, as described above, the client device 102 removes a set of interfering landmarks from a plurality of landmarks to obtain the remaining set of landmarks from the plurality of landmarks.

[0127] At operation 1004, as described above, the client device 102 obtains a depth map of the user's face.

[0128] At operation 1005, as described above, client device 102 calculates the real-world proportion of the user's face based on the depth map and the remaining set of landmarks.

[0129] Figure 10B This is a flowchart of process 1010 based on some examples. Although a flowchart can describe operations as a sequential process, many operations within an operation can be performed in parallel or simultaneously. Furthermore, the order of operations can be rearranged. When the operations of a process are completed, the process terminates. A process can correspond to a method, a program, etc. The steps of a method can be performed in whole or in part, can be combined with some or all of the steps in other methods, and can be performed by any number of different systems or any part thereof (e.g., a processor included in any system).

[0130] At operation 1011, as described above, the client device 102 receives an image including a depiction of the user's face.

[0131] At operation 1012, as described above, the client device 102 calculates the real-world scale of the user's face based on a subset of the selected landmarks of the user's face.

[0132] At operation 1013, as described above, the client device 102 acquires augmented reality graphics elements including the augmented reality eye-wearing device.

[0133] At operation 1014, as described above, the client device 102 scales augmented reality graphics elements based on the calculated real-world proportions of the face.

[0134] At operation 1015, client device 102 positions scaled augmented reality graphics elements within an image of the user's face.

[0135] Machine architecture

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

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

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

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

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

[0141] The environmental component 1132 may include, for example, one or more camera devices (with still image / photograph and video capabilities), lighting sensor components (e.g., photometers), temperature sensor components (e.g., one or more thermometers 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 the concentration of hazardous gases for safety purposes or measure pollutants in the atmosphere), or other components that can provide indications, measurements, or signals corresponding to the surrounding physical environment.

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

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

[0144] The position component 1134 may include a positioning sensor component (e.g., a GPS receiver component), an altitude sensor component (e.g., an altimeter or barometer that detects air pressure and from which altitude can be obtained), an orientation sensor component (e.g., a magnetometer), etc.

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

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

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

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

[0149] Software Architecture

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

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

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

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

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

[0155] Glossary

[0156] "Carrier signal" refers to any intangible medium capable of storing, encoding, or carrying instructions to be executed by a machine, including digital or analog communication signals or other intangible media to facilitate the communication of such instructions. Instructions can be sent or received over a network using a transmission medium via a network interface device.

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

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

[0159] A "component" refers to a device, physical entity, or logic having boundaries defined by functional or subroutine calls, branch points, APIs, or other technologies that provide partitioning or modularity for specific processing or control functions. Components can interface with other components via their interfaces to perform machine processing. Components can be encapsulated functional hardware units designed for use with other components, as well as part of a program that typically performs related functions.

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

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

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

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

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

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

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

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

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

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

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

Claims

1. A method comprising: receiving, by one or more processors, an image comprising a depiction of a face of a user; generating a plurality of landmarks of the face based on the received image; removing a set of interfering landmarks from the plurality of landmarks, resulting in a remaining set of landmarks of the plurality of landmarks; obtaining a generic three-dimensional face model representation; matching the remaining set of landmarks to the generic three-dimensional face model representation; determining a visibility parameter from a number of the remaining set of landmarks that match the generic three-dimensional face model representation, the visibility parameter indicating a degree of matching of each landmark in the generic three-dimensional face model representation; determining a stability parameter from movement of the remaining set of landmarks over a plurality of frames comprising the image, the stability parameter indicating how much each landmark moves over the plurality of frames; selecting, based on the visibility parameter and the stability parameter associated with each landmark of the remaining set of landmarks, a threshold number of top landmarks from the remaining set of landmarks; obtaining a depth map of the face of the user; and calculating a real-world scale of the face of the user based on the depth map and the threshold number of top landmarks selected.

2. The method of claim 1, further comprising: ordering the remaining set of landmarks based on the stability parameter and the visibility parameter.

3. The method of any one of claims 1-2, further comprising: tracking movement of the remaining set of landmarks over the plurality of frames. a number of frames included in the plurality of frames is based on a frame rate used to capture the plurality of frames.

4. The method of claim 3, wherein, the set of interfering landmarks comprises at least one of: a hair region, one or more facial garments, or a face mask.

5. The method of any one of claims 1 to 2, wherein, generating the plurality of landmarks of the face based on the received image comprises applying a machine learning technique to the image to identify the plurality of landmarks.

6. The method of any one of claims 1 to 2, wherein, the threshold number comprises two top landmarks.

7. The method of claim 1, wherein, 8. The method of claim 1, further comprising: in response to determining that an eye landmark and a nose landmark of the remaining set of landmarks are associated with greater visibility and stability parameters than other landmarks, selecting the eye landmark and the nose landmark as the top landmarks. randomly selecting the top landmarks from the remaining set of landmarks.

9. The method of any one of claims 1 and 7-8, wherein, selecting a first set of top landmarks for a first subset of frames of a video comprising the image, and wherein selecting a second set of top landmarks for a second subset of frames of the video.

10. The method of claim 9, wherein, 11. The method of any one of claims 1-2 and 7-8, further comprising: generating a face segmentation mask for the face depicted in the image; and applying momentum smoothing to the depth map based on the face segmentation mask.

12. The method of any one of claims 1-2 and 7-8, further comprising: updating the plurality of landmarks upon receiving each frame of a video depicting the face; and iteratively correcting a real-world scale of the face based on the updated plurality of landmarks by repeating the removing operation and the obtaining operation on the updated plurality of landmarks. ​ ​ 13. The method of any one of claims 1-2 and 7-8, further comprising: obtaining an augmented reality graphical element comprising an augmented reality eyewear device; identifying a nose bridge landmark based on the remaining set of landmarks; and positioning the augmented reality graphical element in the image on the user’s face based on the nose bridge landmark and the depth map.

14. The method of claim 13, further comprising: positioning a nose bridge portion of the augmented reality graphical element at a predetermined distance above the nose bridge landmark.

15. The method of claim 13, further comprising: adjusting a scale of the augmented reality graphical element based on the computed real-world scale of the user’s face.

16. The method of claim 15, further comprising: computing a distance between the remaining set of landmarks retrieving a measurement of a depth of the remaining set of landmarks; and generating a scaling factor based on the distance and the measured depth, the scaling factor relating a size of the user’s face in the image to a real-world size of the user’s face, wherein a size of the augmented reality graphical element is modified according to the scaling factor.

17. A system comprising: a processor; and a memory component having instructions stored thereon that, when executed by the processor, cause the processor to perform operations comprising: receiving an image comprising a depiction of a user’s face; generating a plurality of landmarks of the face based on the received image; removing a set of interfering landmarks from the plurality of landmarks, resulting in a remaining set of landmarks of the plurality of landmarks; obtaining a generic three-dimensional face model representation; matching the remaining set of landmarks to the generic three-dimensional face model representation; determining a visibility parameter from a number of the remaining set of landmarks that match the generic three-dimensional face model representation, the visibility parameter indicating a degree of matching of each landmark in the generic three-dimensional face model representation; determining a stability parameter from movement of the remaining set of landmarks over a plurality of frames comprising the image, the stability parameter indicating how much each landmark moves over the plurality of frames; selecting a threshold number of top landmarks from the remaining set of landmarks based on the visibility parameter and the stability parameter associated with each landmark of the remaining set of landmarks; obtaining a depth map of the user’s face; and computing a real-world scale of the user’s face based on the depth map and the selected threshold number of top landmarks.

18. A non-transitory computer-readable storage medium having instructions stored thereon that, when executed by a processor, cause the processor to perform operations comprising: receiving an image comprising a depiction of a user’s face; generating a plurality of landmarks of the face based on the received image; removing a set of interfering landmarks from the plurality of landmarks, resulting in a remaining set of landmarks of the plurality of landmarks; obtaining a generic three-dimensional face model representation; matching the remaining set of landmarks to the generic three-dimensional face model representation; determining a visibility parameter from a number of the remaining set of landmarks that match the generic three-dimensional face model representation, the visibility parameter indicating a degree of matching of each landmark in the generic three-dimensional face model representation; ​ determining a visibility parameter from a number of the remaining set of landmarks that match the generic three-dimensional facial model representation, the visibility parameter indicating a degree of match of each landmark in the generic three-dimensional facial model representation; determining a stability parameter from movement of the remaining set of landmarks over a plurality of frames including the image, the stability parameter indicating how much each landmark moves over the plurality of frames; selecting a threshold number of top landmarks from the remaining set of landmarks based on the visibility parameter and the stability parameter associated with each landmark of the remaining set of landmarks; obtaining a depth map of the user's face; and calculating a real-world scale of the user's face based on the depth map and the selected threshold number of top landmarks.

Citation Information

Patent Citations

  • Systems and methods for determining the scale of human anatomy from images

    US20180336737A1

  • Virtual try-on systems and methods for spectacles

    US20200219326A1