Skip to content

Commit 677a8d7

Browse files
authored
Merge pull request #16 from andriiryzhkov/readme_update
Update README with current models and versioning docs
2 parents 49c4d2d + 34aa301 commit 677a8d7

1 file changed

Lines changed: 30 additions & 9 deletions

File tree

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@ Currently targets the ONNX backend. The pipeline is designed to support addition
66

77
## Models
88

9-
| Model | Task | Description |
10-
|---------------------------------------------------------------------------------|-------------|-----------------------------------------------|
11-
| [`denoise-nafnet`](models/denoise-nafnet/README.md) | denoise | NAFNet denoiser trained on SIDD dataset |
12-
| [`denoise-nind`](models/denoise-nind/README.md) | denoise | UNet denoiser trained on NIND dataset |
13-
| [`mask-object-segnext-b2hq`](models/mask-object-segnext-b2hq/README.md) | mask-object | SegNext ViT-B SAx2 HQ for masking |
14-
| [`upscale-bsrgan`](models/upscale-bsrgan/README.md) | upscale | BSRGAN 2x and 4x blind super-resolution |
9+
| Model | Task | Description |
10+
|-------------------------------------------------------------------------------|---------|-------------------------------------------------|
11+
| [`denoise-nind`](models/denoise-nind/README.md) | denoise | UNet denoiser trained on NIND dataset |
12+
| [`embed-openclip-vitb32`](models/embed-openclip-vitb32/README.md) | embed | OpenCLIP ViT-B/32 text/image embeddings |
13+
| [`mask-object-sam21-base-plus`](models/mask-object-sam21-base-plus/README.md) | mask | SAM 2.1 Hiera Base Plus for interactive masking |
14+
| [`mask-object-sam21-small`](models/mask-object-sam21-small/README.md) | mask | SAM 2.1 Hiera Small for interactive masking |
15+
| [`mask-object-sam21-tiny`](models/mask-object-sam21-tiny/README.md) | mask | SAM 2.1 Hiera Tiny for interactive masking |
16+
| [`mask-object-segnext-b2hq`](models/mask-object-segnext-b2hq/README.md) | mask | SegNext ViT-B SAx2 HQ for semantic masking |
17+
| [`upscale-bsrgan`](models/upscale-bsrgan/README.md) | upscale | BSRGAN 2x and 4x blind super-resolution |
1518

1619
## Repository structure
1720

1821
```
1922
pyproject.toml Project configuration, dependency groups, CLI entry point
2023
darktable_ai/ Python package (CLI + pipeline orchestration)
21-
vendor/ Git submodules (NAFNet, nind-denoise, SegNext)
24+
vendor/ Git submodules (nind-denoise, sam2, SegNext)
2225
samples/<task>/ Sample images organized by task
2326
output/ Build output: ONNX models + config.json (gitignored)
2427
temp/ Downloaded checkpoints (gitignored)
@@ -34,7 +37,7 @@ models/
3437

3538
Requires [uv](https://docs.astral.sh/uv/) and Python 3.11–3.12.
3639

37-
Dependencies are managed through [dependency groups](https://docs.astral.sh/uv/concepts/dependency-groups/) in `pyproject.toml`. The base package only needs `click` and `pyyaml`. ML dependencies are split into groups one per model plus a shared `core` group so you only install what you need. Use `uv sync --group <name>` to install a specific group, or `--group all-models` for everything.
40+
Dependencies are managed through [dependency groups](https://docs.astral.sh/uv/concepts/dependency-groups/) in `pyproject.toml`. The base package only needs `click` and `pyyaml`. ML dependencies are split into groups one per model plus a shared `core` group so you only install what you need. Use `uv sync --group <name>` to install a specific group, or `--group all-models` for everything.
3841

3942
## Setup
4043

@@ -71,18 +74,36 @@ uv run dtai validate denoise-nind # Validate ONNX output
7174
uv run dtai package denoise-nind # Create .dtmodel archive
7275
uv run dtai demo denoise-nind # Run demo on sample images
7376

77+
# Generate versions.json
78+
uv run dtai versions
79+
7480
# Evaluate a model
7581
uv sync --group eval
7682
uv run dtai eval mask mask-object-segnext-b2hq --limit 5
7783
```
7884

85+
## Versioning
86+
87+
Each model has a `version` field in its `model.yaml` that gets written to `config.json`. The `dtai versions` command generates `output/versions.json` – a manifest mapping model IDs to their current versions:
88+
89+
```json
90+
{
91+
"models": {
92+
"denoise-nind": "1.0",
93+
"mask-object-sam21-small": "1.0"
94+
}
95+
}
96+
```
97+
98+
This file is published as a GitHub release asset alongside `.dtmodel` packages. darktable fetches it to check for model updates without downloading full packages.
99+
79100
## Demos
80101

81102
Each model includes a `demo.py` script that runs inference on sample images
82103
from `samples/<task>/`. Models that require per-image input (e.g. point prompts
83104
for object segmentation) define `image_args` in their `model.yaml`.
84105

85-
Output images are saved to `models/<model>/output/`.
106+
Output images are saved to `output/<model>-demo/`.
86107

87108
## Model selection criteria
88109

0 commit comments

Comments
 (0)