Machine learning model data set generating apparatus and method thereof

The non-uniform frame skipping method improves the effectiveness of IL agents by capturing key events with high accuracy over a longer time period, addressing memory and vanishing gradient issues in traditional methods.

JP2024125264APending Publication Date: 2024-09-18SONY INTERACTIVE ENTERTAINMENT LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024013885
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-08
Filing Date
2024-02-01
Publication Date
2024-09-18

AI Technical Summary

Technical Problem

The effectiveness of imitation learning (IL) agents is dependent on the period covered by the training dataset, but simply increasing the amount of data leads to excessive memory usage and the vanishing gradient problem, compromising performance.

Method used

A novel non-uniform frame skipping method is employed to select a subset of image frames for the training dataset, where the number of skipped frames increases with each selection, ensuring key events are captured with high accuracy while covering a longer time period.

Benefits of technology

This approach generates training datasets that effectively cover contexts and corresponding actions/policies over a longer period with higher accuracy, enhancing the IL agent's ability to respond appropriately to various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024125264000001
    Figure 2024125264000001
Patent Text Reader

Abstract

SOLUTION: An apparatus for generating data for use in training a machine learning model includes: a reception unit for receiving video data formed of continuous image frames; a storage unit for storing the plurality of continuous image frames; and a selection unit for selecting a subset of the stored image frame regarding a target image frame. The subset provides context data relating to the target image frame to the machine learning model. The selection unit continuously generates sampling values. A difference between the continuously generated sampling values is increased as each of the continuously generated sampling value is increased. The selection unit selects respective image frames from the stored image frames with respect to each of the continuously generated sampling values. A frame number of each of the image frames is matched with the latest value of the continuously generated sampling value.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an apparatus and method for generating a dataset for training a machine learning model. [Background technology]

[0002] The "Background" discussion provided herein is intended to generally set forth the context of the present disclosure.

[0003] Imitation Learning (IL) is similar to Reinforcement Learning in that it seeks to train a machine learning agent to select the most appropriate actions and / or policies given the current state of an environment (which may be real or virtual). However, unlike Reinforcement Learning, IL does not use a reward function to motivate the agent's choice of action / policy. Rather, IL provides the agent with a training dataset consisting of not only the environmental state, but also the most appropriate (or at least desirable) actions / policies to take in response to those environmental states. These actions / policies are then executed by elements (characters / avatars in movies, video games, etc.) located within the environment.

[0004] When this training dataset is provided to the IL agent, it learns to mimic the actions / policies executed by the elements and also learns the context (environmental state) in which the actions / policies were executed. Then, in subsequent usages of the trained IL agent, if a similar context occurs, the agent can execute the actions / policies it learned to mimic, thereby responding to the context in the most appropriate / desirable way.

[0005] The effectiveness of IL (i.e., its ability to respond to a context in the most appropriate / desirable way) depends on the period covered by the training data. As a non-limiting example, an IL agent, specifically for a video game, may be trained to dodge melee attacks. If the IL agent is trained using video footage that only depicts an enemy melee attack and the corresponding avatar dodge, the IL agent may be less effective at dodging in subsequent gameplay than if the IL agent was trained using video footage that depicts the enemy running towards the avatar, the enemy pulling back its fist to perform a melee attack, and the avatar then dodging the melee attack. This is because the former training dataset, unlike the latter, does not provide pre-attack cues that the IL agent can rely on to time its dodge. Thus, when trained using the former training dataset, the IL agent may mistime its dodge (e.g., the IL agent may wait for the enemy's fist to start moving towards it before starting its dodge animation), failing to dodge the incoming enemy blow. Summary of the Invention [Problem to be solved by the invention]

[0006] The effectiveness of an IL agent depends on the time period covered by the training dataset. However, simply increasing the amount of data in the training dataset to cover a longer period (e.g., simply increasing the number of video frames) is undesirable because it leads to excessive memory usage by the IL agent. This excessive memory usage can affect the performance of the computing system running the IL agent.

[0007] Moreover, a significant increase in the amount of data in a training dataset does not necessarily correlate with a significant increase in the time period covered by the training dataset. For example, an increase in the frame rate of a video game increases the number of video frames that fit within a given time period, and therefore the amount of video data that comprises a given time period. As a side note, this increase in frame rate may even cause insufficient training of IL agents due to the well-known vanishing gradient problem.

[0008] The present invention seeks to alleviate or mitigate this problem. [Means for solving the problem]

[0009] In a first aspect, in claim 1, there is provided an apparatus for generating a dataset for training a machine learning model.

[0010] In another aspect, there is provided in claim 13 a method for generating a dataset for training a machine learning model.

[0011] Further and respective aspects and features of the present invention are defined in the accompanying claims. [Brief description of the drawings]

[0012] Hereinafter, an embodiment of the present invention will be described by way of example with reference to the accompanying drawings. [Figure 1] 1 is a schematic diagram illustrating an entertainment device operable as an apparatus according to embodiments of the present disclosure; [Diagram 2] FIG. 1 is a schematic diagram of an apparatus according to an embodiment of the present disclosure. [Diagram 3] 3A-3C are schematic diagrams illustrating how image frames are selected for a training data set according to embodiments herein. [Figure 4] 4A-4E are schematic diagrams illustrating a comparison of image frame selection methods known in the art with image frame selection according to embodiments herein. [Diagram 5] FIG. 2 is a schematic diagram illustrating a method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] An apparatus and method for generating a dataset for training a machine learning model are disclosed. In the following description, numerous specific details are set forth to provide a thorough understanding of embodiments of the present invention. However, these specific details are not required to practice the present invention. Conversely, certain details known to those skilled in the art are omitted, where appropriate, for the sake of clarity.

