Systems and methods for modeling key points with probabilistic generative model
A probabilistic generative model addresses the limitations of conventional systems by learning behavior modules and noise patterns in key point tracking data, enhancing the accuracy and robustness of animal behavior analysis by identifying long-duration syllables and temporal behavior structure.
Patent Information
- Application Number
- PCT/US2024/019716
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-14
- Filing Date
- 2024-03-13
- Publication Date
- 2024-09-19
AI Technical Summary
Conventional systems for measuring animal behavior are limited by their inability to accurately track complex movements and transitions in behavior, often resulting in noisy state sequences and reduced sensitivity to behavior changes due to noise filtering techniques.
The use of a probabilistic generative model (PGM) that learns behavior modules and noise patterns in key point tracking data, incorporating techniques like Gibbs sampling and principal component analysis to align and preprocess data, allowing for robust identification of behavior transitions and syllable structures.
This approach enables consistent identification of long-duration behavior syllables and accurate recognition of temporal behavior structure, improving the accuracy and robustness of behavior modeling compared to conventional classifier-based methods.
Smart Images

Figure US2024019716_19092024_PF_FP_ABST
Abstract
Description
Attorney Docket No.: H0776.70153WO00 -1- SYSTEMS AND METHODS FOR MODELING KEY POINTS WITH PROBABILISTIC GENERATIVE MODEL RELATED APPLICATIONS
[0001] This Application claims the benefit of priority under 35 U.S.C. § 119(e) of U.S. Provisional Application Serial No.63 / 490,154, filed March 14, 2023, the disclosure of which is incorporated herein by reference in its entirety. FIELD
[0002] Disclosed embodiments are related to analysing motion of subjects and in particular, modelling key points of subjects. GOVERNMENT SUPPORT
[0003] This invention was made with government support under NS113201 and NS109520 awarded by National Institutes of Health (NIH). The government has certain rights in this invention BACKGROUND
[0004] Measuring animal behavior is challenging because animals move in many different and complex ways. Conventional systems deal with this challenge by either limiting animals' movements or focusing on a small set of well-defined behaviors-of- interest. SUMMARY
[0005] According to some embodiments, a method for analysing motion of a subject is provided. The method includes obtaining key point tracking data of the subject, where the key point tracking data comprises one or more key point locations of the subject for a time period during which the subject is moving. The method may input the key point tracking data into a probabilistic generative model (PGM); and identify errors associated 12216901.1Attorney Docket No.: H0776.70153WO00 -2- with the key point tracking data and the plurality of behavior modules using the PGM, where each of the plurality of behavior modules indicates a category of behavior.
[0006] According to any of the above embodiments, identifying the errors and the plurality of behavior modules using the PGM includes: for each time frame of the time period, determining a category of behavior using a plurality of variables of the PGM and one or more key points of the key point tracking data at a preceding time instance, wherein the plurality of variables includes one or more of: a location, a heading, a pose state trajectory, or a noise scale of the subject.
[0007] According to any of the above embodiments, the noise scale includes one or more of an overall per key point noise level or a per-frame-per-key point noise level.
[0008] According to any of the above embodiments, the PGM is a first PGM, and wherein the plurality of variables of the first PGM include a first plurality of variables and a second plurality of variables different from the first plurality of variables; and the method further includes training a second PGM to determine initial values of the second plurality of variables of the first PGM.
[0009] According to any of the above embodiments, the first PGM is further trained using unsupervised learning while the operations of: inputting the key point tracking data into the PGM and identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM are performed.
[0010] According to any of the above embodiments, the method further includes receiving training key point tracking data of one or more subjects during movement of the one or more subjects for a training time period; wherein training the second PGM to determine the initial values of the second plurality of variables of the first PGM is performed based on the training key point tracking data of the one or more subjects.
[0011] According to any of the above embodiments, at least a subset of the training key point tracking data includes at least a portion of the key point tracking data of the subject.
[0012] According to any of the above embodiments, the method further includes preprocessing the training key point tracking data before training the second PGM, by: filtering out data points of the training key point tracking data having confidence values 12216901.1Attorney Docket No.: H0776.70153WO00 -3- below a confidence threshold; interpolating the filtered out data points; and adding a random error to the training key point tracking data.
[0013] According to any of the above embodiments, training the second PGM further includes aligning coordinates of the training key point tracking data; and applying principal component analysis to the aligned coordinates of the training key point tracking data.
[0014] According to any of the above embodiments, aligning the coordinates of the training key point tracking data includes, for each frame of the training key point tracking data: determining a tail-nose angle from respective training key point tracking data in the frame; and updating the coordinates of the respective training key point tracking data in the frame based on the determined tail-nose angle.
[0015] According to any of the above embodiments, the second PGM includes a hidden Markov model (HMM).
[0016] According to any of the above embodiments, the method further includes modifying coordinates of the key point tracking data of the subject using an output of the PGM.
[0017] According to any of the above embodiments, the PGM includes a switching linear dynamics system (SLDS).
[0018] According to any of the above embodiments, the operations of: inputting the key point tracking data into the PGM; identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM, are implemented in a fitting scheme configured to fit the PGM onto the key point tracking data.
[0019] According to any of the above embodiments, the fitting scheme includes Gibbs sampling for a number of iterations.
[0020] According to any of the above embodiments, the key point tracking data includes a plurality of key point coordinates represented in two dimensional or three dimensional space.
[0021] According to some embodiments, a non-transitory computer readable medium containing programming instructions for analysing motion of a subject is provided. The programming instructions may be configured to obtain key point tracking data of the 12216901.1Attorney Docket No.: H0776.70153WO00 -4- subject, where the key point tracking data comprises one or more key point locations of the subject for a time period during which the subject is moving. The programming instructions may further be configured to input the key point tracking data into a probabilistic generative model (PGM); and identify errors associated with the key point tracking data and the plurality of behavior modules using the PGM, where each of the plurality of behavior modules indicates a category of behavior.
[0022] According to any of the above embodiments, identifying the errors and the plurality of behavior modules using the PGM includes: for each time frame of the time period, determining a category of behavior using a plurality of variables of the PGM and one or more key points of the key point tracking data at a preceding time instance, wherein the plurality of variables includes one or more of: a location, a heading, a pose state trajectory, or a noise scale of the subject.
[0023] According to any of the above embodiments, the noise scale includes one or more of an overall per key point noise level or a per-frame-per-key point noise level.
[0024] According to any of the above embodiments, the PGM is a first PGM, and wherein the plurality of variables of the first PGM include a first plurality of variables and a second plurality of variables different from the first plurality of variables; and the programming instructions further include training a second PGM to determine initial values of the second plurality of variables of the first PGM.
[0025] According to any of the above embodiments, the first PGM is further trained using unsupervised learning while the operations of: inputting the key point tracking data into the PGM and identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM are performed.
[0026] According to any of the above embodiments, the programming instructions further include receiving training key point tracking data of one or more subjects during movement of the one or more subjects for a training time period; wherein training the second PGM to determine the initial values of the second plurality of variables of the first PGM is performed based on the training key point tracking data of the one or more subjects.
[0027] According to any of the above embodiments, at least a subset of the training key point tracking data includes at least a portion of the key point tracking data of the subject. 12216901.1Attorney Docket No.: H0776.70153WO00 -5-
[0028] According to any of the above embodiments, the programming instructions further include preprocessing the training key point tracking data before training the second PGM, by: filtering out data points of the training key point tracking data having confidence values below a confidence threshold; interpolating the filtered out data points; and adding a random error to the training key point tracking data.
[0029] According to any of the above embodiments, training the second PGM further includes aligning coordinates of the training key point tracking data; and applying principal component analysis to the aligned coordinates of the training key point tracking data.
[0030] According to any of the above embodiments, aligning the coordinates of the training key point tracking data includes, for each frame of the training key point tracking data: determining a tail-nose angle from respective training key point tracking data in the frame; and updating the coordinates of the respective training key point tracking data in the frame based on the determined tail-nose angle.
[0031] According to any of the above embodiments, the second PGM includes a hidden Markov model (HMM).
[0032] According to any of the above embodiments, the programming instructions further include modifying coordinates of the key point tracking data of the subject using an output of the PGM.
[0033] According to any of the above embodiments, the PGM includes a switching linear dynamics system (SLDS).
[0034] According to any of the above embodiments, the operations of: inputting the key point tracking data into the PGM; identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM, are implemented in a fitting scheme configured to fit the PGM onto the key point tracking data.
[0035] According to any of the above embodiments, the fitting scheme includes Gibbs sampling for a number of iterations.
[0036] According to any of the above embodiments, the key point tracking data includes a plurality of key point coordinates represented in two dimensional or three dimensional space. 12216901.1Attorney Docket No.: H0776.70153WO00 -6-
[0037] According to some embodiments, a system for analysing motion of a subject is provided. The system includes: at least one imaging device configured to obtain key point tracking data of the subject, where the key point tracking data comprises one or more key point locations of the subject for a time period during which the subject is moving. The system may also include at least one processor configured to: input the key point tracking data into a probabilistic generative model (PGM); and identify errors associated with the key point tracking data and the plurality of behavior modules using the PGM, where each of the plurality of behavior modules indicates a category of behavior.
[0038] According to any of the above embodiments, identifying the errors and the plurality of behavior modules using the PGM includes: for each time frame of the time period, determining a category of behavior using a plurality of variables of the PGM and one or more key points of the key point tracking data at a preceding time instance, wherein the plurality of variables includes one or more of: a location, a heading, a pose state trajectory, or a noise scale of the subject.
[0039] According to any of the above embodiments, the noise scale includes one or more of an overall per key point noise level or a per-frame-per-key point noise level.
[0040] According to any of the above embodiments, the PGM is a first PGM, and wherein the plurality of variables of the first PGM include a first plurality of variables and a second plurality of variables different from the first plurality of variables; and the at least one processor is further configured to train a second PGM to determine initial values of the second plurality of variables of the first PGM.
[0041] According to any of the above embodiments, the at least one processor is further configured to train the first PGM using unsupervised learning while performing the operations of: inputting the key point tracking data into the PGM and identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM.
[0042] According to any of the above embodiments, the at least one processor is further configured to: receive training key point tracking data of one or more subjects during movement of the one or more subjects for a training time period; and train the second PGM 12216901.1Attorney Docket No.: H0776.70153WO00 -7- to determine the initial values of the second plurality of variables of the first PGM based on the training key point tracking data of the one or more subjects.
[0043] According to any of the above embodiments, at least a subset of the training key point tracking data includes at least a portion of the key point tracking data of the subject.
[0044] According to any of the above embodiments, the at least one processor is further configured to preprocess the training key point tracking data before training the second PGM, by: filtering out data points of the training key point tracking data having confidence value below a confidence threshold; interpolating the filtered out data points; and adding a random error to the training key point tracking data.
[0045] According to any of the above embodiments, the at least one processor is further configured to train the second PGM by: aligning coordinates of the training key point tracking data; and
[0046] applying principal component analysis on the aligned coordinates of the training key point tracking data.
[0047] According to any of the above embodiments, the at least one processor is further configured to align the coordinates of the training key point tracking data by, for each frame of the training key point tracking data: determining a tail-nose angle from respective training key point tracking data in the frame; and updating the coordinates of the respective training key point tracking data in the frame based on the determined tail-nose angle.
[0048] According to any of the above embodiments, the second PGM includes a hidden Markov model (HMM).
[0049] According to any of the above embodiments, the at least one processor is further configured to modify coordinates of the key point tracking data of the subject using an output of the PGM.
[0050] According to any of the above embodiments, the PGM includes a switching linear dynamics system (SLDS).
[0051] According to any of the above embodiments, the at least one processor is further configured to perform the operations of: inputting the key point tracking data into the PGM and identifying the errors associated with the key point tracking data and the plurality of 12216901.1Attorney Docket No.: H0776.70153WO00 -8- behavior modules using the PGM, in a fitting scheme configured to fit the PGM onto the key point tracking data.
[0052] According to any of the above embodiments, the fitting scheme includes Gibbs sampling for a number of iterations.
[0053] According to any of the above embodiments, the category of behavior includes any of: rearing, grooming, walking, or a combination thereof.
[0054] According to any of the above embodiments, the key point tracking data includes a plurality of key point coordinates represented in two dimensional or three dimensional space.
[0055] It should be appreciated that the foregoing concepts, and additional concepts discussed below, may be arranged in any suitable combination, as the present disclosure is not limited in this respect. Further, other advantages and novel features of the present disclosure will become apparent from the following detailed description of various non- limiting embodiments when considered in conjunction with the accompanying figures. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component that is illustrated in various figures is represented by a like numeral. For purposes of clarity, not every component may be labelled in every drawing. In the drawings:
[0057] FIG.1 depicts, in accordance with various embodiments, a diagram of a system designed to model key point data with a probabilistic generative model;
[0058] FIG.2 is an illustrative diagram of an exemplary system including two probabilistic generative models for determining animal behavior modules, according to some embodiments.
[0059] FIGS.3A-3B illustrate examples of key points of a mouse captured with different camera angles, where the key points indicate key body locations of the mouse, according to some embodiments;
[0060] FIGS.4A-4B illustrate examples of key points of a mouse represented in 2D and 3D coordinates, according to some embodiments; 12216901.1Attorney Docket No.: H0776.70153WO00 -9-
[0061] FIG.5 illustrates examples of behavior modules that may be determined by the system as shown in FIG.1, according to some embodiments;
[0062] FIG.6 illustrates a flow diagram of an exemplary method that may be implemented to model key points of a subject with a probabilistic generative model, according to some embodiments; and
[0063] FIG.7 shows an illustrative implementation of a computer system that may be used to perform any of the aspects of the techniques and embodiments disclosed herein, according to some embodiments. DETAILED DESCRIPTION
[0064] Conventional systems used in measuring animal behavior often limit animals’ movements or focus on a small set of well-defined behaviors-of-interest because animals move in so many different and complex ways. Recently attempts have been made to use machine learning to automatically track defined locations on an animal’s body (“key points”) from a video recording movement of the animal (e.g., mice, rats or fruit flies) and then apply unsupervised learning algorithms to discover the full set of behaviors that collectively explain the animal’s movements. However, the inventors have recognized and appreciated that existing algorithms for motion sequencing can be prone to noise when they are applied to keep point tracking data. For example, researchers have observed that in existing machine learning systems for motion sequencing, noisy state sequences in the tracking data may switch much faster than the animal's actual behavior. This noise may include both gross errors and subtle, high-frequency jitter, and is a well- known limitation of pose tracking with neural networks. Interventions like increasing the prior on state persistence or smoothing key point trajectories may make the systems more robust to noise, however, the systems may also become less sensitive to behavior transitions when such corrections are applied resulting in a less accurate model.
[0065] In view of the above, the inventors have recognized and appreciated that existing approaches classify each frame (in a video including motion of the animals) with a behavior label, however, the classified behavior labels do not reliably respond to changes in the exhibited behavior. Thus, the inventors have recognized and appreciated that it 12216901.1Attorney Docket No.: H0776.70153WO00 -10- would be advantageous to consider the way in which the behavior changes cause the motion, and develop a system that are more robust to the observed errors in the tracking data while better aligning the predicted behavior modules (also referred to as “syllables”) with the onset of changing behaviors for an animal.
[0066] To solve the aforementioned technical problems and / or other technical problems, the inventors have recognized and appreciated that it may be advantageous to use a probabilistic generative model to learn the syllables and the noise associated with the syllables present in a set of tracking data, which may correspond to key point tracking data in some embodiments. A syllable may be referred to as a behavior module (or unit) having a start time, a stop time, and a time duration, during which the subject exhibits a single type of behavior. Depending on the type of behavior modules, the durations of the syllables may vary.
[0067] In view of the foregoing, described herein are various techniques, including systems, methods and non-transitory computer readable medium containing programming instructions for analysing motion of a subject. In some embodiments, the system may include one or more imaging devices configured to obtain key point tracking data of the subject for a time period during which the subject is moving. For example, the one or more imaging devices may include a camera that captures a stream of sequential images of the subject within a desired environment. The images may then be analysed using any appropriate key point identification module to identify the key point tracking data of the subject in each frame of the stream of sequential images. The key point tracking data may include one or more key point locations of the subject, such as the nose, the tail, the central point of a spline line of a mouse (or other types of subjects such as rats or fruit flies).
[0068] In some examples, key point tracking data may be represented in coordinates in two-dimensional (2D) or three-dimensional (3D) space. In some embodiments, the coordinates of the key point tracking data may be determined using machine vision techniques from the captured video / images. For example, the system may use marker-less tracking of key points in 2D using a single video camera, where key point detection is a achieved through algorithmic image processing (e.g., deep neural networks) and / or 12216901.1Attorney Docket No.: H0776.70153WO00 -11- manual annotation. In some examples, the system may use marker-less tracking of key points in 3D using one or more cameras, where key point detection is a achieved through algorithmic image processing (e.g., deep neural networks) and / or manual annotation. In some examples, the system may use marker-based key point tracking (e.g., in 2D or 3D) wherein markers are affixed to the animal’s body and tracked by one or more cameras, and / or by manual annotation. In some examples, the systems described above may use a depth camera, a non-depth camera, or a combination thereof. In these various systems, one or more algorithms may be used to improve the accuracy of the key points, or transform them, where the output still has the form of key points that are designed to correspond to parts of the animal’s body. For example, key points may be transformed into similar representations of pose, such as joint angles.
[0069] The system may include at least one processor configured to train a probabilistic generative model (PGM) using the key point tracking data over a desired time period and use the PGM to determine a plurality of behavior modules included in the time period the key point tracking data and stream of images correspond to. In some embodiments, the output of the PGM may include a number of behavior modules during the time period, where each of the plurality of behavior modules indicates a category of behavior. For example, the prediction result may include predicted category of behavior per frame in the time period of the key point tracking data. In non-limiting examples, the category of behavior may include one or more of rearing, grooming, walking, or a combination thereof, or other suitable categories of behavior. In some examples, the categories of behavior may be species dependent. For example, when analyzing fruit flies, the category of behavior may include locomotion, head grooming, right wing-grooming, or left wing- grooming, among other suitable categories of behavior.
[0070] In some embodiments, the PGM may include a switching linear dynamics system (SLDS). For example, the PGM may implement a hidden Markov model (HMM), which may define the current behavior of the subject. The PGM may include other variables and define a set of probabilistic dependencies (e.g., parameters) between the HMM and the other variables, and among the other variables. In non-limiting examples, examples of the other variables may include a location, a heading, a pose state trajectory, a noise scale, 12216901.1Attorney Docket No.: H0776.70153WO00 -12- combinations of the forgoing, and / or other appropriate variables related to the movement of the subject. In some examples, the noise scale may be a noise scale of each key point within a frame of the sequence of images.
[0071] In some embodiments, the PGM may also include other variables, such as the syllable (category of behavior) and key points. In some embodiments, the PGM may be configured such that the key point variable is observable (e.g., the observations are known from the key point tracking data), whereas other variables (e.g., the syllable, the location, the heading, the pose state trajectory, the noise scale etc.) are non-observable (hidden). At each time frame of the time period, the PGM is configured to determine a category of behavior (state of the syllable variable) using the states of other variables (non- observable) of the PGM and one or more key points of the key point tracking data (observable) at a preceding time instance. In some embodiments, in the PGM, the state of each variable at a time instance is dependent only on the state of that variable (and / or other variables) at the immediate preceding time instance, where the parameters of the PGM (e.g., state transition matrix) may be trained while performing the prediction (of the state of variables).
[0072] In some embodiments, the training of the PGM and the prediction (e.g., of the syllables) may be performed in one or more iterations in a unsupervised learning scheme, by: inputting the key point tracking data into the PGM; and identifying errors associated with the key point tracking data and the plurality of behavior modules using the PGM. This iterative process may be implemented in a fitting scheme that fits the PGM onto the key point tracking data. In some examples, the fitting scheme may include Gibbs sampling for a predetermined number of iterations. Alternatively, the fitting scheme may continue until the model converges to a desired performance metric. Additionally, it should be appreciated that other suitable fitting schemes can also be implemented.
[0073] In some embodiments, the coordinates of the key point tracking data at each frame may be modified based on the trained PGM (e.g., the predicted value of the key point at the preceding time frame). This may result in reduced noise in the key point tracking data and corrected key point tracking data may be output from the PGM in some embodiments. 12216901.1Attorney Docket No.: H0776.70153WO00 -13-
[0074] In some embodiments, initial values for some or all of the variables of the PGM (i.e., the first PGM) may be trained by another PGM (the second PGM). In some embodiments, the second PGM may be trained using training key point tracking data of one or more subjects during movement of the one or more subjects for a training time period. In some examples, the training key point tracking data may be the same key point tracking data of the subject used for training the first PGM and predicting the category of behavior. In some examples, the training key point tracking data may be received from other sources, for example, from separate training sessions of one or more subjects.
[0075] In some embodiments, the second PGM may be an auto-aggressive hidden Markov model (AR-HMM) configured to be trained and to determine initial values of a subset of the variables of the first PGM. For example, the second PGM may be trained to provide initial values of the pose state trajectory variable of the first PGM. In a non- limiting implementation, the second PGM may be trained to provide initial values of some variables (e.g., the syllable transition probabilities and linear dynamics parameters) of the first PGM. In some embodiments, principal components analysis (PCA) may be used in the course of training the second PGM. In some embodiments, PCA may also be used to provide initial values of the pose trajectory for the first PGM. When PCA is used, PCA may be applied to the aligned key point tracking data as further described.
[0076] In some embodiments, the system may align the coordinates of a set of key point tracking data before applying the PCA. In some examples, aligning the coordinates may include, for each frame of the training key point tracking data: determining a tail-nose angle, or other parameter related to a pose of a subject, from respective training key point tracking data in the frame; and updating the coordinates of the respective training key point tracking data in the frame based on the determined tail-nose angle. For example, the system may align the coordinates of the training key point tracking data so that the tail- nose angle is aligned with a predetermined direction such as an axis of the images (e.g., horizonal or vertical axis).
[0077] In some embodiments, the system may pre-process the training key point tracking data before the data is used for training the second PGM. For example, the pre-processing may include: filtering out key point tracking data points that have a confidence value 12216901.1Attorney Docket No.: H0776.70153WO00 -14- below a confidence threshold; interpolating the filtered training key point tracking data based at least in part on a location of the filtered out key point tracking data in adjacent time frames; and adding noise to the key point tracking data (e.g., the original and / or interpolated key point tracking data points). In some instances, the noise may be added using a randomly determined error within a predetermined error range for adding to the key point location. In some embodiments, the confidence threshold may be determined based on the histogram of confidence values of the training key point tracking data. The confidence values may be obtained in any appropriate manner. In a non-limiting, training key point tracking data may be obtained by a key point detection neural network. The confidence values of the training key point tracking data may be determined based on the peak activations from the key point detection neural network.
[0078] The various embodiments described above and further herein provide advantages over conventional systems in recognizing the temporal structure of behavior, such as, when each action started and stopped, and how long it lasted. Whereas the output of conventional systems (e.g., classifier-based approaches) tend to flicker every few frames, the techniques disclosed in the present disclosure may consistently identify 200-900ms- long syllables that transition accurately at kinematic changepoints, as measured by key point tracking, depth imaging and accelerometery. These differences in temporal structure may have a profound effect on the apparent dynamics and accuracy of a trained statistical model.
[0079] Turning to the figures, specific non-limiting embodiments are described in further detail. It should be understood that the various systems, components, features, and methods described relative to these embodiments may be used either individually and / or in any desired combination as the disclosure is not limited to only the specific embodiments described herein.
[0080] FIG.1 depicts, in accordance with various embodiments, a diagram of an exemplary system designed to model key points and predict behavior syllables with a probabilistic generative model. For instance, the system may include an imaging device 100, such as video recorder 100 which may be a 2D camera or a 3D depth camera and a tracking system 110. For instance, the tracking system may project structured infrared 12216901.1Attorney Docket No.: H0776.70153WO00 -15- light into the experimental field 10. Infrared receivers on the tracking system may be able to determine the location of an object based on parallax. In some embodiments, the video recorder 100 may be connected to the tracking system 110 or in some embodiments they may be separate components. However, other lighting and / or tracking arrangements may be used.
[0081] The imaging device 100 may output data related to video images and or tracking data from the tracking system 110 to a computing device 113 including one or more processors configured to perform any of the methods disclosed herein. In some embodiments, the computing device 113 may perform pre-processing of the data locally before sending over a network 120 to be analysed by a server 130 and to be saved in a database 160. In other embodiments, the data may be processed, and fit locally on the computing device 113.
[0082] In one embodiment, an imaging device 100 is used to obtain a stream of images of the subject, e.g., animal 50 during movement of the animal. In some embodiments, a 3D depth camera is used to obtain a stream of images of the animal 50 having both area and depth information. The background image (the empty experimental area) is then removed from each of the plurality of images to generate processed images having light and dark areas. The contours of the light areas in the plurality of processed images can be found and parameters from both area and depth image information within the contours can then be extracted to form a plurality of multi-dimensional key points tracking data, each point representing the location of a specific portion of the subject’s body, which may be related to a posture of the subject, at a specific time.
[0083] In some embodiments, the 2D or 3D key point tracking data may be input into one or more probabilistic generative models in order to determine the number of behavior “modules” int the motion video and transition periods that describe repeated units of behavior that are assembled together to form coherent behaviors observable by the human eye. The output of the models that classify the video data into modules may output several key parameters including: (1) the number of behavioral modules observed within a given set of experimental data (i.e. the number of states), (2) the parameters that describe the pattern of motion expressed by the animal associated with any given module 12216901.1Attorney Docket No.: H0776.70153WO00 -16- (i.e. state-specific autoregressive dynamical parameters), (3) the parameters (e.g., variables) that describe how often any particular module transitions to any other module (i.e. the state transition matrix), and (4) for each video frame an assignment of that frame to a behavioral module (i.e. a state sequence associated with each data sequence). Additionally, the variables may also include one or more of: a location, a heading, a pose state trajectory, a noise scale associated with the key point locations. In some embodiments, these latent variables were defined by a generative probabilistic process and were simultaneously trained while determining the number of behavior modules.
[0084] Various methods may be utilized to record and track video images of animals 50 (e.g., mice). In some embodiments, the video recorded may be recorded using any imaging device (e.g., a phone camera, CCD camera, etc.) to capture 2D images. In some embodiments, the video recorded may be recorded in three dimensions. For example, other appropriate imaging devices may include, but are not limited to: (1) stereo-vision cameras (which may include groups of two or more two-dimensional cameras calibrated to produce a depth image, (2) time-of-flight depth cameras (e.g. CamCube, PrimeSense, Microsoft Kinect 2, structured illumination depth cameras (e.g. Microsoft Kinect 1), and x-ray imaging systems. In some embodiments, multiple imaging devices may be used to capture images with depth information. Thus, it should be understood that the current systems and methods are not limited to any particular imaging device and / or method of obtaining the key point data for use with the disclosed methods.
[0085] Data output from the imaging device 100 and tracking system 110 may be received by and processed by a computing device 113 including one or more processors using any appropriate type of key point identification algorithm to determine the key point locations in each frame of the captured stream of images as previously discussed. Alternatively, in some embodiments, the data from the imaging device 100 and tracking system 110 may be directly output over a network 120 to a server 130, or may be temporarily buffered and / or sent over a USB or other connection to an associated computing device 113 that temporarily stores the data before sending over a network 120 to a centralized server 130 for further processing to determine the key point data. 12216901.1Attorney Docket No.: H0776.70153WO00 -17-
[0086] FIG.2 is an illustrative diagram of an exemplary system including two PGMs (120, 150) for determining animal behavior modules, according to some embodiments. In some embodiments, the system shown in FIG.2 may be implemented in the system shown in FIG.1. For example, the PGM 120 may be implemented as a first PGM described above to determine and output animal behavior modules 104 which may be used to label a behavior associated with each distinct grouping of sequential images within a stream of images capturing the movement of a subject. PGM 150 may be implemented as a second PGM described above as an initial training model to provide initial values of a subset of the variables for the first PGM 120. In some embodiments, the first PGM 120 may be a switching linear dynamical systems (SLDS) configured to decouple noise from behavior. SLDS is a class of probabilistic model. As shown, the first SLDS 120 may have three levels of a hierarchy: a discrete state sequence (top level); that governs the dynamics of a low-dimensional trajectory (middle level); which is then projected into observation space (bottom level). In some embodiments, the three levels as shown may correspond to syllable sequence, pose trajectory, and key point coordinates respectively. Additionally, the PGM 120 may include additional variables, such as: centroid (location), heading, and a noise scale for the key points.
[0087] When fitting the PGM to data during training (e.g., unsupervised learning as describe above and further herein), the model outputs predicted values for the five unobserved (latent) variables (e.g., syllable sequence, pose trajectory, centroid, heading, and noise scale) that together account for observed key point coordinates. This structure naturally decouples the different causes of key point movements: when a single key point jumps implausibly to another location, the model may attribute it to noise and preserve a smooth pose trajectory; if all the key points suddenly rotate within the egocentric reference frame, the model can adjust the inferred heading for that frame and restore a plausible sequence of coordinates; if key point motions are consistent with a learned syllable, the model can output that syllable for being associated with the corresponding frames of the stream of images.
[0088] With further reference to FIG.2, and as noted above, the system may include a second probabilistic generative model 150 (e.g., the second PGM described above and 12216901.1Attorney Docket No.: H0776.70153WO00 -18- further herein) for determining initial values of at least a portion of plurality of variables of the first probabilistic generative model 120. In some embodiments, the second PGM 150 may be an autoregressive hidden Markov model (AR-HMMs). As shown, the second PGM 150 may include two levels, and treat the key point coordinates as veridical representations of pose. Thus, no distinction may be made between the two possible causes of the movement: noise versus actual behavior. In some embodiments, the second PGM 150 may be trained to provide at least a portion of initial values for the first PGM 120. In some embodiments, the first and second PGMs 120, 150 may be trained using the same key point tracking data 102 and 106. Additionally, and / or alternatively, the PGM 150 may use other training key point tracking data (e.g., 106) received from other sources. The details of the PGMs 120, 150 are further described with reference to FIG.6.
[0089] FIGS.3A-3B illustrate examples of key points of a mouse captured with different camera angles, where the key points indicate key body locations of the mouse, according to some embodiments. As shown, an image of a mouse is captured using a top camera (FIG.3A) and a bottom camera (FIG.3B), with the background of the image separated. The key points on the body of the mouse may be determined from the captured image(s) and provided to the PGM(s) described above and further herein for determining the plurality of behavior modules from key point tracking data in a time period.
[0090] FIGS.4A-4B illustrate examples of key points of a mouse represented in 2D (FIG. 4A) and 3D (FIG.4B) space, according to some embodiments, where the key points represent a trajectory. The key points shown in FIGS.4A-4B may be any of the key point tracking data or training key point tracking data as described above and further herein that are used for training the PGM(s).
[0091] FIGs.3A-4B illustrate examples of key points of a mouse, however the techniques described herein may be used based on key points of other animals including fruit flies. Key points of other animals may be captured as described herein and may be located at anatomical landmarks analogous to those of a mouse or unique to the specific animal. The key points on other animals be determined from captured image(s) and provided to the PGM(s) described above and further herein for determining the plurality of behavior modules from key point tracking data in a time period. The key points of other animals 12216901.1Attorney Docket No.: H0776.70153WO00 -19- may be any of the key point tracking data or training key point tracking data as described above and further herein that are used for training the PGM(s).
[0092] FIG.5 illustrates examples of behavior modules that may be determined by the system as shown in FIG.1, according to some embodiments. In the example in FIG.5, a broad variation in the certainty of each state transition is shown. The illustrate states relative to the illustrated trajectories include grooming, rearing, small / medium / large turns, and slow / medium / fast movement, though other behavior modules may also be identified.
[0093] FIG.6 illustrates a flow diagram of an example method that may be implemented to identify behavior modules using key point tracking data associated with a sequential series of images taken of a subject over a sufficiently long time period using a probabilistic generative model. In some embodiments, the process 600 may be implemented in a system (e.g., described in FIG.1, FIG.2) for analysing the movement of a subject. In some embodiments, acts 602-610 may be implemented to train the first PGM (e.g., 120 in FIG.2) to predict the plurality of behavior modules as described above and further herein. Acts 620-626 may be implemented to train the second PGM (e.g., 150 in FIG.2) to provide initial values of one or more variables for the first PGM (e.g., 120 in FIG.2) as described above and further herein.
[0094] With further reference to FIG.6, the training of the first and second PGMs are further described. As shown, the modelling process in the system (e.g., FIG.1, FIG.2) may include two phases (1) Acts 620-626 corresponding to fitting a second PGM (150 in FIG.2, e.g., an autoregressive hidden Markov model, AR-HMM) to a fixed pose trajectory, which may be derived from principal component analysis (PCA), (2) Acts 602- 610: fitting another first PGM (120 in FIG.2, e.g., a SLDS model) initialized from the second PGM (e.g., 150 in FIG.2).
[0095] When fitting the initial PGM to train the subsequent PGM, the key point tracking data, which may be training key point tracking data, may be received at 620. The key point tracking data may be pre-processed at act 622. This may include defining key points with confidence below a confidence value, e.g., 0.5, as missing data and determining the coordinates of the deleted key point data using linear interpolation or other appropriate interpolation method. The key point coordinates may then be modified 12216901.1Attorney Docket No.: H0776.70153WO00 -20- with a small amount of random noise added to the location. The noise values may be uniformly sampled from an appropriately sized interval including, for example, [-0.1, 0.1] to help prevent degeneracy during model fitting. In some embodiments, these pre- processing steps may only be applied during AR-HMM fitting, whereas the original coordinates may be used without pre-processing when fitting the SLDS model.
[0096] In some embodiments, the coordinates of key points in each frame may be aligned, at act 624. For example, the coordinates may be centred, and aligned by orienting the tail-nose angle in a predetermined direction. The key point tracking data may also be transformed using principal component analysis (PCA) with whitening. The number of principal components (PCs) may be chosen for each dataset as a minimum required to explain 90% of the total variance. In some examples, act 624 may result in four principal components for the top-down 2D datasets, six principal components for the bottom-up 2D datasets, and six principal components for the 3D dataset.
[0097] In some embodiments, at act 626, a suitable sampling technique, e.g., Gibbs sampling, may be used for a predetermined number of iterations (e.g., 500 iterations) to fit the variables of an AR-HMM, including the state sequence ^, the autoregressive parameters ^, ^, ^, and the transition parametersIn some embodiments, the hyper- parameters for training the first and second PGMs (e.g., 120, 150 in FIG.2) may be substantial similar. One exception may be that ^ which can be adjusted separately for each dataset to ensure a median state duration of 400ms.
[0098] The SLDS model (e.g., 120 in FIG.2) may include a plurality of variables, which may include the AR-HMM variables mentioned above, and additional variables, such as the centroid (location) ^ and heading ℎ, latent pose trajectory ^, noise scale (e.g., overall per-key point noise level ^^, and per-frame, per-key point noise scale ^). Fitting of the SLDS model may be performed using any suitable techniques, such as Gibbs sampling, for a number of iterations (e.g., 500), at acts 606, 608. In some embodiments, in comparison to the AR-HMM model, the same hyper-parameters values may be used across datasets. The two exceptions may be that ^, which may be adjusted to maintain a median state duration of 400ms, and ^^, which determines a prior on the noise scale. Since low-confidence key point detections often have high error, ^^may be determined 12216901.1Attorney Docket No.: H0776.70153WO00 -21- using a logistic curve that transitions between a high-noise regime (^^= 100) for detections with low confidence and a low-noise regime (^^= 1) for detections with highconfidence:^= 1 + ^^^^^^^^^^^^^ ^.") $^ 100^1 + ^ #
[0099] With further reference to FIG.6, input key point tracking data (location of animal body parts over time) may be obtained, e.g., using machine vision analysis of video recordings, at act 602. The output of the training of the second PGM may be used as initial values for at least some of the variables in the first PGM in combination with the key point tracking data input into the first PGM at acts 606. The first PGM may then undergo an iterative unsupervised training process using the key point tracking data and the initial values from the initial PGM as described previously above. After being trained the trained PGM may identify and output a set of behavior labels indicating a category of behavior and an assignment of each video frame to one of the identified behavior modules at 608. The trained PGM may also identify and output detected errors associated with the key point tracking data at 608. Optionally, the key point tracking data and the identified errors associated with the key point tracking data from the PGM may be used to modify the coordinates of the key point tracking data. The resulting modified key point tracking data may more accurately track the locations of the key points within the stream of images. The mathematical model (e.g., PGM 120, FIG.2) used for analysing the key point tracking data is further described, with SLDS as an example.
[0100] Example: Difficulties with prior models
[0101] Various embodiments in the present disclosure describe new techniques that use raw video to automatically track defined locations on an animal’s body (“key points”) and then apply unsupervised learning algorithms to discover the full set of behaviors that collectively explain the animal’s movements. In conventional systems, partitioning those movements into discrete behaviors is not well defined. For example, animals structure their actions across multiple timescales, and any attempt to boil their behavior down to a sequence of labels will capture some aspects of this structure but not others. Because of this inherent ambiguity, unsupervised behavior analysis works best when it is tailored to an explicitly-defined timescale or pattern of dynamics. For behaviors that divide neatly 12216901.1Attorney Docket No.: H0776.70153WO00 -22- into chunks, such as swim bouts in larval zebrafish or syllables in bird song, simple clustering approaches may be sufficient.
[0102] However, for more complex behaviors, probabilistic generative models (PGMs) may provide a versatile alternative for tailoring towards dynamics-of-interest. The inventors have recognized and appreciated that the PGM(s) can target qualitative patterns in behavior through the structure of the generative model, and allow for quantitative fine- tuning by adjustment of prior parameters. Accordingly, the inventors developed new techniques that apply PGMs to identify a sub-second timescale of behavior organization for subjects (e.g., mice) exploring an open field. Using a 3D depth camera, it was found that mouse movements tend to divide into 200-900ms “syllables”, such as run, turn, rear or groom, that could be parsed using an autoregressive hidden Markov Model (AR- HMM) – a type of PGM.
[0103] The inventors have recognized and appreciated that, when AR-HMM alone is applied to animal key point data, noisy state sequences that switch much faster than the animal's actual behavior are reported. The cause for the noisy states is the noise in the key point trajectories. The noise includes both gross errors and subtle, high-frequency jitter (e.g., >8Hz fluctuation in a key point’s position), and is a well-known limitation of pose tracking with neural networks. Interventions like increasing the prior on state persistence or smoothing key point trajectories may make the AR-HMM more robust to noise, but they may also make it less sensitive to behavior transitions.
[0104] Accordingly, the inventors have developed new techniques including a model for modelling the movement of a subject, e.g., a mouse. In some embodiments, the model (e.g., a PGM) models the coordinates as error-prone observations from an underlying movement trajectory. By fitting the trajectory, the model learns which key point dynamics are caused by behavior and which are attributable to noise. The model may be used to estimate the syllable structure in a variety of datasets, including mice with implants, filmed from above or below, using 2D or 3D key points. This new approach may be broadly useful in parsing the temporal structure of animal behavior.
[0105] Example: Probabilistic Generative Model implementation 12216901.1Attorney Docket No.: H0776.70153WO00 -23-
[0106] The inventors have recognized that mouse behavior evolves through a sequence of short motifs that are referenced as syllables. Each motif is characterized by a stable pattern of movement dynamics, and the boundaries between motifs correspond to sudden changes in these dynamics. In some embodiments, switching linear dynamical systems (SLDS) may be suitable for identifying these dynamical patterns and the transitions between them. SLDS models the observed data using a lower-dimensional latent time- series with linear autoregressive dynamics. The dynamics switch over time, and the sequence of transitions are assumed to form a Markov chain. Formally, if %&, ^&, and ^&represent the observed state, continuous latent state, and discrete latent state at time ',SLDS defines the following generative model.() ∼ +,-. / 0123,4^5()67#
[0107] In case the key points are represented in 3D space, %&represents pixel values in a 3D depth map, and G, H, ^&are fixed ahead of time using PCA . The system may relax these constraints and fit ^&simultaneously with the rest of the model. The system may usea matrix normal inverse Wishart (MNIW) prior for the autoregressive parameters^;^I), @^I)#, A^I) ∼ JKLM^NO, FO, PO, QO)and a sticky hierarchical Dirichlet process (HDP) prior for the transition matrix ^, taking the weak limit with maximum number of states R. In practice, this means ^ is generatedvia stacked Dirichlet distributions as follows.S∼5I ∼
[0108] The hyperparameters \, ], ^ control the sparsity of states, the weight of the sparsity prior, and the bias toward self-transitions respectively. Additionally, and / or alternatively, SLDS models can have state dependent observation parameters ^G, H, ^) and time-varying input signals.
[0109] When clustering kinematics into distinct behavior motifs, conventional systems typically ignore absolute location and heading angle. Common approaches for such affine invariance include centering and aligning data ahead of time, or using relative distances 12216901.1Attorney Docket No.: H0776.70153WO00 -24- or angles. One issue with these approaches is that they induce spurious correlations between variables. When a single key point moves, it may shift the egocentric reference frame, or perturb multiple distances and / or angles. To avoid this problem, the techniques herein include modelling the animal’s centroid and heading explicitly, and then combining these variables with pose to predict key point locations in absolute coordinates.
[0110] In some examples, let _& ∈ ℝb×d represent the coordinates of e key points at time', where f ∈ {2,3}. Define latent variables ^& ∈and ℎ& ∈ k0,2^l to represent theanimal’s location and heading angle. At each time point, the pose _&is generated via rotation and translation of a centered and oriented pose _m&that depends on the current latent state ^&, as follows, whereis a matrix that rotates by angle ℎ&in the xy-plane.o) = op)q^r)) + 7Qs>) where vec^op)# ∼ 9^^t ⊗ vw)^D8) + E), F)#
[0111] The matrix x is defined by the singular value decomposition xyxz = {b −1b×b / e, and ensures that }^_m is always centered. x encodes a linear transformationthat isometrically mapsto the set of all centered key point arrangements inThe elements of G, H have iid priors ~^0, ^^^) and each angle ℎ& has anindependent uniform prior. We assume that the translations are autocorrelated as follows,where ^loc is a hyper-parameter.
[0112] To account for occasional large errors in key point tracking data, in some embodiments, a (heavy-tailed) Student’s-t distribution for key point coordinates was used, assuming that the noise in these coordinates is independent and isotropic for each keypoint. These assumptions were encoded in the following generative model for ^&.
[0113] Examples of possible, but non-limiting, hyper-parameter values that may be used in the process shown in FIG.6 include:
[0114] Transition matrix 12216901.1Attorney Docket No.: H0776.70153WO00 -25- R= 100\ = 1000] = 100^fit to each dataset
[0115] Autoregressive process Let ^ = dim^^)and ^ = 3 =+ 2{^ 1^×1l
[0116] Observation process^^^ = 1^^= 10^^^ = 5^^ set based on neural network confidence
[0117] Animal position^^loc = 0.4
[0118] In some embodiments, the PGM (e.g., 120 in FIG. 2) may contain latent variables^, ℎ, ^, ^, ^ and parameters ^, ^, ^, G, H, ^, ^, ^. The system may fit each of these variables– with the exception of ^G, H) using Gibbs sampling, wherein each variable is resampledfrom its posterior distribution conditional on all the other variables and on the data_$, ... , _z. Here we describe Gibbs updates for ^G, H) even though these variables arefixed at their initial values (learned from PCA) for the PGM (e.g., SLDS). The Gibbs updates for G, H, ^, ^, ^ and ℎ are described below.
[0119] ^^G, H ∣ ^, ^, ^, ^, ℎ, _)Let ^^& represent ^& with a 1 appended and define^^& = ^xzdiag^^^$^&,$, ... , ^^b^&,b#x# ⊗ {dThe posterior updatewith ^ = vecm z^,^^_
[0120] ^^^ ∣ G, H, ^, ^, ^, ℎ, _) 12216901.1Attorney Docket No.: H0776.70153WO00 -26-Each ^&,^ is conditionally independent with posterior
[0121] ^^^ ∣ G, H, ^, ^, ^, ℎ, _)Each ^^ is conditionally independent with posterior
[0122] ^^^ ∣ G, H, ^, ^, ^, ℎ, _)Since the translations ^$, ... , ^^form a linear dynamical system, they can be updated by Kalman sampling. The observation potentials have the form ~^^&∣ ^, \^{d)where
[0123] ^^ℎ ∣ G, H, ^, ^, ^, ^, _)The posterior of ℎ&is the von-Mises distribution vM^ , ^) where ^ and ∈ k0,2^l are the unique parameters satisfying k^¡¢^^ ), ^^£^^ )l = <^$,$+ ^^,^, ^$,^− ^^,$? for ^= ^ 1^^^x^G^ + H) ^_ − ^ #z&^ &,^ &^ &,^ ^
[0124] ^^^ ∣ G, H, ^, ^, ^, ℎ, _) To resample ^, its temporal dependencies were expressed as a first-order autoregressive process, and then Kalman sampling was applied. The change of variables isKalman sampling was then applied to the linear system
[0125] A derivation of the Gibbs updates (Derivation of G, H updates) is provided below.To simply notation, the following definition may be used.The likelihood of the centered and aligned key point locations _mcan be expanded as follows. 12216901.1Attorney Docket No.: H0776.70153WO00 -27-whereMultiplying by the prioryieldswhere
[0126] Derivation of ^^, ^&,^updates is provided below. For each time ' and key point ^, let _‾&,^= x^G^&+ H). The likelihood of the centered and aligned key point location _m&,^is:Posteriors may then be calculated for ^&,^ ∣ ^^ and ^^ ∣ ^&,^ as follows.12216901.1Attorney Docket No.: H0776.70153WO00 -28-where
[0128] Derivation of ℎ&updateLetk^cos^ ), ^sin^ )lrepresent <^$,$+in polar coordinates. Then ^^_& ∣ ℎ&) ∝ expk^cos^ℎ&)cos^ ) + sin^ℎ&)sin^ )l=expk^cos^ℎ& − )l ∝ vM^ℎ& ∣ , ^)12216901.1Attorney Docket No.: H0776.70153WO00 -29-
[0129] Various embodiments as described in the present disclosure provide several advantages over conventional systems. For example, the techniques disclosed herein can recognize the temporal structure of behavior: when each action started and stopped, and how long it lasted. In comparison with other classifiers, which tend to flicker every few frames, the techniques provided herein can consistently identify 200-900ms-long syllables that transitioned precisely at kinematic changepoints, as measured by key point tracking, depth imaging and accelerometery. These differences in temporal structure had a profound affect on the apparent dynamics of neural activity. When behavior associated with striatal dopamine was analysed using the output of techniques described herein, the techniques were able to identify fast fluctuations aligned to behavior onset.
[0130] Since the PGM (e.g., SLDS) is a probabilistic model, it can generate a full distribution of syllable sequences in addition to a single point estimate. Comparing samples from this distribution revealed broad variation in the certainty of each state transition. Some transitions occurred with almost 100% certainty, though the precise timing often varied by one or two frames. Other transitions occurred in only a fraction of samples or varied more broadly in their timing. In some embodiments, the probabilistic analysis may be useful in assigning confidence values to each state transition.
[0131] Mouse syllables cover a broad range of movements varying in both types (e.g., rearing vs. grooming) and quality (e.g., fast vs. slow). A method that discretizes this space needs to balance sensitivity to these differences with robustness to noise. Thus, the methods and systems described in the present disclosure may use a probabilistic generative model that takes into account the magnitude of differences between behaviors and the total amount of data that attest to these differences. In some experiments, the described techniques identified 25 syllables states, differentiating between categories of behavior (e.g., rearing, grooming, walking), and variations within each category (e.g., turn angle, speed).
[0132] Example: Sensitive to key point tracking data
[0133] Experiments were performed to explore whether the PGM (e.g., SLDS) described in the present disclosure partition behaviors differently if the way pose was encoded was changed. In an experiment, six additional key points were tracked on the fore- and 12216901.1Attorney Docket No.: H0776.70153WO00 -30- hindlimbs, and used multiple cameras to estimate the position of each key point in 3D. The new pose representation differed in several ways, yielded smoother trajectories (e.g., 3D including a Z-axis), and exhibited oscillatory gate dynamics. The temporal structure of syllables, however, was unchanged. For example, the distribution of state durations was almost identical between the 2D and 3D datasets, and transitions between states tended to occur at the same moments in time. There was a bigger change, however, in the way syllables were categorized. For example, the model tended to distinguish more syllable states in the 3D data (33±2 states vs.27±2 for the 2D data), especially for behaviors that varied in the mouse’s height. Stationary sniffing, for example, was grouped as a single state with the 2D data but partitioned into three states with different head positions with the 3D data (nose to the ground vs. nose in the air). Rearing was even more fractionated, with a single 2D syllable splitting 5 ways on the basis of body angle and trajectory (rising vs. falling). Thus, the techniques described herein may split behaviors more finely along dimensions that are cleanly encoded in the pose representation.
[0134] Example: Additional Organisms and Behavior Modelling
[0135] Experiments were performed to explore whether the PGM (e.g., SLDS) described in the present disclosure is capable of segmenting the behavior of fruit fly movement. Fruit flies tend to switch between distinct, oscillatory pose trajectories, with many repetitions of a single motion during the execution of each behavior, and these movements can be finely subdivided, as in the coordinated stance and swing phases of locomotion, or more coarsely segmented at the transitions between distinct oscillatory modes (e.g., locomotion vs. grooming).2D keypoint data for fruit flies exploring a substrate was analyzed using PGM and the resulting identified behavioral motifs varied from tens to hundreds of milliseconds in median duration depending on parameters of the PGM.20 models were fit for different timescales. For motif durations, the duration distributions from all 20 models were pooled and the median durations were determined. For determining the motif number, the number of motifs with frequency above 0.5% for each of the 20 models was determined. At longer model timescales, behavioral motifs were identified that corresponded to recognizable behaviors such as locomotion, head grooming or left-wing grooming, while at shorter model time scales, multiple motifs were assigned to each individual state. This greater 12216901.1Attorney Docket No.: H0776.70153WO00 -31- fractionation of fly behaviors at short timescales might reflect the sequential division of these behaviors into their constituent phases, while the longer timescales see merging of these phases. This demonstrates the applicability of the PGM techniques described herein as useful tools for analyzing the behavior of different organisms, including fruit flies, and suggest a that users may adjust parameters of the models such that longer model timescale may be used to distinguish different oscillatory behaviors, and a shorter model time scale may be used to further segment each oscillation into phases.
[0136] The above analysis confirms that the currently disclosed techniques are flexible and may be used to accurately identify and segment the observed behavior of different types of organisms. Additionally, as illustrated by this example, the categories of behavior may be species dependent. For instance, when analyzing fruit flies, the category of behavior may include locomotion, head grooming, right wing-grooming, or left wing- grooming, among other suitable categories of behavior which are different from those identified and segmented for the other animals described herein. Thus, the currently disclosed systems and algorithms may be used to provide a flexible accurate tool for identifying behaviors for multiple different animals and should not be limited to only being used with the animals described herein.
[0137] In some experiments, the techniques described in the present disclosure were compared with conventional systems, such as a cluster-based approach, which may typically apply two steps in sequence: first transforming the data into a feature space that reflects the dynamics in a small window around each frame, and then clustering within that space to distinguish a set of behaviors. Since the clustering step lacks a prior for the timescale of behavioral transitions, these approaches may be vulnerable to over- segmentation. For example, it was found from the experiments that behavior states from the cluster-based approaches were usually brief (median duration 33-100ms, compared to 400ms for the new techniques described in the present disclosure) and their transitions aligned less closely with change-points in the key-point data. Scanning across parameters for each method revealed some combinations with longer state durations, but these tended to have the same or worse alignment to change-points (e.g., for both top-down and bottom-camera angles). These experimental results suggest that the currently disclosed 12216901.1Attorney Docket No.: H0776.70153WO00 -32- techniques may better handle the temporal structure of behavior than existing cluster- based approaches.
[0138] It was found that the new techniques disclosed herein recognize social behaviors in a manually annotated benchmark dataset. In addition to capturing temporal structure, model’s prior on state persistence may be helpful for detecting behaviors with complex, compound kinematics. This possibility was examined using the CalMS21 benchmark of manually annotated social behaviors. The dataset includes videos of male mice in their home cage (residents) interacting with an unfamiliar male or female (intruder). Three of the resident’s behaviors were labelled on a frame-by-frame basis: mounting (29% of frames), investigation (5.6%) and attack (3%). The ability to discover these behaviors de novo using just the kinematics of the resident mouse were investigated for different methods. This ability to discover the behaviors was found to vary by method used. From the experiments, it was found that the new model disclosed in the present disclosure defined at least one state specific to each of these behaviors in 100% of model fits while other cluster-based approaches did not. These differences were recapitulated when unsupervised state labels were used from each method to predict each social interaction. The results suggest that the currently disclosed techniques herein may be useful for recognizing kinematically complex and / or rare behaviors.
[0139] It was found from experiments that the currently disclosed techniques may tend to start and stop at clear change-points in the key point dynamics. The experimental results suggest that for the model in the new techniques, the onsets of behavioral states are meaningful landmarks for neural data analysis.
[0140] Having described various embodiments and performed various experiments, the currently disclosed techniques including the new probability generative model (e.g., SLDS) may use a key point-specific emission distribution to decouple tracking noise from an animal’s underlying behavior. The model was tested across multiple datasets, camera angles and tracking modalities, and its outputs were evaluated using accelerometry, supervised behavior labels and neural recordings. The analyses suggest that the currently disclosed techniques robustly detect behavioral syllables, identifying when they transition, and classifying them into a finite set of distinct behaviors. The new model may 12216901.1Attorney Docket No.: H0776.70153WO00 -33- be broadly useful for recognizing patterns in noisy tracking data, and can parse the key point tracking data cleanly even with high-frequency jitter in the tracking data.
[0141] FIG.7 shows an illustrative implementation of a computer system that may be used to perform any of the aspects of the techniques and embodiments disclosed herein, according to some embodiments. For example, the computer system 700 may be configured to implement any of the embodiments described in FIGS.1-6. The computer system 700 may include one or more processors 702 and one or more non-transitory computer-readable storage media (e.g., memory 704 and one or more non-volatile storage media 706) and a display 710. The one or more processors 702 may control writing data to and reading data from the memory 704 and the non-volatile storage device 706 in any suitable manner, as the aspects of the invention described herein are not limited in this respect. To perform functionality and / or techniques described herein, the processor(s) 702 may execute one or more instructions stored in one or more computer-readable storage media (e.g., the memory 704, storage media, etc.), which may serve as non- transitory computer-readable storage media storing instructions for execution by the processor 702.
[0142] In connection with techniques described herein, code used to, for example, train the PGM(s) and / or predict the plurality of behavior modules described in the present disclosure may be stored on one or more computer-readable storage media of computer system 700. Processor(s) 702 may execute any such code to provide any techniques for modelling the behavior of the subjects. Any other software, programs or instructions described herein may also be stored and executed by computer system 700. It will be appreciated that computer code may be applied to any aspects of methods and techniques described herein. For example, computer code may be applied to interact with an operating system to model the animals’ behaviors through conventional operating system processes.
[0143] The various methods or processes outlined herein may be coded as software that is executable on one or more processors that employ any one of a variety of operating systems or platforms. Additionally, such software may be written using any of numerous suitable programming languages and / or programming or scripting tools, and also may be 12216901.1Attorney Docket No.: H0776.70153WO00 -34- compiled as executable machine language code or intermediate code that is executed on a virtual machine or a cloud or other framework via a network interface 708.
[0144] In this respect, various inventive concepts may be embodied as at least one non- transitory computer readable storage medium (e.g., a computer memory, one or more floppy discs, compact discs, optical discs, magnetic tapes, flash memories, circuit configurations in Field Programmable Gate Arrays or other semiconductor devices, etc.) encoded with one or more programs that, when executed on one or more computers or other processors, implement the various embodiments of the present invention. The non- transitory computer-readable medium or media may be transportable, such that the program or programs stored thereon may be loaded onto any computer resource to implement various aspects of the present invention as discussed above.
[0145] The terms “program,” “software,” and / or “application” are used herein in a generic sense to refer to any type of computer code or set of computer-executable instructions that can be employed to program a computer or other processor to implement various aspects of embodiments as discussed above. Additionally, it should be appreciated that according to one aspect, one or more computer programs that when executed perform methods of the present invention need not reside on a single computer or processor, but may be distributed in a modular fashion among different computers or processors to implement various aspects of the present invention.
[0146] Computer-executable instructions may be in many forms, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments.
[0147] Also, data structures may be stored in non-transitory computer-readable storage media in any suitable form. Data structures may have fields that are related through location in the data structure. Such relationships may likewise be achieved by assigning storage for the fields with locations in a non-transitory computer-readable medium that convey relationship between the fields. However, any suitable mechanism may be used to 12216901.1Attorney Docket No.: H0776.70153WO00 -35- establish relationships among information in fields of a data structure, including through the use of pointers, tags or other mechanisms that establish relationships among data elements.
[0148] Having thus described several aspects of at least one embodiment of this invention, it is to be appreciated that various alterations, modifications, and improvements will readily occur to those skilled in the art.
[0149] Such alterations, modifications, and improvements are intended to be part of this disclosure, and are intended to be within the spirit and scope of the invention. Further, though advantages of the present invention are indicated, it should be appreciated that not every embodiment of the invention will include every described advantage. Some embodiments may not implement any features described as advantageous herein and in some instances. Accordingly, the foregoing description and drawings are by way of example only.
[0150] Various aspects of the present invention may be used alone, in combination, or in a variety of arrangements not specifically discussed in the embodiments described in the foregoing and is therefore not limited in its application to the details and arrangement of components set forth in the foregoing description or illustrated in the drawings. For example, aspects described in one embodiment may be combined in any manner with aspects described in other embodiments.
[0151] Also, the invention may be embodied as a method, of which an example has been provided. The acts performed as part of the method may be ordered in any suitable way. Accordingly, embodiments may be constructed in which acts are performed in an order different than illustrated, which may include performing some acts simultaneously, even though shown as sequential acts in illustrative embodiments.
[0152] The indefinite articles “a” and “an,” as used herein in the specification and in the claims, unless clearly indicated to the contrary, should be understood to mean “at least one.”
[0153] The phrase “and / or,” as used herein in the specification and in the claims, should be understood to mean “either or both” of the elements so conjoined, i.e., elements that are conjunctively present in some cases and disjunctively present in other cases. Multiple 12216901.1Attorney Docket No.: H0776.70153WO00 -36- elements listed with “and / or” should be construed in the same fashion, i.e., “one or more” of the elements so conjoined. Other elements may optionally be present other than the elements specifically identified by the “and / or” clause, whether related or unrelated to those elements specifically identified. Thus, as a non-limiting example, a reference to “A and / or B”, when used in conjunction with open-ended language such as “comprising” can refer, in one embodiment, to A only (optionally including elements other than B); in another embodiment, to B only (optionally including elements other than A); in yet another embodiment, to both A and B (optionally including other elements); etc.
[0154] As used herein in the specification and in the claims, the phrase “at least one,” in reference to a list of one or more elements, should be understood to mean at least one element selected from any one or more of the elements in the list of elements, but not necessarily including at least one of each and every element specifically listed within the list of elements and not excluding any combinations of elements in the list of elements. This definition also allows that elements may optionally be present other than the elements specifically identified within the list of elements to which the phrase “at least one” refers, whether related or unrelated to those elements specifically identified. Thus, as a non-limiting example, “at least one of A and B” (or, equivalently, “at least one of A or B,” or, equivalently “at least one of A and / or B”) can refer, in one embodiment, to at least one, optionally including more than one, A, with no B present (and optionally including elements other than B); in another embodiment, to at least one, optionally including more than one, B, with no A present (and optionally including elements other than A); in yet another embodiment, to at least one, optionally including more than one, A, and at least one, optionally including more than one, B (and optionally including other elements); etc.
[0155] Use of ordinal terms such as “first,” “second,” “third,” etc., in the claims to modify a claim element does not by itself connote any priority, precedence, or order of one claim element over another or the temporal order in which acts of a method are performed, but are used merely as labels to distinguish one claim element having a certain name from another element having a same name (but for use of the ordinal term) to distinguish the claim elements. 12216901.1Attorney Docket No.: H0776.70153WO00 -37-
[0156] Also, the phraseology and terminology used herein is for the purpose of description and should not be regarded as limiting. The use of "including," "comprising," or "having," “containing,” “involving,” and variations thereof herein, is meant to encompass the items listed thereafter and equivalents thereof as well as additional items. 12216901.1
Claims
Attorney Docket No.: H0776.70153WO00 -38- CLAIMS 1. A method for analyzing motion of a subject to separate the motion into a plurality of behavior modules, the method comprising: obtaining key point tracking data of the subject, the key point tracking data comprising one or more key point locations of the subject for a time period during which the subject is moving; inputting the key point tracking data into a probabilistic generative model (PGM); and identifying errors associated with the key point tracking data and the plurality of behavior modules using the PGM, each of the plurality of behavior modules indicating a category of behavior.
2. The method of claim 1, wherein identifying the errors and the plurality of behavior modules using the PGM comprises: for each time frame of the time period, determining a category of behavior using a plurality of variables of the PGM and one or more key points of the key point tracking data at a preceding time instance, wherein the plurality of variables comprise one or more of: a location, a heading, a pose state trajectory, or a noise scale of the subject.
3. The method of claim 2, wherein the noise scale comprises one or more of an overall per key point noise level or a per-frame-per-key point noise level.
4. The method of claim 2, wherein: the PGM is a first PGM, and wherein the plurality of variables of the first PGM include a first plurality of variables and a second plurality of variables different from the first plurality of variables; and the method further comprises training a second PGM to determine initial values of the second plurality of variables of the first PGM. 12216901.1Attorney Docket No.: H0776.70153WO00 -39- 5. The method of claim 4, wherein the first PGM is further trained using unsupervised learning while the operations of: inputting the key point tracking data into the PGM and identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM are performed.
6. The method of claim 4, further comprising: receiving training key point tracking data of one or more subjects during movement of the one or more subjects for a training time period; wherein training the second PGM to determine the initial values of the second plurality of variables of the first PGM is performed based on the training key point tracking data of the one or more subjects.
7. The method of claim 6, wherein at least a subset of the training key point tracking data comprises at least a portion of the key point tracking data of the subject.
8. The method of claim 6, further comprising preprocessing the training key point tracking data before training the second PGM, by: filtering out data points of the training key point tracking data having confidence values below a confidence threshold; interpolating the filtered out data points; and adding a random error to the training key point tracking data.
9. The method of claim 6, wherein training the second PGM further comprises: aligning coordinates of the training key point tracking data; and applying principal component analysis to the aligned coordinates of the training key point tracking data.
10. The method of claim 9, wherein aligning the coordinates of the training key point tracking data comprises, for each frame of the training key point tracking data: 12216901.1Attorney Docket No.: H0776.70153WO00 -40- determining a tail-nose angle from respective training key point tracking data in the frame; and updating the coordinates of the respective training key point tracking data in the frame based on the determined tail-nose angle.
11. The method of claim 4, wherein the second PGM comprises a hidden Markov model (HMM).
12. The method of claim 2, further comprising modifying coordinates of the key point tracking data of the subject using an output of the PGM.
13. The method of claim 1, wherein the PGM comprises a switching linear dynamics system (SLDS).
14. The method of claim 1, wherein the operations of: inputting the key point tracking data into the PGM; identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM, are implemented in a fitting scheme configured to fit the PGM onto the key point tracking data.
15. The method of claim 14, wherein the fitting scheme comprises Gibbs sampling for a number of iterations.
16. The method of claim 1, wherein the key point tracking data comprises a plurality of key point coordinates represented in two dimensional or three dimensional space.
17. A non-transitory computer readable medium containing programming instructions that, when executed by one or more processors, cause the one of more processors to perform one or more operations in any of claims 1-16.
18. A system for analyzing motion of a subject, comprising: 12216901.1Attorney Docket No.: H0776.70153WO00 -41- at least one imaging device configured to obtain key point tracking data of the subject comprising one or more key point locations of the subject for a time period during which the subject is moving; and at least one processor configured to: input the key point tracking data into a probabilistic generative model (PGM); and identify errors associated with the key point tracking data and a plurality of behavior modules using the PGM, each of the plurality of behavior modules indicating a category of behavior.
19. The system of claim 18, wherein identifying the errors and the plurality of behavior modules using the PGM comprises: for each time frame of the time period, determining a category of behavior using a plurality of variables of the PGM and one or more key points of the key point tracking data at a preceding time instance, wherein the plurality of variables comprise one or more of: a location, a heading, a pose state trajectory, or a noise scale of the subject.
20. The system of claim 19, wherein the noise scale comprises one or more of an overall per key point noise level or a per-frame-per-key point noise level.
21. The system of claim 20, wherein: the PGM is a first PGM, and wherein the plurality of variables of the first PGM include a first plurality of variables and a second plurality of variables different from the first plurality of variables; and the at least one processor is further configured to train a second PGM to determine initial values of the second plurality of variables of the first PGM.
22. The system of claim 21, wherein the at least one processor is further configured to train the first PGM using unsupervised learning while performing the operations of: 12216901.1Attorney Docket No.: H0776.70153WO00 -42- inputting the key point tracking data into the PGM and identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM.
23. The system of claim 21, wherein the at least one processor is further configured to: receive training key point tracking data of one or more subjects during movement of the one or more subjects for a training time period; and train the second PGM to determine the initial values of the second plurality of variables of the first PGM based on the training key point tracking data of the one or more subjects.
24. The system of claim 23, wherein at least a subset of the training key point tracking data comprises at least a portion of the key point tracking data of the subject.
25. The system of claim 23, wherein the at least one processor is further configured to preprocess the training key point tracking data before training the second PGM, by: filtering out data points of the training key point tracking data having confidence value below a confidence threshold; interpolating the filtered out data points; and adding a random error to the training key point tracking data.
26. The system of claim 22, wherein the at least one processor is further configured to train the second PGM by: aligning coordinates of the training key point tracking data; and applying principal component analysis on the aligned coordinates of the training key point tracking data.
27. The system of claim 26, wherein the at least one processor is further configured to align the coordinates of the training key point tracking data by, for each frame of the training key point tracking data: 12216901.1Attorney Docket No.: H0776.70153WO00 -43- determining a tail-nose angle from respective training key point tracking data in the frame; and updating the coordinates of the respective training key point tracking data in the frame based on the determined tail-nose angle.
28. The system of claim 22, wherein the second PGM comprises a hidden Markov model (HMM).
29. The system of claim 20, wherein the at least one processor is further configured to modify coordinates of the key point tracking data of the subject using an output of the PGM.
30. The system of claim 19, wherein the PGM comprises a switching linear dynamics system (SLDS).
31. The system of claim 19, wherein the at least one processor is further configured to perform the operations of: inputting the key point tracking data into the PGM and identifying the errors associated with the key point tracking data and the plurality of behavior modules using the PGM, in a fitting scheme configured to fit the PGM onto the key point tracking data.
32. The system of claim 31, wherein the fitting scheme comprises Gibbs sampling for a number of iterations.
33. The system of claim 19, wherein the category of behavior comprises any of: rearing, grooming, walking, or a combination thereof.
34. The system of claim 19, wherein the key point tracking data comprises a plurality of key point coordinates represented in two dimensional or three dimensional space. 12216901.1
Citation Information
Patent Citations
System and method for classifying agents based on agent movement patterns
US10514694B1
Systems and method for action recognition using micro-doppler signatures and recurrent neural networks
US20200160046A1
Machine learning model scaling system with energy efficient network data transfer for power aware hardware
US20220036123A1
Cited By
Safety risk anti-fact deduction method based on causal guidance and physical hard constraint
CN122839128A
