Metadata-Version: 2.4
Name: dafne-sam2-tools
Version: 0.1.0
Summary: One shot support/query matching and SAM2 segmentation
Author: Giuseppe Timpano
License: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.5.1
Requires-Dist: torchvision>=0.20.1
Requires-Dist: numpy>=2.0.1
Requires-Dist: scipy
Requires-Dist: scikit-image
Requires-Dist: hydra-core>=1.3.2
Requires-Dist: iopath>=0.1.10
Requires-Dist: pillow>=10.4.0
Requires-Dist: monai>=1.4
Requires-Dist: appdirs>=1.4.4
Requires-Dist: sam2>=1.1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Provides-Extra: gui
Requires-Dist: qtpy; extra == "gui"
Dynamic: license-file

# dafne-sam2

One-shot support/query matching and segmentation on SAM2 embeddings, for MRI (PerSAM-style bag-of-vectors matching).

## Structure

```
src/dafne_sam2/
  automatic/         automatic pipeline (api.py, backbone.py, checkpoints.py, ...)
  semi_automatic/     semi-automatic pipeline (api.py, session.py, slice_matching.py)
  matching.py         shared multiclass scoring
  preprocessing.py, utils.py, metrics.py   shared utilities
gui/                  Qt interface
app.py                GUI entry point
```

## Install

```bash
pip install -e '.[gui]'
```

## Usage

```bash
python app.py
```

## Development

```bash
pip install -e ".[dev]"
pytest
```
