Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moseq Pipeline #1056

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9d6d3e1
Add organization tables for keypoint pose data
samuelbray32 Jun 10, 2024
28748f1
Add model training tables
samuelbray32 Jun 11, 2024
7d5d66c
apply fit moseq model to data
samuelbray32 Jun 13, 2024
09779a6
add ability to initialize model training from pre-existing model
samuelbray32 Jun 13, 2024
983f179
make model names unique
samuelbray32 Jun 13, 2024
fdaff80
add initial tutorial
samuelbray32 Jun 13, 2024
c2b4d4f
add moseq pipeline diagram
Jun 14, 2024
2e9ea46
get rid of PoseOutput and fetch pose data from PositionOutput
Jun 26, 2024
62c8eef
remove PoseOutput and corresponding references
samuelbray32 Aug 6, 2024
36ad016
allow passing of null entries from DLCPoseEstimation to PositionOutpu…
samuelbray32 Aug 6, 2024
fe3c6d4
Apply suggestions from code review
samuelbray32 Dec 20, 2024
ccf370f
Merge branch 'master' into moseq
samuelbray32 Dec 20, 2024
b8dfd42
lint
samuelbray32 Dec 20, 2024
310abf7
implement changes from review
samuelbray32 Dec 20, 2024
69335a8
rename fetch_video_name to fetch_video_path
samuelbray32 Dec 20, 2024
fc46b37
cleanup outdated usages of PoseOutput
samuelbray32 Dec 20, 2024
c3c7b84
Cleanup errors from removal of PoseOutput
samuelbray32 Dec 20, 2024
e5b2c1b
add get_position_interval_epoch
samuelbray32 Dec 20, 2024
dc8435c
Add method to get training results pdf
samuelbray32 Dec 27, 2024
f92320b
Add description and example of hyperparameter sweep
samuelbray32 Dec 27, 2024
d663e0e
move moseq dir definition to spyglass config
samuelbray32 Dec 27, 2024
3a1c079
move moseq config function to method
samuelbray32 Dec 27, 2024
589bdb2
Update changelog
samuelbray32 Dec 27, 2024
7d30fc1
update pipeline diagram
samuelbray32 Dec 30, 2024
81f3dfa
Apply suggestions from code review
samuelbray32 Jan 2, 2025
3bfcb9f
move moseq into v1 folder
samuelbray32 Jan 2, 2025
8fd900b
add docstrings
samuelbray32 Jan 2, 2025
5a33090
make video symlink more robust
samuelbray32 Jan 3, 2025
bd29c76
cleanup setup_project call
samuelbray32 Jan 3, 2025
c7ea1f5
cleanup config method
samuelbray32 Jan 3, 2025
5901edc
Implement suggestions from code review
samuelbray32 Jan 3, 2025
e5af455
cleanup readability of DLCPosV1 make conditions
samuelbray32 Jan 3, 2025
04c2a37
allow key argument when fetching video path
samuelbray32 Jan 3, 2025
8106929
add moseq dependencies
samuelbray32 Jan 16, 2025
2bff705
Add moseq install instructions to tutorials
samuelbray32 Jan 16, 2025
31014f9
accept key in all get video path functions
samuelbray32 Jan 16, 2025
3dacc40
Merge branch 'master' into moseq
samuelbray32 Jan 16, 2025
f61f10c
fix spelling
samuelbray32 Jan 16, 2025
719486b
Merge branch 'moseq' of https://github.com/LorenFrankLab/spyglass int…
samuelbray32 Jan 16, 2025
24e1150
fix spelling
samuelbray32 Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@

- Ensure merge tables are declared during file insertion #1205
- Update URL for DANDI Docs #1210
- Add common method `get_position_interval_epoch` #1056

### Pipelines

- Position
- Allow population of missing `PositionIntervalMap` entries during population of `DLCPoseEstimation` #1208

- Behavior
- Implement pipeline for keypoint-moseq extraction of behavior syllables #1056


## [0.5.4] (December 20, 2024)

