Pretrained remote sensing models.
Project description
Moonshine
Pretrained remote sensing models for the rest of us.
What is Moonshine?
Moonshine is a software package that makes it easier to train models on remote sensing data like satellite imagery. Using Moonshine's pretrained foundation models, you can reduce the amount of labeled data required and reduce the training compute needed.
For more info and examples, read the docs.
Installation
PyPI version:
pip install moonshine
Latest version from source:
pip install git+https://github.com/moonshinelabs-ai/moonshine
Quick Start
The Moonshine Python package offers a light wrapper around our pretrained PyTorch models. You can load the pretrained weights into your own model architecture and fine tune with your own data:
import torch.nn as nn
from moonshine.models.unet import UNet
class SegmentationModel(nn.Module):
def __init__(self):
super().__init__()
# Create a blank model based on the available architectures.
self.backbone = UNet(name="unet50_fmow_rgb")
# Load both encoder and decoder weights. Some networks will want to not load the decoder.
self.backbone.load_weights(
encoder_weights="unet50_fmow_rgb", decoder_weights="unet50_fmow_rgb"
)
# Run a per-pixel classifier on top of the output vectors.
self.classifier = nn.Conv2d(32, 2, (1, 1))
def forward(self, x):
x = self.backbone(x)
return self.classifier(x)
You can also configure data pre-processing to make sure your data is formatted the same way as the model pretraining was done.
from moonshine.preprocessing import get_preprocessing_fn
preprocess_fn = get_preprocessing_fn(model="unet50", data="fmow_rgb")
Citing
@misc{Harada:2023,
Author = {Nate Harada},
Title = {Moonshine},
Year = {2023},
Publisher = {GitHub},
Journal = {GitHub repository},
Howpublished = {\url{https://github.com/moonshinelabs-ai/moonshine}}
}
License
This project is under MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for moonshine-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab62d7ecac63b0f68b752200676c51b7b40d260b1d6424de82c9a9838b3a9a91 |
|
MD5 | f6582474b58ab3eda56e33969c2f74c6 |
|
BLAKE2b-256 | 9ea13047d3225053518cc66c680763f3691b493b68d89de4e0dc33e7a53e073a |