9-degree-of-freedom object tracking

By intelligently automatically tracking the 9-DoF of real-world objects and generating 3D bounding boxes, the inefficiency problem of users manually selecting and placing AR elements in existing AR systems is solved, and automated AR element placement is achieved, improving user experience and system efficiency.

CN119998836APending Publication Date: 2025-05-13SNAP INC
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202380069884.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-30
Filing Date
2023-09-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Existing augmented reality (AR) systems require users to manually select and place AR elements, resulting in inefficient and error-prone user experience, especially when determining the size and location of AR elements.

Method used

By intelligently automatically tracking real-world objects with nine degrees of freedom (9-DoF), a 3D bounding box is generated for real-world objects, and the bounding box is stabilized based on the device's sensor, thereby automatically placing the AR item on the appropriate position or top within the video.

Benefits of technology

Automatically select and place AR elements without additional input from users, improving the efficiency and accuracy of the user experience and reducing the consumption of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119998836A_ABST
    Figure CN119998836A_ABST
Patent Text Reader

Abstract

Aspects of the present disclosure relate to a system for presenting AR items. A system receives a video including a depiction of a real-world object in a real-world environment. The system generates a three-dimensional (3D) bounding box for a real-world object, and stabilizes the 3D bounding box based on one or more sensors of the device. The system determines a position, orientation, and size of the real-world object based on the stabilized 3D bounding box, and renders a display of an augmented reality (AR) item within the video based on the position, orientation, and size of the real-world object.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority declaration

[0002] This application claims the benefit of U.S. patent application serial number 17 / 937,153, filed on September 30, 2022, the entire contents of which are incorporated herein by reference. Technical Field

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

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

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

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

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

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

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

[0010] Figure 5 is a block diagram illustrating an example object tracking system according to some examples.

[0011] Figure 6 is an illustration of example operations performed by a 3D bounding box module, according to some examples.

[0012] Figures 7 to 9 is a graphical representation of the output of an object tracking system according to some examples.

[0013] Fig.10 is a flow diagram illustrating example operation of an object tracking system according to some examples.

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

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

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

[0017] Typically, virtual reality (VR) and augmented reality (AR) systems allow users to add augmented reality elements to their environment (e.g., captured image data corresponding to the user's surroundings). Such systems can recommend AR elements based on various external factors (e.g., the user's current geographic location and various other environmental clues). Some AR systems allow users to capture a video of a room and select from a list of available AR elements to add to the room to see how the selected AR element looks in the room. These systems allow users to preview the appearance of physical items at specific locations in the user's environment, which simplifies the purchase process. However, these systems require users to manually select which AR elements to display in the captured video and where to place the AR elements. Specifically, users of these systems may spend a lot of effort searching and navigating multiple user interfaces and information pages to identify items of interest. Then, the user may need to manually position the selected item within the view. In many cases, the user does not know the size of the AR element, which causes the user to place the AR element in an unrealistic position. These tasks are both arduous and time-consuming, which reduces the overall interest in using these systems and causes a waste of resources.

[0018] Furthermore, allowing users to place AR elements in unrealistic locations may cause users to believe that the corresponding real-world products fit in the room, and may cause users to mistakenly purchase the corresponding products. This may ultimately frustrate users and reduce their level of trust in AR and VR systems when they eventually discover that the corresponding real-world products do not fit in the room.

[0019] The disclosed technology seeks to improve the efficiency of using electronic devices that implement AR / VR systems or otherwise access AR / VR systems by intelligently and automatically tracking real-world objects in nine degrees of freedom (9-DoF), and then automatically placing AR items in appropriate locations or on top of the tracked real-world objects in a realistic manner. Specifically, the disclosed technology receives a video that includes a depiction of real-world objects in a real-world environment. The disclosed technology generates a 3D bounding box for the real-world object, and stabilizes the 3D bounding box based on one or more sensors of the device (e.g., a gyroscope sensor, an accelerometer, an infrared sensor, etc.). The disclosed technology determines the position, orientation, and size of the real-world object based on the stabilized 3D bounding box, and renders the display of the AR item within the video based on the position, orientation, and size of the real-world object.

[0020] In this way, the disclosed technology can select and automatically place one or more AR elements in the current image or video without requiring additional input from the user. This improves the user's overall experience when using the electronic device and reduces the total amount of system resources required to complete the task.

[0021] Networked computing environment

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

[0023] The client device 102 can operate as a standalone device, or can be coupled (e.g., networked) to other machines. In a networked deployment, the client device 102 can operate in a server-client network environment with the capabilities of a server machine or a client machine, or operate as a peer machine in a peer-to-peer (or distributed) network environment. The client device 102 may include, but is not limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a notebook computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular phone, a smart phone, a mobile device, a wearable device (e.g., a smart watch), a smart home device (e.g., a smart appliance), other smart devices, a network (web) device, a network router, a network switch, a network bridge, or any machine capable of performing the disclosed operations. In addition, although only a single client device 102 is shown, the term "client device" should also be considered to include a collection of machines that perform the disclosed operations individually or jointly.

[0024] In some examples, client device 102 may include AR glasses or AR headsets, where virtual content is displayed within the lenses of the glasses while the user views the real world environment through the lenses. For example, an image may be presented on a transparent display that allows the user to simultaneously view the content presented on the display and real-world objects.

[0025] The messaging clients 104 are able to communicate and exchange data with other messaging clients 104 and with a messaging server system 108 via the network 112. The data exchanged between the messaging clients 104 and between the 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).

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

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

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

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

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

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