[0014] In an exemplary embodiment of the present invention, an entertainment system is a non-limiting example of such a device.

[0015] Referring to FIG. 1, one example of an entertainment device 10 is a computer or console, such as the Sony PlayStation 5® (PS5®).

[0016] The entertainment device 10 comprises a CPU 20. This may be a single-core or multi-core processor, for example consisting of eight cores, as in the PS5. The entertainment device also comprises a graphical processing unit (GPU) 30. The GPU may be physically separate from the CPU, or may be integrated with the CPU as a system on chip (SoC), as in the PS5.

[0017] The entertainment device also includes RAM 40, which may be separate for each CPU and GPU, or may include a shared RAM, as in the PS5, and may be physically separate or integrated as part of the SoC, as in the PS5. Further storage is provided by disk 50, either as an external or internal hard drive, an external solid state drive, or an internal solid state drive, as in the PS5.

[0018] The entertainment device may transmit and receive data via one or more data ports 60, as appropriate, such as a USB port, an Ethernet port, a WiFi port, a Bluetooth port, etc., and may also optionally receive data via an optical drive 70.

[0019] Interaction with the system is typically performed using one or more handheld controllers 80, such as the DualSense® controller in the case of the PS5.

[0020] Audio / visual output from the entertainment equipment is typically provided via one or more A / V ports 90 or one or more of wired or wireless data ports 60 .

[0021] If the components are not integrated, they are connected via dedicated data links or buses 100 as appropriate.

[0022] An example of a device that displays images output by an entertainment device is a head mounted display "HMD" 802 worn by a user 800.

[0023] As mentioned earlier, the effectiveness of imitation learning (IL) depends on the time period covered by the training data, but simply increasing the amount of data in the training dataset to cover a longer time period is undesirable due to the resulting excessive memory usage and vanishing gradients.

[0024] Traditionally, frame skipping has been used to provide training data sets covering longer periods of time. Frame skipping is a known technique for selecting a subset of image frames from a group of consecutive image frames (e.g. video footage), where the image frames in the subset are typically separated from each other by a set number of consecutive video frames. For example, for a group of consecutive image frames, a subset may be created consisting of the first, third, fifth etc. (or second, fourth, sixth etc.) image frames of the group. That is, a subset may be created using every other frame of the group. Of course, this frame skipping could be implemented by creating a subset for every third, fourth, fifth etc. image frame of the group. Thus, more generally, traditionally, a linear relationship between the frame numbers of the image frames of the video footage (v) and the frame numbers of the image frames of the subset (s), i.e. v=As Frame skipping has been implemented by utilizing A, where A is a coefficient. The created subset can form at least a part of the training dataset for the IL agent.

[0025] This technique allows us to double, triple, quadruple, ... the time period between adjacent image frames in the subset, thus allowing more time periods to be covered in the resulting training dataset.

[0026] However, this technique requires that the distance between adjacent image frames in the subset (i.e., the number of consecutive image frames and / or the time period) is uniform, that all image frames in the subset are separated from adjacent image frames by A consecutive image frames of the video footage, and that there is a linear relationship between the number of image frames of the video footage and the number of image frames in the subset, i.e., v=As This limitation traditionally requires a compromise between the period covered by the resulting training dataset and the accuracy with which the key event(s) are depicted within the training dataset.

[0027] Returning to the melee attack example, if every other image frame was selected from a video that depicts an opponent running towards an avatar, the opponent pulling back a fist to perform a melee attack, and then the avatar dodging the melee attack, the key events (the melee attack and the dodging) might be depicted with high accuracy. However, the period covered by the training dataset might not be sufficient to improve the effectiveness of the IL agent. Starting with one of the image frames depicting the avatar dodging and working backwards through the video footage, using every other frame would impose a limit on the number of image frames (i.e., a data volume limit) on the training dataset, and might produce a training dataset that does not contain any image frames depicting the opponent running towards the avatar. On the other hand, if the fifth image frame is selected from the video footage, the entire time period covered by the video footage may be covered in the training dataset, but fast actions such as enemy strikes and avatar dodges may not be captured as accurately as if other image frames were selected (e.g., image frames depicting the beginning and end of a melee attack may be selected, but image frames depicting fist movements during the melee attack may not be selected). This lack of precision may result in the IL agent failing to recognize the same melee attack performance in subsequent gameplay.

[0028] Thus, there is a need in the art for a means to generate training datasets that more effectively cover contexts and corresponding actions / policies over longer time periods (i.e., datasets that cover longer time periods than datasets generated by previously used methods, while covering important events within the context with similar / greater accuracy as such methods). Such a means would ultimately improve the effectiveness of IL agents, since they could be provided with a more comprehensive view of the context used for training, and thus could learn to respond more effectively to that context.

[0029] Devices that generate IL datasets Therefore, turning now to Fig. 2, in an embodiment herein, an apparatus for generating a dataset for training a machine learning model comprises a receiving unit 200 for receiving video data consisting of successive image frames, a storage unit 202 for storing a plurality of said successive image frames, and a selection unit 204 for selecting a subset of the stored image frames with respect to a target image frame. The subset provides the machine learning model with contextual data related to the target image frame. The selection unit 204 successively generates sampling values. A difference between the successively generated sampling values ​​increases with each successively generated sampling value. The selection unit 204 selects a respective image frame from the stored image frames for each successively generated sampling value. The frame number of the respective image frame corresponds to the latest value of the successively generated sampling values.

