Selecting representative video frames by machine learning

By training a machine learning model and utilizing aesthetic visual analysis and weakly labeled video frames, the problem of poor selection of representative video frames in existing technologies is solved, resulting in higher quality video thumbnail generation that meets users' aesthetic needs.

CN116710978BActive Publication Date: 2026-04-10SNAP INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing messaging systems lack effective machine learning methods when selecting representative video frames, resulting in poor quality video thumbnails that fail to meet users' aesthetic needs.

Method used

By training a machine learning model, using aesthetic visual analysis images and weakly labeled video frames, combined with training on degraded images, the machine learning model is self-trained, representative video frames are selected, and labels and pseudo-labels are generated based on predefined preferences for the sorting and selection of video frames.

Benefits of technology

It improves the aesthetic quality of video frame selection, meets users' visual preferences, and enhances the visual experience of video thumbnails.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116710978B_ABST
    Figure CN116710978B_ABST
Patent Text Reader

Abstract

Aspects of the disclosure relate to a system comprising a medium storing a program and a method of selecting representative video frames based on machine learning. The program and method cause receiving a set of video frames; determining a first subset of frames by removing frames outside of an image quality threshold; determining a second subset by removing frames outside of an image stillness threshold; computing feature data for each frame in the second subset; providing the feature data for each frame in the second subset to a machine learning model (MLM) configured to output a score for each frame in the second subset of frames based on the feature data, wherein the MLM has been trained on a first set of images labeled based on aesthetics and a second set of images labeled based on image quality; and selecting frames based on the output scores.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references to related applications

[0002] This patent application claims the benefit of U.S. Application No. 17 / 550,852, filed December 14, 2021, which claims the benefit of U.S. Provisional Patent Application No. 63 / 131,839, filed December 30, 2020, entitled “MACHINE LEARNING-BASED SELECTION OF AREPRESENTATIVE VIDEO FRAME WITHIN AMESSAGING APPLICATION,” the entire contents of which are incorporated herein by reference. Technical Field

[0003] This disclosure generally relates to messaging systems, including a messaging system that implements machine learning to select representative video frames. Background Technology

[0004] Messaging systems enable the exchange of messages between users. For example, a messaging system allows a user to exchange message content (e.g., video, image) with one or more other users. Attached Figure Description

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

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

[0007] Figure 2 It is a graphical representation of a message sending and receiving system with both client-side and server-side functionality, based on some examples.

[0008] Figure 3 It is a graphical representation of a data structure maintained in a database according to some example implementations.

[0009] Figure 4 It is a graphical representation of a message based on some example implementations.

[0010] Figure 5 A machine learning system for training and using a machine learning model to select representative video frames, according to some example implementations, is shown.

[0011] Figure 6A Examples of representative video frames selected using different selection methods are shown.

[0012] Figure 6B Other examples of representative video frames selected using different selection methods are shown.

[0013] Figure 7 is a flowchart showing a process for selecting representative video frames using machine learning, according to some example embodiments.

[0014] Figure 8 is a flowchart of an access restriction process, according to some example embodiments.

[0015] Figure 9 is a diagrammatic representation of a machine in the form of a computer system within which a set of instructions can be executed to cause the machine to perform any one or more of the methodologies discussed herein, according to some example embodiments.

[0016] Figure 10 is a block diagram illustrating a software architecture, wherein an example can be implemented. DETAILED DESCRIPTION

[0017] Messaging systems generally allow users to exchange content items (e.g., videos, images, audio, and / or text) with each other. Messaging systems can be configured to select video frames that are representative of a particular video, for example, to use as a thumbnail image for the video.

[0018] The disclosed embodiments provide messaging systems configured to train and use machine learning models to select representative video frames. The messaging systems train the machine learning models with various types of training data. For example, the training data can include aesthetic visual analysis (AVA) images having labels corresponding to aesthetic scores (e.g., corresponding to a large-scale database separate from the messaging system).

[0019] The training data can also include randomly selected video frames stored in association with the messaging system that are weakly labeled. Weak labeling can include providing the randomly selected video frames to a machine learning model initially trained with labeled AVA images, and using the output evaluation (e.g., score) to label the randomly selected video frames. Further, the messaging system degrades the image quality for the randomly selected video frames, for example, to explicitly train the machine learning model with the degraded quality images.

[0020] Further, a machine learning model can be at least partially self-trained based on labeled and unlabeled video frames. For a given video associated with a messaging system, some video frames are labeled based on predefined preferences (e.g., subject of video centered, foreground prominent, appears large, etc.). The labeled video frames are provided to a machine learning model trained using AVA video frames and randomly selected downgraded video frames to determine pseudo-labels for the unlabeled video frames. The labeled and pseudo-labeled video frames are then used to further train the machine learning model. The machine learning model can be used on new image data (e.g., new videos) in order to rank video frames for selection of which video frame(s) represent the new video.

[0021] Figure 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 client devices 102, each hosting multiple applications including a messaging client 104 and other applications 106. Each messaging client 104 is communicatively coupled to other instances of the messaging client 104 (e.g., hosted on respective other client devices 102), a messaging server system 108, and third-party servers 110 via networks 112 (e.g., the Internet). The messaging client 104 can also communicate with locally-hosted applications 106 using application programming interfaces (APIs).

[0022] The messaging client 104 is able to communicate and exchange data with other messaging clients 104 and the messaging server system 108 via the networks 112. The data exchanged between the messaging clients 104 and between the messaging clients 104 and the messaging server system 108 includes functionality (e.g., commands to activate functionality) as well as payload data (e.g., textual, audio, video or other multimedia data).

[0023] The messaging server system 108 provides server-side functionality via the networks 112 to particular messaging clients 104. While some functionality of the messaging system 100 is described herein as being performed by the messaging client 104 or by the messaging server system 108, the location of certain functionality is a design choice. For example, it can be technically preferable to initially deploy certain technology and functionality within the messaging server system 108, but to later migrate this technology and functionality to the messaging client 104 where the client device 102 has sufficient processing capacity.

[0024] The messaging server system 108 supports a variety of services and operations that are provided to the messaging client 104. Such operations include transmitting data to, receiving data from, and processing data generated by the messaging client 104. This data can include message content, client device information, geolocation information, media

[0025] Turning now specifically to the messaging server system 108, an Application Program Interface (API) server 116 is coupled to, and provides a programmatic interface to, the application server 114. The application server 114 is communicatively coupled to a database server 120, which facilitates access to the 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 web-based interfaces to the application server 114. To this end, the web server 128 processes incoming network requests using the Hypertext Transfer Protocol (HTTP) and several related protocols.

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

[0027] The application servers 114 host a number of 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 a number of message processing technologies and functions, particularly with respect to the aggregation and other processing of content (e.g., textual and multimedia content) included in messages received from the multiple instances of the messaging client 104. As will be described in further detail, textual and media content from multiple sources can be aggregated into collections of content (e.g., referred to as stories or galleries). These collections are then made available to the messaging client 104. Such processing can also be performed server-side by the messaging server 118, given the hardware requirements for other processor and memory intensive processing of data.

[0028] The application servers 114 also include an image processing server 122 that is dedicated to performing various image processing operations, typically with respect to images or videos that are within the payloads of messages sent from or received at the messaging server 118.

[0029] The social network server 124 supports various social networking functions and services, and makes these functions and services available to the messaging server 118. To this end, the social network server 124 maintains and accesses an entity graph 304 (as shown in Figure 3 FIG. 4) within a database 126. Examples of the functions and services supported by the social network server 124 include identifying other users in the messaging system 100 that have a relationship with or are being "followed" by a particular user, and also identifying interests and other entities of a particular user.

[0030] Returning to the messaging client 104, features and functionality of external resources (e.g., applications 106 or widgets) are made available to users via the interface of the messaging client 104. In this context, "external" refers to the fact that the applications 106 or widgets are external to the messaging client 104. External resources are typically provided by third parties, but can also be provided by the creator or provider of the messaging client 104. The messaging client 104 receives user selections of options to launch or access features of such external resources. The external resources can be applications 106 installed on the client device 102 (e.g., "native apps"), or small-scale versions of applications (e.g., "widgets") that are hosted on the client device 102 or located remotely from the client device 102 (e.g., on a third-party server 110). The small-scale versions of applications include a subset of the features and functionality of the applications (e.g., full-scale, native versions of the applications), and are implemented using markup language documents. In one example, the small-scale versions of applications (e.g., "widgets") are web-based markup language versions of the applications, and are embedded in the messaging client 104. In addition to using markup language documents (e.g.,.html files), the widgets can include script language (e.g.,.js files or.json files) and style sheets (e.g.,.ss files).

[0031] In response to receiving a user selection of an option to launch or access a feature of an external resource, the messaging client 104 determines whether the selected external resource is a web-based external resource or a locally installed application 106. In some cases, applications 106 that are locally installed on the client device 102 can be launched independently of and separately from the messaging client 104, e.g., by selecting an icon corresponding to the application 106 on the home screen of the client device 102. Small-scale versions of such applications can be launched or accessed via the messaging client 104, and in some examples, any portion of the small-scale application cannot be accessed (or limited portions can be accessed) outside of the messaging client 104. The small-scale applications can be launched by the messaging client 104, e.g., receiving markup language documents associated with the small-scale applications from the third-party server 110 and processing such documents.

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

[0033] The messaging client 104 can notify a user of the client device 102 or other users (e.g., "friends") associated with such a user of activity occurring in one or more external resources. For example, the messaging client 104 can provide notifications to participants in a conversation (e.g., chat session) in the messaging client 104 about current or recent use of an external resource by one or more members of a group of users. One or more users can be invited to join an active external resource or launch (among the group of friends) a recently used but not currently active external resource. An external resource can provide participants in a conversation who are each using a respective messaging client 104 with the ability to share an item, status, condition, or location in the external resource to the chat session by one or more members of a group of users. The shared item can be an interactive chat card that members of the chat can interact with, for example, to launch the corresponding external resource, view particular information within the external resource, or bring the members of the chat to a particular location or status within the external resource. Within a given external resource, response messages can be sent to the user on the messaging client 104. The external resource can selectively include different media items in the response based on the current context of the external resource.

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

