Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/developmentseed/label-maker-dask
Library for running label-maker as a dask job
https://github.com/developmentseed/label-maker-dask
dask machine-learning microsoft osm
Last synced: about 1 month ago
JSON representation
Library for running label-maker as a dask job
- Host: GitHub
- URL: https://github.com/developmentseed/label-maker-dask
- Owner: developmentseed
- License: mit
- Created: 2021-08-31T13:25:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-06T15:37:06.000Z (over 2 years ago)
- Last Synced: 2024-10-14T09:40:47.374Z (2 months ago)
- Topics: dask, machine-learning, microsoft, osm
- Language: Jupyter Notebook
- Homepage:
- Size: 85.9 KB
- Stars: 7
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# label-maker-dask
Library for running [label-maker](https://github.com/developmentseed/label-maker/) as a [dask](https://dask.org/) job
# Acknowledgements
This work was undertaken with support from Microsoft to be run on the [Planetary Computer](https://planetarycomputer.microsoft.com/). With access to the Planetary Computer Hub, you can find an interactive notebook tutorial for running this library.
# Basic Example
Instantiate a distributed dask cluster
```python
from dask.distributed import Client
cluster = ...
client = Client(cluster)
```Create a label maker job
```python
from label_maker_dask import LabelMakerJob
lmj = LabelMakerJob(
zoom=13,
bounds=[-44.4836425781, -23.02665962797, -43.412719726, -22.5856399016],
classes=[
{ "name": "Roads", "filter": ["has", "highway"] },
{ "name": "Buildings", "filter": ["has", "building"] }
],
imagery="http://a.tiles.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=ACCESS_TOKEN",
ml_type="segmentation",
label_source="https://qa-tiles-server-dev.ds.io/services/z17/tiles/{z}/{x}/{y}.pbf"
)
```Build & execute the job
```python
lmj.build_job()
lmj.execute_job()
```View or otherwise use the results (by passing to a machine learning framework)
```python
for result in lmj.results:
...
```