Siglip2 For Palm Disease Detection
Fine-tuned google/siglip2-so400m-patch14-384 vision encoder with a 9-way multi-label linear head, for detecting diseases/conditions on oil-palm (kelapa sawit) seedlings in the pre-nursery phase.
Model source
- Kind
- Checkpoint
- File size
- 1.60 GB
- Base model
- google/siglip2-so400m-patch14-384
- Version
- vRevision db3adf3
- Updated
- Oct 4, 2026
- Publisher
- @farhan-fahlevi
- Downloads
- 5
- Source
- Hugging Face
Source description
Oil-Palm Seedling Disease Detector (SigLIP 2, multi-label)
Fine-tuned google/siglip2-so400m-patch14-384 vision encoder with a 9-way multi-label linear head, for
detecting diseases/conditions on oil-palm (kelapa sawit) seedlings in the
pre-nursery phase.
Classes (multi-label — an image may have several)
| code | name | note |
|---|---|---|
| P00 | Normal | |
| P01 | LeafSpot | |
| P02 | Anthracnose | |
| P03 | BudRot | data-limited |
| P04 | Chlorosis | |
| P05 | NettleCat | data-limited |
| P06 | AlgalRust | |
| P07 | Fusarium | data-limited |
| P08 | FertBurn |
How to load and predict
See inference_example.py. In short: load the base SigLIP vision tower, attach
the linear head from model.safetensors, preprocess with the bundled
preprocessor_config.json, apply per-class thresholds from thresholds.json.
import json, torch
from transformers import AutoModel, AutoProcessor
from safetensors.torch import load_file
from PIL import Image
# ... (full runnable version in inference_example.py)
Decision thresholds (IMPORTANT)
This model outputs one independent sigmoid score per class. Do not use a
global 0.5 cutoff. Use the per-class thresholds in thresholds.json, which
were tuned on a validation split (maximizing per-class F1) and then frozen.
A global threshold is known to be wrong here because the class scores are
imbalanced and not comparable across classes.
Honest limitations
- Data-limited classes. P03, P05, P07 have very few training positives. Their metrics are high-variance and should be treated as indicative only. Headline numbers should be reported as a macro over the six data-adequate classes.
- Two-source training data. Training unions two labeled image sources with different acquisition styles and label statistics. Cross-source generalization was audited; see the thesis report. New images from a very different camera/pipeline may see reduced accuracy.
- Scope. Pre-nursery seedlings only. Not validated on mature palms, other crops, or field (non-nursery) imagery.
- Not a substitute for an agronomist. Intended as a screening / decision- support aid with human verification, not autonomous diagnosis.
Provenance
Undergraduate thesis, Program Studi Ilmu Komputer, FMIPA, Universitas Pakuan.
Weights repackaged from training checkpoint siglip2_palm.pt.
Sources
1 source
Sources
1 sourceVerified Oct 4
Model artifacts
1 artifact
Model artifacts
1 artifactSource excerpts
3 excerpts
Source excerpts
3 excerpts--- license: apache-2.0 base_model: google/siglip2-so400m-patch14-384 tags: - image-classification - multi-label - siglip - agriculture - plant-disease library_name: transformers pipeline_tag: image-classification --- # Oil-Palm Seedling Disease Detector (SigLIP 2, multi-label) Fine-tuned `google/siglip2-so400m-patch14-384` vision encoder with a 9-way multi-label linear head, for detecting diseases/conditions on oil-palm (kelapa sawit) seedlings in the pre-nursery phase. ## Classes (multi-label — an image may have several) | code | name | note | |------|------|------| | P00 | Normal | | | P01 | LeafSpot | | | P02 | Anthracnose | | | P03 | BudRot | data-limited | | P04 | Chlorosis | | | P05 | NettleCat | data-limited | | P06 | AlgalRust | | | P07 | Fusarium | data-limited | | P08 | FertBurn | | ## How to load and predict See `inference_example.py`. In short: load the base SigLIP vision tower, attach the linear head from `model.safetensors`, preprocess with the bundled `preprocessor_config.json`, apply per-class thresholds from `thresholds.json`. ```python import json, torch from transformers import AutoModel, AutoProcessor from safetensors.torch import load_file from PIL import Image # ... (full runnable version in inference_example.py) ``` ## Decision thresholds (IMPORTANT) This model outputs one independent sigmoid score per class. **Do not use a global 0.5 cutoff.** Use the per-class thresholds in `thresholds.json`, which were tuned on a validation split (maximizing per-class F1) and then frozen. A global threshold is known to be wrong here because the class scores are imbalanced and not comparable across classes. ## Honest limitations - **Data-limited classes.** P03, P05, P07 have very few training positives. Their metrics are high-variance and should be treated as indicative only. Headline numbers should be reported as a macro over the six data-adequate classes. - **Two-source training data.** Training unions two labeled image sources with different acquisition styles and label statistics. Cross-source generalization was audited; see the thesis report. New images from a very different camera/pipeline may see reduced accuracy. - **Scope.** Pre-nursery seedlings only. Not validated on mature palms, other crops, or field (non-nursery) imagery. - **Not a substitute for an agronomist.** Intended as a screening / decision- support aid...
Source context: 5 downloads · 0 likes · Pipeline image-classification · Library transformers · Repo farhan-fahlevi/siglip2-for-palm-disease-detection
Source context: 1266 downloads · 0 likes · Pipeline image-classification · Library transformers · Repo farhan-fahlevi/siglip2-for-palm-disease-detection