[0035] Figure 2is a block diagram illustrating additional details regarding the messaging system 100, in accordance with some example embodiments. In particular, the messaging system 100 is shown to include the messaging client 104 and the application server 114. The messaging system 100 includes 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 ephemeral timer system 202, a collection management system 204, an augmentation system 208, a map system 210, an external resource system 212, and / or a machine learning system 214.

[0036] The ephemeral 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 ephemeral timer system 202 incorporates a number of timers that selectively enable access (e.g., for presentation and display) of messages and associated content via the messaging client 104 based on a duration and display parameters associated with a message or a collection of messages (e.g., a story). Additional details regarding the operation of the ephemeral timer system 202 are provided below.

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

[0038] In addition, the collection management system 204 includes a curation interface 206 that enables a collection manager to manage and curate particular collections of content. For example, the curation interface 206 enables an event organizer to curate a collection of content related to a particular event (e.g., to delete inappropriate content or redundant messages). In addition, the collection management system 204 employs machine vision (or image recognition techniques) and content rules to automatically curate collections of content. In certain examples, users can be paid compensation for including user-generated content into a collection. In such cases, the collection management system 204 operates to automatically make payments to users for using such user’s content.

[0039] The augmentation system 208 provides various functionality that enables users to augment (e.g., annotate or otherwise modify or edit) media content associated with messages. For example, the augmentation system 208 provides functionality related to generating and publishing media overlays for messages processed by the messaging system 100. The augmentation system 208 operatively provides media overlays or augmentations (e.g., image filters) to the messaging client 104 based on the geolocation of the client device 102. In another example, the augmentation system 208 operatively provides media overlays to the messaging client 104 based on other information such as social network information of a user of the client device 102. The media overlays can include audio and visual content as well as visual effects. Examples of audio and visual content include pictures, text, logos, animations, and sound effects. Examples of visual effects include color overlays. The audio and visual content or visual effects can be applied to a media content item (e.g., a photo) at the client device 102. For example, the media overlays can include text or images that can be overlaid on a photo taken by the client device 102. In another example, the media overlays include a location identification overlay (e.g., Venice Beach), a live event name or business name overlay (e.g., Beach Coffee Shop). In another example, the augmentation system 208 uses the geolocation of the client device 102 to identify a media overlay that includes a business name at the geolocation of the client device 102. The media overlay can include other indicia associated with the business. The media overlays can be stored in the database 126 and accessed by the database server 120.

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

[0041] In other examples, the augmentation system 208 provides a business-based publishing platform that enables businesses to select particular media overlays associated with geolocations via a bidding process. For example, the augmentation system 208 associates the media overlays of the highest bidding businesses with corresponding geolocations for a predefined amount of time.

[0042] In other examples, as described below with respect to Figure 3As discussed, the augmentation system 208 causes augmented reality content to be presented in association with images or video captured by a camera of the client device 102. The augmentation system 208 can implement or otherwise access augmented reality content items (e.g., corresponding to an application lens or augmented reality experience) to provide real-time special effects and / or sounds that can be added to images or video. To facilitate the presentation of augmented reality content, the augmentation system 208 can implement or otherwise access an object recognition algorithm (e.g., including a machine learning algorithm) that is configured to scan images or video and detect / track movement of objects within the images or video.

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

[0044] The external resource system 212 provides an interface for the messaging client 104 to communicate with remote servers (e.g., third-party servers 110) to launch or access external resources (i.e., applications or applets). Each third-party server 110 hosts, for example, a markup language (e.g., HTML5) based application or a scaled down version of an application (e.g., a game application, a utility application, a payment application, or a ride sharing application). The messaging client 104 can launch a web-based resource (e.g., an application) by accessing an HTML5 file from the third-party server 110 associated with the web-based resource. In certain examples, the application hosted by the third-party server 110 is programmed in JavaScript with a software development kit (SDK) provided by the messaging server 118. The SDK includes an application program interface (API) with functionality that can be called or activated by the web-based application. In certain examples, the messaging server 118 includes a JavaScript library that provides given external resource access to certain user data of the messaging client 104. HTML5 is used as an example technology for programming games, but applications and resources programmed based on other technologies can be used.

[0045] To integrate the functionality of the SDK into the web-based resource, the SDK is downloaded by the third-party server 110 from the messaging server 118 or otherwise received by the third-party server 110. Once downloaded or received, the SDK is included as part of the application code of the web-based external resource. The code of the web-based resource can then call or activate certain functionality of the SDK to integrate features of the messaging client 104 into the web-based resource.

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

[0047] Not all information from the messaging client 104 is shared with the third-party servers 110 by using the SDK. The SDK limits which information is shared based on the needs of the external resource. In certain examples, each third-party server 110 provides the messaging server 118 with an HTML5 file corresponding to the web-based external resource. The messaging server 118 can add a visual representation of the web-based external resource (such as a box design or other graphic) in the messaging client 104. Once the user selects the visual representation or indicates to the messaging client 104 through the GUI of the messaging client 104 to access the feature of the web-based external resource, the messaging client 104 obtains the HTML5 file and instantiates the resources needed to access the feature of the web-based external resource.

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

[0049] The messaging client 104 controls the type of user data shared with external resources based on the type of the external resource that is authorized. For example, external resources that include full-scale applications (e.g., the application 106) are provided access to a first type of user data (e.g., two-dimensional avatars of users with or without different avatar characteristics). As another example, external resources that include small-scale versions of the application (e.g., web-based versions of the application) are provided access to a second type of user data (e.g., payment information, two-dimensional avatars of users, three-dimensional avatars of users, and avatars with various avatar characteristics). Avatar characteristics include different ways of customizing the appearance and feel of an avatar (e.g., different poses, facial features, clothing, etc.).

[0050] The machine learning system 214 implements various functionality of machine learning within the environment of the messaging system 100. In one or more embodiments, the machine learning system 214 provides the messaging system 100 with the ability to learn without being explicitly programmed. The machine learning system 214 can implement or otherwise access machine learning algorithms configured to learn from existing data and make predictions on new data. For example, a machine learning algorithm operates by building a machine learning model from example training data in order to make data-driven predictions or decision expression evaluations (e.g., or scores).

[0051] Figure 3 FIG. 3 is a schematic diagram illustrating a data structure 300 that can be stored in the databases 126 of the messaging server system 108, in accordance with certain examples. While the contents of the databases 126 are illustrated as including a plurality of tables, it will be appreciated that data can be stored in other types of data structures (e.g., as an object-oriented database).

[0052] The databases 126 include message data stored within a messages table 306. For any particular message, the message data includes at least message sender data, message recipient (or receiver) data, and a payload. Reference is made below to FIG. 4 for a more detailed description of the message data. Figure 4 Additional details are described regarding information that can be included in a message and included within the message data stored in the messages table 306.

[0053] The entities table 308 stores entity data and is linked to (e.g., references) the entity graph 304 and the profile data 302. Entities for which records are maintained within the entities table 308 can include individuals, corporate entities, organizations, objects, locations, events, and the like. Regardless of the entity type, any entity for which the messaging server system 108 stores data can be an identified entity. Each entity is provided with a unique identifier as well as an entity type identifier (not shown).

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

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

[0056] In the case of an entity being a group, the profile data 302 for the group can similarly include one or more avatar representations associated with the group in addition to the group name, members, and various settings (e.g., notifications) for the relevant group.

[0057] The database 126 also stores augmentation data, such as overlays or filters, in an augmentation table 310. The augmentation data is associated with and applied to videos (data for which is stored in a video table 316) and images (data for which is stored in an image table 318).

[0058] In one example, a filter is an overlay that is displayed as an overlay on an image or video during presentation to a recipient user. The filter can be of various types, including a user-selected filter from a collection of filters presented by the messaging client 104 to a sending user when the sending user is composing a message. Other types of filters include geolocation filters (also referred to as geo-filters) that can be presented to the sending user based on a 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.

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

[0060] Other augmentation data that can be stored within the image table 318 includes augmented reality content items (e.g., corresponding to an application lens or augmented reality experience). Augmented reality content items can provide real-time special effects and / or sounds that can be added to an image or video.

[0061] As described above, augmentation data includes augmented reality content items, overlays, image transformations, AR images, and similar terms referring to modifications that can be applied to image data (e.g., a video or image). This includes real-time modifications, which modify an image as it is being captured using a device sensor (e.g., one or more cameras) of the client device 102 and then displayed on a screen of the client device 102 with the modification. This also includes modifications to stored content (e.g., a video clip in a gallery that can be modified). For example, in a client device 102 that accesses multiple augmented reality content items, a user can use a single video clip with multiple augmented reality content items to see how different augmented reality content items would modify the stored clip. For example, multiple augmented reality content items that apply different pseudo-random motion models can be applied to the same content by selecting different augmented reality content items for the same content. Similarly, real-time video capture can be used with the shown modifications to show how a video image currently being captured by the sensors of the client device 102 would modify the captured data. Such data can be displayed on the screen only and not stored in memory, or the content captured by the device sensors can be recorded and stored in memory with or without modification (or both). In some systems, a preview feature can simultaneously show how different augmented reality content items would look within different windows in the display. For example, this can enable multiple windows with different pseudo-random animations to be viewed simultaneously on the display.

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

[0063] Real-time video processing can be performed with any kind of video data (e.g., video streams, video files, etc.) saved in memory of any kind of computerized system. For example, a user can load a video file and save it in memory of a device, or can generate a video stream using sensors of the device. Additionally, any object can be processed using computer animation models, such as faces and parts of human bodies of people, animals, or non-biological objects (e.g., chairs, cars, or other objects).

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

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

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

[0067] Other methods and algorithms suitable for face detection can be used. For example, in some examples, features are located using landmarks, which represent distinguishable points that are present in most images under consideration. For example, for face landmarks, the location of the left eye pupil can be used. If the initial landmark is not identifiable (e.g., if the person has an eye patch), a secondary landmark can be used. Such landmark identification processes can be used for any such object. In some examples, a set of landmarks forms a shape. A shape can be represented as a vector using the coordinates of the points in the shape. One shape is aligned with another shape with a similarity transform that minimizes the average Euclidean distance between the shape points (allowing for translation, scaling, and rotation). A mean shape is the mean of the aligned training shapes.

