ReliefLens is a local-first image triage prototype built around
apple/MobileCLIP2-S0. It turns a folder of field photos into a ranked CSV,
JSONL, and HTML dashboard showing likely needs, hazards, damage, supplies, and
follow-up actions.
The core idea: in floods, fires, storms, housing inspections, mutual-aid intake, or community health work, people often have messy photo dumps before they have clean forms. ReliefLens uses zero-shot image/text matching to make those photos searchable and actionable without sending them to a hosted vision API.
apple/MobileCLIP2-S0 is small, current, and underused. Apple lists it as
11.4M image parameters plus 63.4M text parameters, which makes it a good fit
for high-volume local transformation work.
This project is intentionally Apple-model-first:
- Default model:
apple/MobileCLIP2-S0 - Official implementation:
apple/ml-mobileclip - Upstream contribution:
apple/ml-mobileclip#11 - Apple-specific notes:
APPLE_MOBILECLIP.md
triage.csv: one row per image with top category, confidence, action, and per-category scores.triage.jsonl: machine-readable records for downstream workflows.dashboard.html: a static, shareable review page with severity counts, category filters, search, and top-match evidence.embeddings.npz: optional cached image embeddings for re-labeling without re-encoding images.
Create a Python environment, then install:
pip install -r requirements.txtThe model card for MobileCLIP2 says to install Apple's ml-mobileclip package.
If it is not available through pip in your environment, install from Apple's
GitHub repo, then rerun ReliefLens:
pip install git+https://github.com/apple/ml-mobileclip.gitpython relieflens.py scan `
--images C:\path\to\photos `
--out C:\path\to\relieflens-output `
--model apple/MobileCLIP2-S0For a faster dry run that validates parsing and output generation without loading the model:
python relieflens.py demo --out C:\path\to\relieflens-demoEdit taxonomy.yaml. Each category has prompts and an action. ReliefLens embeds
the prompts, compares them to each image, and reports the best match.
Good taxonomies are concrete:
- Prefer
a washed out road or bridgeoverinfrastructure. - Prefer
standing flood water inside a homeoverwater issue. - Add local needs: insulin, oxygen tanks, wheelchair ramps, school meals, damaged documents, mold, downed power lines, blocked exits.
python -m unittest discover -s tests
python relieflens.py demo --out relieflens-outputOpen relieflens-output/dashboard.html to review the static dashboard.
github-actions-test.example.yml contains a ready-to-copy GitHub Actions
workflow. It is kept as an example because some OAuth tokens cannot create
active workflow files without the extra workflow scope.
ReliefLens is a triage aid, not an emergency decision-maker. Treat its output as an attention-routing layer. Human review should decide actual priority, especially for medical, legal, housing, insurance, or emergency response use.
See IMPACT.md for deployment ideas and the roadmap.
ReliefLens depends on Apple's MobileCLIP work. If this project is useful, cite
the MobileCLIP2 and MobileCLIP papers listed in Apple's
ml-mobileclip README.