Frictonless model storage, inferencing & discovery
Machine Learning has proven to be very successful to make mapping fast with high quality. With a diverse set of models and tools, it is hard to integrate them to existing tools like Tasking Manager and iD. ML Enabler (MLE) is a service that provides better integration during model development as well integrating model inferences to mapping tools.
MLE was initially developed by Development Seed in partnership with Humanitarian OpenStreetMap Team.
MLE serves as a registry of public and private machine learning models. It can track models from disparate organizations all in one place and take advantage of all of them.
MLE makes it easy to spin up AWS infrastructure to run your model along with all necessary resources. MLE UI allows you to upload new models & generate and preview predictions, all you need is a TMS end point and an AOI.
MLE supports all three categories of CV problems i.e classification, detection & segmentation.
MLE supports a feedback loop about predictions from within the interface. Users can tag a tile as valid or invalid. Predictions tagged as valid switch to green, predictions tagged as invalid switch to white, and predictions that haven’t been manually validated stay red. MLE can then convert these validated predictions back into labelled training data matched up with imagery to allow users to easily re-train a new model with the validated model predictions.
MLE uses AWS CloudFormation and is tightly integrated with AWS infrastructure at the moment. MLE currenlty doesn't support any other public or private cloud.
MLE supports TFv2 models PyTorch Segmentation models for large scale inferencing.
MLE's feedback loop can track metrics on model predictions verified by Human mappers. There is no active learning pipeline in place today to automatically retrain the models.
To know more about MLE, please read our blogs ML Enabler — completing the Machine Learning pipeline for mapping and On-demand machine learning predictions for mapping tools
The API uses the following terms:
Model -- A model is a machine learning model. With ml-enabler, we use the TFService convention of publishing models. This allows to spin up containers of the model for prediction and query the data for storage. For an example of a complete implementation, see Development Seed's looking-glass. ml-enabler-api can store data from several versions of the same model.
Prediction -- A prediction is a set of results from an ML Model for a bounding box (region) and at a specific tile level.
Prediction tiles -- Prediction tiles are the results of the prediction. The tiles are indexed using quadkeys for easy spatial search.
The CloudFormation template is designed to be AWS Account agnostic and will create all necessary resources with the exception of an SSL certificate (leave blank to disable https) and initial ECS images.
The cloudformation template is designed to be deployed with cfn-config, or a cfn-config compatible client. OpenAddresses/Deploy is a compatible client with a bunch of extra nice features.
The following parameters have special considerations you should be aware of.
These values must be compatible with Fargate. See Task CPU Limitations for compatible values.
The name of the SSL Cert as managed by AWS to use with the HTTPS ELB. This value can be left blank to disable all HTTPS Load Balancing
See API.md
TODO: Update
example.env
to ml_enabler.env
docker-compose build
docker-compose up
Prerequisite
deploy
& yarn
command available globally
npm install -g @openaddresses/deploy yarn
$(MAPBOX_TOKEN)
environment variable from your mapbox accountjq
from hereClone ml-enabler & install node-modules (TODO: Replace these with scripts in the future)
gh repo clone developmentseed/ml-enabler
cd ml-enabler/api && npm install && npx knex migrate:latest
cd web && yarn install
cd ../..
Clone a stacks database into local database for development
./clone prod
Authenticate the deploy
cli to make any changes to the underlying AWS Infrastructure
Note:
profile name
should match with the AWS credentials file located at ~/.aws/credentialsdeploy init $(deploy env)
Run the API & web UI
cd api && npm run dev
cd web && npm run dev