Skip to content

Commit c090e51

Browse files
talmoclaude
andauthored
Update to 0.5.0 and refresh docs (#203)
* Update to 0.5.0 and refresh docs - Bump version from 0.4.1 to 0.5.0 - Add prominent documentation link in README before installation section - Remove non-existent save_labels_set reference from examples - Reorganize formats.md to move load_labels_set after save_video - Move LabelsSet to bottom of model.md for better organization - Add comprehensive Mermaid class diagram showing data model relationships 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Add COCO format to documentation - Add load_coco to formats.md documentation - This was implemented in PR #199 but not included in the docs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Add installation instructions from main branch - Add installation from source (main branch) instructions to README - Add installation from source instructions to docs homepage - Organize installation options with clear headings (From PyPI, From source) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent dbb4a64 commit c090e51

6 files changed

Lines changed: 110 additions & 6 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,22 @@ package that aims to provide functionality for interacting with pose tracking-re
1313
data structures and file formats with minimal dependencies. This package *does not*
1414
have any functionality related to labeling, training, or inference.
1515

16+
## Documentation
17+
18+
**📚 [Documentation](https://io.sleap.ai)** - Comprehensive guides and API reference
19+
1620
## Installation
21+
22+
### From PyPI
1723
```
1824
pip install sleap-io
1925
```
2026

27+
### From source (latest version)
28+
```
29+
pip install git+https://github.com/talmolab/sleap-io.git@main
30+
```
31+
2132
For video backend support, install with extras:
2233
```
2334
pip install sleap-io[opencv] # For OpenCV backend

docs/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ file_dict = {
184184
loaded_set = sio.load_labels_set(file_dict)
185185
```
186186

187-
**See also:** [`LabelsSet`](model.md#sleap_io.LabelsSet), [`load_labels_set`](formats.md#sleap_io.load_labels_set), [`save_labels_set`](formats.md#sleap_io.save_labels_set)
187+
**See also:** [`LabelsSet`](model.md#sleap_io.LabelsSet), [`load_labels_set`](formats.md#sleap_io.load_labels_set)
188188

189189

190190
## Re-encode video

docs/formats.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
::: sleap_io.save_video
1010

11+
::: sleap_io.load_labels_set
12+
1113
::: sleap_io.load_slp
1214

1315
::: sleap_io.save_slp
@@ -24,14 +26,14 @@
2426

2527
::: sleap_io.save_labelstudio
2628

29+
::: sleap_io.load_coco
30+
2731
::: sleap_io.load_dlc
2832

2933
::: sleap_io.load_ultralytics
3034

3135
::: sleap_io.save_ultralytics
3236

33-
::: sleap_io.load_labels_set
34-
3537
::: sleap_io.load_skeleton
3638

3739
::: sleap_io.save_skeleton

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ See [Examples](examples.md) for more usage examples and recipes.
3737

3838

3939
## Installation
40+
41+
### From PyPI
4042
```
4143
pip install sleap-io
4244
```
@@ -47,6 +49,11 @@ or
4749
conda install -c conda-forge sleap-io
4850
```
4951

52+
### From source (latest version)
53+
```
54+
pip install git+https://github.com/talmolab/sleap-io.git@main
55+
```
56+
5057
### Optional Dependencies
5158

5259
For video backend support, install with extras:

docs/model.md

Lines changed: 86 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,93 @@
22

33
`sleap-io` implements the core data structures used in SLEAP for storing data related to multi-instance pose tracking, including for annotation, training and inference.
44

5+
## Class Relationships
6+
7+
The following diagram shows the relationships between the main classes in the `sleap-io` data model:
8+
9+
``` mermaid
10+
classDiagram
11+
class Labels {
12+
+List~LabeledFrame~ labeled_frames
13+
+List~Video~ videos
14+
+List~Skeleton~ skeletons
15+
+List~Track~ tracks
16+
}
17+
18+
class LabeledFrame {
19+
+Video video
20+
+int frame_idx
21+
+List~Instance~ instances
22+
}
23+
24+
class Instance {
25+
+Skeleton skeleton
26+
+Track track
27+
+PointsArray points
28+
}
29+
30+
class PredictedInstance {
31+
+float score
32+
+int tracking_score
33+
}
34+
35+
class Skeleton {
36+
+List~Node~ nodes
37+
+List~Edge~ edges
38+
+List~Symmetry~ symmetries
39+
}
40+
41+
class Node {
42+
+str name
43+
}
44+
45+
class Edge {
46+
+Node source
47+
+Node destination
48+
}
49+
50+
class Symmetry {
51+
+Set~Node~ nodes
52+
}
53+
54+
class Track {
55+
+str name
56+
}
57+
58+
class Video {
59+
+str filename
60+
+VideoBackend backend
61+
}
62+
63+
class LabelsSet {
64+
+List~Labels~ labels
65+
}
66+
67+
Labels "1" *-- "0..*" LabeledFrame : contains
68+
Labels "1" *-- "0..*" Video : contains
69+
Labels "1" *-- "0..*" Skeleton : contains
70+
Labels "1" *-- "0..*" Track : contains
71+
72+
LabeledFrame "0..*" --> "1" Video : references
73+
LabeledFrame "1" *-- "0..*" Instance : contains
74+
75+
Instance "0..*" --> "1" Skeleton : uses
76+
Instance "0..*" --> "0..1" Track : belongs to
77+
Instance <|-- PredictedInstance : inherits
78+
79+
Skeleton "1" *-- "1..*" Node : contains
80+
Skeleton "1" *-- "0..*" Edge : contains
81+
Skeleton "1" *-- "0..*" Symmetry : contains
82+
83+
Edge "0..*" --> "2" Node : connects
84+
Symmetry "0..*" --> "2" Node : pairs
85+
86+
LabelsSet "1" *-- "1..*" Labels : contains
87+
```
588

689

7-
::: sleap_io.Labels
890

9-
::: sleap_io.LabelsSet
91+
::: sleap_io.Labels
1092

1193
::: sleap_io.LabeledFrame
1294

@@ -37,3 +119,5 @@
37119
::: sleap_io.InstanceGroup
38120

39121
::: sleap_io.RecordingSession
122+
123+
::: sleap_io.LabelsSet

sleap_io/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Define package version.
44
# This is read dynamically by setuptools in pyproject.toml to determine the release
55
# version.
6-
__version__ = "0.4.1"
6+
__version__ = "0.5.0"

0 commit comments

Comments
 (0)