[0032] The image processing server 122 is used to implement the enhancement system 208 ( Figure 2 The scanning function includes activating and providing one or more augmented reality experiences on the client device 102 when an image is captured by the client device 102. Specifically, the messaging application 104 on the client device 102 can be used to activate the camera. The camera displays one or more real-time images or videos and one or more icons or identifiers of one or more augmented reality experiences to the user. The user can select a given identifier in the identifier to start the corresponding augmented reality experience or perform the desired image modification.

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

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

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

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

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

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

[0039] System Architecture

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

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

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

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

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

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

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

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

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

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

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

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

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

[0053] In order to integrate the functionality of the SDK into the web-based resource, the SDK is downloaded from the messaging server 118 by the external resource (application) server 110 or received by the external resource (application) server 110 in other ways. Once downloaded or received, the SDK will be included as part of the application code of the web-based external resource. The code of the web-based resource can then call or activate certain functions of the SDK to integrate the features of the messaging client 104 into the web-based resource.

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

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

[0056] The messaging client 104 presents a graphical user interface (e.g., a login page or title screen) for an external resource. During, before, or after presenting the login page or title screen, the messaging client 104 determines whether the launched external resource has been previously authorized to access the user data of the messaging client 104. In response to determining that the launched external resource has been previously authorized to access the user data of the messaging client 104, the messaging client 104 presents another graphical user interface of the external resource including the functions and features of the external resource. In response to determining that the launched external resource has not been previously authorized to access the user data of the messaging client 104, after a threshold time period (e.g., 3 seconds) of displaying the login page or title screen of the external resource, the messaging client 104 slides up a menu (e.g., animating the menu to emerge from the bottom of the screen to the middle or other portion of the screen) for authorizing the external resource to access the user data. The menu identifies the type of user data that the external resource will be authorized to use. In response to receiving the user selection of the accept option, the messaging client 104 adds the external resource to the list of authorized external resources and enables the external resource to access the user data from the messaging client 104. In some examples, the messaging client 104 authorizes the external resource to access the user data according to the OAuth 2 framework.

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

[0058] The object tracking system 224 receives an image or video depicting a real-world environment (e.g., a room in a home) from the client device 102. The object tracking system 224 detects one or more real-world objects depicted in the image or video, and uses the detected one or more real-world objects (or features of the real-world environment) to calculate a classification of the real-world environment. For example, the object tracking system 224 may classify the real-world environment as a kitchen, bedroom, baby room, toddler room, teen room, office, living room, den, formal living room, patio, terrace, balcony, bathroom, or any other suitable home-based room classification. Once classified, the object tracking system 224 identifies one or more items (e.g., physical products or electronic consumable content items) related to the real-world environment classification. The identified one or more items may be items available for purchase.

[0059] The object tracking system 224 can perform 9-DoF tracking of one or more real-world objects depicted in an image or video. Specifically, the object tracking system 224 captures or receives real-time video depicting real-world objects in a real-world environment. The object tracking system 224 applies a machine learning model (e.g., an artificial neural network) to the video to generate one or more 2D bounding boxes for one or more corresponding real-world objects depicted in the video. The object tracking system 224 then processes the 2D bounding boxes and one or more sensor data of the client device 102 (e.g., accelerometer measurements, gyroscope measurements, infrared image data, etc.) to generate a 3D bounding box representing the 3D placement, position, location, and size of the corresponding real-world object. The object tracking system 224 can then activate one or more AR experiences based on the 3D bounding box, such as replacing the real-world object with a virtual object and / or adding a virtual object in a position, orientation, and location relative to the real-world object. The following is combined with Figure 5 An exemplary implementation of object tracking system 224 is shown and described.

[0060] The object tracking system 224 is a component that can be accessed by an AR / VR application implemented on the client device 102. The AR / VR application uses an RGB camera to capture images of the real-world environment. In some implementations, the AR / VR application continuously captures images of the real-world environment in real time or periodically to continuously or periodically update the 3D bounding boxes of real-world items and the placement of virtual objects. This allows the user to walk around in the real world and view updated AR representations of objects in real time.

[0061] Data Architecture

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

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

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

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

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

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

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

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

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

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

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

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

[0074] Thus, data and various systems using augmented reality content items or other such transformation systems that modify content using such data may involve detection of objects (e.g., faces, hands, bodies, cats, dogs, surfaces, objects, etc.) in video frames; tracking of such objects as they leave, enter, and move around the field of view; and modification or transformation of such objects as they are tracked. In various examples, different methods for implementing such transformations may be used. Some examples may involve: generating a three-dimensional mesh model of one or more objects; and using transformations of the models and animated textures within the video to implement the transformations. In other examples, tracking of points on an object may be used to place an image or texture (which may be two-dimensional or three-dimensional) at the tracked location. In further examples, neural network analysis of video frames may be used to place an image, model, or texture in content (e.g., an image or video frame). Thus, augmented reality content items refer both to images, models, and textures used to create transformations in content, and to additional modeling and analysis information required to implement such transformations using object detection, tracking, and placement.

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

[0076] In some examples, in the case where a specific modification is selected together with the content to be transformed, the element to be transformed is identified by a computing device, and then if the element to be transformed is present in a video frame, the element to be transformed is detected and tracked. The elements of the object are modified according to a request for modification, thereby transforming the frame of the video stream. The transformation of the frame of the video stream can be performed by different methods for different types of transformations. For example, for a frame transformation that mainly refers to a variation of the elements of the object, characteristic points for each element of the object are calculated (e.g., using an active shape model (Active Shape Model, ASM) or other known methods). Then, a grid based on characteristic points is generated for each element of at least one element of the object. The grid is used to track the elements of the object in the video stream in a subsequent stage. During the tracking process, the grid mentioned for each element is aligned with the position of each element. Then, additional points are generated on the grid. A set of first points is generated for each element based on a request for modification, and a set of second points is generated for each element based on the set of first points and the request for modification. Then, the frame of the video stream can be transformed by modifying the elements of the object based on the set of first points and the set of second points and the grid. In such a method, the background of the modified object may also be changed or deformed by tracking and modifying the background of the modified object.

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

[0078] In some examples of computer animation models that use face detection to transform image data, faces are detected on an image using a specific face detection algorithm (e.g., Viola-Jones). An active shape model (ASM) algorithm is then applied to the facial region of the image to detect facial feature reference points.

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

[0080] In some examples, the landmark search begins with an average shape that aligns with the location and size of the face determined by a global face detector. Such a search then repeats the steps of proposing tentative shapes by adjusting the positions of shape points by template matching of the image texture around each point, and then conforming the tentative shapes to the global shape model until convergence occurs. In some systems, individual template matches are unreliable, and the shape model pools the results of weak template matches to form a stronger overall classifier. The entire search is repeated at each level of the image pyramid from coarse to fine resolution.

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

[0082] In some examples, a computer animation model for transforming image data can be used by a system in which a user can capture an image or video stream of the user (e.g., a selfie) using a client device 102 having a neural network that operates as part of a messaging client 104 operating on the client device 102. A transformation system operating within the messaging client 104 determines the presence of a face within the image or video stream and provides a modification icon associated with the computer animation model to transform the data image, or the computer animation model can be presented in association with an interface described herein. The modification icon includes a change in the basis that can modify the user's face within the image or video stream as part of the modification operation. Once the 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 can implement a complex convolutional neural network on a portion of the image or video stream to generate and apply the selected modification. That is, a user can capture an image or video stream, and once a modification icon has been selected, the modified result can be presented in real time or near real time. In addition, the modification can continue while the video stream is being captured and the selected modification icon remains switched. A machine learning neural network can be used to implement such modification.

[0083] The graphical user interface presenting the modifications performed by the transformation system can provide additional interactive options to the user. Such options can be based on the interface for initiating content capture and selecting a specific computer animation model (e.g., launched from a content creator user interface). In various examples, the modification can continue after the initial selection of the modification icon. The user can switch to turn the modification on or off by tapping or otherwise selecting the face being modified by the transformation system, and store it for later viewing or browsing other areas of the imaging application. In the case of multiple faces being modified by the transformation system, the user can globally turn on or off the modification by tapping or selecting a single face modified and displayed within the graphical user interface. In some examples, each face in a group of multiple faces can be modified individually, or such modifications can be switched individually by tapping or selecting a single face or a series of individual faces displayed within the graphical user interface.

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

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

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

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

[0088] The data structure 300 may also store training data for training one or more machine learning techniques (models) to generate 2D bounding boxes. The training data may include multiple training videos and corresponding ground truth bounding boxes. Images and videos may include a mixture of all kinds of real-world objects that may appear in different real-world environments (e.g., different rooms in a home or residence). One or more machine learning techniques or models may be trained to extract features of received input images or videos and establish a relationship between the extracted features and the 2D bounding boxes of real-world objects depicted in the images or videos. Once trained, the machine learning techniques may receive new images or videos and may estimate 2D bounding boxes for the newly received images or videos.

[0089] Data communication architecture

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

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

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

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

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

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

[0096] Message enhancement data 412: Enhancement data (e.g., filters, stickers, or other annotations or enhancements) indicating enhancements to be applied to the message image payload 406, message video payload 408, or message audio payload 410 of the message 400. The enhancement data 412 for a sent or received message 400 may be stored in the enhancement table 310.

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

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

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

[0100] Message tags 420: Each message 400 may be tagged with a plurality of tags, each of which indicates the subject of the content included in the message payload. For example, where a particular image included in the message image payload 406 depicts an animal (e.g., a lion), a tag value may be included within the message tags 420 indicating the relevant animal. The tag value may be manually generated based on user input, or may be automatically generated using, for example, image recognition.

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

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

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

[0104] Object Tracking System

[0105] Figure 5 is a block diagram illustrating an example object tracking system 224 according to an example. The object tracking system 224 includes a set of components 510 that operate on a set of input data (e.g., a monocular image (or video)) 501 and sensor data 502 (obtained from a depth sensor or camera, accelerometer, gyroscope, and / or infrared camera of the client device 102) depicting a real-world environment. The object tracking system 224 includes an object detection module 512, a 2D bounding box module 514, a 3D bounding box module 517 (the 3D bounding box module 517 can be used to generate a 3D bounding box of a real-world object from a 2D bounding box), a 9-degrees-of-freedom (9-DOF) module 516, an image modification module 518, an AR item selection module 519, and an image display module 520. All or some of the components of the object tracking system 224 can be implemented by a server, in which case the monocular image 501 and sensor data 502 depicting the real-world environment are provided to the server by the client device 102. In some cases, some or all of the components of object tracking system 224 may be implemented by client device 102 , or may be distributed across a group of client devices 102 .

[0106] In some examples, object tracking system 224 receives a video including a depiction of a real-world object in a real-world environment. Object tracking system 224 generates a 3D bounding box for the real-world object and stabilizes the 3D bounding box based on one or more sensors of the device. Object tracking system 224 determines the position, orientation, and size (e.g., 9-DoF information) of the real-world object based on the stabilized 3D bounding box, and renders a display of an AR item or object within the video based on the position, orientation, and size of the real-world object that has been determined based on the stabilized 3D bounding box.

[0107] In some examples, object tracking system 224 uses a stabilized 3D bounding box to perform nine degrees of freedom (9-DoF) tracking of real-world objects. In some examples, object tracking system 224 maintains the display position of the AR item within the video in real time as the camera capturing the video moves around the real-world environment. In some examples, the 3D bounding box includes eight corner points in 3D space.

[0108] In some examples, the object tracking system 224 applies a machine learning model to frames of a video to generate a 2D bounding box of a real-world object. In such a case, a 3D bounding box is generated based on the 2D bounding box. In some aspects, the machine learning model includes an artificial neural network. In such a case, the object tracking system 224 trains the ANN by performing a training operation, the training operation comprising: receiving training data including a plurality of training videos and corresponding true bounding boxes; applying the ANN to a first training video of the plurality of training videos to estimate a 2D bounding box of a training object depicted in the first training video; calculating a deviation between the estimated 2D bounding box and a true bounding box associated with the first training video; and updating parameters of the ANN based on the calculated deviation. In some examples, the object tracking system 224 repeats the application operation, the calculation operation, and the update operation for a set of a plurality of training videos.

[0109] In some examples, the object tracking system 224 calculates intersection points of a first set of rays originating from a bottom portion of a 2D bounding box, with a starting point located at a camera device of a device used to capture the video. The 3D world coordinates of the first set of rays can be obtained using one or more sensors of the device. The object tracking system 224 identifies a first 3D point corresponding to a first bottom corner of the 2D bounding box based on one or more sensors of the device, and draws a first ray in the first set of rays from the first 3D point toward the starting point. In some aspects, the object tracking system 224 identifies a height of a floor in the video based on one or more sensors, and identifies a 3D position of each corner of the bottom portion of the 2D bounding box based on the first set of rays and the identified height of the floor.

[0110] In some examples, the object tracking system 224 calculates the intersection of the second set of rays, the second set of rays originating from the top portion of the 2D bounding box, the starting point being located at the camera device of the device used to capture the video. The 3D world coordinates of the second set of rays can be obtained using one or more sensors of the device. In some examples, the object tracking system 224 identifies a second 3D point corresponding to a first top corner of the 2D bounding box based on one or more sensors of the device, and draws a first ray in the second set of rays from the second 3D point toward the starting point based on the height of the identified floor. In some examples, the object tracking system 224 identifies the intersection between the first set of rays and the second set of rays, and generates a 3D bounding box based on the first set of rays, the second set of rays, and the intersection between the first set of rays and the second set of rays.

[0111] In some examples, the object tracking system 224 calculates a stability parameter representing the change between 3D points of a 3D bounding box between two or more frames of a video. The stability parameter represents the mean deviation of each corner of the 3D bounding box. The stability parameter can be calculated as the maximum mean deviation for a previous set of frames of the video.

[0112] In some examples, the object tracking system 224 stabilizes the 3D bounding box by determining that a stability parameter corresponds to a threshold stability; and in response to determining that the stability parameter corresponds to the threshold stability, rendering a display of the AR item and tracking movement of the AR item based on one or more sensors.

[0113] In some examples, the object tracking system 224 generates a 3D bounding box based on a plurality of 2D bounding boxes estimated by the machine learning model for each corresponding frame in the first set of frames. The object tracking system 224 determines that the stability parameter corresponds to a threshold stability after generating the 3D bounding box using the 2D bounding boxes of the first set of frames, and updates the 3D bounding boxes for a second set of frames received after the first set of frames without estimating the 2D bounding boxes of the second set of frames using the machine learning model. In some examples, the object tracking system 224 replaces a depiction of a real-world object with an AR item in the video. In some aspects, the depiction of the real-world object includes a depiction of a person on top of the real-world object, and after replacing the depiction of the real-world object with the AR item, the person is depicted as being on top of the AR item.

[0114] In some examples, the object detection module 512 receives a monocular image (or video) 501 depicting a real-world object in a real-world environment. The image or video may be received as part of a new image / video captured by a front-facing camera and / or a rear-facing camera of the client device 102, a previously captured video stream, or a real-time video stream. The object detection module applies one or more machine learning techniques to identify real-world physical objects that appear in the monocular image 501 depicting the real-world environment. For example, the object detection module 512 may segment out a single object in the image and assign a label or name to the single object. Specifically, the object detection module 512 may identify a sofa as a separate object, a television as another separate object, a lamp as another separate object, and so on. Any type of object that may appear or exist in a particular real-world environment (e.g., a room in a home or residence) may be identified and labeled by the object detection module 512.

[0115] The object detection module 512 provides the identified and recognized objects to the 2D bounding box module 514. The 2D bounding box module 514 can calculate or determine or estimate the 2D bounding box of each real-world object depicted in the image 501 depicting the real-world environment that has been detected by the object detection module 512. Specifically, the 2D bounding box module 514.

[0116] In another implementation, the 2D bounding box module 514 may implement one or more machine learning techniques (e.g., one or more ANNs or other types of machine learning models) to estimate 2D bounding boxes of real-world objects depicted in an image. During training, the machine learning techniques of the 2D bounding box module 514 receive a given training image or video (e.g., a monocular image or video depicting one or more real-world objects in a real-world environment, such as an image of a living room or bedroom) from the training image data stored in the data structure 300. The 2D bounding box module 514 applies one or more machine learning techniques to the given training image. The 2D bounding box module 514 extracts one or more features from the given training image to estimate a 2D bounding box for each real-world object depicted in the real-world environment depicted in the image or video.

[0117] For example, the 2D bounding box module 514 predicts the projection angle of the 2D bounding box. To this end, the 2D bounding box module 514 predicts a Gaussian heat map for the center of the real-world object and one or more horizontal disparity maps and vertical disparity maps (e.g., eight horizontal disparity maps and eight vertical disparity maps) for each of the corner points. The 2D bounding box module 514 outputs a Gaussian heat map for the center of the real-world object and one or more horizontal disparity maps and vertical disparity maps as a prediction, and the Gaussian heat map and one or more horizontal disparity maps and vertical disparity maps are collected and processed to generate a projected 2D bounding box. In some cases, in addition to or instead of a 2D bounding box, the 2D bounding box module 514 also estimates a 3D bounding box. The 2D bounding box module 514 can generate a 2D bounding box or a 3D bounding box without using any sensor information of the client device 102 and only using image data.

[0118] The 2D bounding box module 514 obtains a known or predetermined true 2D bounding box of each of the one or more real-world objects depicted in the real-world environment depicted in the training image based on the training data. The 2D bounding box module 514 compares the estimated 2D bounding box with the true 2D bounding box (calculates the deviation between the two). Based on the difference threshold of the comparison (or deviation), the 2D bounding box module 514 updates one or more coefficients or parameters and obtains one or more additional training images or videos of the real-world environment. In some cases, the 2D bounding box module 514 first trains on a set of images associated with one real-world environment classification, and then trains on another set of images associated with another real-world environment classification.

[0119] After processing a specified number of epochs or batches of training images and / or when a difference threshold (or deviation) (calculated based on the difference or deviation between the estimated 2D bounding box and the true 2D bounding box) reaches a specified value, the 2D bounding box module 514 completes training, and the parameters and coefficients of the 2D bounding box module 514 are stored as a trained machine learning technique or a trained classifier.

[0120] In an example, after training, the 2D bounding box module 514 receives a monocular input image 501 depicting a real-world environment as a single RGB image or as a video of multiple images from the client device 102. The 2D bounding box module 514 applies the trained machine learning technique to the received input image to extract one or more features and generate a prediction or estimate of a 2D bounding box for each real-world object depicted in the image 501 of the real-world environment.

[0121] The 2D bounding box module 514 provides the 2D bounding box to the 3D bounding box module 517. The 3D bounding box module 517 uses the data from the input image, the estimated 2D bounding box or 3D bounding box, and the sensor data 502 to generate a 3D bounding box for each depicted real-world object or a subset of real-world objects. That is, the 3D bounding box module 517 uses the 3D world tracking sensors and data to more accurately calculate the 3D bounding box of the real-world object based on the estimated 2D bounding box / 3D bounding box of the real-world object provided by the 2D bounding box module 514.

[0122] In some examples, given the eight corner points detected or provided by the 2D bounding box module 514, the 3D bounding box module 517 computes or calculates the intersection of a ray having a starting point at the camera passing through the four bottom corners of the image. The ray can be obtained in world coordinates (3D coordinate system) using the 3D tracking information. Given the height of the floor depicted in the image determined using the sensor data 502, the 3D bounding box module 517 can calculate the intersection of the ray with the starting point at the camera passing through the four bottom corners of the image. The intersection is obtained, where c represents the position of the camera in the 3D world coordinate system, fy represents the height of the floor, and d represents the direction of the ray passing through the corner point in the image. After detecting the four bottom points, the 3D bounding box module 517 identifies the intersection between the upward ray from each bottom point and the ray passing through the upper corner of the bounding box.

[0123] For example, Figure 6 As shown in , the 3D bounding box module 517 obtains the 3D coordinates of the camera 610, such as the sensor data 502, from one or more sensors of the client device 102. As shown in the diagram 600, the 3D bounding box module 517 receives the 2D bounding box 620 that has been estimated by the 2D bounding box module 514 based on the image frame 640. The 2D bounding box 620 includes a bottom portion 622 having four corners. The 3D bounding box module 517 uses the 2D bounding box 620 to draw a set of rays that together form a bottom portion 632 of the 3D bounding box. Specifically, the 3D bounding box module 517 generates a first ray that originates at the location of the camera 610 and passes through a first corner of the bottom portion 622. The intersection between the first ray and the location of the floor corresponds to a first point of the bottom portion 622 of the 3D bounding box. This process is repeated for each other corner of the bottom portion 622 of the 2D bounding box 620 to form the bottom portion 632 of the 3D bounding box.

[0124] As shown in diagram 601, the 3D bounding box module 517 then repeats the above process for each point in the upper portion 624 of the 2D bounding box 620. This results in the formation of the top portion or upper portion 634 of the 3D bounding box 630. Initially, the 3D bounding box module 517 draws a set of vertical rays 636 extending at a 90 degree angle from each point of the bottom portion 632 of the 3D bounding box 630. The 3D bounding box module 517 then draws a set of rays that together form the top portion or upper portion 634 of the 3D bounding box using the 2D bounding box 620 and the vertical rays 636. That is, the 3D bounding box module 517 generates a second ray that originates at the location of the camera 610 and passes through the first corner of the upper portion 624 of the 2D bounding box 620. The intersection between the second ray and one of the given vertical rays 636 corresponds to the first point of the upper portion 634 of the 3D bounding box 630. This process is repeated for each other corner of the upper portion 624 of the 2D bounding box 620 to form the upper portion 634 of the 3D bounding box. For example, the 3D bounding box module 517 generates a third ray that originates at the location of the camera 610 and passes through the second corner of the upper portion 624 of the 2D bounding box 620. The intersection point between the third ray and one of the other given vertical rays 636 corresponds to the second point of the upper portion 634 of the 3D bounding box 630.

[0125] 3D bounding box module 517 continues to receive 2D bounding box estimates that have been generated for each subsequent frame of the video from 2D bounding box module 514, and continues to generate new 3D bounding boxes for each newly received 2D bounding box using updated sensor data 502. 3D bounding box module 517 periodically or continuously calculates stability parameters based on the differences between the 3D points of the 3D bounding box of a given frame and the 3D points of the 3D bounding box generated based on one or more previous frames of the video. For example, 3D bounding box module 517 calculates stability parameters based on The stability parameter is calculated by , where p represents the 3D point at each corner of the 3D bounding box for a given frame received at time t. The 3D bounding box module 517 may calculate the mean shift for each of the eight corner points of the 3D bounding box and may calculate the maximum shift for the previous N frames.

[0126] Once the stability parameter reaches a threshold stability (e.g., less than a threshold), the 3D bounding box module 517 stops receiving 2D bounding box estimates from the 2D bounding box module 514 and updates the 3D bounding box only based on the sensor data 502. That is, the 3D bounding box module 517 instructs the 2D bounding box module 514 to stop generating and processing image frames to save processing resources and reduce power consumption. At this point, the 3D bounding box module 517 transmits the generated 3D bounding box to the 9-DOF module 516.

[0127] Return to reference Figure 5, the 9-DOF module 516 can generate 9-DOF tracking information for real-world objects depicted in an image or video. Such tracking information can be used to display one or more AR items in the video, for example, to replace the real-world object corresponding to the 9-DoF tracking information or to supplement or enhance the real-world object using the 9-DoF tracking information.

[0128] In one example, the AR item selection module 519 can present a list of AR objects or items to the user in a graphical user interface. The list can be presented as an overlay on top of a real-world environment depicted in an image or video captured by a camera of the client device 102. The list can include a graphical representation of each AR object on the list and / or a text label identifying each AR representation on the list. The AR item selection module 519 can receive input from the user selecting a given AR object from the list. In response, the AR item selection module 519 transmits the selected AR object to the 9-DOF module 516 and to the image modification module 518.

[0129] The 9-DOF module 516 receives a selection of an AR object and obtains one or more position and orientation parameters associated with the AR object. The one or more position and orientation parameters are used to automatically place the AR object within the real-world environment depicted in the image or video. The 9-DOF module 516 can control which position and orientation is used to place the AR object based on the size, orientation, and / or position of the real-world object corresponding to the 3D bounding box.

[0130] The 9-DOF module 516 may generate a marker representing the 3D bounding box generated by the 3D bounding box module 517. The marker may be displayed within the video feed as an overlay on top of the real-world object corresponding to the 3D bounding box. Figure 7 As shown in , an image 710 may be received as part of a real-time video feed of a client device 102. Object tracking system 224 may generate a 3D bounding box 730 for a real-world object 720 depicted in image 710. In some cases, object tracking system 224 presents one or more points 732 of 3D bounding box 730 to identify the 3D location of each of the eight points of 3D bounding box 730. A different visual indicator (e.g., a different color) may be used to represent each point. As the camera moves around, the position, orientation, and size of one or more points 732 and 3D bounding box 730 are updated in real time.

[0131] The image modification module 518 may display or generate an image combining an AR object having a position, size, and orientation set based on a 3D bounding box with a real-world object of a real-world environment depicted in the image. The image modification module 518 may receive input from a user to move (reposition) the combined AR object within the real-world environment, and may update the position, orientation, and / or size of the AR object based on the input. The image display module 520 receives the image from the image modification module 518 and displays the image on a screen of the client device 102.

[0132] Figures 8 to 9 is a graphical representation of an output 800 of an object tracking system according to some examples. Specifically, Figure 8 As shown in , the object tracking system 224 receives an image or video 810 depicting a real-world object 812 in a real-world environment. The object tracking system 224 receives a user selection of an AR object (e.g., an AR table) or automatically selects an AR object based on a real-world environment classification. The object tracking system 224 generates a 3D bounding box of the real-world object 812 and displays a marker 814 (e.g., a graphic) representing the 3D bounding box. The 3D bounding box is updated based on performing 9-DoF tracking of the real-world object 812.

[0133] As the camera moves around to capture subsequent images 820, the object tracking system 224 continues to update the 3D bounding box. The object tracking system 224 can determine that the stability parameter of the 3D bounding box reaches a certain stability threshold. In response, the object tracking system 224 displays the AR object 822 in the image 820 along with the real-world object 812. The size, orientation, and position of the AR object 822 are automatically selected and placed in the image 820 without receiving user input to drag the AR object 822 to a specified location. The object tracking system 224 performs 9-DoF tracking of the real-world object 812 and continuously updates the position, orientation, and size of the AR object 822 based on the performed 9-DoF tracking.

[0134] like Fig. 9 , object tracking system 224 displays a series of graphical user interfaces 900. Graphical user interface 900 depicts an image or video of a real-world environment 910 including a real-world object 912. Object tracking system 224 can detect real-world object 912 in a first image of real-world environment 910. Object tracking system 224 can receive input to activate a particular AR experience and display an icon 914 representing the AR experience. In some cases, a person can sit on real-world object 912 or stand relative to real-world object 912. The 3D bounding box is calculated independently of the person's position.

[0135] The object tracking system 224 generates a 3D bounding box for the real-world object 912 based on the estimated 2D bounding box for the real-world object 912. The object tracking system 224 can continuously calculate or update the stability parameter of the 3D bounding box. Once the stability parameter of the 3D bounding box reaches a stability threshold, the object tracking system 224 obtains an AR object 922 corresponding to the AR experience. Then, the object tracking system 224 presents the AR object 922 in the image 920.

[0136] Object tracking system 224 actively and continuously tracks the movement of real-world object 912 with 9-DoF, and updates the display of AR object 922 based on the movement of real-world object 912. In some cases, object tracking system 224 determines that person 932 is sitting on real-world object 912 based on the 3D bounding box. In response, object tracking system 224 generates image 930 that depicts person 932 as sitting on top of AR object 922. That is, object tracking system 224 can replace the display of real-world object 912 with the display of AR object 922. Even though real-world object 912 is no longer depicted in image 930, object tracking system 224 still updates the displayed AR object 922 according to the detected changes to real-world object 912. This creates the illusion that person 932 is interacting directly with AR object 922.

[0137] Fig.10 1000 is a flowchart of a process 1000 according to some examples. Although a flowchart may describe operations as a sequential process, many of these operations may be performed in parallel or simultaneously. In addition, the order of the operations may be rearranged. A process terminates when its operations are completed. A process may correspond to a method, a procedure, etc. The steps of a method may be performed in whole or in part, may be performed in conjunction with some or all of the steps in other methods, and may be performed by any number of different systems or any part thereof (e.g., a processor in any system included in the system).

[0138] At operation 1001 , as discussed above, the object tracking system 224 (eg, a server or client device 102 ) receives a video including a depiction of a real-world object in a real-world environment.

[0139] At operation 1002 , the object tracking system 224 generates a 3D bounding box for a real-world object, as discussed above.

[0140] At operation 1003 , as discussed above, the object tracking system 224 stabilizes the 3D bounding box based on one or more sensors of the device.

[0141] At operation 1004 , the object tracking system 224 determines the position, orientation, and size of the real-world object based on the stabilized 3D bounding box, as discussed above.

[0142] At operation 1005 , as discussed above, the object tracking system 224 renders the display of the AR item within the video based on the position, orientation, and size of the real-world object that has been determined based on the stabilized 3D bounding box.

[0143] Machine Architecture

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

[0145] The machine 1100 may include a processor 1102, a memory 1104, and an input / output (I / O) component 1138 that may be configured to communicate with each other via a bus 1140. In an example, the 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, a processor 1106 that executes instructions 1108 and a processor 1110. The term "processor" is intended to include multi-core processors, which may include two or more independent processors (sometimes referred to as "cores") that may execute instructions simultaneously. Although Fig.11 Multiple processors 1102 are shown, but the 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.

[0146] The memory 1104 includes a main memory 1112, a static memory 1114, and a storage unit 1116, all of which are accessible to the processor 1102 via the bus 1140. The main memory 1104, the static memory 1114, and the storage unit 1116 store instructions 1108 that embody any one or more of the methods or functions described herein. The instructions 1108 may also reside, completely or partially, within the main memory 1112, within the static memory 1114, within a machine-readable medium within the storage unit 1116, within at least one of the processors 1102 (e.g., within a cache memory of a processor), or within any suitable combination thereof during execution thereof by the machine 1100.

[0147] I / O components 1138 may include various components for receiving input, providing output, generating output, sending information, exchanging information, capturing measurements, etc. The specific I / O components 1138 included in a particular machine will depend on the type of machine. For example, a portable machine such as a mobile phone may include a touch input device or other such input mechanism, while a headless server machine may not include such a touch input device. It should be appreciated that I / O components 1138 may include Fig.111124 and a plurality of other components not shown in the drawings. In various examples, the I / O components 1138 may include a user output component 1124 and a user input component 1126. The user output component 1124 may include a visual component (e.g., a display such as a plasma display panel (PDP), a light emitting diode (LED) display, a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)), an acoustic component (e.g., a speaker), a tactile component (e.g., a vibration motor, a resistance mechanism), other signal generators, etc. The user input component 1126 may include an alphanumeric input component (e.g., a keyboard, a touch screen configured to receive alphanumeric input, an optical keyboard, or other alphanumeric input component), a point-based input component (e.g., a mouse, a touch pad, a trackball, a joystick, a motion sensor, or other pointing instrument), a tactile input component (e.g., a physical button, a touch screen or other tactile input component that provides location and force of a touch or touch gesture), an audio input component (e.g., a microphone), etc.

