Zoobot
Zoobot classifies galaxy morphology with deep learning. This code will let you:
- Reproduce and improve the Galaxy Zoo DECaLS automated classifications
- Finetune the classifier for new tasks
For example, you can train a new classifier like so:
model = define_model.get_model(
output_dim=len(schema.label_cols), # schema defines the questions and answers
input_size=initial_size,
crop_size=int(initial_size * 0.75),
resize_size=resize_size
)
model.compile(
loss=losses.get_multiquestion_loss(schema.question_index_groups),
optimizer=tf.keras.optimizers.Adam()
)
training_config.train_estimator(
model,
train_config, # parameters for how to train e.g. epochs, patience
train_dataset,
test_dataset
)
Install using git and pip: git clone [email protected]:mwalmsley/zoobot.git pip install -r zoobot/requirements.txt (virtual env or conda highly recommended) pip install -e zoobot The main
branch is for stable-ish releases. The dev
branch includes the shiniest features but may change at any time.
To get started, see the documentation.
I also include some working examples for you to copy and adapt:
Latest cool features on dev branch (June 2021):
- Multi-GPU distributed training
- Support for Weights and Biases (wandb)
- Worked examples for custom representations
Contributions are welcome and will be credited in any future work.
If you use this repo for your research, please cite the paper.