Run this model with HF Jobs

Run matthieulel/beit-base-patch16-224-pt22k-galaxy10-decals-full-v2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/matthieulel/beit-base-patch16-224-pt22k-galaxy10-decals-full-v2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/matthieulel/beit-base-patch16-224-pt22k-galaxy10-decals-full-v2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

beit-base-patch16-224-pt22k-galaxy10-decals-full-v2

microsoft/beit-base-patch16-224-pt22k 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 17 of 30) 85.51 85.38
Mean +/- s.d. over three seeds (42, 1, 2) 85.61 +/- 0.16 85.35 +/- 0.12

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 17 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 1.4723 48.14 48.70 42.91
2 0.8940 69.73 67.36 66.46
3 0.6948 76.94 77.17 75.65
4 0.6275 79.43 79.93 79.31
5 0.5907 79.76 79.82 79.15
6 0.5568 81.85 81.40 80.56
7 0.5509 81.23 80.33 80.10
8 0.5933 80.27 81.45 80.70
9 0.5240 82.69 82.58 82.13
10 0.4970 83.31 82.81 82.56
11 0.4992 82.81 82.53 82.27
12 0.4897 84.05 83.03 82.84
13 0.4964 83.60 83.43 82.92
14 0.4622 84.72 83.31 83.10
15 0.4525 85.29 84.84 84.72
16 0.4545 85.06 84.61 84.41
17 (selected) 0.4355 85.79 85.51 85.38
18 0.4561 85.74 84.16 83.81
19 0.4602 85.23 84.16 83.76
20 0.4556 85.51 84.39 84.26
21 0.4545 85.74 85.51 85.22
22 0.4633 85.34 85.23 85.16
23 0.4528 85.17 85.01 84.99
24 0.4601 85.91 85.17 85.05
25 0.4439 86.19 85.63 85.42
26 0.4459 85.91 85.68 85.51
27 0.4558 86.41 85.46 85.29
28 0.4400 86.13 85.57 85.46
29 0.4410 86.81 85.57 85.49
30 0.4415 86.53 85.40 85.31

How to use

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

model = AutoModelForImageClassification.from_pretrained("matthieulel/beit-base-patch16-224-pt22k-galaxy10-decals-full-v2").eval()
processor = AutoImageProcessor.from_pretrained("matthieulel/beit-base-patch16-224-pt22k-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 1.66e-05).

Citation

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

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

Model tree for matthieulel/beit-base-patch16-224-pt22k-galaxy10-decals-full-v2

Finetuned
(4)
this model

Dataset used to train matthieulel/beit-base-patch16-224-pt22k-galaxy10-decals-full-v2

Collection including matthieulel/beit-base-patch16-224-pt22k-galaxy10-decals-full-v2

Evaluation results