-
Notifications
You must be signed in to change notification settings - Fork 28
Lite API: Gateway
Gyeonghwan Hong edited this page Dec 21, 2020
·
6 revisions
Parent Document: ANT APIs
Gateway API comprises of M/L (machine learning) gateway offloading functions, sensor directory functions and sensor database functions.
var gatewayAPI = require('ant').gateway;
- M/L gateway offloading functions are strongly dependent on
MLAPI.createMLFragmentElement()of Machine Learning APIs.
- MLFragmentElement GatewayAPI.createImgClsImageNet(String modelPath, Integer numFragments, String targetUri)
- Create an ImageNet-based image classification ML fragment element. The ML fragment element can be offloaded to the gateway device. When the gateway's load increases, the gateway also can offload some ML fragments to the user devices.
-
Argument 1: String modelPath
- Target image classification model's absolute path.
modelPathcan be retrieved byMLAPI.downloadModel().
- Target image classification model's absolute path.
-
Argument 2: Integer numFragments
- The number of ML model fragments.
-
Argument 3: String targetUri
- Target user device's URI.
-
Return: MLFragmentElement
- The resulting ML fragment element. This element can be added to the pipeline by Stream API.
- void GatewayAPI.connect(void)
- void GatewayAPI.getSensor(String uri, Function handler)
- void GatewayAPI.findSensor(String type, Function handler)
- void GatewayAPI.getSensorData(String uri, Function handler)
- Home
- About
- Getting Started
-
ANT APIs
- ANT Classic API
- ANT Lite API
- Getting Involved