An upgraded version of AstroVision, replacing the zero-shot CLIP model with Zoobot — a deep learning model specifically built and fine-tuned for galaxy morphology classification on real labeled astronomical data.
Try it here → astrovision-advanced.streamlit.app
All 5 galaxy classes classified correctly on real astronomical images:
| Galaxy Type | Confidence |
|---|---|
| 🌀 Spiral Galaxy | 99.89% |
| ⚪ Elliptical Galaxy | 81.42% |
| 💫 Edge-on Disk | 100.00% |
| 🌫️ Irregular Galaxy | 99.17% |
| 💥 Merger | 99.99% |
Validation accuracy: 92.9% — trained on 17,736 real galaxy images from the Galaxy10 DECals dataset.
| AstroVision (v1) | AstroVision Advanced | |
|---|---|---|
| Classifier | CLIP (zero-shot, general-purpose) | Zoobot (fine-tuned on galaxy images) |
| Training data | None — text prompts only | 17,736 labeled galaxy images |
| Architecture | Vision Transformer (ViT-B/32) | ConvNeXT Nano |
| Val Accuracy | Not applicable | 92.9% |
| Research module | Google Gemini | Google Gemini (unchanged) |
Upload a galaxy image and the app classifies it into one of 5 morphological types:
- Spiral Galaxy
- Elliptical Galaxy
- Edge-on Disk
- Irregular Galaxy
- Merger
The model was fine-tuned on Galaxy10 DECals — a real dataset of galaxy images labeled by volunteers through the Galaxy Zoo citizen science project. Results are shown as a confidence score and a probability bar chart across all 5 classes.
Upload an astronomy research paper (PDF) and interact with it using Google Gemini:
- Summarization — three detail levels: Brief Abstract, Key Findings, or Comprehensive Analysis
- Q&A — ask technical questions; Gemini answers based strictly on the uploaded paper
git clone https://github.com/zev-walker/Astrovision-Advanced.git
cd Astrovision-Advancedpy -3.12 -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/Macpip install torch torchvision --index-url https://download.pytorch.org/whl/cu121pip install -r requirements.txtCreate .streamlit/secrets.toml:
GEMINI_API_KEY = "your-gemini-api-key-here"Get a free key at https://aistudio.google.com/app/apikey
python train.pyThis downloads Galaxy10 DECals (~2.5GB), fine-tunes Zoobot for 10 epochs, and saves model/zoobot_finetuned.ckpt.
On an RTX 3050 Laptop GPU: approximately 30–45 minutes.
Alternatively, the pre-trained checkpoint is available on Hugging Face and downloads automatically on first app launch.
streamlit run app.pyZoobot is a foundation model for galaxy morphology created by Mike Walmsley, trained on millions of Galaxy Zoo volunteer classifications. This project uses Zoobot's pretrained ConvNeXT Nano encoder as a feature extractor with a fine-tuned classifier head trained on Galaxy10 DECals.
Galaxy10 DECals contains 17,736 labeled galaxy images across 10 classes, remapped to 5 for this project:
| Galaxy10 Original | Mapped To |
|---|---|
| Barred Spiral, Unbarred Tight Spiral, Unbarred Loose Spiral | Spiral Galaxy |
| Round Smooth, In-between Smooth, Cigar Shaped Smooth | Elliptical Galaxy |
| Edge-on without Bulge, Edge-on with Bulge | Edge-on Disk |
| Disturbed Galaxies | Irregular Galaxy |
| Merging Galaxies | Merger |
AstroVision-Advanced/
├── app.py # Streamlit application
├── train.py # One-time fine-tuning script
├── requirements.txt # Python dependencies
├── README.md
├── .gitignore
├── data/ # Galaxy10 dataset (gitignored — auto-downloaded)
└── model/ # Model weights (gitignored — auto-downloaded from HF)
| Component | Library |
|---|---|
| App framework | Streamlit |
| Galaxy classifier | Zoobot (zoobot[pytorch]) |
| Model architecture | ConvNeXT Nano |
| Training framework | PyTorch Lightning |
| Training dataset | Galaxy10 DECals (via h5py) |
| LLM (Research module) | Google Gemini |
| PDF parsing | PyPDF2 |
| Image handling | Pillow |
- Live App: astrovision-advanced.streamlit.app
- Model Weights: huggingface.co/zev-walker/astrovision-advanced
- Original AstroVision: github.com/zev-walker/Astrovision
- Zoobot: github.com/mwalmsley/zoobot
- Galaxy10 DECals: zenodo.org/records/10845026
Built with ❤️ for Astronomy and Deep Learning