moonshine


Namemoonshine JSON
Version 0.1.7 PyPI version JSON
download
home_page
SummaryPretrained remote sensing models.
upload_time2023-04-23 17:42:25
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT
keywords moonshine remote satellite sensing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <br />
<p align="center">
    <a href="https://github.com/moonshinelabs-ai/moonshine">
      <img src="https://moonshine-assets.s3.us-west-2.amazonaws.com/theme_light_logo.png" width="50%"/>
    </a>
</p>

<h2><p align="center">Pretrained remote sensing models for the rest of us.</p></h2>

<h4><p align='center'>
<a href="https://moonshineai.readthedocs.io/en/latest/">[Read The Docs]</a>
- <a href="https://moonshineai.readthedocs.io/en/latest/getting_started/quick_start.html">[Quick Start]</a>
- <a href="http://www.moonshinelabs.ai/">[Website]</a>
</p></h4>

<p align="center">
    <a href="https://moonshineai.readthedocs.io/en/latest/">
        <img alt="Documentation" src="https://readthedocs.org/projects/moonshineai/badge/?version=latest">
    </a>
    <a href="https://pypi.org/project/moonshinelabs-ai/">
        <img alt="PyPi Version" src="https://img.shields.io/pypi/pyversions/moonshine">
    </a>
    <a href="https://pypi.org/project/moonshinelabs-ai/">
        <img alt="PyPi Package Version" src="https://img.shields.io/pypi/v/moonshine">
    </a>
    <a href="https://pepy.tech/project/moonshine/">
        <img alt="PyPi Downloads" src="https://static.pepy.tech/personalized-badge/moonshine?period=month&units=international_system&left_color=grey&right_color=blue&left_text=Downloads/month">
    </a>
    <a href="https://join.slack.com/t/moonshinecommunity/shared_invite/zt-1rg1vnvmt-pleUR7TducaDiAhcmnqAQQ">
        <img alt="Chat on Slack" src="https://img.shields.io/badge/slack-chat-2eb67d.svg?logo=slack">
    </a>
    <a href="https://github.com/moonshinelabs-ai/moonshine/blob/main/LICENSE">
        <img alt="License" src="https://img.shields.io/badge/license-MIT-green">
    </a>
</p>
<br />

## What is Moonshine?

Moonshine is a Python package that makes it easier to train models on remote sensing
data like satellite imagery. Using Moonshine's pretrained models, you can reduce the
amount of labeled data required and reduce the training compute needed.

