Data Preparation
Two split protocols
Two different splits are used in the project, so test sets differ between experiments.
| Protocol | Train | Val | Test |
|---|---|---|---|
| Random permutation, seed 42 (notebooks 01–06: CNNs, DINOv2, U-Net) | 12,416 | 2,660 | 2,660 |
| Stratified 70/15/15, random_state 42 (notebooks 08–09: fusion, uncertainty) | 12,415 | 2,660 | 2,661 |
_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
| Model | Input | Training augmentation | Evaluation |
|---|---|---|---|
| SimpleCNN, EfficientNet-B0 | 256×256 tensor in [0, 1], ImageNet mean/std | horizontal and vertical flips, rotation up to 180°, colour jitter (brightness 0.2, contrast 0.2, saturation 0.1) | normalisation only |
| DINOv2 ViT-B/14 | resize to 256, crop to 224×224 | same family plus random crop | resize 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
Mris 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.
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.