--- license: mit task_categories: - image-classification tags: - spacr - microscopy - annotation - toxoplasma pretty_name: spaCR Annotate and Classify example data --- # spaCR — Annotate and Classify example data Example input for the **Annotate** and **Classify** modules of [spaCR](https://github.com/EinarOlafsson/spacr). It is the output of a Measure run, so both modules can be exercised without segmenting or measuring anything first. ## What is here | Path | What it is | |---|---| | `data/` | 2,341 single-cell PNG crops, foldered by phenotype | | `measurements.db` | The measurements, plus `png_list` and the annotation tables | | `measurements/active_learning/` | The model card from the first annotation round | | `settings/annotate_settings.csv` | Settings for the Annotate module | | `settings/classify_settings.csv` | Settings for the Classify module | ## It carries real annotations `png_list.annotate` holds **88 labels** — 50 of class 1 and 38 of class 2 — against 2,253 unlabelled crops, with 101 rows of per-round history in `annotation_rounds`. That is what makes this usable as a *classify* set: a training example needs labels, and unlabelled crops alone would only exercise the viewer. The first active-learning round is recorded too: 88 labels, 25 held out by well, `holdout_accuracy` 1.0 on a `StratifiedGroupKFold` split where no well appears on both sides. Treat that number as a demonstration of the workflow, not as a result — 88 labels over four wells is a very small set. ## Paths are RELATIVE, deliberately Every path in `measurements.db` and in both settings files is relative to the dataset root: ``` data/single_nucleus/uninfected/plate1_E01/cell_png/plate1_E01_19_1_12.png ``` A measurements database normally stores absolute paths, which name the machine that made it and resolve nowhere else. spaCR's downloader rewrites these to absolute on arrival, so the database works wherever it is unpacked. If you unpack it by hand, do the same, or point spaCR at the folder and let it. `` in the settings files is a placeholder for the unpack location and is substituted the same way. ## Plate layout Four wells (E01, E02, L01, L02) from the plate published as [`einarolafsson/spacr-example-measure`](https://huggingface.co/datasets/einarolafsson/spacr-example-measure), which holds the merged arrays these crops were cut from. ## Provenance Produced by spaCR's Mask module and then its Measure module, from spaCR's own example images, with `cpsam` for cells and nuclei and a Toxoplasma-specific CPSAM checkpoint for pathogens. One field of fifty-two (`plate1_E02_20_1`) failed to measure — a nucleus label spanning two cells — so the crops come from 51 fields. Absolute paths have been rewritten to relative throughout.