7 Downloads Updated 2 months ago
ollama run brinzaengineeringai/microlens-final
Updated 2 months ago
2 months ago
2dfe60217bd8 · 6.5GB ·
A pocket microscope that fits in your pocket. Open-weight, offline, license-clean. Built for the Gemma 4 Good Hackathon (Kaggle 2026).
ollama run brinzaengineeringai/microlens-final
Then drop in a microscopy image and ask “Identify the organism and describe its morphology.”
Diatoms are the gold-standard bioindicator for freshwater quality under the European Water Framework Directive. A community lake monitor or a high-school biology class can measure pollution by counting and identifying diatoms — but a trained diatomologist takes years to learn the 200+ relevant genera, and the world is short on taxonomists.
Closed-source SaaS tools require internet and a credit card. Image-classification CNNs emit only a label — no morphology, no habitat reasoning, no “why”.
MicroLens turns a 2 B-effective vision model into a field assistant that:
Pair with a $20 USB-microscope clip-on lens → floor hardware cost: $120. That is what digital equity for science looks like.
unsloth/gemma-4-E2B-it — 4.44 B total parameters · ~2 B effective via Per-Layer Embeddings (PLE), runnable on consumer GPU, Android phones, and Raspberry Pi 5.Measured on a 200-pair stratified sample of the held-out validation split (150 diatoms + 50 fungal spores, covering all 95 genera):
| Metric | Value |
|---|---|
| Genus accuracy (substring match) | 89.0 % |
| Category accuracy (diatom vs fungal spore) | 100 % |
| Format adherence (morphology / habitat / cues) | 89.5 % |
| Genus accuracy — fungal spores only | 100 % |
The 11 % of genus misses are between visually adjacent diatom genera (Bacillaria ↔ Nitzschia, Cyclostephanos ↔ Discostella, Staurosirella ↔ Staurosira) — pairs that even expert diatomists routinely confuse without SEM imaging.
75,491 image-question-answer pairs · 95 unique genera · 2 categories:
| Source | Pairs | License |
|---|---|---|
| UDE Diatoms in the Wild 2024 (Zenodo 10410655) | 39,389 | CC0 |
| DIATLAS open European diatom imaging (Zenodo 16260887) | 23,544 | CC-BY 4.0 |
| TgFC — Tectona grandis Fungal Community (figshare 28855910) | 4,188 | CC-BY 4.0 |
Top-30 genera have hand-curated knowledge-base answers from AlgaeBase, WoRMS, and ITIS.
Datasets released on Kaggle:
Image: Gomphonella olivacea (UDE Diatoms)
MicroLens: *“This is a diatom of the genus Gomphonella, specifically Gomphonella olivacea. Morphology: pennate diatom with characteristic silica frustule composed of two valves (epitheca and hypotheca). Cell size, valve outline, and striae pattern are species-specific. Frustule preserves well in sediments. Habitat: ubiquitous in fresh, brackish, and marine waters worldwide. Identification cues: valve outline, raphe arrangement, striae density and pattern, presence/absence of rimoportulae, fultoportulae, fibulae.”*
tools capability tag shown on this Hub page is inherited from base Gemma 4, not trained for MicroLens. Tool-calling and function-calling are not characterised for this fine-tune — use vision and chat features only.@misc{brinza2026microlens,
title = {MicroLens: Gemma 4 Vision for Biological Microscopy},
author = {Brinza, Serghei},
year = {2026},
month = {may},
url = {https://ollama.com/brinzaengineeringai/microlens-final},
note = {Submission for the Gemma 4 Good Hackathon, Kaggle 2026}
}
Serghei Brinza — AI engineer, Vienna, Austria. Open vision-language models for biological and microscopy applications.
Built with Unsloth and Google Gemma 4. Diatom imagery used under CC0 and CC-BY 4.0.