Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
84d409e
tmp build books
maximpavliv Feb 5, 2025
d0041b2
Additional reference points
maximpavliv Feb 7, 2025
b388843
Update course.md
maximpavliv Jan 29, 2025
075ee05
Update standardDeepLabCut_UserGuide
maximpavliv Feb 3, 2025
7beee45
Update Overviewof3D
maximpavliv Feb 4, 2025
2693ab7
Update deeplabcutlive
maximpavliv Feb 4, 2025
26f277a
Update ModelZoo
maximpavliv Feb 5, 2025
01414a1
Tmp fix create_pretrained_project: create TF trainingset metadata
maximpavliv Feb 6, 2025
4219fc2
Update UsingModelZooPupil
maximpavliv Feb 6, 2025
bb4e8f7
Remove MegaDetector+DLC from TOC
maximpavliv Feb 6, 2025
1c6e45c
Update Project_gui
maximpavliv Feb 6, 2025
cbd0778
Update single_animal_quick_guide
maximpavliv Feb 6, 2025
16f990f
Update beginner-guides/manage-project
maximpavliv Feb 6, 2025
c42bafd
Update beginner-guides/labelling
maximpavliv Feb 6, 2025
1e66c0e
Update beguinner-guides/Training-Evaluation
maximpavliv Feb 6, 2025
fed789c
Update beginner-guides/video-analysis
maximpavliv Feb 6, 2025
f426233
Update convert_maDLC
maximpavliv Feb 7, 2025
c890473
Update BatchProcessing
maximpavliv Feb 7, 2025
48a1034
Update DLCMethods
maximpavliv Feb 7, 2025
e2080f8
Update ClusteringNapari
maximpavliv Feb 7, 2025
1ff49c2
Update OpenVINO
maximpavliv Feb 7, 2025
1a28105
Update pose_cfg_file_breakdown
maximpavliv Feb 7, 2025
827ad7d
Update publishing_notebooks
maximpavliv Feb 7, 2025
0f13790
Update MISSION_AND_VALUES
maximpavliv Feb 7, 2025
33d6b42
Update Governance
maximpavliv Feb 7, 2025
89f7c6c
Update roadmap
maximpavliv Feb 7, 2025
db687bf
pytorch_config.yaml: add gpus list example
maximpavliv Feb 10, 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
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ only_build_toc_files: true

sphinx:
config:
autodoc_mock_imports: ["wx"]
autodoc_mock_imports: ["wx", "matplotlib", "qtpy", "PySide6", "napari", "shiboken6"]
mermaid_output_format: raw
extra_extensions:
- numpydoc
Expand Down
2 changes: 0 additions & 2 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ parts:
chapters:
- file: docs/ModelZoo
- file: docs/recipes/UsingModelZooPupil
- file: docs/recipes/MegaDetectorDLCLive
- caption: 🧑‍🍳 Cookbook (detailed helper guides)
chapters:
- file: docs/tutorial
- file: docs/convert_maDLC
- file: docs/recipes/OtherData
- file: docs/recipes/io
Expand Down
37 changes: 34 additions & 3 deletions deeplabcut/create_project/modelzoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
from pathlib import Path

import yaml

import deeplabcut
from deeplabcut.utils import auxiliaryfunctions
from dlclibrary.dlcmodelzoo.modelzoo_download import (
download_huggingface_model,
MODELOPTIONS,
)

import deeplabcut
from deeplabcut import Engine
from deeplabcut.generate_training_dataset.metadata import TrainingDatasetMetadata, ShuffleMetadata, DataSplit
from deeplabcut.pose_estimation_pytorch.config import read_config_as_dict
from deeplabcut.utils import auxiliaryfunctions

Modeloptions = MODELOPTIONS # backwards compatibility for COLAB NOTEBOOK


