Downloads · 30 days
42
9% of all-time downloads
jpmarindiaz/lfm2-flood
lfm2-flood is a image-text-to-text model from jpmarindiaz. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tune of LiquidAI/LFM2.5-VL-450M for flood detection from Sentinel-2 satellite tile pairs (RGB + SWIR baseline + RGB + SWIR current). Output is a structured JSON flood-risk profile.
Downloads · 30 days
42
9% of all-time downloads
All-time downloads
454
Public
Parameters
516M
7.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt6.3 GB · 81%
From the Hugging Face model README
Fine-tune of LiquidAI/LFM2.5-VL-450M for flood detection from Sentinel-2 satellite tile pairs (RGB + SWIR baseline + RGB + SWIR current). Output is a structured JSON flood-risk profile.
The model is intended to run on a low-resource node (a satellite or a community ground station) and downlink only the JSON payload — not raw imagery — for offline humanitarian response in flood-affected regions.
Status: experimental. Trained on 88 paired samples (110 total, 22 held out for eval). The dataset is too small and noisy for an operational alert system; this is the infrastructure, not a deployable model. See the Limitations section.
Four images per inference, in this order:
Each is a Sentinel-2 PNG, ~5 km × 5 km, served as base64 data URL or HF Hub URL.
{
"flood_present": true,
"flood_severity": "moderate",
"water_coverage_pct_estimate": "30-60%",
"populated_area_affected": true,
"infrastructure_at_risk": true,
"river_overflow_visible": true,
"image_quality_limited": false
}
7 fields. flood_present and the four booleans are change-relative — i.e. "is there flooding vs the baseline tile", not "is there water in this tile". image_quality_limited is the abstention signal — set true on cloudy or partial-coverage tiles.
| file | size | purpose |
|---|---|---|
model.safetensors | ~860 MB | merged HF checkpoint, full fine-tune of LFM2.5-VL-450M |
config.json, tokenizer*.json, chat_template.jinja, etc. | small | standard HF transformers metadata |
lfm2-flood-Q4_0.gguf | ~245 MB | quantized backbone for llama.cpp |
mmproj-lfm2-flood-F16.gguf | ~189 MB | vision tower + projector for llama.cpp |
# Download both files (or use `hf download`)
hf download jpmarindiaz/lfm2-flood lfm2-flood-Q4_0.gguf --local-dir .
hf download jpmarindiaz/lfm2-flood mmproj-lfm2-flood-F16.gguf --local-dir .
# Serve OpenAI-compatible endpoint
llama-server -m lfm2-flood-Q4_0.gguf --mmproj mmproj-lfm2-flood-F16.gguf -c 8192 --port 8765
Then POST 4 images to /v1/chat/completions with a JSON-schema response_format. Full client code in the humaid repo (finetune-flood/src/evaluate.ts, finetune-flood/app/server.ts).
LiquidAI/LFM2.5-VL-450Mjpmarindiaz/flood-detection-pair-colombia.Compared against the labeler's self-consistency oracle and the un-fine-tuned base model on the same 110 pair samples:
| field | opus oracle (n=30) | base LFM2.5-VL (n=110) | this model (n=110) |
|---|---|---|---|
| valid_json | 1.00 | 1.00 | 1.00 |
| fields_present | 1.00 | 1.00 | 1.00 |
| flood_present | 0.67 | 0.66 | 0.66 |
| flood_severity | 0.43 | 0.29 | 0.29 |
| water_coverage_pct_estimate | 0.70 | 0.37 | 0.35 |
| populated_area_affected | 0.73 | 0.51 | 0.51 |
| infrastructure_at_risk | 0.73 | 0.54 | 0.54 |
| river_overflow_visible | 0.67 | 0.60 | 0.60 |
| image_quality_limited | 0.83 | 0.10 | 0.90 |
| overall | 0.68 | 0.44 | 0.55 |
| avg latency (s) | 3.87 | 0.53 | 0.53 |
overall is the macro-average across the 7 fields. valid_json and fields_present are 1.0 because we use grammar-constrained JSON output via response_format: {type: "json_schema"}.
image_quality_limited (0.10 → 0.90). Other fields essentially didn't move with 88 train samples × 3 epochs.The full pipeline + scripts + playbook are in the humaid repo on GitHub. Key files:
finetune-flood/PLAYBOOK.md — end-to-end command sequence (fetch → label → build → upload → train → pull → package → serve → eval)finetune-flood/REPORT.md — wrap-up findings (what worked, what didn't, the case for switching to Sentinel-1 SAR before resuming)finetune-flood/docs/ — overview, pipeline, data collection, labeling, evaluation, findingsfinetune-flood/scripts/convert_mmproj_lfm2vl.py — patch around the upstream convert_hf_to_gguf.py issue with lm_head.weight in full-FT merged checkpointsfinetune-flood/app/ — small Hono app for testing the model interactivelyTrained 2026-05-08 as part of the humaid project — offline-first humanitarian response toolkit for flood crises in Colombia. Built on: