Skip to main content

Welcome to fastgs

Introduction

This library is currently in alpha, neither the functionality nor the API is stable

This library provides geospatial multispectral image support for fastai. FastAI already has extensive support for RGB images in the pipeline. I try to achieve feature parity for multi-spectral images with this library, specifically in the context of Sentinel 2 geospatial imaging.

Install

pip install -Uqq fastgs
conda install -c restlessronin fastgs

How to use

The low-level functionality is wrapped into a class that loads sets of Sentinel 2 channels into a multi-spectral tensor (a TensorImageMS subclass of fastai TensorImage which itself is a subclass of the pytorch Tensor).

from fastgs.geospatial.sentinel import *

The following code creates a class that can load 11 Sentinel 2 channels into a TensorImageMS.

from fastgs.vision.testio import * # defines read_multichan_files_as_tensor

sentinel2 = createSentinel2Descriptor()

snt_12 = MultiSpectral(
    sentinel2,
    ["B02","B03","B04","B05","B06","B07","B08","B8A","B11","B12","AOT"],
    "LC",
    [sentinel2.rgb_combo["natural_color"], ["B07","B06","B05"],["B12","B11","B8A"],["B08"]],
    get_channel_filenames,
    read_multichan_files,
    read_mask_file
)

The second parameter is a list of 4 channel sets that are minimally required to visualize all the individual channels.

img_12 = snt_12.load_image(66)
img_12.show()
[<AxesSubplot:>, <AxesSubplot:>, <AxesSubplot:>, <AxesSubplot:>]

Acknowledgements

This library is inspired by the following notebooks (and related works by the authors)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastgs-0.0.14.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastgs-0.0.14-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file fastgs-0.0.14.tar.gz.

File metadata

  • Download URL: fastgs-0.0.14.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.6

File hashes

Hashes for fastgs-0.0.14.tar.gz
Algorithm Hash digest
SHA256 cf46fcb1795488403f4f06bfd340be39d31fa4800b6f0eef559f551a3ed40416
MD5 cc3cfdb2113e4662b6fd515bfb05bf93
BLAKE2b-256 24264f5c1f6217504b14628cbe6eaa5227839aef519cd57c5e8689e9da0505d8

See more details on using hashes here.

File details

Details for the file fastgs-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: fastgs-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.6

File hashes

Hashes for fastgs-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 ce9d3c0584e1a167cdcfc9f50e6d11854e5159622325b2a1f85a9807baa533ee
MD5 604ffeffa270a4341e6da24529f295d7
BLAKE2b-256 223d304d494edbfaa9f70013006da88857b79a5ff9b9da37b5029cb3bab1b12a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

0.1.0

2 files

0.0.35

2 files

0.0.34

2 files

0.0.33

2 files

0.0.32

2 files

0.0.31

2 files

0.0.30

2 files

0.0.29

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

This release

0.0.14 This release

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page