Dataset catalog
MedOtter ships a committed catalog of 130 public radiology and imaging
datasets — CT, MRI, endoscopy, dermoscopy, histopathology, and more. The
catalog layer (list_datasets, describe, DatasetInfo) is fully
torch-free: it reads a JSON file bundled with the package, so it works
with no GPU, no network access, and no ML dependencies installed.
Listing and filtering datasets
def list_datasets(modality=None, anatomy=None, task=None, has_video=None) -> list[DatasetInfo]
modality, anatomy, and task are case-insensitive substring matches
against free-text catalog fields — a dataset’s modality might be recorded
as "CT, MRI" or its anatomy as "abdomen, liver", so filtering with a
short substring is usually what you want. has_video is an exact boolean
match (whether the dataset is also registered as a video-style loader that
returns frame sequences — true for literal video captures like endoscopy and
laparoscopy, as well as some 3D volumetric datasets exposed as slice
sequences).
import medotter as mo
mo.list_datasets(anatomy="liver") # substring match: 11 datasets
mo.list_datasets(modality="CT, MRI") # exact free-text match: HANSeg, MSD
mo.list_datasets(has_video=False) # single-image (non-video) datasets only
Each call returns a list[DatasetInfo], sorted by name. With no arguments,
mo.list_datasets() returns all 130 entries.
Looking up one dataset
def describe(name: str) -> DatasetInfo
name must be the dataset’s exact registry key — catalog keys are
case-sensitive ("ACDC", not "acdc"). An unknown name raises
KeyError with a “did you mean” hint when a close match exists:
mo.describe("ACDC")
# DatasetInfo(name='ACDC', modality='MRI', anatomy='heart, cardiac',
# task='organ, cardiac', n_classes=4, ...)
mo.describe("acdc")
# KeyError: unknown dataset 'acdc'. Did you mean: ACDC? Use
# medotter.list_datasets() to see all 130.
DatasetInfo fields
| Field | Type | Meaning |
|---|---|---|
name | str | Exact registry key, e.g. "ACDC". |
modality | str | None | Free-text imaging modality, e.g. "CT", "CT, MRI". |
anatomy | str | None | Free-text anatomical region(s), e.g. "abdomen, liver". |
task | str | None | Free-text task description, e.g. "organ, cardiac". |
n_classes | int | None | Number of label classes, including background if named. |
class_names | list[str] | None | Class names in label-index order (index 0 is conventionally background). |
class_labels | dict[int, str] | None | Explicit {label_id: name} map — the authoritative source for LabelSchema.from_catalog. |
background_id | int | None | The label id treated as background, when known. May be None. |
ignore_ids | list[int] | None | Label ids that should not be scored (e.g. “unannotated” regions). |
input_channels | int | None | Expected image channel count. |
has_video | bool | Whether the dataset is also registered as a video-style loader. |
hf_repo | str | None | Hugging Face dataset repo backing this entry, if any. |
source | str | None | Human-readable source/provenance note. |
card | str | None | Path to the dataset’s knowledge card, if one exists. |
Common errors
KeyError—describe(name)with a name not in the catalog. The message includes up to 10 candidate names (existing keys that contain your input as a substring) when any exist.- Catalog functions never raise
ImportError:list_datasetsanddescribeonly touch the bundled JSON file and numpy-free Python, so they work even whentorchand the dataloader package are not installed. That changes once you move to loading data or running inference.