### Infrastructure
Expand Down
42 changes: 42 additions & 0 deletions environment_moseq_cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 1. Install a conda distribution.
# https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html
# 2. Run: `mamba env create -f environment.yml`
# 3. Activate: `conda activate spyglass`
#
# (lines intentionally left blank)
#
#
name: spyglass-moseq-cpu
channels:
- conda-forge
# - defaults # deprecated
- franklab
- edeno
# - pytorch # dlc-only
# - anaconda # dlc-only, for cudatoolkit
dependencies:
- bottleneck
# - cudatoolkit=11.3 # dlc-only
# - ffmpeg # dlc-only
- ipympl
- jupyterlab>=3.*
# - libgcc # dlc-only
- matplotlib
- non_local_detector
- numpy
- pip
- position_tools
- pybind11 # req by mountainsort4 -> isosplit5
- pydotplus
- pyfftw<=0.12.0 # ghostipy req. install from conda-forge for Mac ARM
- python>=3.9,<3.13
- pytorch<1.12.0
- ripple_detection
- seaborn
# - torchaudio # dlc-only
# - torchvision # dlc-only
- track_linearization>=2.3
- pip:
- ghostipy # for common_filter
- mountainsort4
- .[moseq-cpu]
42 changes: 42 additions & 0 deletions environment_moseq_gpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 1. Install a conda distribution.
# https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html
# 2. Run: `mamba env create -f environment.yml`
# 3. Activate: `conda activate spyglass`
#
# (lines intentionally left blank)
#
#
name: spyglass-moseq-gpu
channels:
- conda-forge
# - defaults # deprecated
- franklab
- edeno
# - pytorch # dlc-only
# - anaconda # dlc-only, for cudatoolkit
dependencies:
- bottleneck
# - cudatoolkit=11.3 # dlc-only
# - ffmpeg # dlc-only
- ipympl
- jupyterlab>=3.*
# - libgcc # dlc-only
- matplotlib
- non_local_detector
- numpy
- pip
- position_tools
- pybind11 # req by mountainsort4 -> isosplit5
- pydotplus
- pyfftw<=0.12.0 # ghostipy req. install from conda-forge for Mac ARM
- python>=3.9,<3.13
- pytorch<1.12.0
- ripple_detection
- seaborn
# - torchaudio # dlc-only
# - torchvision # dlc-only
- track_linearization>=2.3
- pip:
- ghostipy # for common_filter
- mountainsort4
- .[moseq-gpu]
Binary file added notebook-images/moseq_outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 43 additions & 3 deletions notebooks/00_Setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,47 @@
"The Decoding pipeline relies on `jax` to process data with GPUs. Please see\n",
"their conda installation steps\n",
"[here](https://jax.readthedocs.io/en/latest/installation.html#conda-installation).\n",
"\n"
"\n",
"#### Deep Lab Cut (DLC)\n",
"\n",
"Spyglass provides an environment build for using the DLC pipeline. To create an \n",
"environment with these features, please:\n",
"1. navigate to your cloned spyglass repo.\n",
"2. build the environment from the dlc version\n",
"3. activate the environment to use\n",
"\n",
"```bash\n",
"cd /path/to/spyglass # 1\n",
"mamba env create -f environment_dlc.yml # 2\n",
"mamba activate spyglass-dlc # 3\n",
"```\n",
"\n",
"Alternatively, you can pip install using\n",
"```bash\n",
"pip install spyglass[dlc]\n",
"```\n",
"\n",
"#### Keypoint-Moseq\n",
"\n",
"Spyglass provides an environment build for using the Moseq pipeline. To create an \n",
"environment with these features, please:\n",
"1. navigate to your cloned spyglass repo.\n",
"2. build the environment from one of the moseq versions\n",
"3. activate the environment to use\n",
"\n",
"```bash\n",
"cd /path/to/spyglass # 1\n",
"mamba env create -f environment_moseq_cpu.yml # 2\n",
"mamba activate spyglass-moseq-cpu # 3\n",
"```\n",
"\n",
"Alternatively, you can pip install using\n",
"```bash\n",
"pip install spyglass[moseq-cpu]\n",
"```\n",
"\n",
"To use a GPU enabled version of the package, replace `cpu` with `gpu` in the above \n",
"commands\n"
]
},
{
Expand Down Expand Up @@ -593,7 +633,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "spyglass",
"language": "python",
"name": "python3"
},
Expand All @@ -607,7 +647,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.18"
}
},
"nbformat": 4,
Expand Down
Loading
Loading