Skip to main content

Geomorphic semantic segmentation using DTMs and LSPs.

Project description

terrainseg

Alt text

Geomorphic semantic segmentation using DTMs and LSPs.

Supports a workflow for performing geomorphic mapping and feature extraction using land surface parameters (LSPs) derived from high spatial resolution digital terrain model (DTM) data.

Model combines an LSP module, which allows for the calculation of LSPs within the model architecture and using tensor-/GPU-based computation, and a trainable semantic segmentation model. Three models are implemented in this package: traditional UNet, a customizable UNet, and a UNet with a ConvNeXt-style decoder and attention gates along the skip connections. However, users can implement their own trainable models or use those provided by another package, such as Segmentation Models.

Models can be trained using DTM chips and associated masks that have been pre-generated and saved to disk or chips and masks that are dynamically generated during the training loop.

Alt text

Installation

We recommend:

  1. Creating a virtual Python environment using Python 3.11 or 3.12
  2. Installing PyTorch and TorchVision as instructed on the PyTorch webpage
  3. Installing the other dendencies using pip: rasterio, pandas, geopandas, matplotlib, torchmetrics, segmentation-models-pytorch, and albumentations
  4. Installing terrainseg
$ pip install terrainseg
$ pip install git+https://github.com/maxwell-geospatial/terrainseg.git

Note: If you want to use GPU acceleration, you will need to install and set up CUDA and cuDNN. We used CUDA verion 12.6.

Usage

License

terrainseg was created by Aaron Maxwell, Sarah Farhadpour, and Miles Reed. It is licensed under the terms of the MIT license.

Credits

terrainseg was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details


Download files

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

Source Distribution

terrainseg-0.1.6.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

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

terrainseg-0.1.6-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

Details for the file terrainseg-0.1.6.tar.gz.

File metadata

  • Download URL: terrainseg-0.1.6.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.5 Windows/11

File hashes

Hashes for terrainseg-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f87b5ae273c3975ffd0fd12c50ac44c0d7b20d2351ee8ab5bc2df9dbffffbdf1
MD5 899d9a3d84e49ce98de25bbaa6dfe109
BLAKE2b-256 36348a690163a89541a1726033d0f6c9355f4057ea51de203770ab486da4cb8e

See more details on using hashes here.

File details

Details for the file terrainseg-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: terrainseg-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 46.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.5 Windows/11

File hashes

Hashes for terrainseg-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7854468c0fb41265e76829c3352773d99b57c18750c27fa36755f5b336d31726
MD5 7020f50d13e4bdb1bdf00ae0e04180f2
BLAKE2b-256 bd5247a20bf0ee3d633746f1276157b2a57c797fcf5d6000966e20fec193c9f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page