MSD is a benchmark for evaluating disentangled representation learning on sequential data (e.g., videos, audio, time-series). It supports datasets with both static and dynamic factors, and includes tools for automatic annotation, model evaluation, and visualization.
We recommend using a conda environment:
conda create -n msd python=3.9
conda activate msd
pip install -r requirements.txtAfter installation, edit the meta.yaml file and set the msd_root field to the absolute path where all outputs (e.g., logs, models, results) should be saved.
MSD is modular and consists of the following major components:
- Datasets: Loaders for synthetic and real-world data. See docs/datasets.md
- Methods: Plug-and-play training pipelines for disentanglement models. See docs/methods.md
- Latent Exploration: Analyzes latent codes to discover factor-aligned dimensions. See docs/latent_exploration.md
- Evaluation: Metrics and visualizations for judging model performance. See docs/evaluation_metrics.md
- VLM Tools: Use vision-language models (e.g., GPT-4) for automatic annotation and factor classification. See docs/vlm_module.md
- Configuration: YAML-driven setup for all runs. See docs/configuration.md
All training and evaluation is handled by the run.py script.
python run.py --run_config configurations/methods/ssm_skd/ssm_skd_sprites.yaml --trainpython run.py --run_config configurations/methods/ssm_skd/ssm_skd_sprites.yaml --evalThe model will be automatically loaded from the checkpoint_dir path specified in the configuration file.
You must also specify a meta.yaml file with global variables like msd_root. This is optional if your meta.yaml is located at configurations/meta.yaml.
Use auto_annotate.py to automatically discover and label factor spaces in new datasets using a vision-language model.
python auto_annotate.py \
--ds_path /path/to/dataset.h5 \
--subset train \
--n_exploration 500 \
--n_annotation 500 \
--out_dir /path/to/output \
--ds_name my_datasetFor details, see docs/vlm_module.md
TBD.
For questions or contributions, feel free to open an issue or contact the authors.
