google/vit-base-patch32-384 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.
| Accuracy (%) | Weighted F1 (%) | |
|---|---|---|
| This checkpoint (seed 42, epoch 15 of 30) | 82.81 | 82.56 |
| Mean +/- s.d. over three seeds (42, 1, 2) | 82.64 +/- 0.34 | 82.41 +/- 0.34 |
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.
| Epoch | Val. loss | Val. acc. | Test acc. | Test weighted F1 |
|---|---|---|---|---|
| 1 | 1.4283 | 50.85 | 50.73 | 46.05 |
| 2 | 0.8219 | 73.00 | 73.00 | 71.95 |
| 3 | 0.7200 | 76.21 | 75.93 | 75.00 |
| 4 | 0.6179 | 79.43 | 78.18 | 77.33 |
| 5 | 0.5844 | 80.33 | 79.93 | 79.51 |
| 6 | 0.5569 | 81.79 | 80.50 | 80.08 |
| 7 | 0.5771 | 81.23 | 79.65 | 79.13 |
| 8 | 0.5817 | 81.62 | 80.83 | 80.27 |
| 9 | 0.5650 | 82.36 | 81.12 | 80.58 |
| 10 | 0.5384 | 82.47 | 81.40 | 81.16 |
| 11 | 0.5303 | 83.65 | 81.85 | 81.49 |
| 12 | 0.5436 | 82.64 | 81.51 | 81.08 |
| 13 | 0.5250 | 83.71 | 82.47 | 81.90 |
| 14 | 0.5277 | 83.31 | 81.85 | 81.52 |
| 15 (selected) | 0.5100 | 84.05 | 82.81 | 82.56 |
| 16 | 0.5184 | 84.22 | 82.58 | 82.29 |
| 17 | 0.5248 | 84.67 | 82.75 | 82.44 |
| 18 | 0.5370 | 83.88 | 82.86 | 82.56 |
| 19 | 0.5328 | 84.67 | 82.41 | 81.93 |
| 20 | 0.5381 | 83.99 | 83.31 | 83.00 |
| 21 | 0.5255 | 84.27 | 82.47 | 82.27 |
| 22 | 0.5407 | 84.33 | 82.53 | 82.29 |
| 23 | 0.5342 | 83.71 | 82.41 | 82.15 |
| 24 | 0.5320 | 84.50 | 82.36 | 82.19 |
| 25 | 0.5316 | 84.50 | 82.92 | 82.69 |
| 26 | 0.5399 | 84.67 | 82.64 | 82.25 |
| 27 | 0.5453 | 84.78 | 82.69 | 82.37 |
| 28 | 0.5399 | 84.44 | 82.69 | 82.43 |
| 29 | 0.5411 | 84.67 | 83.20 | 82.94 |
| 30 | 0.5431 | 84.67 | 83.09 | 82.84 |
from transformers import AutoImageProcessor, AutoModelForImageClassification
from torchvision.transforms import Compose, Resize, CenterCrop, ToTensor, Normalize
model = AutoModelForImageClassification.from_pretrained("matthieulel/vit-base-patch32-384-galaxy10-decals-full-v2").eval()
processor = AutoImageProcessor.from_pretrained("matthieulel/vit-base-patch32-384-galaxy10-decals-full-v2")
# Pre-processing used in the paper: resize and centre-crop to 384x384 px, then the processor's normalisation
transform = Compose([Resize(384), CenterCrop((384, 384)), ToTensor(), Normalize(processor.image_mean, processor.image_std)])
# logits = model(pixel_values=transform(image).unsqueeze(0)).logits
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 1.05e-05).
Paper under revision for Astronomy and Computing; citation to be completed upon publication.