Models
A model is a deterministic transformation turning an input into a set of predictions.
Custom
Object Detection / Instance Segmentation
Classification
Face Recognition
# specific types are dependent on your workflow implementation and are entirely customizable
from my_workflow import MyTestSample, MyInference
def infer(test_sample: MyTestSample) -> MyInference:
"""Transform your test sample into inferences"""
from kolena.detection import TestImage
from kolena.detection.inference import BoundingBox
# to test Instance Segmentation models, use the SegmentationMask inference type
# from kolena.detection.inference import SegmentationMask
def infer(test_image: TestImage) -> List[BoundingBox]:
"""Transform a TestImage into a list of BoundingBox inferences"""
# Step 1: load image at `test_image.locator`
# Step 2: perform inference
# Step 3: transform inferences into BoundingBox objects and return
from kolena.classification import TestImage
Classification = Tuple[str, float] # (label, confidence) pairs
def infer(test_image: TestImage) -> List[Classification]:
"""Transform a TestImage into a list of (label, confidence) inferences"""
# Step 1: load image at `test_image.locator`
# Step 2: perform inference and return
import numpy as np
def extract(locator: str) -> np.ndarray:
"""Extract an embedding representing the face in the image"""
# Step 1: load image at `locator`
# Step 2: run model pipleine -- detect, align, and extract
# Step 3: return extracted embedding, or None if no face was detected
def compare(embedding_a: np.ndarray, embedding_b: np.ndarray) -> float:
"""Compare two embeddings and generate similarity score"""
In Kolena, a "model" is simply a unique descriptor that identifies a model you've trained. When you test your models, you run inference on your hardware and upload results via
kolena-client
. Your model is never uploaded to Kolena and you maintain complete control over the testing process.Models tested on Kolena are tracked in the Model Registry. This registry serves as a flexible way to track models from training through deployment.

The Model Registry is the home for all models you've tested on Kolena.
The Model Registry displays relevant metadata such as when this model was created, relevant metadata such as the framework, training dataset, source code, and responsible engineer was entered. This information can be used to manage your model development and deployment process and provide easy visibility into things such as:
- Models trained by a given team member
- Training dataset and methodology
- Exact code used to test that model
- Location in e.g. an S3 bucket where model weights are stored
Two factors influence model naming:
- 1.A model's name is unique, and
- 2.A model is deterministic.
This means that anything that may change your model's outputs, such as environment or packaging, should be tracked as a new model! We recommend storing a variety of information in the model name, for example:
- Model architecture, e.g.
YOLOR-D6
- Input size, e.g.
1280x1280
- Framework, e.g.
pytorch-1.7
- Additional tracking information, such as its name in Weights & Biases, e.g.
helpful-meadow-5
Anything you can think to include! We recommend:
- Model framework
- Location in your cloud (or local storage) of the model's weights, e.g.
s3://my-models/yolor/yolor-d6-paper-573.pt
- Relevant information about the training set or training methodology
- Reproducibility information such as the commit hash of the repository used to test the model
- Owner or responsible party
- Unstructured notes to capture the context in which that model was trained
- Keywords for search
Last modified 3mo ago