Expand Down Expand Up @@ -300,6 +303,9 @@ def create_pretrained_project(

MakeTest_pose_yaml(pose_cfg, keys2save, path_test_config)

# create fake metadata to read TF Engine in scorer (temporary fix until Pytorch version is implemented)
_create_and_save_fake_metadata(cfg)

video_dir = os.path.join(config["project_path"], "videos")
if analyzevideo == True:
print("Analyzing video...")
Expand All @@ -320,3 +326,28 @@ def create_pretrained_project(

else:
return "N/A", "N/A"

def _create_and_save_fake_metadata(config_path: str | Path):
# First create the metadata object
metadata = TrainingDatasetMetadata.create(config_path)

# Create a new shuffle with TensorFlow engine
new_shuffle = ShuffleMetadata(
name="project_name-trainset95shuffle1",
# This will be overwritten with proper name
train_fraction=read_config_as_dict(config_path)["TrainingFraction"][0],
index=1,
engine=Engine.TF,
split=DataSplit(
train_indices=(0, 1, 2, 3, 4), # Example indices
test_indices=(5,) # Example indices
)
)

# Add the shuffle to metadata
metadata = metadata.add(new_shuffle)

# Save the metadata
metadata.save()

return metadata
14 changes: 9 additions & 5 deletions deeplabcut/generate_training_dataset/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,15 @@ def create(config: str | Path | dict) -> TrainingDatasetMetadata:
cfg = config

trainset_path = TrainingDatasetMetadata.path(cfg).parent
shuffle_docs = [
f
for f in trainset_path.iterdir()
if re.match(r"Documentation_data-.+shuffle[0-9]+\.pickle", f.name)
]
if trainset_path.exists():
shuffle_docs = [
f
for f in trainset_path.iterdir()
if re.match(r"Documentation_data-.+shuffle[0-9]+\.pickle", f.name)
]
else:
trainset_path.mkdir(parents=True)
shuffle_docs = []

prefix = cfg["Task"] + cfg["date"]
shuffles = []
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/refine_training_dataset/outlier_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def extract_outlier_frames(
outlieralgorithm: str, optional, default="jump".
String specifying the algorithm used to detect the outliers.

* ``'Fitting'`` fits a Auto Regressive Integrated Moving Average model to the
* ``'fitting'`` fits an Auto Regressive Integrated Moving Average model to the
data and computes the distance to the estimated data. Larger distances than
epsilon are then potentially identified as outliers
* ``'jump'`` identifies larger jumps than 'epsilon' in any body part
Expand Down
1 change: 1 addition & 0 deletions deeplabcut/utils/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
https://github.com/DeepLabCut/DeepLabCut/blob/master/AUTHORS
Licensed under GNU Lesser General Public License v3.0
"""
from __future__ import annotations

import os
from pathlib import Path
Expand Down
6 changes: 3 additions & 3 deletions docs/Governance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(governance-model)=
# Governance Model of DeepLabCut
(adapted from https://napari.org/docs/_sources/developers/GOVERNANCE.md.txt)
(adapted from https://napari.org/stable/community/governance.html)

## Abstract

Expand Down Expand Up @@ -30,7 +30,7 @@ project in concrete ways, such as:
[GitHub pull request](https://github.com/DeepLabCut/DeepLabCut/pulls);
- reporting issues on our
[GitHub issues page](https://github.com/DeepLabCut/DeepLabCut/issues);
- proposing a change to the documentation (http://docs.deeplabcut.org) via a
- proposing a change to the [documentation](https://deeplabcut.github.io/DeepLabCut/README.html) via a
GitHub pull request;
- discussing the design of the `DeepLabCut` or its tutorials on in existing
[issues](https://github.com/DeepLabCut/DeepLabCut/issues) and
Expand All @@ -43,7 +43,7 @@ among other possibilities. Any community member can become a contributor, and
all are encouraged to do so. By contributing to the project, community members
can directly help to shape its future.

Contributors are encouraged to read the [contributing guide](https://github.com/DeepLabCut/DeepLabCut/CONTRIBUTING.md).
Contributors are encouraged to read the [contributing guide](https://github.com/DeepLabCut/DeepLabCut/blob/main/CONTRIBUTING.md).

### Core developers

Expand Down
54 changes: 37 additions & 17 deletions docs/MISSION_AND_VALUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,74 @@

This document is meant to help guide decisions about the future of `DeepLabCut`, be it in terms of
whether to accept new functionality, changes to the styling of the code or graphical user interfaces (GUI),
or whether to take on new dependencies, when to break into other repos, among other things. It serves as a point of reference for core developers actively working on the project, and an introduction for
or whether to take on new dependencies, when to break into other repos, among other things. It serves as a point of
reference for core developers actively working on the project, and an introduction for
newcomers who want to learn a little more about where the project is going and what the team's
values are. You can also learn more about how the project is managed by looking at our [governance model](governance-model).
values are. You can also learn more about how the project is managed by looking at our
[governance model](governance-model).

## Our founding principles

The founding DeepLabCut team came together around a shared vision for building the first open-source animal pose estimation framework
that is:
The founding DeepLabCut team came together around a shared vision for building the first open-source animal pose
estimation framework that is:

- user defined pose estimation - i.e. species or object agnostic.
- access to SOTA deep learning models that can be swiftly re-trained for customized applications
- fast (GPU-powered)
- scalable (project focused for ease of portability and sharability)


As the project has grown we've turned these original principles into the mission statement and set of values that we described below.
As the project has grown we've turned these original principles into the mission statement and set of values that we
described below.

## Our mission

DeepLabCut aims to be **the animal pose software package for Python** and to **provide access to deep learning-based pose estimation for people to use in their daily work** without the need to be able to program in a deep learning framework.
We hope to accomplish this by:
DeepLabCut aims to be **the animal pose software package for Python** and to **provide access to deep learning-based
pose estimation for people to use in their daily work** without the need to be able to program in a deep learning
framework. We hope to accomplish this by:

- being **easy to use and install**. We are careful in taking on new dependencies, sometimes making them optional, and aim support a fully (Python) packaged installation that works cross-platform.
- being **easy to use and install**. We are careful in taking on new dependencies, sometimes making them optional, and
aim support a fully (Python) packaged installation that works cross-platform.

- being **well-documented** with **comprehensive tutorials and examples**. All functions in our API have thorough docstrings clarifying expected inputs and outputs, and we maintain a separate [tutorials and information website](http://deeplabcut.org).
- being **well-documented** with **comprehensive tutorials and examples**. All functions in our API have thorough
docstrings clarifying expected inputs and outputs, and we maintain a separate
[tutorials and information website](http://deeplabcut.org).

- providing **GUI access** to all critical functionality so DeepLabCut can be used by people without coding experience.

- being **interactive** and **highly performant** in order to support large data pipelines.

- providing a **consistent and stable API** to enable plugin developers to build on top of DeepLabCut without their code constantly breaking and to enable advanced users to build out sophisticated Python workflows, if needed.
- providing a **consistent and stable API** to enable plugin developers to build on top of DeepLabCut without their
code constantly breaking and to enable advanced users to build out sophisticated Python workflows, if needed.

- **ensuring correctness**. We strive for complete test coverage of both the code and GUI, with all code reviewed by a core developer before being included in the repository.
- **ensuring correctness**. We strive for complete test coverage of both the code and GUI, with all code reviewed by a
core developer before being included in the repository.

## Our values

- We are **inclusive**. We welcome newcomers who are making their first contribution and strive to grow our most dedicated contributors into [core developers](https://github.com/orgs/DeepLabCut/teams/core-developers). We have a [Code of Conduct](https://github.com/DeepLabCut/DeepLabCut/CODE_OF_CONDUCT.md) to make DeepLabCut
- We are **inclusive**. We welcome newcomers who are making their first contribution and strive to grow our most
dedicated contributors into [core developers](https://github.com/orgs/DeepLabCut/teams/core-developers).
We have a [Code of Conduct](https://github.com/DeepLabCut/DeepLabCut/blob/main/CODE_OF_CONDUCT.md) to make DeepLabCut
a welcoming place for all.

- We are **community-engaged**. We respond to feature requests and proposals on our [issue tracker](https://github.com/DeepLabCut/DeepLabCut/issues).
- We are **community-engaged**. We respond to feature requests and proposals on our
- [issue tracker](https://github.com/DeepLabCut/DeepLabCut/issues).

- We serve **scientific applications** primarily, over “consumer or commercial” pose estimation tools. This often means prioritizing core functionality support, and rejecting implementations of “flashy” features that have little scientific value.
- We serve **scientific applications** primarily, over “consumer or commercial” pose estimation tools. This often means
prioritizing core functionality support, and rejecting implementations of “flashy” features that have little
scientific value.

- We are **domain agnostic** within the sciences. Functionality that is highly specific to particular scientific domains belongs in plugins, whereas functionality that cuts across many domains and is likely to be widely used belongs inside DeepLabCut.
- We are **domain agnostic** within the sciences. Functionality that is highly specific to particular scientific
domains belongs in plugins, whereas functionality that cuts across many domains and is likely to be widely used belongs
inside DeepLabCut.

- We value **education and documentation**. All functions should have docstrings, preferably with examples, and major functionality should be explained in our [tutorials](http://deeplabcut.org). Core developers can take an active role in finishing documentation examples.
- We value **education and documentation**. All functions should have docstrings, preferably with examples, and major
functionality should be explained in our [tutorials](http://deeplabcut.org). Core developers can take an active role
in finishing documentation examples.


## Acknowledgements

We share a lot of our mission and values with [`napari`](https://napari.org/docs/developers/MISSION_AND_VALUES.html) and [`scikit-image`](https://scikit-image.org/docs/dev/values.html) and acknowledge the influence of their mission and values statements on this document.
We share a lot of our mission and values with [`napari`](https://napari.org/stable/community/mission_and_values.html)
and [`scikit-image`](https://scikit-image.org/docs/stable/about/values.html) and acknowledge the influence of their
mission and values statements on this document.
Loading