Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mwalmsley/zoobot/llms.txt

Use this file to discover all available pages before exploring further.

Zoobot provides a collection of pretrained encoder weights across a wide range of architectures — from lightweight ResNets to large-scale transformer-hybrid MaxViT models. All weights are hosted on HuggingFace and can be loaded directly into your training workflow with a single line of code. Every model was pretrained on the GZ Evo dataset and learns a rich, transferable representation of galaxy morphology that you can finetune for your own tasks.

Loading Models

The simplest way to load a pretrained Zoobot model is via the finetuning interface. Pass the HuggingFace model ID with the hf_hub: prefix and Zoobot will automatically download the encoder weights:
from zoobot.pytorch.training.finetune import FinetuneableZoobotClassifier
# or FinetuneableZoobotRegressor, or FinetuneableZoobotTree

model = FinetuneableZoobotClassifier(name='hf_hub:mwalmsley/zoobot-encoder-convnext_nano')
You can also load the underlying timm encoder directly, for example to extract representations or plug the backbone into a custom architecture:
import timm

encoder = timm.create_model('hf_hub:mwalmsley/zoobot-encoder-convnext_nano', pretrained=True, num_classes=0)

Available Models

Zoobot includes pretrained weights for the following architectures. Test loss is measured on a held-out split of the GZ Evo dataset — lower is better.
ArchitectureParametersTest LossHuggingFace
ConvNeXT-Pico9.1M19.33Link
ConvNeXT-Nano15.6M19.23Link
ConvNeXT-Tiny44.6M19.08Link
ConvNeXT-Small58.5M19.06Link
ConvNeXT-Base88.6M19.05 (best)Link
ConvNeXT-Large197.8M19.09Link
MaxViT-Tiny29.1M19.22Link
MaxViT-Small64.9M19.20Link
MaxViT-Base124.5M19.09Link
MaxViT-Large211.8M19.18Link
EfficientNetB05.33M19.48WIP
EfficientNetV2-S48.3M19.33WIP
ResNet1811.7M19.83Link
ResNet5025.6M19.43Link
ResNet10144.5M19.37Link
Missing a model you need? Reach out! There’s a good chance we can train any model supported by timm.

Which Model Should I Use?

For most users, start with ConvNeXT-Nano. It delivers good performance while still being small enough to train on a single gaming GPU, so you can iterate quickly without cluster access. For maximum performance, consider upgrading to ConvNeXT-Small or ConvNeXT-Base. MaxViT-Base is another excellent option — it achieves competitive results and incorporates an attention mechanism that may be of scientific interest. All of these larger models require cluster-grade GPUs (e.g. V100 or above). For benchmarks or reproducibility:
  • EfficientNetB0 is equivalent to the model used in the original GZ DECaLS and GZ DESI papers.
  • ResNet18 and ResNet50 are well-established baselines useful for comparison or as backbones in other frameworks (e.g. object detection).

Greyscale Models

Available from Zoobot v2.0.1 onwards. Greyscale (single-channel) encoder variants are available at the zoobot-encoders-greyscale HuggingFace collection. Load them with the hf_hub:mwalmsley/zoobot-encoder-greyscale-convnext_nano naming pattern.

Training Data

All Zoobot encoders are trained on the GZ Evo dataset, which aggregates data from every major Galaxy Zoo campaign:
  • 820,000 galaxy images
  • 100 million+ volunteer classification votes
  • Campaigns covered: GZ2, GZ UKIDSS, GZ Hubble, GZ CANDELS, GZ DECaLS/DESI, and GZ Cosmic Dawn (HSC)
The models learn an adaptable representation of galaxy morphology by training to answer every Galaxy Zoo question simultaneously. This approach is described in detail in the Scaling Laws for Galaxy Images paper.

Build docs developers (and LLMs) love