Instructions to use HomesteaderLabs/forager-field-station-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use HomesteaderLabs/forager-field-station-models with timm:
import timm model = timm.create_model("hf_hub:HomesteaderLabs/forager-field-station-models", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Forager's Field Station — Field ID Models
Small, on-device classifiers that identify wild berries, mushrooms, and medicinal
plants from a photo — and refuse by default when unsure. Four
tf_efficientnet_lite2 models (~9M params each, ~0.04B total) fine-tuned from
timm/tf_efficientnet_lite2.in1k on iNaturalist research-grade observations. They
run offline on a Raspberry Pi 5 + Hailo 8L in a handheld device; the same ONNX
weights run on a free CPU.
🔗 Live demo: Forager's Field Station Space · Open dataset: HomesteaderLabs/forager-sightings
Architecture — single-expert routing (safety-first)
photo (224x224 RGB, ImageNet-normalized)
-> domain_router_v2 (berry / mushroom / plant / other)
conf < 0.74 or "other" -> ABSTAIN
else route to the ONE expert that owns the domain:
berry -> berry_expert
mushroom -> highvalue_expert
plant -> medicinals_expert
expert below confidence gate -> ABSTAIN
-> SAFE / CAUTION / DEADLY (+ scientific name, look-alike, key difference)
Single-expert routing is a safety choice: an off-domain expert never gets to misclassify an input it doesn't own (the mushroom expert never sees a plant, so it can't call a poison hemlock "ramps"). All models emit raw logits; softmax, confidence gating, and abstention run downstream.
Models in this repo
| Folder | Domain | Classes |
|---|---|---|
domain_router_v2/ |
berry / mushroom / plant / other | 4 |
berry_expert/ |
wild berries + toxic look-alikes | 11 |
highvalue_expert/ |
chanterelle, morel, lion's mane, ginseng… | 11 |
medicinals_expert/ |
wild medicinals + deadly look-alikes | 21 |
Each folder has *_logits.onnx (CPU/edge), *_classes.json (label order), and
*.pt (the fine-tuned timm checkpoint: model_state_dict + classes + arch).
energy_thresholds.json holds per-expert in-domain energy percentiles for optional
OOD gating.
Benchmarks
iNaturalist held-out validation: berry 92.1% · high-value 97.4% · medicinals 95.7% · router 92.9% (≥95% routing accuracy at conf 0.74). Toxic-as-edible false-accept rate: 0.00% on all three experts.
Real-world field photos: berry 95.5% · high-value 100% · medicinals 95.2%; across the held-out real set the stack never labelled a deadly specimen as edible.
Usage (ONNX, CPU)
import onnxruntime as ort, numpy as np, json
sess = ort.InferenceSession("berry_expert/berry_expert_logits.onnx",
providers=["CPUExecutionProvider"])
classes = json.load(open("berry_expert/berry_expert_classes.json"))
# x: float32 [1,3,224,224], ImageNet-normalized (Resize 255 -> CenterCrop 224)
logits = sess.run(None, {"input": x})[0][0]
probs = np.exp(logits - logits.max()); probs /= probs.sum()
print(classes[int(probs.argmax())], float(probs.max()))
⚠️ Safety
Identification aid only — never an authority. Wild mushroom and plant ID carries fatal risk. No output should be acted on — including any consumption decision — without independent verification by a qualified expert. Amatoxin poisoning (Amanita, Galerina, Conocybe) is lethal with no reliable field antidote. The maintainers accept no liability for decisions made from model output.
License & citation
Apache-2.0. Training data from iNaturalist observers (CC-BY / CC0); weights are an original derivative released independently under Apache-2.0.
HomesteaderLabs (2026). Forager's Field Station Field ID Models. https://homesteaderlabs.com
- Downloads last month
- -
Model tree for HomesteaderLabs/forager-field-station-models
Base model
timm/tf_efficientnet_lite2.in1k