microlens / README.md
Laborator's picture
Add demo video link
f87ca59 verified

A newer version of the Gradio SDK is available: 6.14.0

Upgrade
metadata
title: MicroLens
emoji: 🔬
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.7.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: Gemma 4 E2B + LoRA · diatoms & fungal spores · 95 genera
models:
  - Laborator/microlens-final
tags:
  - microscopy
  - biology
  - vision-language
  - gemma
  - gemma-4
  - unsloth
  - qlora

Demo video

Watch the 90-second walkthrough on YouTube

🔬 MicroLens — Microscopy AI Demo

Live demo of MicroLens: a fine-tuned Gemma 4 E2B vision-language model that identifies microscopic subjects across 2 categories (diatoms and fungal spores) and 95 genera.

Built by Serghei Brinza (Vienna, Austria) for the Kaggle Gemma 4 Good Hackathon (May 2026).


🚀 How to use

  1. Upload a microscopy image (or pick one from the examples gallery).
  2. Optionally add a question, for example: "What is shown here?", "Describe the morphology", "What category does this belong to?"
  3. Click AI Analyze.

You get three side-by-side answers:

  • UNTRAINED BASELINE — stock Gemma 4 E2B with no microscopy training.
  • MICROLENS · BRIEF — same base + Laborator/microlens-final LoRA, prompted for a single-sentence genus answer.
  • MICROLENS · RICH — same base + same LoRA, prompted for the full schema (genus + morphology + habitat + identification cues).

🔒 Privacy

  • Images are processed in-memory on this Space and not stored server-side.
  • No analytics, no tracking, no third-party sharing.
  • For fully offline operation, see the desktop release linked below.

⚠️ Disclaimer

MicroLens is a research and educational tool. It is not a medical device and must not be used for clinical diagnosis, food-safety decisions, forensic identification, or any purpose where an incorrect answer could harm a person.

  • Predictions are probabilistic and may be wrong, especially on out-of-distribution samples.
  • Always verify critical findings with a qualified microscopist or laboratory.

For any vertical that requires regulatory clearance (medicine, veterinary, forensics, food safety), see the 4-stage gated rollout in the project roadmap.


🔗 Links


📜 License and citation

  • Code: Apache 2.0
  • Documentation: CC-BY 4.0
@software{brinza_microlens_2026,
  title        = {MicroLens: a microscopy vision-language interface built on Gemma 4 E2B},
  author       = {Brinza, Serghei},
  year         = {2026},
  month        = may,
  publisher    = {Hugging Face},
  note         = {Submission to the Gemma 4 Good Hackathon (Kaggle, May 2026)}
}

Built with Unsloth, llama.cpp, and Gradio in Vienna, Austria.