[0030] Essentially, embodiments herein relate to a novel non-uniform frame skipping method, such that the number of skipped image frames increases with each newly selected image frame. As a non-limiting example, one image frame may be skipped before selecting the first image frame for a training dataset (subset), two image frames may be skipped before selecting the second image frame for the dataset, three image frames may be skipped before selecting the third image frame for the dataset, etc.

[0031] Furthermore, this non-uniform frame skipping is not necessarily performed on the first stored image frame or the current / most recently received image frame, but rather on a target image depicting a critical moment (key event) within the context depicted in the stored consecutive image frames, such that smaller frame skips are performed closer to the target image frame (ensuring that the key event is captured with relatively high accuracy) and larger frame skips are performed further away from the target image frame (allowing a longer period of time to be covered in the training dataset, albeit with relatively lower accuracy).

[0032] The term "target image" here refers to the image used to anchor / define the selection process, not the image generated by the machine learning system. Typically, the selected images, or data representative of them, or features within them, are provided to the IL system as inputs that provide a context, and the IL system outputs a target action / policy appropriate to that context.

[0033] As a non-limiting example of the operation of the device, considering the melee attack example discussed above, the receiving unit 200 may receive video data relating to melee attacks and dodges, and the storage unit 202 may store multiple successive image frames of the video data, where the stored multiple successive image frames may constitute at least a portion of this video data. For example, the storage unit 202 may store multiple successive image frames depicting an opponent running towards an avatar, the opponent subsequently drawing back a fist to perform a melee attack, and the avatar subsequently dodging the melee attack. These stored successive image frames may constitute a portion or all of the received video data.

[0034] In this melee attack example, a target image frame depicting a critical moment or important event may be a stored image frame depicting the moment when an opponent's fist approaches and the avatar begins to dodge. This target frame may be tagged as such by a user and / or may be determined as such by the device, for example, by considering the respective amount of data (e.g., bits) of each stored image frame, any metadata associated with each image frame such as corresponding controller input data, and / or the image content of each image frame. Determination of such target image frames is described in further detail later in this specification.

[0035] In any case, once the target image frame is determined, other stored image frames may be selected by the selection unit 204 to form a training data set (subset). Such selected image frames are selected according to a novel non-uniform frame skipping method. The selection unit 204 may generate sampling values ​​successively before selecting image frames for the training data set. In this case, each sampling value essentially represents the number of image frames to be skipped (e.g., starting from the target image frame or a previously selected one).

[0036] With each successively generated sample value, the difference between successive sample values ​​increases. As a non-limiting example, consider the Fibonacci sequence starting with the numbers 2 and 3. In this case, a non-uniform frame skip occurs when the selection unit 204 selects a stored image frame whose distance from the target image frame or a previously selected image frame matches the latest successively generated sample value, in terms of the number of successive image frames. Alternatively, a non-uniform frame skip occurs when the selection unit 204 selects a stored image frame whose frame number relative to the target image or a previously selected image frame matches the latest successively generated sample value. Note that the generated sample value does not need to be an integer, but may be a real number (e.g., 3.768). For example, the image frame whose distance from the target image frame is closest to the sample value (the image frame that is four successive frames away from the target image frame; the image frame whose frame number relative to the target image frame is 4) may be selected by the selection unit 204.

[0037] As mentioned earlier, this novel non-uniform frame skipping approach results in smaller frame skips occurring closer to the target image frame (ensuring that key events are captured with relatively high accuracy) and larger frame skips occurring further away from the target image frame (ensuring that a larger period is covered in the training dataset, albeit with relatively lower accuracy).

[0038] A training dataset generated according to this novel non-uniform frame skipping approach can more effectively cover a longer period of context and corresponding actions / policies (i.e., a dataset generated in this manner can cover a longer period of time than datasets generated by traditional methods, while still covering important events in the context with similar / higher accuracy). Thus, such a training dataset may improve the effectiveness of IL agents, since such agents may be provided with a more comprehensive view of the contexts used for training, and as a result, the agents can learn to respond more effectively to these contexts.

[0039] Receiving video data In an embodiment herein, the receiving unit 200 receives video data consisting of successive image frames. In an embodiment herein, the receiving unit 200 may be one or more data ports, such as the data port 60, a USB port, an Ethernet port, a Wi-Fi port, a Bluetooth port, for receiving video data from a device external to the device. The receiving unit 200 may also be a bus, such as the bus 100, for receiving video data from an internal component of the device (e.g., the CPU(s) / GPU(s) generating / rendering the video data).

[0040] Storage of successive image frames In an embodiment of the present specification, the storage unit 202 stores multiple sequential image frames. In an embodiment of the present specification, the storage unit 202 may be a system memory such as a RAM 40, a ROM, etc. In other embodiments, the storage unit 202 may be a storage memory such as a HDD, an SSD 50, a CD, a floppy disk, etc.

[0041] Optionally, the storage unit 202 may be a circular buffer. This is advantageous for generating the training dataset on the fly. Game consoles such as the PS5 typically have a circular buffer sized to accommodate a pre-determined number of image frames. Here, the image frame that has been stored the longest is removed from the circular buffer in favor of the image frame to be stored (i.e., the image frame depicting the current state of the video game). At a given moment during gameplay, the circular buffer may consist of a target frame depicting an important event in a context, which is desirable for the purpose of imitation learning. While the target image frame is still in the circular buffer, the selection unit 204 may extract the target image frame and other image frames to generate the training dataset. Thus, due to the nature of the circular buffer, useful context and corresponding demonstration of actions / policies are not lost, but such information may be extracted to train the IL agent.

[0042] In any case, the storage unit 202 may store a number of successive image frames from which the selection unit 204 may select a subset of the image frames (ie, a training data set).

