Views
No views yet
1from huggingface_hub import hf_hub_download
2from safetensors.torch import load_file
3import torch
4
5# Download weights
6weights_path = hf_hub_download(
7 repo_id="aksshaymathewp/agrihybridFM-small-dino-pretrained",
8 filename="model.safetensors"
9)
10
11# Load state dict
12state_dict = load_file(weights_path)
13
14# Create model (you need the AgriViT model code)
15from models import create_agrivit
16model = create_agrivit("small")
17model.load_state_dict(state_dict)
18model.eval()1@misc{agrihybridfm2024,
2 title={AgriHybridFM: A Hybrid CNN-Transformer Foundation Model for Agricultural Vision},
3 author={Aksshay Mathew P},
4 year={2024},
5}