[0148] In other examples, the I / O component 1138 may include a biometric component 1128, a motion component 1130, an environment component 1132, or a position component 1134, as well as various other components. For example, the biometric component 1128 includes components for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body postures, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, sweat, or brain waves), identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition), etc. The motion component 1130 includes an acceleration sensor component (e.g., an accelerometer), a gravity sensor component, and a rotation sensor component (e.g., a gyroscope).

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

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

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

[0152] The location component 1134 includes a positioning sensor component (e.g., a GPS receiver component), an altitude sensor component (e.g., an altimeter or a barometer that detects air pressure that can obtain altitude), an orientation sensor component (e.g., a magnetometer), and the like.

[0153] A variety of technologies may be used to achieve communication. The I / O components 1138 also include a communication component 1136 that is operable to couple the machine 1100 to the network 1120 or device 1122 via a corresponding coupling or connection. For example, the communication component 1136 may include a network interface component or other suitable device that interfaces with the network 1120. In other examples, the communication component 1136 may include a wired communication component, a wireless communication component, a cellular communication component, a near field communication (NFC) component, Parts (e.g. Low power consumption), Components and other communication components for providing communication via other modalities. Device 1122 can be another machine or any peripheral device among various peripheral devices (e.g., a peripheral device coupled via USB).