[0043] Selecting a subset of image frames In an embodiment herein, the selection unit 204 selects a subset of the stored image frames for a target image frame. The subset provides context data related to the target image frame for the machine learning model. The selection unit 204 continuously generates sampling values. A difference between the consecutive sampling values ​​increases for each consecutively generated sampling value. The selection unit 204 selects a respective image frame from the stored image frames for each consecutively generated sampling value. A frame number of the respective predetermined image frame is consistent with the latest consecutively generated sampling value. In an embodiment herein, the selection unit 204 may be one or more CPUs (e.g., CPU 20, etc.) and / or one or more GPUs (e.g., GPU 30, etc.).

[0044] As mentioned above, each sampling value essentially represents the number of image frames to be skipped before selecting an image frame of the training data set. These generated sampling values ​​do not have to be integers, one or more of the sampling values ​​may be non-integer real numbers (e.g. 3.768, etc.). The distance from the target image frame that matches the sampling value (closest) is selected, for example, by the selection unit 204 (this could be, for example, the image frame that is four consecutive frames away from the target image frame, or the image frame with frame number 4 relative to the target image frame, etc.).

[0045] In any case, with each successively generated sampled value, the difference between the successive sampled values ​​increases. As a non-limiting example, a sequence of successively generated sampled values ​​may be triangular numbers 1, 3, 6, 10, 14, etc. The difference between two successive values ​​in this sequence increases as the sequence progresses. Such difference increases with each new sampled value. This sequence may result in uneven frame skipping, for example, one image frame is skipped before selecting the first image frame of a training dataset (subset), two image frames are skipped before selecting the second image frame of the dataset, three image frames are skipped before selecting the third image frame of the dataset, etc.

[0046] For simplicity, a numerical sequence exhibiting a behavior in which the difference between successive sampled values ​​increases with each successively generated sampled value will hereinafter be referred to as an "augmented sequence."

[0047] Other non-limiting examples of expansion sequences include the following: - The Fibonacci sequence starting with 2 and 3 (2, 3, 5, 8, 13, 21, etc.). - Geometric series. For example, for the i-th iteration of sample generation, aΣ k=1 i r k where a and r are constants and r ≠ 1. Exponential or power sequence, for example, for the i-th iteration of sample generation: r i where r ≠ 1 and typically 1 <r<2である。 A sequence of values ​​calculated using a nonlinear function, for example, for the i-th iteration of sampled value generation: i n We can calculate the sampling value of n, where n ≠ 1. A finite series that is not a geometric series. As a non-limiting example, for the i-th iteration of sample generation: bΣ k=1 i k n where b and n are constants, and triangular numbers occur when b, n=1.

[0048] The above list of non-limiting examples is not exhaustive, and extension sequences other than those listed above may also be considered within the scope of this specification.

[0049] The image frames selected for the subset may be those received at the receiving unit 200 before and / or after the target image frame is received, as shown in Figures 3A-3C. In Figures 3A-3C, the selection unit 204 uses a sampling function f(i)=i 1.5 where i is the number of iterations.

[0050] In Fig. 3A, the selection unit 204 selects a subset of the stored image frames (depicted as a grey rectangle) consisting of only image frames received at the receiving unit 200 after the target image frame was received. This subset can therefore provide the IL agent with future-oriented data related to (i.e., the aftermath of) important events / moments depicted in the stored image frames. Such future-oriented data can be important as it potentially allows the IL agent to learn how effective a given action / course of action once executed will be, especially if the important consequences of that action / course of action do not occur immediately afterwards. For example, the target frame may depict a soccer player kicking a ball towards a goal. The outcome of this shot (whether the shot led to a goal or not) may only be depicted in a few image frames later, and the number of image frames between the shot and the (non-goal) goal increases with the distance from the goal at which the shot was made.

[0051] In Fig. 3B, the selection unit 204 selects a subset of the stored image frames consisting of only image frames received at the receiving unit 200 before the target image frame is received. This subset may thus provide the IL agent with historical data related to (i.e., leading up to) the important events / moments depicted in the stored image frames. Such historical data may be important as it may enable the IL agent to learn how to more effectively time the execution of actions / policies. For example, in the aforementioned context of melee attacks and dodging, the effectiveness of dodging depends on the timing of its execution. In this way, the historical context depicted in the training dataset may enable the IL agent to learn how to more effectively dodge.

[0052] In Figure 3C, both future and historical data are available, i.e. the selection unit 204 has selected a subset of stored image frames that comprises image frames received at the receiving unit 200 before and after the target image frame is received.

[0053] Using an extended sequence of sampled values ​​allows us to generate training datasets that can more effectively cover a longer period of context and corresponding actions / policies. That is, the datasets generated in this way cover a longer period of time than datasets generated by traditional methods, as shown in Figures 4A-4E, while still covering important events in the context with similar / higher accuracy.

[0054] In Figure 4A, no frame skipping is used when selecting image frames from the training dataset. This results in the key events depicted in the target frame being captured with the highest possible accuracy (i.e., all frames in the selected subset are contiguous and the latest image frame of the subset is adjacent to the target frame). On the other hand, the period covered may not be long enough for the IL agent to learn how to time the execution of actions / policies more effectively.

[0055] In Figure 4B, a uniform 3-frame skip was used when selecting image frames for the training dataset, i.e., every third saved image frame was selected as a subset. As a result, although a longer period (and therefore more historical data) is covered in the training dataset (a 3x increase compared to Figure 4A), the key events depicted in the target frames may not be captured with a high enough accuracy for the IL agent to recognize the performance of the same key events in subsequent gameplay.

