KubeAI Application Nucleus for edge (KAN) API defines a common object model that describes the full stack of intelligent Edge solutions, from AI models to solutions to devices and sensors. Because these objects are defined as standard Kubernetes custom resources, you can use popular Kubernetes tools like kubectl to manipulate these objects.
- AI model (
model.ai.kan
) - AI skill (
skill.ai.kan
) - Device (
device.fabric.kan
) - Target (
target.fabric.kan
) - Solution (
solution.solution.kan
) - Instance (
instance.solution.kan
)
The KAN portal experience aims to provide a streamlined experience of creating and managing intelligent Edge solutions leveraging cameras. Hence, we’ve hidden some KAN API concepts and renamed a few objects to make the UX more intuitive for target scenarios. The following table summarizes how portal concepts are mapped to API concepts:
API Object | Portal Concept |
---|---|
device.fabric.kan |
Camera |
instance.solution.kan |
Deployment |
model.ai.kan |
AI Model |
skill.ai.kan |
AI Skill |
solution.solution.kan |
There are no solutions surfaced on portal. Essentially, a portal operates on a single, system-maintained solution object on behalf of the user. |
target.fabric.kan |
Compute device |
Depending on your focus, you can start with the AI workflow, the device workflow, or the solution workflow as described below. At the end, you can create Instance
objects which represent running deployments of your intelligent Edge solution.
- Create your AI model using tools of your choice.
- Once you have the AI model file, register your AI model with KAN as a
Model
object. - Then define AI
Skill
objects that define processing pipelines. A processing pipeline reads data from a data source, applies one or more AI models (and other transformations), and sends inference results to designated outputs.
- Register your computational devices with KAN as
Target
objects. You can also specify desired runtime components, such as a KAN agent, in your target definition. - Manually register your non-computational devices, such as sensors and actuators, as
Device
objects. You can also leverage projects like Akri to auto-discover devices.
- Define your intelligent solution as a
Solution
object, which consists of a number ofComponent
elements. A component is usually a container, and it may refer to AISkill
objects in its properties. - Define a
Instance
object that maps aSolution
to one or multipleTarget
objects. Once the instance object is created, KAN ensures the impacted targets are updated according to the desired solution state and target state.
Note
The current version of KAN portal doesn't explicitly expose the Solution
object. Behind the scenes, you always work with a single Solution
object that is automatically managed. However, you can use KAN API to examine and update the object.
Assume that you are creating an intelligent edge solution that uses a website to show number of cars passing an intersection each hour. The following workflow describes how to create and deploy such a solution using KAN API.
-
Create or select a car detection model. KAN comes with a model zoo, which contains a car detection model you can use.
-
Register the model as a KAN
Model
object. -
Define a KAN
Skill
object that defines a pipeline that:- Takes input from a camera;
- Sends frames to the car detection model;
- Collects inference results and sends detection events to an output (such as IoT Hub or an HTTP endpoint).
-
Define a KAN
Solution
object that will create a Docker containerComponent
that takes theSkill
as input and drives the inference process.Since KAN provides some containers out-of-the-box, you don't have to create these containers yousrelf.
-
Create your website container and add it as a
Component
of yourSolution
. -
Define a
Target
that represents a computer to which you want to deploy your solution. -
Define
Device
objects for cameras you want to use. TheseDevice
objects are associated with yourTarget
object through labeling. -
Create a
Instance
object that deploys yourSolution
to yourTarget
.
Visit the KAN API Quickstart to try out the tutorials.
- For more information about KAN configuration, visit KAN Project: Setup guide.