[0154] In addition, the communication component 1136 can detect an identifier or include a component operable to detect an identifier. For example, the communication component 1136 can include a radio frequency identification (RFID) tag reader component, an NFC smart tag detection component, an optical reader component (e.g., an optical sensor for detecting one-dimensional bar codes such as universal product code (UPC) bar codes, multi-dimensional bar codes such as quick response (QR) codes, Aztec codes, data matrix, data symbol (Dataglyph), MaxiCode, PDF417, UltraCode, UCC RSS-2D bar codes, and other optical codes) or an acoustic detection component (e.g., a microphone for identifying an audio signal of a tag). In addition, various information can be obtained via the communication component 1136, such as positioning obtained via Internet Protocol (IP) geolocation, Positioning obtained by signal triangulation, positioning obtained by detecting NFC beacon signals that can indicate a specific position, etc.

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

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

[0157] Software Architecture

[0158] Fig.121200 is a block diagram illustrating a software architecture 1204 that may be installed on any one or more of the devices described herein. The software architecture 1204 is supported by hardware, such as a machine 1202 including a processor 1220, a memory 1226, and an I / O component 1238. In this example, the software architecture 1204 may 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, a library 1210, a framework 1208, and an application 1206. In operation, the application 1206 invokes an API call 1250 through the software stack and receives a message 1252 in response to the API call 1250.

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

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

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