[0056] In FIG. 4C, a novel non-uniform frame skipping scheme according to the embodiments herein was used in selecting image frames of the training dataset. The sampling values ​​are expressed by the sampling function f(i)=i 1.35 , and the stored image frames whose respective frame numbers for the target image frame match (are most similar to) the respective ones of the sampling values ​​are selected by the selection unit 204. As a result, the key events depicted in the target frame are captured with higher accuracy compared to the case of FIG. 4B (where three of the four most recent stored image frames received before the target frame are selected for the subset), while a longer period is covered compared to the case of FIG. 4A (due to frame skipping). Thus, according to the present embodiment, a training dataset is obtained that combines the advantages of both previous examples. Thus, the IL agent can not only learn how to time the execution of actions / policies more effectively, but also potentially recognize the performance of the same key events in subsequent gameplays.

[0057] In FIG. 4D, the same novel non-uniform frame approach is applied to the sampling function f(i)=i 1.35 However, instead of selecting those stored image frames whose respective distance (relative respective frame number) from the target image frame matches (is most similar to) a respective one of the sampling values, a given stored image frame was selected based on whether its distance (relative frame number) from a previously selected stored image frame matches the latest successively generated sampling value. This selection method is advantageous in that the distance between successively selected image frames increases with each successively selected image frame, thereby covering a longer period of the training data set. The selection method implemented in FIG. 4C may not always result in such an increase in the distance between the selected image frames due to rounding / aliasing errors (two successive image frames were selected in FIG. 4C). For lower exponent values, e.g. f(i)=i 1.10 In the latter case, the distance between successively selected image frames may be the same for short parts of the sequence, e.g., especially early on, while the value of the function grows by less than 1 for each iteration, but the distance between the frames does not get smaller.

[0058] The discussion up to this point has been concerned with selecting a stored image frame based on whether its respective distance from the target image frame (its respective frame number relative to the target image frame) matches with the respective sampling value, but more generally, the selection unit 204 is configured to select, for each successively generated sampling value, a respective image frame from the stored image frames, the frame number of the respective image frame matching the most recent value of the successively generated sampling value.

[0059] In particular, the frame number for each given image frame may relate to either: i. Target image frame. ii. The previously selected image frame.

[0060] In FIG. 4E, the same novel non-uniform frame method is applied to the sampling function f(i)=i 1.35 In one embodiment, a combination of the selection methods depicted in Figures 4C and 4D is used to select the image frames to be saved. The first two selected image frames (i.e., the two image frames closest to the target image frame) were selected using the selection method of Figure 4C (i.e., selecting based on whether their distance from the target image frame matches their respective sampling values), and the other selected image frames were selected using the selection method of Figure 4D (i.e., selecting based on whether their distance from the previously selected image frame matches their respective sampling values). Such a combination of selection methods may be used such that the distance between successively selected image frames increases with each successively selected image frame, thereby covering a longer period of the training data set. Again, if the exponential or other growth function is set to a low growth value, the increase may be less than one frame per iteration, so that some parts of the sequence may have the same frame separation, but the separation increases but does not decrease over time.

[0061] The selection unit 204 may use some form of algorithm or relationship to continuously generate the sampled values. The Fibonacci sequence is an example of a recursive relationship where the next Fibonacci number is calculated by summing the previous two Fibonacci numbers. Other recursive relationships may be used to generate the extended sequence.

[0062] Optionally, the selection unit 204 may use a sampling function to generate the sampling values ​​successively. In this case, the sampling function is a mathematical function. In the context of this specification, whereas a recurrence relationship requires knowledge of previously generated sampling values ​​to generate the next sampling value, a sampling function does not require such knowledge. Rather, a sampling value may be generated using an iteration number (e.g., input the number 5 for the fifth iteration to obtain the fifth sampling value). Non-limiting examples of such sampling functions can be found in the list of extended sequences above.

[0063] In some such sampling functions, the degree to which the difference between successive sampled values ​​increases with each successively generated sampled value is responsive to the respective values ​​of one or more sampling parameters configured within the sampling function. As a non-limiting example, a sequence of powers of three (e.g., 1, 3, 9, 27, 81) will scale at a greater rate than a sequence of powers of two (e.g., 1, 2, 4, 8, 16). Furthermore, powers of two multiplied by factors greater than one (e.g., 1.5, 1.5, 3, 6, 12, 24, etc.) will scale at a greater rate than a power of two. Thus, the more common sampling functions f(i) = a × k i where i is the number of iterations, changing the value of either a or k changes the expansion rate of the expanded sequence. Thus, in the context of this document, a and k can be considered as sampling parameters.

[0064] Optionally, at least one of the sampling parameters is at least one of a modulus, a base, and an exponent. f(i) = a × k i The sampling parameters of are the coefficient (a) and the base (k). f(i)=i n , the sampling parameter n is the exponent. Of course, the sampling parameters do not need to be limited to these three types of terms / parameters, and other terms / parameters such as summand, dividend, divisor, square root, etc. can be used as sampling parameters.

[0065] In any case, the values ​​of the sampling parameters may be predetermined or user-defined, statically or dynamically adjustable.

[0066] With respect to dynamically adjustable sampling parameters, embodiments herein may optionally include a value determination unit 208. The value determination unit 208 may determine one or more respective values ​​of the sampling parameters based on image content of a target image frame. In embodiments herein, the value determination unit 208 may be one or more CPUs (such as, for example, CPU 20) and / or one or more GPUs (such as, for example, GPU 30).

