SatSeg (WIP)
A python package to assist in multispectral satellite image segmentation.
Installation
pip install satseg
Usage
Training
from satseg.dataset import create_datasets
from satseg.model import save_model, train_model
# A list of paths to the satellite image tif files (.TIF)
tif_paths = ["01.tif". "02.tif"]
# A list of paths to the shapefiles (.SHP) of the masks
mask_paths = ["mask.shp"]
# Create the train and validation datasets
# The intermediate image files will be saved at ./temp/labeled/
train_set, val_set = create_datasets(tif_paths, mask_paths, "temp/labeled")
# Train the model
model, metrics = train_model(train_set, val_set, "unet")
# Save the model at a specified path
model_path = "model.pt"
save_model(model, model_path)
Inference
from satseg.dataset import create_inference_dataset
from satseg.model import load_model, run_inference
tif_paths = ["03.tif", "04.tif"]
# The intermediate image files will be saved at ./temp/unlabeled/
dataset = create_inference_dataset(tif_paths, "temp/unlabeled/", 256)
# Load a previously saved model
model_path = "model.pt"
model = load_model(model_path)
# Run inference on the dataset using the loaded model
# Results will be saved ./temp/infer/
run_inference(dataset, model, "temp/infer/")
Metadata
Release files for satseg 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| satseg-0.1.1.tar.gz | 8.8 kB | Without provenance | Details for satseg-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| satseg-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for satseg-0.1.1-py3-none-any.whl |
Total release size: 18.8 kB
Release files / satseg-0.1.1.tar.gz
| Download URL | satseg-0.1.1.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba6358cb223cdb83ea8a9e01e797bba217c4ff9fb2fd08cbe36bfc680d8b6e48
|
|
BLAKE2b-256 checksum How to use checksums |
27536d431523dbee53a63edec0e3059073e45883f1f8c5940f3570c563653fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.9 Windows/10
|
Release files / satseg-0.1.1-py3-none-any.whl
| Download URL | satseg-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0f5786953ae3de2d034eced510c7b0633070afbf76efec4adfc7b8ecd46eaa3
|
|
BLAKE2b-256 checksum How to use checksums |
bc8c5e8024d452b47d3412981d41d9d8e1dc4ae82a5277d6ed2353024c176d28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.9 Windows/10
|
Security for satseg 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.