[0068] In some examples, a search for landmarks starts from a mean shape that is aligned with the position and size of the face determined by the global face detector. Such a search then repeats the following steps: a tentative shape is suggested by adjusting the location of the shape points through template matching of the image texture around each point, and then the tentative shape is brought into conformity with the global shape model until convergence occurs. In some systems, individual template matching is unreliable, and the shape model pools the results of weak template matching to form a stronger overall classifier. The entire search is repeated at each level of an image pyramid, from coarse resolution to fine resolution.

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

[0070] In some examples, the computer animation model used to transform 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 operating as part of a messaging client 104 operating on the client device 102. A transform system operating within the messaging client 104 determines the presence of a face within the image or video stream and provides modification icons associated with computer animation models to transform the data image, or the computer animation models can be present in association with the interfaces described herein. The modification icons include changes that can be the basis for modifying the face of the user within the image or video stream as part of a modification operation. Once a modification icon is selected, the transform system initiates processing to convert the image of the user to reflect the selected modification icon (e.g., generate a smiling 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 transform 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, the user can capture an image or video stream and the modification result is presented to the user in real-time or near real-time once the modification icon has been selected. Further, the modification can be persistent when a video stream is being captured and the selected modification icon remains toggled. Machine-taught neural networks can be used to implement such modifications.

[0071] The graphical user interface presenting the modifications performed by the transform system can provide additional interaction options to the user. Such options can be based on the interface used to initiate the selection of a particular computer animation model and content capture (e.g., initiated from a content creator user interface). In various examples, the modification can be persistent after an initial selection of a modification icon. The user can turn the modification on or off by tapping or otherwise selecting the face being modified by the transform system and store it for later viewing or browsing to other areas of the imaging application. In the case of multiple faces being modified by the transform system, the user can turn the modification on or off globally by tapping or selecting the individual face modified and displayed within the graphical user interface. In some examples, individual faces within a group of multiple faces can be modified individually or such modifications can be toggled individually by tapping or selecting individual faces or a series of individual faces displayed within the graphical user interface.

[0072] The story table 312 stores data regarding collections of messages and associated image, video, or audio data that are compiled into collections (e.g., stories or galleries). The creation of a particular collection can be initiated by a particular user (e.g., each user for which a record is maintained in the entity table 308). A user can create a "personal story" in the form of a collection of content that has been created and sent / broadcast by that user. To this end, the user interface of the messaging client 104 can include a user-selectable icon to enable a sending user to add particular content to his or her personal story.

[0073] A collection can also constitute a "live story," which is a collection of content from multiple users created manually, automatically, or using a combination of manual and automatic techniques. For example, a "live story" can constitute a curated stream of content submitted by users from different locations and events. Users whose client devices are enabled with location services and are at a common location event at a particular time can be presented with an option to contribute content to a particular live story, e.g., via the user interface of the messaging client 104. A live story can be identified to a user by the messaging client 104 based on the user's location. The end result is a "live story" told from a group perspective.

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

[0075] The user memory table 314 stores data regarding one or more "user memories," where each user memory corresponds to content (e.g., image, video, and / or audio files) saved by a single user for subsequent access by that user. The creation and saving of a particular user memory can be initiated by a single user (e.g., each user for which a record is maintained in the entity table 308). Further, each user memory stored within the user memory table 314 can be viewed, edited, and / or sent by the single user.

[0076] For example, if a user creates content (e.g., for exchange with others in messaging), the created content can be automatically deleted and removed from storage after a specified period of time (e.g., one hour, one minute, one second, etc.) by default. However, if the user elects the content to be permanently retained (e.g., via a "save" interface) before the specified period of time for automatic deletion of the content, the content can be added in the user memory table 314 as user memory. The saved content can be accessible by the individual user for viewing, editing, and / or sharing with other users.

[0077] As mentioned above, the video table 316 stores video data that, in one example, is associated with messages for which records are maintained within the message table 306. Similarly, the image table 318 stores image data that is associated with messages for which message data is stored in the entity table 308. The entity table 308 can associate various augmentations from the augmentation table 310 with various images and videos stored in the image table 318 and the video table 316.

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

[0079] • message identifier 402: a unique identifier that identifies the message 400.

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

[0081] • 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 sent or received message 400 can be stored in the image table 318.

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

[0083] • 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.

[0084] • message augmentation data 412: augmentation data (e.g., filters, stickers, or other annotations or augmentations) that represents augmentations to be applied to the message image payload 406, the message video payload 408, or the message audio payload 410 of the message 400. Augmentation data for sent or received messages 400 can be stored in the augmentation table 310.

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

[0086] • message geolocation parameter 416: geolocation data (e.g., latitude and longitude coordinates) associated with a content payload of the message. Multiple message geolocation parameter 416 values can be included in the payload, each of which is associated with a content item included in the content (e.g., a particular image within the message image payload 406 or a particular video in the message video payload 408).

[0087] • message story identifier 418: an identifier value that identifies one or more content collections (e.g.,“stories” identified in the story table 312) that are associated with a particular content item in the message image payload 406 of the message 400. For example, multiple images within the message image payload 406 can each be associated with multiple content collections using the identifier value.

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

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

[0090] • message sender identifier 422: an identifier (e.g., messaging system identifier, email address, or device identifier) that indicates a user of the client device 102 that sent the message 400.

[0091] The content (e.g., values) of the various components of the message 400 can be pointers to locations in tables where the content data values are stored. For example, the image value in the message image payload 406 can be a pointer (or address) to a location within the image table 318. Similarly, the values within the message video payload 408 can point to data stored within the video table 316, the values stored within the message augmentations 412 can point to data stored in the augmentations table 310, the values stored within the message story identifier 418 can point to data stored in the story table 312, and the values stored within the message sender identifier 422 and the message recipient identifier 424 can point to user records stored within the entities table 308.

[0092] Figure 5 A machine learning system 214 for training and using a machine learning model 538 to select representative video frames is shown in accordance with some example implementations. In one or more implementations, the machine learning system 214 is used to perform operations associated with determining an evaluation 540 (e.g., score) of a video frame for the purposes of ranking. Not all of the depicted components can be used in all implementations, and one or more implementations can include additional or different components than those shown in the figure. Variations in the arrangement and type of the components can be made without departing from the spirit or scope of the claims as set forth herein.

[0093] As noted above, the machine learning system 214 can correspond to a subsystem of the messaging system 100 and can be supported on the client side by the messaging client 104 and / or on the server side by the application server 114. In one or more implementations, the training and use of the machine learning model 538 can be implemented on the client side, on the server side, and / or a combination of the client side and the server side.

[0094] As described herein, the machine learning system 214 enables training of the machine learning model 538 with different types of training data. For example, the training data 502 includes aesthetic visual analysis (AVA) images with labels corresponding to aesthetic scores. Further, the training data 504 includes randomly selected video frames stored in association with the messaging system 100 that are weakly labeled. Weakly labeling includes providing the randomly selected video frames to the machine learning model 538 that is initially trained by labeled AVA images. The machine learning system 214 reduces the quality for the randomly selected video frames, for example, to explicitly train the machine learning model with the reduced quality video frames. Further, the machine learning model 538 is at least partially self-trained based on labeled and unlabeled video frames (e.g., training data 506). For a given video associated with the messaging system 100, some video frames are labeled based on predefined preferences (e.g., subject centered, foreground prominent, appear large, etc.). The labeled video frames are provided to the machine learning model 538 (trained using AVA video frames and downgraded randomly selected video frames) to determine pseudo-labels for the unlabeled video frames. The labeled and pseudo-labeled video frames are then used to further train the machine learning model 538. The machine learning model 538 can be used on new image data (e.g., new videos) to rank the video frames for which frame(s) best represent the new video.

[0095] As Figure 5 As shown in the example of FIG. 5, the machine learning system 214 includes training data 502 associated with AVA images 510, features 524, and labels 512; training data 504 associated with the machine learning system 214, features 526, and generated labels 516 (modified); training data 506 associated with scraped images 518, features 528, labels 520, and pseudo-labels 522; a machine learning algorithm 508; video frames 530; a frame filtering and key frame extraction module 532; a subset of video frames 534; features 536; a machine learning model 538; and an evaluation 540. However, not all of the depicted components can be used in all implementations, and one or more embodiments can include additional or different components than those shown in the figure. Variations in the arrangement and type of components can be made without departing from the spirit or scope of the claims as set forth herein. Additional components, different components, or fewer components can be provided.

[0096] The machine learning system 214 provides the messaging system 100 with the ability to learn without being explicitly programmed. The machine learning system 214 can implement or otherwise access machine learning algorithms (e.g., machine learning algorithms 508) configured to learn from existing data and make predictions on new data. For example, a machine learning algorithm operates by building a machine learning model 538 from example training data (e.g., training data 502-506) in order to make data-driven predictions or decisions represented as evaluations 540 (e.g., scores).

[0097] Two common types of problems in machine learning are classification problems and regression problems. Classification problems (also known as categorization problems) aim to classify items into one of several categorical values (e.g., object recognition). Regression problems aim to quantify some items (e.g., by providing values for ordering purposes). Different machine learning algorithms can be used to solve classification and / or ordering problems. Examples of machine learning algorithms include, but are not limited to, random forest (RF), neural network (NN), logistic regression (LR), Naive Bayes, matrix factorization, and support vector machine (SVM) algorithms. In Figure 5 In examples, the machine learning algorithms 508 can implement or otherwise access one or more machine learning algorithms.

[0098] Generally, machine learning algorithms (e.g., machine learning algorithms 508) can train machine learning models (e.g., machine learning models 538) in different ways, such as through supervised learning and / or unsupervised learning. Supervised learning is a machine learning task of learning a function that maps inputs to outputs based on example input-output pairs. Supervised learning infers a function from labeled training data consisting of input-output pairs. Unsupervised learning, on the other hand, is a type of machine learning that seeks to find previously undetected patterns in a dataset without pre-existing labels and with minimal human supervision. As described herein, a machine learning model 538 can be trained using a combination of labeled and unlabeled data.

[0099] With respect to features 524-528 and 536, each individual feature is a measurable attribute of the data being analyzed (e.g., AVA images 510, (modified) captured images 514, captured images 518, and subset of video frames 534). Each individual feature can have a respective data type, such as a numerical value or structured data (e.g., a histogram). Features 524-528 and 536 can be represented by a feature vector. In one or more embodiments, a feature vector for a given image (e.g., a video frame) can include respective values to represent one or more of: color mean and standard deviation for each channel (e.g., color channel) of the image; a color histogram (e.g., percentage of image pixels falling within each bin); local binary patterns of the image; Gabor filter results (e.g., local energy and average amplitude) for the image. Alternatively or additionally, a feature vector for an image can include respective values for one or more of: image quality features (e.g., brightness, sharpness, uniformity, and / or blurriness); image stillness features (e.g., based on pixel-wise frame differences between consecutive video frames); image color features (e.g., hue, saturation, brightness, color variation, and / or color uniformity); and / or image composition features (e.g., presence of an object, size of an object, location of an object, expression of an object, or features such as facial expression, open eyes, etc.).

[0100] As described herein, machine learning algorithm 508 uses training data 502-506 to find correlations between identified features 524-528 that affect evaluation 540 (e.g., a score). In one or more embodiments, training data 502-506 includes respective labels (e.g., labels 512, (modified) generated labels 516, labels 520, and pseudo labels 522). For example, labels 512, 516, 520, 522 correspond to evaluations (e.g., scores) for AVA images 510, (modified) captured images 514, and captured images 518, respectively. In one or more embodiments, such evaluations can indicate an overall quality of an image (e.g., a video frame) and / or how well a video frame represents the video as a whole (e.g., for thumbnail selection).

[0101] Accordingly, machine learning algorithm 508 corresponds to training a machine learning model 538 with training data 502-506 (i.e., features 524-528 and their respective labels 512, 516, 520, 522). The resulting machine learning model 538 is configured to receive new image data (e.g., a video) as input and generate an evaluation 540 (e.g., a score) for the new image data as output. As described herein, evaluation 540 can be used to select a video frame for use as a thumbnail image. Figure 5As shown by way of example, the new image data can correspond to features 536 of a subset 534 of video frames, where the subset 534 of video frames is generated using the frame filtering and key frame extraction module 532 for the video frames 530. The messaging system 100 can select the video frame with the highest evaluation (e.g., score) as a representative frame of the video (e.g., for thumbnail selection).

[0102] In one or more embodiments, the video frames 530 can correspond to a video stored in the video table 316. The video can correspond to one or more of a message (e.g., associated with the message table 306), a content collection (e.g., a story associated with the story table 312), or a user memory (e.g., associated with the user memory table 314). In one or more embodiments, the frame filtering and key frame extraction module 532 performs frame filtering and key frame extraction on the video frames 530.

[0103] In one or more embodiments, the frame filtering corresponds to determining a first subset of the video frames 530. The frame filtering and key frame extraction module 532 removes those video frames from the video frames 530 that are outside of an image quality threshold. For example, the frame filtering and key frame extraction module 532 is configured to filter out frames based on different image quantifiers. Each image quantifier can be assigned a respective image quality threshold. The respective image quality threshold can be predetermined based on a test performed for each image quantifier. Thus, the frame filtering and key frame extraction module 532 can filter out a particular percentage of video frames that fall outside (e.g., above or below) the respective image quality threshold for each image quantifier.

[0104] In one or more embodiments, the image quantifiers include, but are not limited to, brightness (e.g., such that low brightness frames are removed or filtered out), sharpness (e.g., measured via convolution with a Sobel operator, where the magnitude of the gradient is a measure of the difference between adjacent pixels), uniformity (e.g., measured via a grayscale histogram representation of the image / video frame), and blurriness (e.g., measured by the variance of the Laplacian of the image / video frame).

[0105] In one or more embodiments, keyframe extraction corresponds to determining a second subset within a first subset of video frames. The frame filtering and keyframe extraction module 532 removes those video frames from the first subset of video frames that are outside of an image stillness threshold. An example of a basic rationale is that, during video capture, the device camera will stop to highlight important objects. In one or more embodiments, the frame filtering and keyframe extraction module 532 is configured to compute respective stillness values between consecutive frames in the first subset of frames. A particular stillness value can correspond to a pixel-wise frame difference across channels (e.g., three RGB channels). The frame filtering and keyframe extraction module 532 removes a preset amount (e.g., a preset percentage) of video frames from the first subset based on the respective stillness values. For example, based on the stillness values, the bottom 60% of video frames are removed from the first subset in order to determine a second subset of frames. Thus, in one or more embodiments, the subset of video frames 534 corresponds to the second subset of frames.

[0106] The machine learning system 214 is configured to compute image descriptors for each of the subset of video frames 534. Image descriptors include, but are not limited to: color mean and standard deviation for each channel (e.g., color channel) of the image; color histogram (e.g., percentage of image pixels falling within each bin); local binary pattern of the image; Gabor filter results (e.g., local energy and average amplitude) of the image. Further, the machine learning system 214 is configured to generate feature vectors based on the image descriptors. The generated feature vectors correspond to features 536 of the subset of video frames 534.

[0107] As described above, the messaging system 100 described herein is configured to select representative frames within a video, e.g., based at least in part on the features 536. In one or more embodiments, such selection can be based on different training methods available to the messaging system 100 (e.g., in conjunction with the machine learning system 214). The different methods are referred to as “Methods 1-4” described below. Methods 1-4 can select video frames that are considered to be representative (e.g., based on image quality, aesthetics, user preferences) of the video frames 530, and can be used in place of selecting only the first video frame within a video to be representative of that video.

[0108] With respect to method 1, the messaging system 100 is configured to cluster respective feature vectors (e.g., features 536) corresponding to the subset of video frames 534. For example, the messaging system 100 implements or otherwise accesses a K-means clustering via a gap statistical algorithm to perform the clustering. In this regard, such a K-means clustering enables a dynamic determination of a number of clusters based on the feature vectors. In one or more implementations, the messaging system 100 is further configured to select one video frame from each cluster based on an image still (e.g., a value that has been determined as described above). Moreover, as described above, a representative frame of the video (e.g., a final "best" frame) is selected based on a combination of the still and blur values (e.g., a lowest blur) described above. Accordingly, method 1 corresponds to an implementation that does not necessarily utilize a machine learning algorithm 508. Figure 5 An example implementation of the machine learning algorithm 508 is depicted in FIG. 5.

[0109] On the other hand, methods 2-4 correspond to alternative implementations that utilize the machine learning algorithm 508 to train the machine learning model 538. As discussed below, method 2 trains with the training data 502 in conjunction with the machine learning algorithm 508. Method 3 builds on method 2 by training with the training data 502 and the training data 504 in conjunction with the machine learning algorithm 508. Moreover, method 4 builds on methods 2 and 3 by training with the training data 502, the training data 504, and the training data 506 in conjunction with the machine learning algorithm 508.

[0110] Method 2 can correspond to a supervised computer vision training method. As shown in FIG. 5, the training data 502 includes AVA images 510 and labels 512, which are provided as input to the machine learning algorithm 508. The AVA images 510 correspond to a large-scale AVA database for performing aesthetic visual analysis. For example, the database contains a plurality of images (e.g., 250,000 images) along with metadata that includes various aesthetic scores for each image, semantic labels for a plurality of categories (e.g., over 60 categories), and labels related to photographic style. Figure 5

[0111] In one or more implementations, the machine learning system 214 is configured to generate feature vectors (e.g., features 524) corresponding to the AVA images 510. As described above, the feature vectors can be indicative of respective values for color mean / standard deviation, color histograms, local binary patterns, and / or Gabor filter results, without limitation. The feature vectors can be generated based at least in part on metadata provided by the AVA database. Alternatively or additionally, the feature vectors can be generated based at least in part on computing respective image descriptors (as described above) for the AVA images 510.

[0112] ​In one or more embodiments, the labels 512 are based on the aesthetic scores provided by the AVA database for the AVA images 510. As described above, the AVA database can include individual aesthetic scores for each image. Each of the labels 512 can correspond to a single aesthetic score (e.g., a single score, an average score, a weighted score, etc.) based on one or more of the aesthetic scores provided by the AVA database. In one or more embodiments, the aesthetic score for each of the labels 512 falls within a predefined range (e.g., between 1 and 10). Thus, the machine learning algorithm 508 trains the machine learning model 538 using the features 524 and the labels 512.

[0113] For new image data (e.g., the video frames 530), the machine learning system 214 computes image descriptors and generates feature vectors (e.g., the features 536), as described above. The machine learning model 538 receives the features 536 as input and provides an evaluation 540 of the subset of video frames 534 as output. For example, the evaluation 540 corresponds to a score within a predefined range (e.g., between 1 and 10) that is similar in format to the scores described above that correspond to the labels 512. The messaging system 100 can select the video frame with the highest evaluation (e.g., score) as the representative frame.

[0114] In one or more embodiments of the method 2, the machine learning model 538 corresponds to a random forest model. For example, the machine learning model 538 corresponds to a Catboost model that uses gradient boosting on decision trees. The Catboost model can have been trained based on the AVA images 510 and the labels 512 in order to generate the evaluations 540.

[0115] Note that the domain of the AVA images 510 is different from the domain of the video frames 530. As described above, the AVA images 510 are associated with the AVA database that corresponds to a first domain. On the other hand, the video frames 530 are associated with the messaging system 100 that corresponds to a second domain. In one or more embodiments, the AVA images 510 of the first domain have a relatively higher image quality compared to the video frames 530 of the second domain. The algorithms 3 and 4, discussed below, enable transfer of knowledge (e.g., for training) between the first domain and the second domain without having to require extensive labeling (e.g., manual labeling) of training data.

[0116] As described above, the method 3 builds on the method 2 by utilizing training data 504 in addition to the training data 502. The method 3 can correspond to weakly supervised training. The training data 504 corresponds to a plurality of images (e.g., video frames) that are stored in association with the messaging system 100 (e.g., the second domain). For example, the video frames are stored in the video table 316 and can correspond to video content of messages, content collections, and / or user memories.

[0117] In one or more embodiments, the number of video frames selected for training data 504 is preset. For example, machine learning system 214 may extract a given number of videos from video table 316. Machine learning system 214 may randomly select a preset number of video frames or a preset percentage of video frames (e.g., 10%) from the extracted videos.

[0118] Although not in Figure 5 As shown, however, the machine learning system 214 is configured to weakly label the selected video frames. In one or more embodiments, the machine learning system 214 uses the method described above for generating feature vectors to generate feature vectors for the selected video frames. The machine learning system 214 provides the generated feature vectors as input to the machine learning model 538, which has been pre-trained with AVA-based training data 502 at this stage. The machine learning model 538 provides corresponding evaluations (e.g., scores) based on the feature vectors, thereby labeling (e.g., weakly labeling) the selected video frames.

[0119] Furthermore, the machine learning system 214 is configured to reduce the image quality of the selected video frame. For example, the machine learning system 214 subtracts a predetermined amount from a ranking of image operations regarding downsampling / pixelation, exposure (e.g., high and / or low exposure), and Gaussian blur. In this way, the machine learning system 214 is able to determine both the (modified) captured image 514 and the (modified) generated label 516 for the selected video frame. The machine learning system 214 can also use the methods described above for generating feature vectors to determine the features 526 (e.g., feature vectors) of the (modified) captured image 514.

[0120] Machine learning system 214 is configured to further train machine learning model 538 based on features 526 and (modified) generated labels 516. In one or more embodiments, such training may include feature vectors and weak labels from the original, unmodified versions of selected video frames. By means of training machine learning model 538 with training data 504 according to method 3, machine learning system 214 can explicitly train machine learning model 538 with degraded images.

[0121] After training based on method 3, machine learning model 538 can generate an evaluation 540 (e.g., a score) for the new image data (e.g., video frame 530) as described above. The video frame with the highest evaluation (e.g., score) can be selected as the representative frame.

[0122] As described above, method 4 builds on methods 2 and 3 by utilizing training data 506 in addition to training data 502 and training data 504. Method 4 can correspond to self-training using labeled and unlabeled (e.g., which becomes pseudo-labeled) data. Training data 506 corresponds to a plurality of images (e.g., video frames) stored in association with messaging system 100 (e.g., a second domain). For example, the video frames are stored in video table 316 and can correspond to video content of messages, content collections, and / or user stores.

[0123] In one or more embodiments, the amount of video frames selected for training data 506 is preset. For example, machine learning system 214 can grab a given number of videos from video table 316. The grabbed videos can be the same, different, or at least partially different from the grabbed videos described above with respect to method 3. Further, machine learning system 214 selects a preset number of video frames (e.g., 1000 frames) from the set of grabbed videos for labeling.

[0124] For example, performing the labeling can be performed manually by a person provided instructions of particular image preferences. In one or more embodiments, the image preferences include one or more of: centering of a subject of the video frame; the subject being large in the video frame; the subject being in the foreground of the video frame; the subject having a preferred expression or characteristic (e.g., smiling, eyes open, etc.); and / or increased color variation in the video frame. Thus, the selected video frames are labeled with labels 520.

[0125] In addition to training machine learning model 538 with training data 502 and training data 504 described above, machine learning system 214 causes machine learning model 538 to be trained based on the labeled data. For the labeled selected video frames, machine learning system 214 trains machine learning model 538 via machine learning algorithm 508 with the corresponding feature vectors.

[0126] Further, machine learning system 214 provides additional training with respect to unlabeled data (e.g., initially unselected video frames within the grabbed videos). Machine learning system 214 is configured to pseudo-label the unselected video frames by submitting the corresponding feature vectors of those unselected frames to machine learning model 538 trained with the labeled data. Machine learning model 538 provides an evaluation (e.g., score) corresponding to a pseudo-label for the unselected video frames.

[0127] Further, the machine learning system 214 is configured to further train the machine learning model 538 based on the features 528, the labels 520, and the pseudo labels 522 (for both selected and non-selected video frames). By virtue of training the machine learning model 538 with the training data 506 in accordance with method 4, the machine learning system 214 can self-train the machine learning model 538 for both labeled and unlabeled data.

[0128] For example, the machine learning system 214 causes the machine learning model 538 to be trained with initial training data (e.g., the training data 502, the training data 504, and the labeled video frames). In this regard, the machine learning model 538 can be viewed as a teacher to generate pseudo labels 522 for unlabeled images. Then, the machine learning model 538 is trained as a student based on a combination of labeled images (e.g., the labels 520) and unlabeled images (the pseudo labels 522), and then iteratively trained by viewing the student as a teacher. During student learning, the machine learning system 214 can inject noise to the student (e.g., image noise such as random augmentation and / or model noise such as increased dropout rate, cross-entropy loss), so that the student can generalize better than the teacher.

[0129] While method 4 is described as building on methods 2 and 3, method 4 can also be implemented as building only on method 2 (i.e., without using method 3). In such a case, the machine learning algorithm 508 would train the machine learning model 538 by using the training data 502 and the training data 506, without using the training data 504.

[0130] After training based on method 4, the machine learning model 538 can generate an assessment 540 (e.g., a score) as described above with respect to new image data (e.g., the video frames 530). With respect to subjects in the video frames, the machine learning system 214 can detect the subjects based at least in part on the object recognition algorithm described above. The video frame with the highest assessment (e.g., score) can be selected as the representative frame.

[0131] While the above examples involve selecting a thumbnail image of a video (e.g., corresponding to the video frames 530), the selected representative frame can be used for different purposes. As non-limiting examples, the selected frame can be used for one or more of the following: visual labeling of the video; labeling of a highlighted portion of the video; ranking of the video relative to other videos for video editing; content management of the video within a map interface; or generating an animated thumbnail based on multiple frames (e.g., a group of consecutive frames with high ranking, or a group of frames adjacent to the highest ranked frame).

[0132] By using the training methods described above, the amount of labels required to train the machine learning model 538 via machine learning algorithm 508 can be reduced. For example, instead of manually labeling (e.g., by human annotation) a large number of videos (e.g., millions), the weak labeling and self-training described herein allow for manual labeling of a small number of videos (e.g., hundreds or thousands). Reducing the amount of labels can in turn reduce the resources (e.g., computing resources and / or manpower) required to train the machine learning model.

[0133] Figure 6A Examples of representative video frames selected using different selection methods according to some exemplary implementations are shown. Figure 6A In the example, a video comprising multiple video frames is provided as input to the machine learning model 538. In one or more embodiments, video frame 602 corresponds to the first video frame of the video. On the other hand, video frames 604, 606, 608, and 610 correspond to representative video frames (e.g., the video frame with the highest score) selected using methods 1, 2, 3, and 4, respectively.

[0134] Furthermore, each of images 602 to 610 depicts a Method 3 score 622 and a Method 4 score 624. For example, the Method 3 score 622 corresponds to an evaluation (e.g., a score) of the corresponding image as calculated by the machine learning model 538 with respect to Method 3. Note that this evaluation is used to determine the representative video frame selected by Method 3, namely video frame 608. The Method 4 score 624 corresponds to an evaluation (e.g., a score) of the corresponding image as calculated by the machine learning model 538 with respect to Method 4. This evaluation is used to determine the representative video frame selected by Method 4, namely video frame 610.

[0135] like Figure 6A As shown in the example, video frames 608 and 610 selected by method 3 and method 4, respectively, appear to represent the video. However, video frame 610 selected by method 4 centers the finger and points to the subject of the video (e.g., a depicted shopping item). On the other hand, images 602 to 606 may not be representative, for example, due to the position / visibility of the subject, blur (not shown), and / or other undesirable image quality / preference characteristics as described above.

[0136] Figure 6B Further examples of representative video frames selected using different selection methods according to some exemplary implementations are shown. Figure 6BIn the example, a video comprising multiple video frames is provided as input to the machine learning model 538. In one or more embodiments, video frame 612 corresponds to the first video frame of the video. On the other hand, images 614 to 620 respectively correspond to representative video frames selected using methods 1 to 4 (e.g., the video frame with the highest score).

[0137] Furthermore, each of images 612 to 620 depicts a Method 3 score 626 and a Method 4 score 628. For example, the Method 3 score 626 corresponds to an evaluation (e.g., a score) of the corresponding image as calculated by the machine learning model 538 with respect to Method 3. Note that this evaluation is used to determine the representative video frame selected by Method 3, namely video frame 618. The Method 4 score 628 corresponds to an evaluation (e.g., a score) of the corresponding image as calculated by the machine learning model 538 with respect to Method 4. This evaluation is used to determine the representative video frame selected by Method 4, namely video frame 620.

[0138] like Figure 6B As shown in the example, video frame 620 selected by method 4 appears to represent video. For example, method 4 demonstrates a preference for open eyes, minimal facial occlusion, and still images. On the other hand, images 612 to 616 may not be representative, for example, due to the position / visibility of the subject, blur (not shown), and / or other undesirable image quality / preference characteristics as described above.

[0139] Figure 7 This is a flowchart illustrating a process 700 of using machine learning to select representative video frames according to some example implementations. For illustrative purposes, this document primarily refers to... Figure 2 and Figure 5 The process 700 is described using a machine learning system 214. However, one or more blocks (or operations) of process 700 may be executed by one or more other components and / or other suitable devices. Further, for illustrative purposes, the blocks (or operations) of process 700 are described herein as occurring sequentially or linearly. However, multiple blocks (or operations) of process 700 may occur in parallel or simultaneously. Furthermore, the blocks (or operations) of process 700 need not be executed in the order shown, and / or one or more blocks (or operations) of process 700 need not be executed and / or may be replaced by other operations. Process 700 may terminate when its operations are complete. Additionally, process 700 may correspond to a method, program, algorithm, etc.

[0140] Machine learning system 214 receives a set of video frames corresponding to the video (block 702). Machine learning system 214 determines a first subset of video frames by removing those video frames that are outside an image quality threshold from the set of video frames (box 704).

[0141] Determining the first subset of video frames can include applying, for each video frame in the set of video frames, respective image quantifiers related to luminosity, sharpness, uniformity, and blurriness of the video frame, and removing from the set of video frames those video frames that are above or below a preset threshold with respect to each of the respective image quantifiers.

[0142] The machine learning system 214 determines a second subset of video frames by removing from the first subset of video frames those video frames that are outside of an image stillness threshold (block 706). Determining the second subset of video frames can include computing respective stillness values corresponding to pixel-wise frame differences between consecutive video frames in the first subset of video frames, and removing from the first subset of video frames a preset amount of video frames based on the respective stillness values.

[0143] The machine learning system 214 computes feature data (e.g., a feature vector) for each video frame in the second subset of video frames (block 708). The machine learning system 214 provides the feature data for each video frame in the second subset of video frames as input to a machine learning model (block 710). The machine learning model is configured to output a score for each video frame in the second subset of video frames based on the feature data for the video frame, wherein the machine learning model has been trained with a first set of images labeled based on image aesthetics and has been further trained with a second set of images labeled based on image quality, the first and second sets of images being associated with different domains.

[0144] The domain associated with the first set of images can correspond to an aesthetic visual analysis (AVA) database. The video can be stored in association with a messaging application, and the domain associated with the second set of images can correspond to the messaging application, the second set of images corresponding to additional videos stored in association with the messaging application. The second set of images can correspond to randomly selected video frames in the additional videos stored in association with the messaging application.

[0145] The training of the machine learning model can include performing a first phase of training the machine learning model based on the first set of images, providing the second set of images as input to the machine learning model trained in the first phase of training in order to label the second set of images, generating a third set of images by degrading image quality of the second set of images, and performing a second phase of training the machine learning model based on the labeled second set of images and the third set of images. The degrading of the image quality of the second set of images is based on at least one of: down-sampling of the second set of images, adjusting exposure, or Gaussian blur.

[0146] The training of the machine learning model can further include: performing a third stage of training the machine learning model based on a labeled subset of images included within other videos associated with the messaging application, providing an unlabeled subset of images included within the other videos to the trained machine learning model that has been trained through the third stage in order to pseudo-label the unlabeled subset of video frames, and performing a fourth stage of training the machine learning model based on the labeled subset of images and the pseudo-labeled subset of images. The labeled subset of images can have been labeled based on a preference for at least one of: a subject of the image being centered, the subject being larger, the subject being in the foreground, or the subject having a predefined expression or characteristic.

[0147] The machine learning system 214 selects a video frame from the second subset of video frames to represent the set of video frames based on scores output by the machine learning model (block 710). The selected video frame can correspond to a thumbnail image that represents the set of video frames. Alternatively or additionally, the selected video frame can be used for at least one of: visual labeling of the video, labeling of a highlighted portion of the video, ranking of the video relative to other videos for video editing, content management of the video within a map interface, or generating an animated thumbnail based on other video frames selected to present the set of video frames.

[0148] Figure 8 is a schematic diagram illustrating an access restriction process 800 according to which access to content (e.g., ephemeral messages 802 and associated multimedia payloads of data) or sets of content (e.g., groups of ephemeral messages 804) can be time-limited (e.g., such that it is ephemeral).

[0149] The ephemeral message 802 is shown as being associated with a message duration parameter 806, the value of which determines an amount of time that the messaging client 104 will display the ephemeral message 802 to a receiving user of the ephemeral message 802. In one example, depending on the amount of time specified by the sending user using the message duration parameter 806, the receiving user can view the ephemeral message 802 for up to 10 seconds.

[0150] The message duration parameter 806 and the message recipient identifier 424 are shown as inputs to a message timer 810, which is responsible for determining an amount of time to show the ephemeral message 802 to a particular receiving user identified by the message recipient identifier 424. In particular, the ephemeral message 802 is shown to the relevant receiving user for only a time period determined by the value of the message duration parameter 806. The message timer 810 is shown as providing output to a more generalized ephemeral timer system 202, which is responsible for overall timing of the display of content (e.g., the ephemeral message 802) to receiving users.

[0151] ephemeral messages 802 are shown as being included within an ephemeral message group 804 (e.g., a collection of messages in a personal story or an event story). The ephemeral message group 804 has an associated group duration parameter 808, the value of which determines the duration for which the ephemeral message group 804 is presented and accessible to users of the messaging system 100. For example, the group duration parameter 808 can be the duration of a concert, where the ephemeral message group 804 is a collection of content about that concert. Alternatively, the value of the group duration parameter 808 can be specified by a user (the owning user or a curator user) when the setup and creation of the ephemeral message group 804 is performed. Figure 8

[0152] Additionally, each ephemeral message 802 within the ephemeral message group 804 has an associated group engagement parameter 812, the value of which determines the duration for which the ephemeral message 802 is accessible within the context of the ephemeral message group 804. Thus, a particular ephemeral message group 804 can“expire” and become inaccessible in the context of the ephemeral message group 804 before the ephemeral message group 804 itself expires according to the group duration parameter 808. The group duration parameter 808, the group engagement parameter 812, and the message recipient identifier 424 each provide input to a group timer 814, which is operable to first determine whether a particular ephemeral message 802 in the ephemeral message group 804 is to be displayed to a particular receiving user, and if so, for how long. Note that the ephemeral message group 804 is also aware of the identity of the particular receiving user due to the message recipient identifier 424.

[0153] Thus, the group timer 814 is operable to control the overall lifetime of the associated ephemeral message group 804, as well as the individual ephemeral messages 802 included in the ephemeral message group 804. In one example, each ephemeral message 802 within the ephemeral message group 804 remains viewable and accessible for the time period specified by the group duration parameter 808. In another example, a certain ephemeral message 802 can expire within the context of the ephemeral message group 804 based on the group engagement parameter 812. Note that the message duration parameter 806 can still determine the duration for which a particular ephemeral message 802 is displayed to a receiving user, even within the context of the ephemeral message group 804. Thus, the message duration parameter 806 determines the duration for which a particular ephemeral message 802 is displayed to a receiving user, regardless of whether the receiving user is viewing that ephemeral message 802 within the context of the ephemeral message group 804 or not.

[0154] ​The ephemeral timer system 202 can also operatively remove a particular ephemeral message 802 from the ephemeral message group 804 based on determining that the associated group participation parameter 812 has been exceeded. For example, where the sending user has established a group participation parameter 812 of 24 hours from publication, the ephemeral timer system 202 will remove the relevant ephemeral message 802 from the ephemeral message group 804 after the specified 24 hours. The ephemeral timer system 202 also operates to remove the ephemeral message group 804 when the group participation parameter 812 for each ephemeral message 802 within the ephemeral message group 804 has expired, or when the ephemeral message group 804 itself has expired according to the group duration parameter 808.

[0155] In certain use cases, the creator of a particular ephemeral message group 804 can specify a group duration parameter 808 that is unlimited. In this case, the expiration of the group participation parameter 812 for the last remaining ephemeral message 802 within the ephemeral message group 804 will determine when the ephemeral message group 804 itself expires. In this case, the addition of a new ephemeral message 802 to the ephemeral message group 804 with a new group participation parameter 812 effectively extends the life of the ephemeral message group 804 to equal the value of the group participation parameter 812.

[0156] In response to the ephemeral timer system 202 determining that an ephemeral message group 804 has expired (e.g., is no longer accessible), the ephemeral timer system 202 communicates with the messaging system 100 (and, for example, specifically the messaging client 104) to cause the indicia (e.g., icon) associated with the relevant ephemeral message group 804 to no longer be displayed within the user interface of the messaging client 104. Similarly, when the ephemeral timer system 202 determines that the message duration parameter 806 for a particular ephemeral message 802 has expired, the ephemeral timer system 202 causes the messaging client 104 to no longer display the indicia (e.g., icon or textual identification) associated with the ephemeral message 802.

[0157] Figure 9is a graphical representation of a machine 900 within which instructions 910 (e.g., software, a program, an application, an applet, an app, or other executable code) for causing the machine 900 to perform any one or more of the methodologies discussed herein can perform. The instructions 910 transform the general, non-programmed machine 900 into a particular machine 900 programmed to carry out the described and illustrated functions in the manner described. The machine 900 can operate as a standalone device or can be coupled (e.g., networked) to other machines. In a networked deployment, the machine 900 can operate in the capacity of a server machine or a client machine in server-client network environments, or it can act as a peer machine in peer-to-peer (or distributed) network environments. The machine 900 can comprise, but not be limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a laptop computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular telephone, 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 executing the instructions 910, sequentially or otherwise, that specify actions to be taken by machine 900. Further, while only a single machine 900 is illustrated, the term “machine” shall also be taken to include a collection of machines 900 that individually or jointly execute the instructions 910 to perform any one or more of the methodologies discussed herein. For example, the machine 900 can include the client device 102 or any of the multiple server devices forming part of the messaging server system 108. In some examples, the machine 900 can further include both a client system and a server system, where certain operations of a particular method or algorithm are performed in the server-side and certain operations of the particular method or algorithm are performed in the client-side.

[0158] The machine 900 can include processors 904, memory 906, and input / output (I / O) components 902, which can be configured to communicate with each other via a bus 940. In an example, the processor(s) 904 (e.g., a central processing unit (CPU), a reduced instruction set computer (RISC) processor, a complex instruction set computer (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) can include, for example, a processor 908 and a processor 912 that execute the instructions 910. The term “processor” is intended to include a multi-core processor that can include two or more independent processors (sometimes referred to as “cores”) that can execute instructions contemporaneously. Although FIG. 9 shows the processor(s) 904 that include the processor 908 and the processor 912, the processor(s) 904 can include more than two processors, and the two processors 908, 912 can be replaced with a single processor.Figure 9 Multiple processors 904 are shown, but the machine 900 can include a single processor with single cores, 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.

[0159] The storage 906 includes a main memory 914, a static memory 916, and a storage unit 918 each of which can be accessed via the bus 940 by the processors 904. The main memory 914, static memory 916, and storage unit 918 store the instructions 910 implementing any one or more of the methodologies or functions described herein. The instructions 910 can also reside, completely or any portion of them, within the main memory 914, within the static memory 916, within the storage unit 918, within at least one of the processors 904 (e.g., within the processor’s cache memory), or any suitable combination thereof, during execution thereof by the machine 900.

[0160] The I / O components 902 can include a wide variety of components to receive input, provide output, produce output, transmit information, exchange information, capture measurements, and so on. The specific I / O components 902 that are included in the machine will depend on the type of machine. For example, portable machines such as mobile phones will likely include a touch input device or other such input mechanisms, while a headless server machine will likely not include such a touch input device. It will be appreciated that the I / O components 902 can include many other components that are not shown in FIG. 9. In various examples, the I / O components 902 can include user output components 926 and user input components 928. The user output components 926 can include visual components (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)), acoustic components (e.g., speakers), haptic components (e.g., a vibratory motor, resistance mechanisms), other signal generators, and so forth. The user input components 928 can include alphanumeric input components (e.g., a keyboard, a touch screen configured to receive alphanumeric input, a photo-optical keyboard, or other alphanumeric input components), point-based input components (e.g., a mouse, a touchpad, a trackball, a joystick, a motion sensor, or another pointing instrument), tactile input components (e.g., a physical button, a touch screen that provides location and force of touches or touch gestures, or other tactile input components), audio input components (e.g., a microphone), and the like. Figure 9

[0161] ​In further examples, I / O components 902 can include biometric components 930, motion components 932, environmental components 934, or position components 936, among a variety of other components. Biometric components 930 include, for example, components to detect expressions (e.g., hand expressions, facial expressions, vocal expressions, body gestures, or eye tracking), measure biosignals (e.g., blood pressure, heart rate, body temperature, perspiration, or brain waves), identify a person (e.g., voice identification, retinal identification, facial identification, fingerprint identification, or electroencephalogram-based identification), and the like. Motion components 932 include acceleration sensor components (e.g., accelerometer), gravitation sensor components, rotation sensor components (e.g., gyroscope).

[0162] Environmental components 934 include, for example, one or more cameras (with still and / or video capabilities), illumination sensor components (e.g., photometer), temperature sensor components (e.g., one or more thermometers that detect ambient temperature), humidity sensor components, pressure sensor components (e.g., barometer), 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 to detect concentrations of hazardous gases for safety or to measure pollutants in the atmosphere), or other components that can provide an indication, measurement, or signal corresponding to a physical environment.