[0067] The image content of the target frame may be used to determine the magnification ratio of the magnification sequence of sampling values. For example, the value determination unit 208 may determine that such a target frame depicting the onset of an avatar dodging is a larger sampling parameter value(s) than a frame depicting the onset of an avatar standing on, for example, a static virtual object (e.g., a stone) and jumping. The latter may require less historical and / or future data (i.e., image frames depicting the environment and avatar before and / or after the target image frame, respectively) compared to the former data, since the effectiveness of the IL agent jumping over an obstacle may be less dependent on timing than the effectiveness of the IL agent dodging an enemy attack.

[0068] In order for the value determination unit 208 to make a decision as to what values ​​the respective sampling parameters should take, the value determination unit 208 may use any commonly known computer vision / object recognition techniques / algorithms to detect one or more virtual elements configured within the image content of the target image frame.

[0069] The terms "computer vision algorithm" and "object recognition algorithm" refer to any suitable computer-implemented method, software, algorithm, etc. for causing a computer (such as the device described herein) to recognize / detect objects, animals, humans, etc. from captured images. Such algorithms are well known in the art, and examples include Viola-Jones detection (optionally based on Haar features), Scale Invariant Feature Transform (SIFT), Histogram of Oriented Gradients (HOG) features, etc. Alternatively or additionally, machine learning and methods, neural networks, artificial intelligence, etc. may be used to recognize / detect objects, etc. Examples of neural network approaches include Multi-Layer Perceptron (MLP), Convolutional Neural Networks (CNN), Region-Based Convolutional Neural Networks (R-CNN), Single-Shot Multibox Detector (SSD), YouOnlyLookOnce (YOLO) method, Single-Shot Refinement Neural Networks for Object Detection (RefineDets), Retina-Net, Deformable Convolutional Networks, etc.

[0070] In any case, once the configured virtual element(s) in the image content of the target image frame are detected, the value determination unit 208 may determine one or more respective values ​​of the sampling parameters based on the detected virtual element(s) in the image content. For example, the value determination unit 208 may determine one or more respective values ​​of the sampling parameters by considering the color(s), size, shape, and / or position in the target image frame of each detected virtual element, a description of each detected virtual element (e.g., avatar, ally, enemy, weapon, object, building, etc., where the description originates from, for example, a computer vision / object recognition algorithm), etc.

[0071] Alternatively or additionally, the value determination unit 208 may configure a value determination model trained to determine one or more respective values ​​of the sampling parameters based on the image content of the target image frame. For example, the value determination model may be trained with individual image frames each associated with one or more sampling parameter values. Thus, the value determination model can learn the correlation between pixel data of the target image frame and values ​​of one or more sampling parameters without needing to understand what the pixel data represents. Alternatively or additionally, the results of any computer vision / obstacle recognition algorithms may be utilized to train the value determination model. That is, for a given image frame associated with one or more sampling parameter values, the value determination unit 208 may detect one or more virtual elements configured within the given image frame, and the detected virtual elements and sampling parameter values ​​(and optionally the given image frame itself) may be input into the value determination model for training purposes.

[0072] In any event, optionally, if the predetermined sampling parameter is a base or an exponent, the value of the predetermined sampling parameter is greater than 1. This is to ensure that a sampling function utilizing a base and / or an exponent as a sampling parameter generates an extended sequence of sampling values. Furthermore, other types of sampling parameters do not necessarily need to be greater than 1, and an extended sequence of sampling values ​​will be generated even if the sampling parameter is a factor less than or equal to 1. For example, if a sampling function has a factor b≦1, f(i)=bΣ k=1 i k n However, this does not mean that all other types of sampling parameters will generate an expanded sequence of sampled values ​​for all values ​​- there may be upper and / or lower limits associated with a given sampling parameter, beyond which an expanded sequence of sampled values ​​will not be generated.

[0073] In any case, once the value(s) of the sampling parameter are known, the selection unit 204 can generate sampling values ​​successively. Each sampling value essentially represents the number of image frames to be skipped before selecting an image frame of the training data set. Considering that with each successively generated sampling value, the difference between successive sampling values ​​increases, non-uniform frame skipping occurs when the selection unit 204 selects a stored image frame whose distance from the target image frame (or a previously selected image frame) in terms of the number of successive image frames matches (e.g., is closest to) one of the sampling values. In other words, non-uniform frame skipping occurs when the selection unit 204 selects a stored image frame whose frame number relative to the target image or a previously selected image frame matches the latest successively generated sampling value.

[0074] As a result, the selected subset of image frames (training data set) may be optionally output to the IL agent to train the IL agent. Thus, more generally, embodiments herein may comprise an output unit 210 to output a subset of stored image frames to a machine learning model (e.g., an IL agent) to train the machine learning model. In embodiments herein, the output unit 210 may be one or more data ports, such as data port 60, a USB port, an Ethernet port, a Wi-Fi port, a Bluetooth port, etc., for outputting a subset of stored image frames to a machine learning model external to the device. Alternatively or additionally, the receiving unit 200 may be a bus, such as bus 100, for outputting a subset of stored image frames to a machine learning model located within the device. The output unit 210 may also output target image frames to a machine learning model for training purposes.

[0075] In any case, a training dataset generated according to this novel non-uniform frame-skipping approach can more effectively cover a longer period of context and corresponding actions / policies (i.e., a dataset generated in this manner can cover a longer period of time than datasets generated by traditional methods, while still covering important events in the context with similar / higher accuracy). Thus, such a training dataset can improve the effectiveness of IL agents, since such agents can be provided with a more comprehensive view of the context used for training, which enables such agents to learn to respond more effectively to such context.

