vit-large-patch16-224-galaxy10-decals-full-v2

google/vit-large-patch16-224 adapted to galaxy morphology classification on Galaxy10 DECaLS (10 classes) by full fine-tuning (all parameters updated), under the revised protocol of the paper When foundation models meet astronomical data (Astronomy and Computing, revised version, 2026). One of the 80 configurations (40 pretrained backbones x two adaptation regimes) of the collection Vision Foundation Models Benchmark.

Results (held-out test set, 1,774 images)

Accuracy (%) Weighted F1 (%)
This checkpoint (seed 42, epoch 9 of 30) 83.60 83.40
Mean +/- s.d. over three seeds (42, 1, 2) 83.28 +/- 0.51 83.09 +/- 0.50

Scores are computed at the epoch of minimum validation loss. The per-epoch metrics of all runs, the tables of the paper and the data split are in the dataset vision-foundation-models-benchmark-runs.

Training protocol

  • Data: Galaxy10 DECaLS (17,736 images). The public test split (1,774 images) is the held-out test set; the public train split is divided, with stratification by class, into 14,188 training and 1,774 validation images (indices in the dataset repository above). The validation set is used only to select the epoch.
  • Recipe (identical for the 40 backbones): AdamW (betas 0.9/0.999, eps 1e-8, weight decay 0.1, gradient clipping 1.0), learning rate 5e-5, linear schedule with 10% warm-up, batches of 32 images with gradient accumulation over 8 steps (effective batch 256), 30 epochs, single precision (fp32, TF32 disabled), one GPU. Augmentation: random resized crop to the input resolution and random horizontal flip. Evaluation: resize and centre crop to 224x224 px, normalisation of the checkpoint's image processor. Seed 42 (seeds 1 and 2 give the mean and s.d. above).
  • Regime: full fine-tuning (all parameters updated). The head is a single linear layer with ten outputs.
  • Selection: epoch of minimum validation loss (epoch 9 here); the weights of this repository are those of that epoch.
  • Software: PyTorch 2.3.0, transformers 4.37.2, datasets 2.19.1, torchvision 0.18.0.

Per-epoch metrics (seed 42)

Epoch Val. loss Val. acc. Test acc. Test weighted F1
1 0.7910 72.83 72.89 71.50
2 0.6234 78.58 78.24 77.77
3 0.5807 81.51 81.00 80.34
4 0.5948 80.61 79.43 79.27
5 0.5173 82.86 83.43 82.99
6 0.5798 80.72 81.23 80.92
7 0.5492 81.40 80.89 80.54
8 0.5198 83.60 84.33 83.82
9 (selected) 0.4721 84.84 83.60 83.40
10 0.5392 83.43 83.99 83.66
11 0.5040 84.05 84.05 83.90
12 0.5799 82.98 82.19 82.32
13 0.5435 84.33 82.24 82.10
14 0.5577 84.61 84.44 84.24
15 0.5683 85.17 84.22 84.00
16 0.5500 85.23 85.01 84.84
17 0.5940 84.78 82.92 82.86
18 0.5971 84.50 84.16 84.14
19 0.5957 85.46 83.77 83.50
20 0.6346 84.89 84.55 84.27
21 0.6168 85.01 84.50 84.32
22 0.6249 85.63 83.03 82.84
23 0.6318 85.06 83.09 83.19
24 0.6616 84.89 84.27 84.07
25 0.6476 85.01 84.16 84.03
26 0.6610 85.79 84.44 84.28
27 0.6504 85.23 84.67 84.53
28 0.6453 85.79 84.44 84.26
29 0.6502 85.46 84.44 84.30
30 0.6498 85.63 84.72 84.61

How to use

from transformers import AutoImageProcessor, AutoModelForImageClassification
from torchvision.transforms import Compose, Resize, CenterCrop, ToTensor, Normalize

model = AutoModelForImageClassification.from_pretrained("matthieulel/vit-large-patch16-224-galaxy10-decals-full-v2").eval()
processor = AutoImageProcessor.from_pretrained("matthieulel/vit-large-patch16-224-galaxy10-decals-full-v2")
# Pre-processing used in the paper: resize and centre-crop to 224x224 px, then the processor's normalisation
transform = Compose([Resize(224), CenterCrop((224, 224)), ToTensor(), Normalize(processor.image_mean, processor.image_std)])
# logits = model(pixel_values=transform(image).unsqueeze(0)).logits

Integrity check

The model stored in this repository was reloaded and run on the first 96 test images: predictions identical to the saved logits of the selected epoch for 100.0% of them (maximum absolute logit difference 3.81e-06).

Citation

Paper under revision for Astronomy and Computing; citation to be completed upon publication.

Downloads last month
50
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for matthieulel/vit-large-patch16-224-galaxy10-decals-full-v2

Finetuned
(105)
this model

Dataset used to train matthieulel/vit-large-patch16-224-galaxy10-decals-full-v2

Collection including matthieulel/vit-large-patch16-224-galaxy10-decals-full-v2

Evaluation results