[0163] With respect to cameras, client device 102 can have a camera system that includes, 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 be used, for example, to capture still and video images of a user of client device 102 (e.g., a “selfie”), which can then be enhanced with the above-described enhancement data (e.g., filters). The rear-facing camera can be used, for example, to capture still and video images in a more traditional camera mode, which are similarly enhanced using the enhancement data. In addition to front- and rear-facing cameras, client device 102 can include a 360° camera for capturing 360° photos and videos.

[0164] Further, the camera system of client device 102 can include dual rear-facing cameras (e.g., a primary camera and a depth-sensing camera), or even triple, quad, or penta rear-facing camera configurations on the front and rear sides of client device 102. These multi-camera systems can include, for example, a wide-angle camera, an ultra-wide-angle camera, a telephoto camera, a macro camera, and a depth sensor.

[0165] The position component 936 includes location sensor components (e.g., GPS receiver components), altitude sensor components (e.g., altimeters or barometers that detect atmospheric pressure from which altitude can be derived), orientation sensor components (e.g., magnetometers), and the like.

[0166] Communication can be implemented using a wide variety of technologies. The I / O component 902 also includes a communication component 938 operable to couple the machine 900, via the respective coupling or connection, to a network 922 or devices 924. For example, the communication component 938 can include a network interface component or another suitable device to interface with the network 922. In further examples, the communication component 938 can include wired Components (e.g., Low Energy), Components, and other communication components to provide communication via other modalities. The devices 924 can be other machines or any of a wide variety of peripheral devices (e.g., a peripheral device coupled via a USB).

