Data Pipeline
Each node in the following diagram represents the analysis code in the pipeline and the
corresponding table in the database. Within the pipeline, Element MoSeq
connects to upstream Elements including Lab, Animal, Session, and Event. For more
detailed documentation on each table, see the API docs for the respective schemas.
The Element is composed of two main schemas, moseq_train
and moseq_infer
. The moseq_train
schema is designed to handle the analysis and ingestion of PCA model for formatted keypoint tracking and train the Kepoint-MoSeq model. The moseq_infer
schema is designed to handle the analysis and ingestion of Keypoint-MoSeq's motion sequencing on video recordings by using one registered model.
Diagrams
moseq_train
module
- The
moseq_train
schema is designed to handle the analysis and ingestion of PCA model for formatted keypoint tracking and train the Kepoint-MoSeq model.
moseq_infer
module
- The
moseq_infer
schema is designed to handle the analysis and ingestion of Keypoint-MoSeq's motion sequencing on video recordings by using one registered model.
Table Descriptions
lab
schema
Table |
Description |
Device |
Scanner metadata |
subject
schema
- Although not required, most choose to connect the
Session
table to a Subject
table.
Table |
Description |
Subject |
Basic information of the research subject |
session
schema
Table |
Description |
Session |
Unique experimental session identifier |
moseq_train
schema
Table |
Description |
KeypointSet |
Store keypoint data and video set directory for model training. |
KeypointSet.VideoFile |
IDs and file paths of each video file that will be used for model training. |
Bodyparts |
Store the body parts to use in the analysis. |
PCATask |
Staging table to define the PCA task and its output directory. |
PCAPrep |
Setup the Keypoint-MoSeq project output directory (kpms_project_output_dir ) creating the default config.yml and updating it in a new dj_config.yml . |
PCAFit |
Fit PCA model. |
LatentDimension |
Calculate the latent dimension as one of the autoregressive hyperparameters (ar_hypparams ) necessary for the model fitting. |
PreFitTask |
Specify parameters for model (AR-HMM) pre-fitting. |
PreFit |
Fit AR-HMM model. |
FullFitTask |
Specify parameters for the model full-fitting. |
FullFit |
Fit the full (Keypoint-SLDS) model. |
moseq_infer
schema
Table |
Description |
Model |
Register a model. |
VideoRecording |
Set of video recordings for the Keypoint-MoSeq inference. |
VideoRecording.File |
File IDs and paths associated with a given recording_id . |
PoseEstimationMethod |
Pose estimation methods supported by the keypoint loader of keypoint-moseq package. |
InferenceTask |
Staging table to define the Inference task and its output directory. |
Inference |
Infer the model from the checkpoint file and save the results as results.h5 file. |
Inference.MotionSequence |
Results of the model inference. |
Inference.GridMoviesSampledInstances |
Store the sampled instances of the grid movies. |