[0162] In an example, applications 1206 may include a home application 1236, a contacts application 1230, a browser application 1232, a book reader application 1234, a positioning application 1242, a media application 1244, a messaging application 1246, a game application 1248, and a variety of other applications such as external applications 1240. Application 1206 is a program that executes the functions defined in the program. Various programming languages ​​can be used to create one or more of the applications 1206 constructed in various ways, such as an object-oriented programming language (e.g., Objective-C, Java, or C++) or a procedural programming language (e.g., C or assembly language). In a specific example, external application 1240 (e.g., an application created by an entity other than the vendor of a particular platform using ANDROID TM or IOS TM Software Development Kit (SDK) can be used to develop applications on mobile operating systems such as IOS TM ANDROID TM , Mobile software running on the iPhone or other mobile operating system. In this example, the external application 1240 can activate the API call 1250 provided by the operating system 1212 to facilitate the functions described herein.

[0163] Glossary

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

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

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

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

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

[0169] Hardware components may also be implemented mechanically, electronically, or in any suitable combination thereof. For example, a hardware component may include a dedicated circuit or logic that is permanently configured to perform certain operations. A hardware component may be a dedicated processor, such as a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC). A hardware component may also include a programmable logic or circuit system that is temporarily configured to perform certain operations by software. For example, a hardware component may include software executed by a general-purpose processor or other programmable processor. Once configured by such software, the hardware component becomes a specific machine (or a specific component of a machine) that is uniquely customized to perform the configured function, rather than a general-purpose processor. It should be recognized that it may be determined for cost and time considerations whether to implement the hardware component mechanically in a dedicated and permanently configured circuit system or in a temporarily configured (e.g., configured by software) circuit system. Therefore, the phrase "hardware component" (or "hardware-implemented component") should be understood to include a tangible entity, i.e., an entity that is physically constructed, permanently configured (e.g., hardwired) or temporarily configured (e.g., programmed) to operate in some way or perform certain operations described herein.

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

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

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

