Skip to content
ModelListedExternal
Download

Resnet50 Eurosat Onnx

ONNX export of cm93/resnet50-eurosat, a ResNet-50 model fine-tuned on the EuroSAT satellite imagery dataset for land-use and land-cover (LULC) classification.

KindOtherBase modelcm93/resnet50-eurosatVersionRevision e794330

Model source

Kind
Other
File size
89.7 MB
Base model
cm93/resnet50-eurosat
Version
vRevision e794330
Updated
Sep 21, 2026
Downloads
8
Source
Hugging Face

Source description

ResNet-50 EuroSAT — ONNX Export

ONNX export of cm93/resnet50-eurosat, a ResNet-50 model fine-tuned on the EuroSAT satellite imagery dataset for land-use and land-cover (LULC) classification.

Model Details

PropertyValue
ArchitectureResNet-50 (ImageNet-1k pretrained)
TaskImage Classification
Classes10
FormatONNX
Source modelcm93/resnet50-eurosat
Source librarytimm
LicenseMIT

Classes

IndexLabel
0AnnualCrop
1Forest
2HerbaceousVegetation
3Highway
4Industrial
5Pasture
6PermanentCrop
7Residential
8River
9SeaLake

Note: Index order reflects id2label from the source model config. Always load it via AutoConfig.from_pretrained("cm93/resnet50-eurosat") rather than assuming alphabetical order.

Evaluation Results

Evaluated on the cm93/eurosat test split. Preprocessing applied using the source model's TimmWrapperImageProcessor via AutoImageProcessor.from_pretrained("cm93/resnet50-eurosat").

MetricScore
Accuracy0.9670
Precision (macro)0.9662
Recall (macro)0.9669
F1 (macro)0.9662

Source model reported metrics (from cm93/resnet50-eurosat):

SplitAccuracyF1
Train0.9756—
Validation0.9830—
Test0.98070.9807

Usage

Installation

pip install onnxruntime huggingface_hub transformers

Inference

import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
from transformers import AutoImageProcessor, AutoConfig
from PIL import Image

# Load ONNX session
model_path = hf_hub_download("krylox/resnet50-eurosat-onnx", filename="model.onnx")
session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])

# Load processor and label map from the source model
processor = AutoImageProcessor.from_pretrained("cm93/resnet50-eurosat")
id2label  = AutoConfig.from_pretrained("cm93/resnet50-eurosat").id2label

# Preprocess and infer
image = Image.open("your_image.jpg").convert("RGB")
pixel_values = processor(images=image, return_tensors="pt")["pixel_values"].numpy().astype(np.float32)

input_name  = session.get_inputs()[0].name
output_name = session.get_outputs()[0].name
logits = session.run([output_name], {input_name: pixel_values})[0]

predicted_label = id2label[int(np.argmax(logits, axis=1)[0])]
print(f"Predicted class: {predicted_label}")

Important: Use AutoImageProcessor.from_pretrained("cm93/resnet50-eurosat") for preprocessing — the source model uses TimmWrapperImageProcessor, which may differ from standard ImageNet normalization. Using hardcoded stats will degrade accuracy significantly.

Training Details (Source Model)

ParameterValue
Base weightsResNet-50 pretrained on ImageNet-1k
OptimizerAdamW (β1=0.9, β2=0.999)
Learning rate3e-5
Weight decay0.01
Batch size64
SchedulerPolynomialLR
LossCrossEntropyLoss
Epochs20
AugmentationRandomHorizontalFlip, RandomVerticalFlip
PreprocessingResize → CenterCrop → Normalize

Training Data

The source model was trained on EuroSAT, which contains 27,000 labeled, geo-referenced Sentinel-2 satellite image patches (JPEG, 64×64 px) across 10 LULC classes.

Intended Uses

  • Land-use / land-cover classification from Sentinel-2 imagery
  • Remote sensing research and benchmarking
  • Deployment in non-PyTorch or resource-constrained environments via ONNX Runtime

Limitations & Biases

  • Trained exclusively on European Sentinel-2 imagery; performance may degrade on other sensors or non-European regions.
  • The 10-class taxonomy is coarse and may not capture fine-grained land-use distinctions.
  • Inherits any biases present in the source checkpoint cm93/resnet50-eurosat.

License

MIT

Sources

1 source
Hugging FacePrimaryVersion e7943309737521bab166270ce60f91f6605e036a
huggingface.co/krylox/resnet50-eurosat-onnx/tree/e7943309737521bab166270ce60f91f6605e036a

Verified Sep 10

Model artifacts

1 artifact

model.onnx

onnx · 89.7 MB · SHA-256 167cdd2e055d…ec0f · Hugging Face

Download

Source excerpts

2 excerpts

--- license: mit library_name: onnx base_model: cm93/resnet50-eurosat datasets: - cm93/eurosat pipeline_tag: image-classification tags: - onnx - resnet50 - timm - remote-sensing - satellite-imagery - eurosat - image-classification model-index: - name: resnet50-eurosat-onnx results: - task: type: image-classification dataset: name: EuroSAT type: cm93/eurosat split: test metrics: - name: Accuracy type: accuracy value: 0.9670 - name: Precision (macro) type: precision value: 0.9662 - name: Recall (macro) type: recall value: 0.9669 - name: F1 (macro) type: f1 value: 0.9662 --- # ResNet-50 EuroSAT — ONNX Export ONNX export of [cm93/resnet50-eurosat](https://huggingface.co/cm93/resnet50-eurosat), a ResNet-50 model fine-tuned on the [EuroSAT](https://huggingface.co/datasets/cm93/eurosat) satellite imagery dataset for land-use and land-cover (LULC) classification. ## Model Details | Property | Value | |---|---| | Architecture | ResNet-50 (ImageNet-1k pretrained) | | Task | Image Classification | | Classes | 10 | | Format | ONNX | | Source model | [cm93/resnet50-eurosat](https://huggingface.co/cm93/resnet50-eurosat) | | Source library | timm | | License | MIT | ### Classes | Index | Label | |---|---| | 0 | AnnualCrop | | 1 | Forest | | 2 | HerbaceousVegetation | | 3 | Highway | | 4 | Industrial | | 5 | Pasture | | 6 | PermanentCrop | | 7 | Residential | | 8 | River | | 9 | SeaLake | > **Note:** Index order reflects `id2label` from the source model config. Always load it via `AutoConfig.from_pretrained("cm93/resnet50-eurosat")` rather than assuming alphabetical order. ## Evaluation Results Evaluated on the `cm93/eurosat` test split. Preprocessing applied using the source model's `TimmWrapperImageProcessor` via `AutoImageProcessor.from_pretrained("cm93/resnet50-eurosat")`. | Metric | Score | |---|---| | Accuracy | **0.9670** | | Precision (macro) | 0.9662 | | Recall (macro) | 0.9669 | | F1 (macro) | 0.9662 | Source model reported metrics (from [cm93/resnet50-eurosat](https://huggingface.co/cm93/resnet50-eurosat)): | Split | Accuracy | F1 | |---|---|---| | Train | 0.9756 | — | | Validation | 0.9830 | — | | Test | 0.9807 | 0.9807 | ## Usage ### Installation ```bash pip install onnxruntime huggingface_hub transformers ``` ### Inference ```python import numpy as np import onnxruntime as ort from huggingface_hub import hf_hub_...

Source context: 8 downloads · 0 likes · Pipeline image-classification · Library onnx · Repo krylox/resnet50-eurosat-onnx