Farmland VLM adapters
LoRA adapters for captioning and answering questions about crop anomalies in aerial farmland tiles. They were trained for AI 512 (IIT Ropar) Project 3 on Agriculture-Vision. The code, the training pipeline and the demo app are at rit3sh-x/farmland-vlm.
This repository holds adapters only. The base models download from their own repositories, and no dataset images, masks or statistics are included.
Contents
| Path | Model | Base |
|---|---|---|
blip-lora/vqa/ | BLIP-LoRA question answering (cycle 6, augmented recipe, fold 0) | Salesforce/blip-vqa-base |
blip-lora/caption/ | BLIP-LoRA captioning (480k pairs, fold 0) | Salesforce/blip-image-captioning-base |
blip-lora/readout.json | Candidate answers per question type and the label-shift correction for the ranked readout | |
qwen-rgb/lora-f16.gguf | Qwen3.5-2B LoRA reading the RGB tile, as a llama.cpp runtime adapter | unsloth/Qwen3.5-2B-GGUF (Q4_K_M + mmproj-F16) |
qwen-ndvi/lora-f16.gguf | Qwen3.5-2B LoRA reading the RGB tile and an NDVI map of it as a second image | unsloth/Qwen3.5-2B-GGUF |
The BLIP adapters are rank 64, alpha 128, on the attention query and value projections, trained at 384 px. The VQA adapter trained on 1.92M question-answer pairs, with half of its training images given one random photometric or compression perturbation.
Task
The models answer four closed-vocabulary question types about nine anomaly classes (double plant, drydown, endrow, nutrient deficiency, planter skip, storm damage, standing water, waterway, weed cluster):
- presence: "Is there weed cluster in this tile?" (yes, no, possibly)
- identify: "What anomalies are visible?"
- extent: "How much of the tile does the drydown cover?" (small, moderate, large, or a range)
- location: "Where is the waterway?" (a cell of a 3×3 grid, two cells, or throughout)
Captions list each anomaly with its extent and location.
Results
These results are from field-grouped 5-fold cross-validation, scored on held-out fields and averaged over the four question types. The adapters here are fold 0's. The demo tiles in the app come from fold 0's held-out fields, so these adapters never trained on them.
| Model | Held-out mean |
|---|---|
| Zero-shot BLIP | 29.6% |
| BLIP-LoRA, plain recipe (report headline) | 74.8 ± 1.2% |
| BLIP-LoRA, augmented recipe (this repo) | 75.0 ± 1.6% |
| Qwen3.5-2B LoRA, RGB (fold 0, greedy) | 70.3% |
| Qwen3.5-2B LoRA, RGB + NDVI (fold 0, greedy) | 70.4% |
BLIP answers are read out by ranking each question type's candidate answers by likelihood, then correcting for the shift between balanced training draws and the test class mix (readout.json). The augmented recipe scores the same as the plain one on clean tiles and holds up much better on damaged or compressed images. That is why it is served.
Use
The demo app downloads these files itself:
hf auth login # once; accept the access terms on this page first
git clone https://github.com/rit3sh-x/farmland-vlm && cd farmland-vlm
make app
To load the BLIP adapters directly:
from huggingface_hub import snapshot_download
from peft import PeftModel
from transformers import BlipForQuestionAnswering
path = snapshot_download("DarkSlayer16/farmland-vlm", allow_patterns=["blip-lora/*"])
model = PeftModel.from_pretrained(BlipForQuestionAnswering.from_pretrained("Salesforce/blip-vqa-base"), f"{path}/blip-lora/vqa")
Limitations
The adapters were trained on 10 cm Agriculture-Vision tiles of US Midwest farmland. On coarser imagery, other crops or other regions, accuracy is unmeasured and likely lower. They never hedge in words on ambiguous cases, though their confidence ranks their answers. Outputs are for research, not farm management decisions.