[0167] Moreover, the communication component 938 can detect identifiers or include components operable to detect identifiers. For example, the communication component 938 can include radio frequency identification (RFID) tag reader components, NFC smart tag detection components, optical reader components (e.g., an optical sensor to detect 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, Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2D bar codes, and other optical codes), or acoustic detection components (e.g., microphones to identify acoustic signals indicative of particular identifiers associated with a device).

[0168] Various memories (e.g., the main memory 914, the static memory 916, and the memory of the processor 904) and the storage unit 918 can store one or more sets of instructions and data structures (e.g., software) embodying or used by any one or more of the methodologies or functions described herein. These instructions (e.g., instructions 910), when executed by the processor 904, cause various operations to implement the disclosed examples.

[0169] The instructions 910 can be transmitted or received using a transmission medium via a network 922 (for example, a communication network) such as the Internet, Wireless Application Protocol (WAP) network, and / or the like using any one of several known transfer protocols (for example, hypertext transfer protocol (HTTP)). Similarly, the instructions 910 can be transmitted or received using a transmission medium via the coupling (for example, a peer-to-peer coupling) to the devices 924.

[0170] Figure 10 is a block diagram 1000 illustrating a software architecture 1004, which can be installed on any one or more of the devices described herein. The software architecture 1004 is supported by hardware such as machine 1002 that includes processors 1020, memory 1026, and I / O components 1038. In this example, the software architecture 1004 can be conceptualized as a stack of layers, where each layer provides particular functionality. The software architecture 1004 includes layers such as an operating system 1012, libraries 1010, frameworks 1008, and applications 1006. Operationally, the applications 1006 invoke API calls 1050 through the software stack and receive messages 1052 in response to the API calls 1050.

[0171] The operating system 1012 manages hardware resources and provides common services. The operating system 1012 includes, for example, a kernel 1014, services 1016, and drivers 1022. The kernel 1014 acts as an abstraction layer between the hardware and the other software layers. For example, the kernel 1014 provides memory management, processor management (for example, scheduling), component management, networking, and security settings, among other functionality. The services 1016 can provide other common services that the applications 1006 and other software layers use. The drivers 1022 are responsible for controlling or interfacing with the underlying hardware, according to the capabilities of the hardware. For instance, the drivers 1022 include input drivers 1024 for dealing with input or Low-power drivers, flash memory drivers, serial communication drivers (for example, USB drivers), audio drivers, power management drivers, and the like.

[0172] ​The libraries 1010 provide a common low-level infrastructure used by the applications 1006. The libraries 1010 can include system libraries 1018 (e.g., C standard library) providing functions such as memory allocation functions, string manipulation functions, mathematic functions, and the like. In addition, the libraries 1010 can include API libraries 1024, such as media libraries (e.g., libraries to support 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-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), graphics libraries (e.g., an OpenGL framework used to render two and three dimensional graphics on a display), database libraries (e.g., SQLite to provide various relational database functions), web libraries (e.g., WebKit to provide web browsing functionality), and the like. The libraries 1010 also include a wide variety of other libraries 1028 to provide many other APIs to the applications 1006.

