Skip to main content

A set of demonstration models to test OSML with.

Project description

OSML Models

This package contains sample models that can be used to test OversightML installations without incurring high compute costs typically associated with complex Computer Vision models. These models implement an interface compatible with SageMaker and are suitable for deployment as endpoints with CPU instances.

Table of Contents

Getting Started

Prerequisites:

First, ensure you have installed the following tools locally

Installation Guide

Clone osml-models package into your desktop

git clone https://github.com/aws-solutions-library-samples/osml-models.git

Documentation

You can find documentation for this library in the ./doc directory. Sphinx is used to construct a searchable HTML version of the API documents.

tox -e docs

Build and Local Testing

To build the container, it uses the default Dockerfile from the root of this repository. If you want to change to another Dockerfile, replace the . with the new Dockerfile path.

docker build . -t osml-models:latest

Note: The MODEL_SELECTION environment variable can be used to pick the model to run. Currently, we support 3 different types of a model and below are the appropriate naming convention:

  • centerpoint
  • flood
  • aircraft

In one terminal, run the following command to start the server:

docker run -p 8080:8080 -e MODEL_SELECTION=${MODEL_SELECTION} osml-models:latest

In another terminal to invoke the rest server and return the inference on a single tile, run the following command from the root of this repository:

curl -I localhost:8080/ping
curl --request POST --data-binary "@<imagery file>" localhost:8080/invocations
  • Example: curl --request POST --data-binary "@assets/images/2_planes.tiff" localhost:8080/invocations

Executing above should return:

{"type": "FeatureCollection", "features": [{"geometry": {"coordinates": [0.0, 0.0], "type": "Point"}, "id": "7683a11e4c93f0332be9a4a53e0c6762", "properties": {"bounds_imcoords": [204.8, 204.8, 307.2, 307.2], "detection_score": 1.0, "feature_types": {"sample_object": 1.0}, "image_id": "8cdac8849cae2b4a8885c0dd0d34f722"}, "type": "Feature"}]}

Support & Feedback

OversightML Models are maintained by AWS Solution Architects. It is not part of an AWS service and support is provided best-effort by the OversightML community.

To post feedback, submit feature ideas, or report bugs, please use the Issues section of this GitHub repo.

If you are interested in contributing to OversightML Models, see the CONTRIBUTING guide.

Resources

Security

See CONTRIBUTING for more information.

License

MIT No Attribution Licensed. See LICENSE.

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

osml-models-1.1.1.tar.gz (13.2 kB view hashes)

Uploaded Source

Built Distribution

osml_models-1.1.1-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

Supported by

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