BiliSakura / AgriFM

huggingface.co
Total runs: 7
24-hour runs: -2
7-day runs: -4
30-day runs: -14
Model's Last Updated: March 09 2026
image-segmentation

Introduction of AgriFM

Model Details of AgriFM

AgriFM

Model Description

This repository provides a Hugging Face-compatible checkpoint for AgriFM , a multi-source temporal remote sensing model for agricultural mapping.

The checkpoint was converted from a legacy PyTorch .pth file into standard transformers -style artifacts:

  • config.json
  • model.safetensors
Model Sources
Conversion Notes
  • The raw checkpoint uses a legacy key layout ( encoder.* ), which was remapped to Hugging Face PreTrainedModel state dict conventions.
  • The raw checkpoint is encoder-only .
  • Fusion neck and segmentation head parameters are initialized from model defaults in this converted package.
Intended Use

This checkpoint is intended for:

  • feature extraction from multi-source temporal remote sensing inputs
  • fine-tuning for segmentation tasks in agricultural or land-cover settings
Input Format

Expected inputs are a dict of tensors with shape (B, T, C, H, W) :

  • HLSL30 : C=6
  • S2 : C=10
  • Modis : C=7
Usage
import torch
from AgriFM.models import AgriFMConfig, AgriFMModel

model_dir = "path/to/AgriFM"
config = AgriFMConfig.from_pretrained(model_dir)
model = AgriFMModel.from_pretrained(model_dir, config=config)
model.eval()

B, T, H, W = 1, 32, 256, 256
pixel_values = {
    "HLSL30": torch.randn(B, T, 6, H, W),
    "S2": torch.randn(B, T, 10, H, W),
    "Modis": torch.randn(B, T, 7, H, W),
}

with torch.no_grad():
    outputs = model(pixel_values=pixel_values)
    features = outputs.features
print(features.shape)
Limitations
  • This is a converted checkpoint and not an official upstream release.
  • Since the source is encoder-only, task heads may require downstream fine-tuning before production use.
  • Performance depends on preprocessing consistency and modality availability.
Training and Evaluation

No additional training or benchmarking was run as part of this conversion step.
For training/evaluation pipelines, refer to Bili-Sakura/AgriFM-transformers .

Dependencies

Recommended environment: environment.yml from Bili-Sakura/AgriFM-transformers
Core libraries: PyTorch, Transformers, timm, einops, scipy, h5py.

Citation
@article{li2026agrifm,
  title={AgriFM: A multi-source temporal remote sensing foundation model for Agriculture mapping},
  author={Li, Wenyuan and Liang, Shunlin and Chen, Keyan and Chen, Yongzhe and Ma, Han and Xu, Jianglei and Ma, Yichuan and Zhang, Yuxiang and Guan, Shikang and Fang, Husheng and others},
  journal={Remote Sensing of Environment},
  volume={334},
  pages={115234},
  year={2026},
  publisher={Elsevier}
}

Runs of BiliSakura AgriFM on huggingface.co

7
Total runs
-2
24-hour runs
-4
3-day runs
-4
7-day runs
-14
30-day runs

More Information About AgriFM huggingface.co Model

AgriFM huggingface.co

AgriFM huggingface.co is an AI model on huggingface.co that provides AgriFM's model effect (), which can be used instantly with this BiliSakura AgriFM model. huggingface.co supports a free trial of the AgriFM model, and also provides paid use of the AgriFM. Support call AgriFM model through api, including Node.js, Python, http.

BiliSakura AgriFM online free

AgriFM huggingface.co is an online trial and call api platform, which integrates AgriFM's modeling effects, including api services, and provides a free online trial of AgriFM, you can try AgriFM online for free by clicking the link below.

BiliSakura AgriFM online free url in huggingface.co:

https://huggingface.co/BiliSakura/AgriFM

AgriFM install

AgriFM is an open source model from GitHub that offers a free installation service, and any user can find AgriFM on GitHub to install. At the same time, huggingface.co provides the effect of AgriFM install, users can directly use AgriFM installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

AgriFM install url in huggingface.co:

https://huggingface.co/BiliSakura/AgriFM

Url of AgriFM

Provider of AgriFM huggingface.co

BiliSakura
ORGANIZATIONS

Other API from BiliSakura

huggingface.co

Total runs: 131
Run Growth: 98
Growth Rate: 75.38%
Updated:February 16 2026
huggingface.co

Total runs: 26
Run Growth: -15
Growth Rate: -57.69%
Updated:February 16 2026
huggingface.co

Total runs: 16
Run Growth: 8
Growth Rate: 50.00%
Updated:March 09 2026
huggingface.co

Total runs: 6
Run Growth: 1
Growth Rate: 16.67%
Updated:March 09 2026
huggingface.co

Total runs: 2
Run Growth: -5
Growth Rate: -250.00%
Updated:March 09 2026