Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ parts:
- file: docs/recipes/publishing_notebooks_into_the_DLC_main_cookbook
# - file: docs/course
- file: docs/dlc-utils/index
sections:
- file: docs/dlc-utils/XROMM/usage

- caption: Project & Community
chapters:
Expand Down
64 changes: 64 additions & 0 deletions docs/dlc-utils/XROMM/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
(file:xamalab-dlc-integration)=

# XROMM + DeepLabCut local integration

These notes describe how this repository is used in the local 3-repo XROMM workflow together with `../XROMM_DLCTools` and `../xmalab`.

> Contributed by [@homfunc](https://github.com/homfunc)

## 1) Expected local layout

Recommended sibling checkout layout:

- `XROMM_DLCTools/`
- `DeepLabCut/`
- `xmalab/`
`XROMM_DLCTools/pyproject.toml` maps its optional `dlc` dependency group to this repository through `tool.uv.sources`.

## 2) DeepLabCut’s role in the workflow

Within the integrated workflow, DeepLabCut provides:

- project creation / dataset generation support
- video analysis / prediction entrypoints
- the local import target used by `XROMM_DLCTools`
- synthetic smoke coverage through the baseline harness
The current local integration suite also uses this repo to verify that the newer workflow service in `XROMM_DLCTools` still interoperates with a sibling DeepLabCut checkout.

## 3) Local setup for this repo

Standard developer setup:

```bash
uv sync --group dev
```

When working from `../XROMM_DLCTools`, enable the sibling import path there with:

```bash
uv sync --group dlc
```

## 4) Integration validation from XROMM_DLCTools

Run these commands from `../XROMM_DLCTools`:

```bash
uv run python scripts/baseline_harness.py --scenario deeplabcut_repo_smoke --output-dir baseline_artifacts/deeplabcut_smoke --deeplabcut-repo ../DeepLabCut
```

Full multi-repo suite:

```bash
uv run python scripts/baseline_harness.py --scenario all --output-dir baseline_artifacts/integration_all --deeplabcut-repo ../DeepLabCut --xmalab-repo ../xmalab
```

True end-to-end local workflow scenario:

```bash
uv run python scripts/baseline_harness.py --scenario phase3_local_workflow_e2e --output-dir baseline_artifacts/e2e_local_workflow --deeplabcut-repo ../DeepLabCut --xmalab-repo ../xmalab
```

## 5) Compatibility notes

The local workflow integration path expects this repo to remain importable in “lite mode” when GUI dependencies are unavailable, and relies on the public `deeplabcut` import surface plus the synthetic project helpers under `examples/utils.py`.
25 changes: 23 additions & 2 deletions docs/dlc-utils/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ align: right
---
```

This repository contains various scripts as well as links to other packages related to [DeepLabCut](https://github.com/DeepLabCut/DeepLabCut). Feel free to contribute your own analysis methods, and perhaps some short notebook of how to use it. Thanks!
This repository contains various scripts as well as links to other packages related to [DeepLabCut](https://github.com/DeepLabCut/DeepLabCut).
Feel free to contribute your own analysis methods, and perhaps some short notebook of how to use it. Thanks!

```{admonition} DLC-Utils
---
class: tip
---
[Link to repository](https://github.com/DeepLabCut/DLCutils)
```

```{caution}
Please direct inquiries to the **contributors/code maintainers of that code**. Note that the software(s) are provided "as is", without warranty of any kind, express.
Please direct inquiries to the **contributors/code maintainers of that code**. Note that the software(s) are provided "as is", without warranty of any kind, express or implied.
The DeepLabCut team is not responsible for the maintenance of these packages, and cannot guarantee that they will work with present & future versions of DeepLabCut.
```

Expand All @@ -34,6 +42,19 @@ These two scripts illustrate how to train, test, and analyze videos for multiple

Contributed by [Alexander Mathis](https://github.com/AlexEMG)

## Using DLC + XROMM_DLCTools + xmalab

> Contributed by [@homfunc](https://github.com/homfunc)

The DeepLabCut repository can also be used as a sibling checkout together with:

- `../XROMM_DLCTools`
- `../xmalab`

In that local layout, `XROMM_DLCTools` uses the optional `dlc` dependency group to import this checkout directly, and its baseline harness runs both a DeepLabCut smoke scenario and a broader end-to-end local workflow integration scenario.

See {ref}`file:xamalab-dlc-integration` for the local integration notes and exact commands.

## Using your DLC outputs, loading, simple ROI analysis, visualization examples

### Time spent of a body part in a particular region of interest (ROI)
Expand Down