GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chip-n-scale-queue-arranger/lambda_examples at master · developmentseed/chip-n-scale-queue-arranger

Expand file tree

/

lambda_examples

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

lambda_examples

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
ml_enabler.py
ml_enabler.py
 
 
s3_images.py
s3_images.py
 
 
save_image.py
save_image.py
 
 
sentinel_hub.py
sentinel_hub.py
 
 
super_tiles.py
super_tiles.py
 
 

README.md

Lambda Examples

(how to customize this repo for running your ML inference task)

The primary functionality of this repository is contained in the lambda function located at lambda/download_and_predict/handler.py. It is intentionally very little code to allow for easy configuration: with the imports and assertions removed, there is one class instantiation and four method calls. The class DownloadAndPredict provides the base functionality required to run machine learning inference:

  • Creates a list of Mercator tiles based on an input SQS event.
  • Downloads those tiles from a TMS/XYS tile endpoint and puts them in the proper format for sending them to Tensorflow Serving or an equivalent Docker image.
  • Sends the payload to the prediction endpoint.
  • Saves the result into a database.

There are two primary options to customize this workflow:

  • Add new code to handler.py to manipulate the returned values (tiles, payload, content, etc.)
  • Subclass DownloadAndPredict to provide alternative methods for the operations listed above.

Any additional third-party libraries should be added to lambda/setup.py for inclusion in the lambda function deployment.

Examples of customization are listed in this library to show how chip-n-scale-queue-arranger can be used with a variety of different tools.

  • Download imagery from Sentinel Hub. For more information, check out the sentinelhub-py docs.
  • Download larger tiles and create smaller tiles for inference. This is useful for reducing the load on the imagery/tile endpoint.
  • Save results to ml-enabler. For more information, check out the ml-enabler repo.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.