talmolab / dreem

DREEM Relates Every Entities' Motion (DREEM). Global Tracking Transformers for biological multi-object tracking.
https://dreem.sleap.ai
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Write a guide for API-based inference #69

Open talmo opened 3 months ago

talmo commented 3 months ago

The run script/CLI is helpful when using this exclusively, but we'll want to be able to integrate it into other stuff.

For example, in SLEAP/sleap-nn, we'll already have loaded the images and maybe will be generating poses batch-by-batch, so using DREEM's inference data loader doesn't make as much sense.

The goal is to show a recipe where we can use DREEM models for inference from other packages (e.g., SLEAP, sleap-nn) in their own workflows and execution context.

We want to write something like this: https://sleap.ai/notebooks/Interactive_and_realtime_inference.html

Note the progressive exposure of complexity, going from high to low level, where on the highest level, we get back numpy arrays and on lowest level we're getting tensors back still on the GPU before any further postprocessing.