[0076] Other embodiments As mentioned above, the target frame may be tagged as such by a user. This tagging of the target frame may occur before or after the receiving unit 200 receives the video data. As a non-limiting example, the user may associate metadata / flag with a given image frame in the video data before the receiving unit 200 receives the video frame. In this case, the metadata / flag provides an indication that the image frame with which it is associated is a target image frame. Thus, more generally, the selection unit 204 may select a given stored image frame to be a target image frame based on the metadata associated therewith.

[0077] As another non-limiting example, alternatively or additionally, after the video is received at the receiving unit 200, a user may use a game controller (such as controller 80) to tag / select one of the stored image frames as the target image frame. Thus, more generally, the receiving unit 200 may receive one or more user inputs. The selection unit 204 may select one of the stored image frames as the target image frame based on one or more of the received user inputs. Furthermore, the user input may be received from one or more of the following: -User input devices (game controllers, mouse, keyboard, mobile phone, etc.). -Cameras (standalone or integrated into computers, mobile phones, head mounted displays, televisions, user input devices, etc.). -Microphone (standalone or built into computer, mobile phone, head mounted display, television, user input device, etc.).

[0078] Tagging does not have to be a conscious act by the user, i.e., it is not necessary to have a dedicated "tag" input, but rather any change in input relevant to gameplay can be treated as a tag, such as a change in direction of in-game movement (optionally as opposed to drift or incidental movement, e.g., a change above a threshold such as a change in direction or start / stop of movement), pressing a button to attack, defend, jump, etc.

[0079] Types of devices operable to transmit user input to the receiving unit 200 other than the above examples are also considered within the scope of this specification.

[0080] Optionally, embodiments herein may comprise a frame nomination unit 206 for determining whether a particular image frame among the stored image frames is to be the target image frame. The frame nomination unit is adapted to nominate based on one or more metrics associated with the particular image frame. In embodiments herein, the frame nomination unit 206 may be one or more CPUs (such as CPU 20) and / or one or more GPUs (such as GPU 30).

[0081] Optionally, one or more of the indicia associated with a particular image frame may include metadata associated therewith, which may consist of one or more of the following: - User defined metadata, for example tags / flags associated with image frames before / after the receiving unit 200 receives the video data, as described above. -An event code that indicates what event is occurring within the image content of a particular image frame, for example an event code indicating a melee attack. -Location metadata indicating the location within the environment (real or virtual) where a particular image frame was captured / produced. -Time metadata indicating the time when a particular image frame was captured / produced, either relative to real world time or relative to power-on of the device that captures / produces the particular image frame.

[0082] It should be noted that the above examples are not exhaustive, and types of metadata other than those listed above are within the scope of this specification.

[0083] Alternatively or additionally, the one or more indicators associated with a particular image frame may constitute the image content of the particular image frame. The discussion regarding the value determination unit 208 may apply mutatis mutandis here, and computer vision / object recognition algorithms may be employed to determine whether or not the particular image frame should be a target image frame.

[0084] Alternatively or additionally, the one or more indicators for a particular image frame may comprise an amount of data of the particular image frame. That is, the size of the particular image frame in terms of number of bits may be used to determine whether the particular image frame should be a target image frame. For example, the frame nomination unit 206 may determine whether a particular image frame among the stored image frames is a target image frame based on whether the amount of data of the particular image frame meets or exceeds a threshold (e.g., number of bits). The amount of data threshold may be pre-determined or user-defined, and may be fixed or dynamically adjustable.

[0085] Although embodiments herein can generate a data set for training purposes, optionally the data can be "live" - ​​that is, the data is generated during one or more playthroughs of a game and provided to the IL system as it is generated. This can also optionally provide timestamps or other indicators of real-time progress to the IL system (although such time data may also be associated with offline data sets). Such playthroughs can be conducted by quality assurance testers, beta testers, early adopters, etc.

[0086] Optionally, the trained IL instance may be refined to more closely mimic the play of an individual user, for example, by training the play by that user.

[0087] Summary of the embodiment In an embodiment herein, an apparatus for generating data (whether live data or a dataset) for training a machine learning model comprises a receiving unit 200 for receiving video data consisting of successive image frames, a storage unit 202 for storing a plurality of said successive image frames, and a selection unit 204 for selecting a subset of the stored image frames for a target image frame. The subset provides context data related to the target image frame for said machine learning model. The selection unit 204 continuously generates sampling values. A difference between the successively generated sampling values ​​increases with each successively generated sampling value. The selection unit 204 selects a respective image frame from the stored image frames for each successively generated sampling value. The frame number of the respective image frame corresponds to the latest value of the successively generated sampling values.

[0088] Those skilled in the art will recognize that variations of the foregoing apparatus as described and claimed herein are within the scope of the invention, without limitation. In one embodiment, the frame number of each image frame is: i. Target image frame ii. The previously selected image frame It relates to any of the following: In one embodiment, the selection unit 204 continuously generates the sampling values ​​using a sampling function, which is a mathematical function. -Optionally in this example, the degree to which the difference between successively generated sampled values ​​increases with each successively generated sampled value corresponds to the respective values ​​of one or more sampling parameters that make up said sampling function. In this example, optionally, at least one of the sampling parameters is at least one of a modulus, a base or an exponent. In this example, optionally, a value determination unit 208 is provided for determining the value of said sampling parameter based on the image content of the target image frame. In this example, optionally, if the sampling parameter is a base or an exponent, the value of the sampling parameter is greater than one. In one embodiment, the apparatus comprises a frame nomination unit 206 which determines whether a particular image frame among the stored image frames is to be a target image frame based on one or more indicators associated with the particular image frame. In this example, optionally, one or more indicia associated with a particular image frame include metadata associated with that image frame. In this example, optionally, one or more indicia associated with a particular image frame include the image content of that image frame. In this example, optionally, the one or more metrics associated with a particular image frame include the amount of data in that image frame. In an embodiment, the device comprises an output unit 210 for outputting a subset of the stored image frames to a machine learning model for training said model. In one embodiment, the storage unit 202 is a circular buffer.

