Skip to main content

Data Preparation

Two split protocols​

Two different splits are used in the project, so test sets differ between experiments.

ProtocolTrainValTest
Random permutation, seed 42 (notebooks 01–06: CNNs, DINOv2, U-Net)12,4162,6602,660
Stratified 70/15/15, random_state 42 (notebooks 08–09: fusion, uncertainty)12,4152,6602,661
Sizes read from the notebook outputs (FACTS_INDEX §3).
Provenance. Model scores in this section are copied from the output cells of the AstroVision notebooks (and, for DINOv2 per-class recall, read from an exported figure). The documentation data pack contains no metrics file for them, so they cannot be re-derived from the pack; the cell of origin is listed for each value in _facts/astrovision/FACTS_INDEX.md §3 and shown when hovering over a number.

load_galaxy10_splits shuffles indices with numpy.random.default_rng(seed) (seed 42), takes 15 % for test and 15 % for validation, and returns the rest for training; it is not stratified. The fusion notebooks use scikit-learn's stratified train_test_split instead. Because the two test sets are different image subsets, results from the two groups of notebooks are not strictly comparable (see Benchmarking).

Image preprocessing​

ModelInputTraining augmentationEvaluation
SimpleCNN, EfficientNet-B0256×256 tensor in [0, 1], ImageNet mean/stdhorizontal and vertical flips, rotation up to 180°, colour jitter (brightness 0.2, contrast 0.2, saturation 0.1)normalisation only
DINOv2 ViT-B/14resize to 256, crop to 224×224same family plus random cropresize to 256, centre crop to 224 (no augmentation)

Flips and arbitrary rotations are appropriate because galaxy orientation on the sky carries no label information. Normalisation uses ImageNet statistics for all pretrained backbones (EfficientNet, DINOv2).

Auxiliary modalities for the fusion model​

The fusion model takes DINOv2 features (768 values), morphometry (5 values: C, A, S, Gini, M20) and SDSS colours (g−r, u−r, Mr). Auxiliary tables do not cover every galaxy:

  • morphometry exists for 4,999 galaxies; 12,737 are masked;
  • the colour triple exists only where Mr is defined: 5,651 galaxies.

Missing values are replaced by 0 after standardisation (scalers are fitted on valid rows only), and the corresponding branch embedding is multiplied by a validity mask, so the network learns to ignore absent modalities.

Features and splits

The DINOv2 features fed to the fusion model are cached (dino_features.npy, not in the data pack). The notebook extracts them from the fine-tuned backbone when the cache is missing, and the fine-tuning split differs from the fusion split. If the cache was built that way, part of the fusion test set was seen by the backbone during fine-tuning. This is documented as an open verification point in the fusion page.