The Dataset Viewer has been disabled on this dataset.

Galaxy Zoo 2 - Preprocessed Dataset

Preprocessed galaxy images from SDSS with Galaxy Zoo 2 morphological classifications, ready for deep learning.

πŸ“ Dataset Structure

β”œβ”€β”€ labels.csv                      # All ~239K galaxy labels (101 MB)
β”œβ”€β”€ labels_sampled.csv              # 25K stratified sample (11 MB)
β”œβ”€β”€ preprocessed_69x69.zip         # Full dataset at 69Γ—69 resolution (2.8 GB)
β”œβ”€β”€ preprocessed_224x224.zip       # Full dataset at 224Γ—224 resolution (3.14 GB)
β”œβ”€β”€ sample_preprocessed_69x69.zip  # Sample subset at 69Γ—69 resolution (308 MB)
└── zoobot_dataset_224.zip         # Zoobot-compatible format at 224Γ—224 (1.94 GB)

πŸ–ΌοΈ Available Image Versions

File Resolution Size Best For
preprocessed_69x69.zip 69Γ—69 2.8 GB Reproducing Dieleman et al. (2015) baseline
sample_preprocessed_69x69.zip 69Γ—69 308 MB Quick experiments, prototyping
preprocessed_224x224.zip 224Γ—224 3.14 GB Modern architectures (ResNet, EfficientNet, ViT)
zoobot_dataset_224.zip 224Γ—224 1.94 GB Fine-tuning with Zoobot pretrained weights

πŸ–ΌοΈ Image Format

  • Format: Compressed NumPy arrays (.npz)
  • Shape: (H, W, 3) β€” RGB
  • Type: float32, range [0, 1]
  • Source: SDSS DR19

Load with:

import numpy as np
img = np.load('file.npz')['image']

🏷️ Labels

37 morphological probability distributions from Galaxy Zoo 2:

  • Smooth vs. Featured
  • Spiral arms
  • Edge-on orientation
  • Bars, bulges, mergers
  • And more...

All labels are debiased probabilities accounting for volunteer expertise and question tree structure.

labels.csv covers the full ~239K dataset. labels_sampled.csv is a 25K stratified sample maintaining morphological diversity (minimum 2,000 images per category: Smooth, Spiral, Edge-on, Featured, Artifact, Uncertain).

πŸ”¬ Preprocessing Pipelines

Each dataset version was preprocessed differently. Choose the version matching your use case.


preprocessed_69x69.zip / sample_preprocessed_69x69.zip

*Reproduces Dieleman et al. (2015)

SDSS API
  └─→ Download 424Γ—424 JPEG cutout (RA/Dec centered, scale=0.396 arcsec/px)
        └─→ Center crop β†’ 207Γ—207  (removes ~108px from each edge)
              └─→ Lanczos downsample β†’ 69Γ—69
                    └─→ Normalize to [0, 1]  (Γ· 255, float32)
                          └─→ Save as .npz

preprocessed_224x224.zip

*Larger resolution for modern architectures

SDSS API
  └─→ Download 424Γ—424 JPEG cutout (RA/Dec centered, scale=0.396 arcsec/px)
        └─→ Center crop β†’ 380Γ—380  (removes ~22px from each edge)
              └─→ Lanczos downsample β†’ 224Γ—224
                    └─→ Normalize to [0, 1] at training time  (Γ· 255, NOT ImageNet mean/std)
                          └─→ Save as .jpg  (quality=95)

Note: normalization is not applied during preprocessing β€” divide by 255 at training time. Images are saved as JPG (not NPZ) to save disk space (~7 GB vs ~36 GB).


zoobot_dataset_224.zip

*Scale-invariant crop for Zoobot fine-tuning

SDSS API
  └─→ Download 424Γ—424 JPEG cutout
        └─→ Lookup Petrosian radius R90 from gz2_complete.csv (SDSS petroR90_r column)
              └─→ Scale-invariant crop: crop_size = int((R90 / 0.396) Γ— 3.5)
                    clamped to [64px, min(image dims)]
                    centered on image center (x = w//2, y = h//2)
                          └─→ Resize β†’ 224Γ—224
                                INTER_AREA if crop > 224 (downscaling)
                                INTER_CUBIC if crop < 224 (upscaling)
                                      └─→ Save as .jpg

βœ… Crop size adapts to each galaxy's physical extent β€” larger galaxies get a larger crop, preserving spiral arms and outer structure. Galaxies without a matching R90 entry are skipped.

❓ FAQ

Q: Which version should I download?

  • Prototyping / quick experiments: sample_preprocessed_69x69.zip (308 MB, ~25K images)
  • Reproducing Dieleman et al. (2015): preprocessed_69x69.zip (full 69Γ—69 dataset)
  • Modern CNN architectures (ResNet, ConvNeXt, EfficientNet): preprocessed_224x224.zip
  • Zoobot fine-tuning: zoobot_dataset_224.zip

Q: What format are the images? Compressed NumPy arrays (.npz). Load with np.load('file.npz')['image'].

Q: Are images augmented? No. Apply rotation, flipping, and scaling during training for best results.

Q: Why both 69Γ—69 and 224Γ—224? 69Γ—69 follows Dieleman et al. (2015). 224Γ—224 is the standard input size for modern pretrained architectures like ResNet, EfficientNet, ConvNeXt, and Zoobot.

πŸŽ“ Citation

@article{willett2013galaxy,
  title={Galaxy Zoo 2: detailed morphological classifications for 304,122 galaxies from the Sloan Digital Sky Survey},
  author={Willett, Kyle W and others},
  journal={Monthly Notices of the Royal Astronomical Society},
  volume={435},
  number={4},
  pages={2835--2860},
  year={2013}
}

πŸ“œ License

  • Images: Public domain (SDSS)
  • Labels: ODC-By (Galaxy Zoo 2)

πŸ”— Links

Credits

Original Data: Galaxy Zoo 2 Team, SDSS Collaboration, 300,000+ volunteers

Downloads last month
32

Paper for marwa000000000/SDSS-GalaxyZoo2-Preprocessed