[0173] "Computer-readable storage media" refers to both machine 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" mean the same thing and may be used interchangeably in this disclosure.

[0174] A "temporary message" is a message that is accessible for a time-limited duration. A temporary message can be text, an image, a video, etc. The access time for a temporary message can be set by the sender of the message. Alternatively, the access time can be a default setting or a setting specified by the recipient. Regardless of the setting technique, the message is transient.

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

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

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

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

Claims

1. A method comprising: receiving, by one or more processors of a device, a video including a depiction of a real-world object in a real-world environment; generating a three-dimensional (3D) bounding box for the real-world object; stabilizing the 3D bounding box based on one or more sensors of the device; determining a position, orientation, and size of the real-world object based on the stabilized 3D bounding box; as well as An augmented reality (AR) item is rendered for display within the video based on the position, orientation, and size of the real-world object that has been determined based on the stabilized 3D bounding box. 2 . The method of claim 1 , further comprising performing nine degrees of freedom (9-DoF) tracking of the real-world object using the stabilized 3D bounding box. 3 . The method according to claim 1 , further comprising maintaining a display position of the AR item within the video in real time as a camera capturing the video moves in the real-world environment.

4. The method according to any one of claims 1 to 3, wherein: The 3D bounding box includes eight corner points in 3D space.