[0173] The frameworks 1008 provide a common high-level infrastructure used by the applications 1006. For example, the frameworks 1008 provide various graphical user interface (GUI) functions, high-level resource management, and high-level location services. The frameworks 1008 can provide a broad spectrum of other APIs that can be used by the applications 1006, some of which are specific to a particular operating system or platform.

[0174] In an example, the applications 1006 include a home application 1036, a contacts application 1030, a browser application 1032, a book reader application 1034, a location application 1042, a media application 1044, a messaging application 1046, a game application 1048, and a broad assortment of other applications such as a third-party application 1040. The applications 1006 are programs that execute functions defined in the programs. Programs can be written in various programming languages such as an object-oriented programming language such as Objective-C, Java, or C++, or a procedural programming language such as C or assembly language. In a specific example, the third-party application 1040 (e.g., an application developed by an entity other than the vendor of the particular platform) can be an Android TM or IOS TM application that is developed using an Android TM or IOS TM software development kit (SDK) provided by the vendor of the particular platform. Mobile software running on the mobile operating system of the Phone or another mobile operating system. In this example, the third-party application 1040 can activate API calls 1050 provided by the operating system 1012 to facilitate the functionality described herein.

[0175] Glossary

[0176] "Carrier signal" means any intangible medium that is capable of storing, encoding, or carrying the instructions for execution by a machine and includes digital or analog communications signals or other intangible media to facilitate communication of such instructions. Instructions can be transmitted or received by one or more network interface devices via the network.

[0177] "Client device" means any machine that interfaces to a communications network to access resources from a server or other client device. A client device can be, without limitation, a mobile telephone, desktop computer, laptop computer, portable digital assistants (PDAs), smart phones, tablets, ultrabooks, netbooks, laptops, multi-processor systems, microprocessor-based or programmable consumer electronics, game consoles, set-top boxes, or any other communication device that a user can use to access a network.

[0178] "Communication network" means one or more portions of a network that can be an ad hoc network, intranet, extranet, virtual private network (VPN), local area network (LAN), wireless LAN (WLAN), wide area network (WAN), wireless WAN (WWAN), metropolitan area network (MAN), the Internet, a portion of the Internet, a portion of the Public Switched Telephone Network (PSTN), a plain old telephone service (POTS) network, a cellular telephone network, a wireless network, a Wi-Fi® network, another type of network, or a combination of two or more such networks. For example, a network or a portion of a network can include a wireless or cellular network, and a coupling can be a Code Division Multiple Access (CDMA) connection, a Global System for Mobile communications, or other type of cellular or wireless coupling. In this example, the coupling can enable any of a variety of types of data transfer technology, such as Single Carrier Radio Transmission Technology (lxRTT), Evolution-Data Optimized (EVDO) technology, General Packet Radio Service (GPRS) technology, Enhanced Data rates for GSM Evolution (EDGE) technology, third Generation Partnership Project (3GPP) including 3G, fourth generation wireless (4G) networks, Universal Mobile

