Object tracking
Step-by-step tutorial on how to integrate custom visual object tracking neural network into Supervisely platform on the example of MixFormer model.
Introduction
Implementation details
Overall structure
class MyModel(sly.nn.inference.BBoxTracking):
def load_on_device(
self,
model_dir: str,
device: Literal["cpu", "cuda", "cuda:0", "cuda:1", "cuda:2", "cuda:3"] = "cpu",
):
# preparing the model: model instantiating, downloading weights, loading it on the device.
pass
def initialize(
self, init_rgb_image: np.ndarray, target_bbox: PredictionBBox
) -> None:
# initialize model with target object
pass
def predict(
self,
rgb_image: np.ndarray,
settings: Dict[str, Any],
prev_rgb_image: np.ndarray,
target_bbox: PredictionBBox,
) -> PredictionBBox:
# the inference of a model here
# ...
return predictionSimple model
Getting started
Step-by-step implementation

MixFormer tracking model
Getting started
Python script
Step-by-step implementation
Run and debug
Local debug

Debug in Supervisely platform


Release your code as a Supervisely App.
Repository structure
modal.html
App configuration
Last updated