For more info and examples,
[read the docs](https://moonshineai.readthedocs.io/en/latest).

## Why use Moonshine?

1. **Pretrained on multispectral data**: Many existing packages are pretrained with
   ImageNet or similar RGB images. Using Moonshine you can unlock the full power of
   satellites that many contain many channels of multispectral data.

1. **Pretrained on remote sensing data**: Pretraining in the domain of your data is
   important, and most off the shelf pretrained models are fit to natural images such as
   ImageNet.

1. **Focus on usability**: While there are some academic remote sensing pretrained
   models available, they often are difficult to use and lack support. Moonshine is
   designed to be easy to use and will offer community support via Github and Slack.

## Installation

PyPI version:

```sh
pip install moonshine
```

Latest version from source:

```sh
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:

```python
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")
        # If we are using pretrained weights, load them here. In
        # general, using the decoder weights isn't preferred unless
        # your downstream task is also a reconstruction task. We suggest
        # trying only the encoder first.
        self.backbone.load_weights(
            encoder_weights="unet50_fmow_rgb", decoder_weights=None
        )
        # 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.

```python
from moonshine.preprocessing import get_preprocessing_fn
preprocess_fn = get_preprocessing_fn(model="unet", dataset="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.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "moonshine",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "moonshine,remote,satellite,sensing",
    "author": "",
    "author_email": "Nate Harada <moonshine@moonshinelabs.ai>",
    "download_url": "https://files.pythonhosted.org/packages/1d/dc/0a39e3e604eb3805047180e6c98341e8633892af43ca40cdb5b546bc919a/moonshine-0.1.7.tar.gz",
    "platform": null,
    "description": "<br />\n<p align=\"center\">\n    <a href=\"https://github.com/moonshinelabs-ai/moonshine\">\n      <img src=\"https://moonshine-assets.s3.us-west-2.amazonaws.com/theme_light_logo.png\" width=\"50%\"/>\n    </a>\n</p>\n\n<h2><p align=\"center\">Pretrained remote sensing models for the rest of us.</p></h2>\n\n<h4><p align='center'>\n<a href=\"https://moonshineai.readthedocs.io/en/latest/\">[Read The Docs]</a>\n- <a href=\"https://moonshineai.readthedocs.io/en/latest/getting_started/quick_start.html\">[Quick Start]</a>\n- <a href=\"http://www.moonshinelabs.ai/\">[Website]</a>\n</p></h4>\n\n<p align=\"center\">\n    <a href=\"https://moonshineai.readthedocs.io/en/latest/\">\n        <img alt=\"Documentation\" src=\"https://readthedocs.org/projects/moonshineai/badge/?version=latest\">\n    </a>\n    <a href=\"https://pypi.org/project/moonshinelabs-ai/\">\n        <img alt=\"PyPi Version\" src=\"https://img.shields.io/pypi/pyversions/moonshine\">\n    </a>\n    <a href=\"https://pypi.org/project/moonshinelabs-ai/\">\n        <img alt=\"PyPi Package Version\" src=\"https://img.shields.io/pypi/v/moonshine\">\n    </a>\n    <a href=\"https://pepy.tech/project/moonshine/\">\n        <img alt=\"PyPi Downloads\" src=\"https://static.pepy.tech/personalized-badge/moonshine?period=month&units=international_system&left_color=grey&right_color=blue&left_text=Downloads/month\">\n    </a>\n    <a href=\"https://join.slack.com/t/moonshinecommunity/shared_invite/zt-1rg1vnvmt-pleUR7TducaDiAhcmnqAQQ\">\n        <img alt=\"Chat on Slack\" src=\"https://img.shields.io/badge/slack-chat-2eb67d.svg?logo=slack\">\n    </a>\n    <a href=\"https://github.com/moonshinelabs-ai/moonshine/blob/main/LICENSE\">\n        <img alt=\"License\" src=\"https://img.shields.io/badge/license-MIT-green\">\n    </a>\n</p>\n<br />\n\n## What is Moonshine?\n\nMoonshine is a Python package that makes it easier to train models on remote sensing\ndata like satellite imagery. Using Moonshine's pretrained models, you can reduce the\namount of labeled data required and reduce the training compute needed.\n\nFor more info and examples,\n[read the docs](https://moonshineai.readthedocs.io/en/latest).\n\n## Why use Moonshine?\n\n1. **Pretrained on multispectral data**: Many existing packages are pretrained with\n   ImageNet or similar RGB images. Using Moonshine you can unlock the full power of\n   satellites that many contain many channels of multispectral data.\n\n1. **Pretrained on remote sensing data**: Pretraining in the domain of your data is\n   important, and most off the shelf pretrained models are fit to natural images such as\n   ImageNet.\n\n1. **Focus on usability**: While there are some academic remote sensing pretrained\n   models available, they often are difficult to use and lack support. Moonshine is\n   designed to be easy to use and will offer community support via Github and Slack.\n\n## Installation\n\nPyPI version:\n\n```sh\npip install moonshine\n```\n\nLatest version from source:\n\n```sh\npip install git+https://github.com/moonshinelabs-ai/moonshine\n```\n\n## Quick Start\n\nThe Moonshine Python package offers a light wrapper around our pretrained PyTorch\nmodels. You can load the pretrained weights into your own model architecture and fine\ntune with your own data:\n\n```python\nimport torch.nn as nn\nfrom moonshine.models.unet import UNet\n\nclass SegmentationModel(nn.Module):\n    def __init__(self):\n        super().__init__()\n\n        # Create a blank model based on the available architectures.\n        self.backbone = UNet(name=\"unet50_fmow_rgb\")\n        # If we are using pretrained weights, load them here. In\n        # general, using the decoder weights isn't preferred unless\n        # your downstream task is also a reconstruction task. We suggest\n        # trying only the encoder first.\n        self.backbone.load_weights(\n            encoder_weights=\"unet50_fmow_rgb\", decoder_weights=None\n        )\n        # Run a per-pixel classifier on top of the output vectors.\n        self.classifier = nn.Conv2d(32, 2, (1, 1))\n\n    def forward(self, x):\n        x = self.backbone(x)\n        return self.classifier(x)\n```\n\nYou can also configure data pre-processing to make sure your data is formatted the same\nway as the model pretraining was done.\n\n```python\nfrom moonshine.preprocessing import get_preprocessing_fn\npreprocess_fn = get_preprocessing_fn(model=\"unet\", dataset=\"fmow_rgb\")\n```\n\n## Citing\n\n```\n@misc{Harada:2023,\n  Author = {Nate Harada},\n  Title = {Moonshine},\n  Year = {2023},\n  Publisher = {GitHub},\n  Journal = {GitHub repository},\n  Howpublished = {\\url{https://github.com/moonshinelabs-ai/moonshine}}\n}\n```\n\n## License\n\nThis project is under MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pretrained remote sensing models.",
    "version": "0.1.7",
    "split_keywords": [
        "moonshine",
        "remote",
        "satellite",
        "sensing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d2df0c0c76f16e75bb1defc25c349b15eea6ecdc4bba725bdd012450d3ad78e",
                "md5": "9c6761568d7b301e302ec2fd051b1587",
                "sha256": "6890e2c0a3be332cb56a7ad15c5a3829c68fbd9713e89657fb254f91788348fb"
            },
            "downloads": -1,
            "filename": "moonshine-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9c6761568d7b301e302ec2fd051b1587",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10318,
            "upload_time": "2023-04-23T17:37:45",
            "upload_time_iso_8601": "2023-04-23T17:37:45.286928Z",
            "url": "https://files.pythonhosted.org/packages/0d/2d/f0c0c76f16e75bb1defc25c349b15eea6ecdc4bba725bdd012450d3ad78e/moonshine-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ddc0a39e3e604eb3805047180e6c98341e8633892af43ca40cdb5b546bc919a",
                "md5": "7de5df88cacedee83ed3e46fd0003922",
                "sha256": "c2db4c9a03866a0876ab07cc7bd96f5e41a1dc01f7421aa45e30414c8d4cd387"
            },
            "downloads": -1,
            "filename": "moonshine-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "7de5df88cacedee83ed3e46fd0003922",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4808677,
            "upload_time": "2023-04-23T17:42:25",
            "upload_time_iso_8601": "2023-04-23T17:42:25.043494Z",
            "url": "https://files.pythonhosted.org/packages/1d/dc/0a39e3e604eb3805047180e6c98341e8633892af43ca40cdb5b546bc919a/moonshine-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-23 17:42:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "moonshine"
}
        
Elapsed time: 0.05709s