[0179] A“component” refers to a device, physical entity or logic having boundaries defined by function or subroutine calls, branches points, APIs, or other technologies that provide the boundaries of a module, or a measure of functionality, that can be used by other components. Components can interface with other components to carry out machine processing. Components can be hardware- or software-based, and can be executable, tangible, or a combination of both. A“hardware component” is tangibly embodied as, for example, a special-purpose machine, or as a portion of a special-purpose machine, that is specifically programmed, configured, or constructed for a particular purpose, and is operable to perform that purpose. A hardware component can be a special-purpose processor, such as a field-programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). A hardware component can also be a programmable logic or circuit that is temporarily configured by software to perform a certain operation. A hardware component can be implemented mechanically, electronically, or any suitable combination thereof. For example, a hardware component can include dedicated circuitry or logic that is permanently configured to perform certain operations. A hardware component can also include programmable logic or circuitry that is temporarily configured by software to perform certain operations. As an example, a hardware component can include software executed by a general-purpose processor or other programmable processor, such as a computer-based system where the software is stored in memory. Once the software is executed, it is no longer a software component and the machine or system is said to be configured or adapted, hardwareized, to perform certain operations.Where multiple hardware components are present, communication can be achieved through signal transmission among or between two or more of the hardware components (e.g., through appropriate circuits and buses). In examples where multiple hardware components are configured or instantiated at different times, communication between such hardware components can for example be achieved through storage of information in memory structures to which the multiple hardware components have access, and retrieval of that information. For example, one hardware component can perform an operation and store output of that operation in a memory device to which it is communicatively coupled. A further hardware component can then, at a later time, access the memory device to retrieve and process the stored output. Hardware components can also initiate communications with input or output devices, and can operate on a resource (e.g., a collection of information). The various operations of example methods described herein can be performed, at least partially, by one or more processors that are temporarily configured (e.g., by software) or permanently configured to perform the relevant operations. Whether temporarily or permanently configured, such processors can constitute processor-implemented components that operate to perform one or more operations or functions described herein. As used herein, “processor- implemented component” refers to a hardware component implemented using one or more processors. Similarly, the methods described herein can be at least partially processor-implemented, with a particular processor or processors being an example of hardware. For example, at least some of the operations of a method can be performed by one or more processors 1004 or processor-implemented components. Moreover, a processor or processors can additionally operate to support performance of the relevant operations in a “cloud computing” environment or as a “software as a service” (SaaS). For example, at least some of the operations can be performed by a group of computers (as examples of machines including processors), with these operations being accessible via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., an API). The performance of certain of the operations can be distributed among the processors, not only residing within a single machine, but deployed across a number of machines. In some examples, the processors or processor-implemented components can be located in a single geographic location (e.g., within a home environment, an office environment, or a server farm). In other examples, the processors or processor-implemented components can be distributed across a number of geographic locations.

[0180] “Computer-readable storage medium” refers to both machine-storage media and transmission media. Thus, the terms “machine-readable medium,” “computer-readable medium,” and “device-readable medium” mean the same thing and can be used interchangeably in this disclosure.

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

[0182] "Machine-storage medium" 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 construed to cover solid-state memories, as well as optical and magnetic media, including memory internal or external to processors. Specific examples of machine-storage media, computer-storage media, and device-storage media include non-volatile memory, including by way of example semiconductor memory devices, for example, 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 medium," "device-storage medium," "computer-storage medium," and "device-storage medium" mean the same thing and are used interchangeably in this disclosure. The terms "machine-storage medium," "computer-storage medium," and "device-storage medium" explicitly exclude carrier waves, modulated data signals, and other such media, at least some of which are covered under the term "signal medium."

[0183] "Non-transitory computer-readable storage medium" refers to a tangible medium that is capable of storing, encoding, or carrying the instructions for execution by a machine.

[0184] "Signal medium" refers to any intangible medium that is capable of storing, encoding, or carrying the instructions for execution by a machine, and includes digital or analog communications signals or other intangible media to facilitate communication of software or data. The term "signal medium" shall be taken to include any form of a modulated data signal, carrier wave, and so on. The term "modulated data signal" means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. The terms "transmission medium" and "signal medium" mean the same thing and can be used interchangeably in this disclosure.

Claims

1. A method for selecting representative video frames, comprising: Receive the set of video frames corresponding to the video; The first subset of video frames is determined by removing those video frames that are outside the image quality threshold from the set of video frames; The second subset of video frames is determined by removing those video frames that are outside the image stillness threshold from the first subset of the video frames; Calculate the feature data of each video frame in the second subset of the video frames; For each video frame in the second subset of the video frames, the feature data of the video frame is provided as input to the machine learning model. The machine learning model is configured to output a score for each video frame in a second subset of the video frames based on feature data of the video frames, wherein the machine learning model has been trained with a first set of images labeled based on image aesthetics, and has been further trained with a second set of images labeled based on image quality, the first set of images and the second set of images being associated with different domains; The domain associated with the first image set corresponds to the Aesthetic Visual Analysis (AVA) database. The video is stored in association with a messaging application, and Wherein, the domain associated with the second image set corresponds to the messaging application, the second image set corresponds to additional video stored in association with the messaging application, and Based on the score output by the machine learning model, video frames are selected from a second subset of the video frames to represent the set of video frames, serving as the representative video frames.

2. The method according to claim 1, wherein, Determining the first subset of the video frames includes: For each video frame in the set of video frames, apply a corresponding image quantizer related to the brightness, sharpness, uniformity, and blur of the video frame; and Remove those video frames from the set of video frames that are above or below a preset threshold relative to each of the corresponding image quantizers.

3. The method according to claim 1, wherein, Determining the second subset of the video frames includes: Calculate the corresponding still value corresponding to the pixel-by-pixel frame difference between consecutive video frames in the first subset of the video frames; and Based on the corresponding still value, a preset number of video frames are removed from the first subset of the video frames.

4. The method according to claim 1, wherein, The second set of images corresponds to randomly selected video frames from the additional video stored in association with the messaging application.

5. The method according to claim 1, wherein, The training of the machine learning model includes: Perform the first phase of training the machine learning model based on the first image set; The second set of images is provided as input to the machine learning model trained in the first phase of training in order to label the second set of images; A third image set is generated by reducing the image quality of the second image set; and The second phase involves training the machine learning model based on the labeled second and third image sets.

6. The method according to claim 5, wherein, The image quality of the second image set is reduced based on at least one of the following: downsampling of the second image set, exposure adjustment, or Gaussian blur.

7. The method according to claim 5, wherein, The training of the machine learning model also includes: The third phase involves training the machine learning model based on a labeled subset of images included in other videos stored in association with the messaging application. Provide the machine learning model, which has already been trained through the third phase of training, with an unlabeled subset of images included in the other videos, so as to pseudo-label the unlabeled subset of video frames; and The fourth stage involves training the machine learning model based on a labeled subset of the images and a pseudo-labeled subset of the images.

8. The method according to claim 7, wherein, The labeled subset of the images has been labeled based on a preference for at least one of the following: the subject of the image is centered, the subject is large, the subject is in the foreground, or the subject has a predefined expression or feature.

9. The method according to claim 1, wherein, The selected video frame corresponds to a thumbnail image representing the set of video frames.

10. The method according to claim 1, wherein, The selected video frames are used for at least one of the following: visual labeling of the video, marking the highlighted portion of the video, sorting the video relative to other videos for video editing, content management of the video within a map interface, or generating animated thumbnails based on other video frames selected to present the set of video frames.

11. A system for selecting representative video frames, comprising: processor; and A memory storing instructions that, when executed by the processor, configure the processor to perform operations including: Receive the set of video frames corresponding to the video; The first subset of video frames is determined by removing those video frames that are outside the image quality threshold from the set of video frames; The second subset of video frames is determined by removing those video frames that are outside the image stillness threshold from the first subset of the video frames; Calculate the feature data of each video frame in the second subset of the video frames; For each video frame in the second subset of the video frames, the feature data of the video frame is provided as input to the machine learning model. The machine learning model is configured to output a score for each video frame in a second subset of the video frames based on feature data of the video frames, wherein the machine learning model has been trained with a first set of images labeled based on image aesthetics, and has been further trained with a second set of images labeled based on image quality, the first set of images and the second set of images being associated with different domains; The domain associated with the first image set corresponds to the Aesthetic Visual Analysis (AVA) database. The video is stored in association with a messaging application, and Wherein, the domain associated with the second image set corresponds to the messaging application, the second image set corresponds to additional video stored in association with the messaging application, and Based on the score output by the machine learning model, video frames are selected from a second subset of the video frames to represent the set of video frames, serving as the representative video frames.

12. The system according to claim 11, wherein, Determining the first subset of the video frames includes: For each video frame in the set of video frames, apply a corresponding image quantizer related to the brightness, sharpness, uniformity, and blur of the video frame; and Remove those video frames from the set of video frames that are above or below a preset threshold relative to each of the corresponding image quantizers.

13. The system according to claim 11, wherein, Determining the second subset of the video frames includes: Calculate the corresponding still value corresponding to the pixel-by-pixel frame difference between consecutive video frames in the first subset of the video frames; and Based on the corresponding still value, a preset number of video frames are removed from the first subset of the video frames.

14. The system according to claim 11, wherein, The second set of images corresponds to randomly selected video frames from the additional video stored in association with the messaging application.

15. The system according to claim 11, wherein, The training of the machine learning model includes: Perform the first phase of training the machine learning model based on the first image set; The second set of images is provided as input to the machine learning model trained in the first phase of training in order to label the second set of images; A third image set is generated by reducing the image quality of the second image set; and The second phase involves training the machine learning model based on the labeled second and third image sets.

16. The system according to claim 15, wherein, The image quality of the second image set is reduced based on at least one of the following: downsampling of the second image set, exposure adjustment, or Gaussian blur.

17. The system according to claim 15, wherein, The training of the machine learning model also includes: The third phase involves training the machine learning model based on a labeled subset of images included in other videos stored in association with the messaging application. Provide the machine learning model, which has already been trained through the third phase of training, with an unlabeled subset of images included in the other videos, so as to pseudo-label the unlabeled subset of video frames; and The fourth stage involves training the machine learning model based on a labeled subset of the images and a pseudo-labeled subset of the images.

18. A non-transitory computer-readable storage medium, the computer-readable storage medium comprising instructions that, when executed by a computer, cause the computer to perform an operation, the operation comprising: Receive the set of video frames corresponding to the video; The first subset of video frames is determined by removing those video frames that are outside the image quality threshold from the set of video frames; The second subset of video frames is determined by removing those video frames that are outside the image stillness threshold from the first subset of the video frames; Calculate the feature data of each video frame in the second subset of the video frames; For each video frame in the second subset of the video frames, the feature data of the video frame is provided as input to the machine learning model. The machine learning model is configured to output a score for each video frame in a second subset of the video frames based on feature data of the video frames, wherein the machine learning model has been trained with a first set of images labeled based on image aesthetics, and has been further trained with a second set of images labeled based on image quality, the first set of images and the second set of images being associated with different domains; The domain associated with the first image set corresponds to the Aesthetic Visual Analysis (AVA) database. The video is stored in association with a messaging application, and Wherein, the domain associated with the second image set corresponds to the messaging application, the second image set corresponds to additional video stored in association with the messaging application, and Based on the score output by the machine learning model, video frames are selected from a second subset of the video frames to represent the set of video frames as representative video frames.