[0089] How to generate an IL dataset Referring now to FIG. 5, a method for generating data for training a machine learning model includes the following steps.

[0090] Step S100: receiving video data consisting of successive image frames.

[0091] Step S102: storing a plurality of the consecutive image frames.

[0092] Step S104: Selecting a subset of the stored image frames for the target image frame. Continuously generating sampling values. For each continuously generated sampling value, selecting a respective image frame from the stored image frames. The subset provides the machine learning model with context data related to the target image frame. The selection unit 204 continuously generates sampling values. The difference between the continuously generated sampling values ​​increases with each continuously generated sampling value. The selection unit 204 selects a respective image frame from the stored image frames for each continuously generated sampling value. The frame number of the respective image frame corresponds to the latest value of the continuously generated sampling values.

[0093] It will be apparent to those skilled in the art that variations of the above methods corresponding to the operation of the various embodiments of the apparatus described and claimed herein are considered to be within the scope of the present invention.

[0094] It will be apparent to those skilled in the art that variations of the above methods corresponding to the operation of various embodiments of the apparatus as described and claimed herein are considered within the scope of the present invention. The above methods may be implemented on conventional hardware (such as entertainment device 10) that is appropriately adapted as applicable, by software instructions, or by the inclusion or substitution of dedicated hardware.

[0095] Thus, the necessary adaptation to existing portions of the conventional equivalent device may be implemented in the form of a computer program product including processor-implementable instructions stored on a non-transitory machine-readable medium such as a floppy disk, optical disk, hard disk, solid state disk, PROM, RAM, flash memory, or any combination of these or other storage media, or may be realized in hardware as an ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array) or other configurable circuit suitable for use in adapting the conventional equivalent device. Alternatively, such a computer program may be transmitted via data signals over a network such as an Ethernet, a wireless network, the Internet, or any combination of these or other networks.

[0096] The foregoing discussion discloses and describes merely exemplary embodiments of the present invention. The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. Accordingly, the disclosure of the present invention, as well as the remaining claims, are intended to be illustrative rather than limiting on the scope of the present invention. This disclosure, including any readily identifiable variations of the teachings herein, defines in part the scope of the preceding claim terms so that the inventive subject matter is not dedicated to the public.

Claims

1. 1. An apparatus for generating data for training a machine learning model, comprising: a receiving unit for receiving video data consisting of successive image frames; a storage unit for storing a plurality of said successive image frames; a selection unit for selecting a subset of the stored image frames with respect to a target image frame; Equipped with the subset providing the machine learning model with contextual data related to a target image frame; The selection unit continuously generates sampling values; The difference between successively generated sampled values ​​increases with each successively generated sampled value, the selection unit selects a respective image frame from the stored image frames for each successively generated sampling value; An apparatus, characterized in that the frame number of each image frame corresponds to the most recent value of successively generated sampling values.

2. The frame number of each of the image frames is i. Target Image Frame ii. The previously selected image frame 2. The apparatus according to claim 1, characterized in that it relates to any one of the following:

3. The selection unit continuously generates sampling values ​​using a sampling function; 2. The apparatus of claim 1, wherein the sampling function is a mathematical function.

4. 4. The apparatus of claim 3, wherein the degree to which the difference between successively generated sampled values ​​increases with each successively generated sampled value corresponds to respective values ​​of one or more sampling parameters that constitute the sampling function.

5. 5. The apparatus of claim 4, wherein at least one of the sampling parameters is at least one of a modulus, a base, or an exponent.

6. 6. Apparatus according to claim 4 or 5, characterized in that it comprises a value determination unit for determining the value of said sampling parameter based on the image content of said target image frame.

7. 7. Apparatus according to claim 4, characterized in that, when the sampling parameter is a base or an exponent, the value of said sampling parameter is greater than one.

8. 8. An apparatus according to claim 4, further comprising a frame nomination unit arranged to determine whether a particular image frame among the stored image frames is to be a target image frame based on one or more indicators associated with the particular image frame.

9. The apparatus of claim 8 , wherein the one or more indicia associated with a particular image frame includes metadata associated with that image frame.

10. 10. Apparatus according to claim 8 or 9, wherein the one or more indicia associated with a particular image frame include image content of that image frame.

11. 11. Apparatus according to any of claims 8 to 10, wherein the one or more metrics associated with a particular image frame include the amount of data in that image frame.

12. 12. The apparatus according to any one of claims 8 to 11, comprising an output unit for outputting a subset of the stored image frames to a machine learning model for training said machine learning model.

13. 12. Apparatus according to any one of claims 1 to 11, characterized in that the storage unit is a circular buffer.

14. 1. A method for generating data for training a machine learning model, comprising: receiving video data comprising successive image frames; storing a plurality of said successive image frames; selecting a subset of the stored image frames for a target image frame; continuously generating sampled values; selecting a respective image frame from the stored image frames for each successively generated sample value; Including, the subset providing the machine learning model with contextual data related to a target image frame; The difference between successively generated sampled values ​​increases with each successively generated sampled value, A method according to claim 1, characterized in that the frame number of each image frame corresponds to the most recent value of successively generated samples.

15. A computer program comprising computer executable instructions for causing a computer system to perform the method of claim 14.

16. A non-transitory computer-readable storage medium storing the computer program of claim 15.