5. The method according to any one of claims 1 to 4, further comprising: A machine learning model is applied to frames of the video to generate a two-dimensional (2D) bounding box for the real-world object, wherein the 3D bounding box is generated based on the 2D bounding box.

6. The method according to claim 5, wherein: The machine learning model includes an artificial neural network (ANN), and the method further includes training the ANN by performing a training operation, the training operation including: Receiving training data including a plurality of training videos and corresponding ground-truth bounding boxes; applying the ANN to a first training video of the plurality of training videos to estimate a 2D bounding box of a training object depicted in the first training video; calculating a deviation between the estimated 2D bounding box and a ground-truth bounding box associated with the first training video; and Parameters of the ANN are updated based on the calculated deviations.

7. The method according to claim 6, further comprising: The applying operation, the calculating operation, and the updating operation are repeated for the set of the plurality of training videos.

8. The method according to claim 5, further comprising: Intersection points of a first set of rays are calculated, the first set of rays originating from a bottom portion of the 2D bounding box, with a starting point located at a camera of the device used to capture the video, wherein 3D world coordinates of the first set of rays are obtained using one or more sensors of the device.

9. The method according to claim 8, further comprising: identifying, based on one or more sensors of the device, a first 3D point corresponding to a first bottom corner of the 2D bounding box; as well as A first ray of the first set of rays is drawn from the first 3D point toward the starting point.

