API Reference
vyntri.backbones
Backbone registry, automatic selection, and candidate control.
vyntri.backbones
Backbone Registry
| Backbone | Features | Params | Input Size | Description |
|---|---|---|---|---|
| mobilenet_v3_small (default) | 576 | 2.5M | 224 | Fast, lightweight, good for edge |
| resnet18 | 512 | 11.7M | 224 | Good balance of speed and accuracy |
| resnet50 | 2048 | 25.6M | 224 | Higher capacity, slower extraction |
| efficientnet_b0 | 1280 | 5.3M | 224 | Efficient architecture, strong accuracy |
| convnext_tiny | 768 | 28.6M | 224 | ConvNeXt architecture, competitive performance |
Registry validated at construction. An invalid backbone name produces a clear error listing all supported names.
Automatic Backbone Selection
When backbone="auto", Vyntri scores candidates with LogME on frozen features, validates the top-k candidates with the analytic pipeline, and selects the best performer. Requires validation data.
from vyntri import Vyntri
from vyntri.data import split
s = split("./my_dataset", train=0.7, test=0.2, seed=42)
model = Vyntri(backbone="auto")
model.fit(train=s.train, val=s.val)
# View selection results
sel = model.metadata_["selection"]
print(f"Selected: {sel['selected']}")
print(f"Scores: {sel['scores']}")Candidate Control
Control which backbones are evaluated during auto-selection. Only the specified candidates are benchmarked — excluded backbones are never initialized or evaluated.
model = Vyntri(
backbone="auto",
candidates=[
"mobilenet_v3_small",
"resnet18",
"efficientnet_b0",
],
)
model.fit(train=s.train, val=s.val)Rules:
candidatesis only valid whenbackbone="auto"— combiningcandidateswith an explicit backbone raises an error- Invalid candidate names are rejected with a clear error message
- Duplicate candidates are rejected
- If no candidates are provided, all supported backbones are evaluated
- Selection is deterministic: same candidates + same data + same seed = same result