Small, on-device classifiers that identify wild berries, mushrooms, and medicinal plants from a photo — and refuse by default when unsure. Four tfefficientnetlite2 models (9M params each, 0.04B total) fine-tuned from...
Fonte do modelo
Descrição da fonte
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.
🔗 ·
Fontes
1 fonteVerificado 28 de set.
Artefatos de modelo
8 artefatosTrechos de fonte
2 trechosphoto (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.
| 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.
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.
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()))
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.
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
domain_router_v2/domain_router_v2_logits.onnx
onnx · 18,4 MB · SHA-256 c4f1fc39d0dd…7aeb · Hugging Face
highvalue_expert/highvalue_expert_logits.onnx
onnx · 18,4 MB · SHA-256 d22ab3d94af5…f474 · Hugging Face
Baixarmedicinals_expert/medicinals_expert_logits.onnx
onnx · 18,5 MB · SHA-256 69cae9fb7e14…720a · Hugging Face
Baixar--- license: apache-2.0 library_name: timm pipeline_tag: image-classification base_model: timm/tf_efficientnet_lite2.in1k tags: - image-classification - foraging - mushrooms - wild-plants - berries - onnx - edge - raspberry-pi - safety --- # 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](https://huggingface.co/spaces/build-small-hackathon/Forager-Field-Notes) · **Open dataset:** [HomesteaderLabs/forager-sightings](https://huggingface.co/datasets/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...
Source context: 0 downloads · 0 likes · Pipeline image-classification · Library timm · Repo HomesteaderLabs/forager-field-station-models