10. The method according to claim 9, further comprising: identifying a height of a floor in the video based on the one or more sensors; as well as A 3D position of each corner of a bottom portion of the 2D bounding box is identified based on the first set of rays and the identified height of the floor.

11. The method according to claim 10, further comprising: An intersection point of a second set of rays is calculated, the second set of rays originating from a top portion of the 2D bounding box, the starting point being located at a camera of the device used to capture the video, wherein 3D world coordinates of the second set of rays are obtained using one or more sensors of the device.

12. The method according to claim 11, further comprising: identifying, based on one or more sensors of the device, a second 3D point corresponding to a first corner of the 2D bounding box; as well as Based on the identified height of the floor, a first ray of the second set of rays is drawn from the second 3D point toward the starting point.

13. The method according to claim 12, further comprising: identifying an intersection point between the first set of rays and the second set of rays; as well as The 3D bounding box is generated based on the first set of rays, the second set of rays, and the intersection points between the first set of rays and the second set of rays.

14. The method according to any one of claims 1 to 13, further comprising: Calculating a stability parameter, the stability parameter representing changes between 3D points of the 3D bounding box between two or more frames of the video, the stability parameter representing a mean shift for each corner of the 3D bounding box, wherein the stability parameter is calculated as a maximum mean shift for a previous set of frames of the video.

15. The method according to claim 14, wherein: Stabilizing the 3D bounding box includes: determining that the stability parameter corresponds to a threshold stability; and In response to determining that the stability parameter corresponds to the threshold stability, rendering a display of the AR item and tracking movement of the AR item based on the one or more sensors.

16. The method according to claim 15, further comprising: generating the 3D bounding box based on a plurality of two-dimensional (2D) bounding boxes estimated by the machine learning model for each respective frame in the first set of frames; after generating the 3D bounding box using the 2D bounding box for the first set of frames, determining that the stability parameter corresponds to the threshold stability; as well as The 3D bounding box for a second set of frames received after the first set of frames is updated without using the machine learning model to estimate the 2D bounding box for the second set of frames.

17. The method according to any one of claims 1 to 16, further comprising: The AR item in the video is used to replace the depiction of the real-world object.

18. The method according to claim 17, wherein: The depiction of the real-world object includes a depiction of a person above the real-world object, and after replacing the depiction of the real-world object with the AR item, the person is depicted above the AR item.

19. A system comprising: A processor of a device, the processor being configured to perform operations comprising: receiving a video including a depiction of a real-world object in a real-world environment; generating a three-dimensional (3D) bounding box for the real-world object; stabilizing the 3D bounding box based on one or more sensors of the device; determining a position, orientation, and size of the real-world object based on the stabilized 3D bounding box; and An augmented reality (AR) item is rendered for display within the video based on the position, orientation, and size of the real-world object that has been determined based on the stabilized 3D bounding box.

20. A non-transitory machine-readable storage medium comprising instructions that, when executed by one or more processors of a device, cause the device to perform operations comprising: receiving a video including a depiction of a real-world object in a real-world environment; generating a three-dimensional (3D) bounding box for the real-world object; stabilizing the 3D bounding box based on one or more sensors of the device; determining a position, orientation, and size of the real-world object based on the stabilized 3D bounding box; as well as An augmented reality (AR) item is rendered for display within the video based on the position, orientation, and size of the real-world object that has been determined based on the stabilized 3D bounding box.

Citation Information

Cited By

  • Method, system, and medium for augmented reality product recommendations

    US12412205B2

  • AR item placement in a video

    US12499626B2