Need help upgrading to Sentis 2.0

I implemented ARTrack (Object tracking model) to my Unity Project but I’m encountering an issue with the release version.

Basically, the tracking process is separated into 3 steps: preprocess, execution and postprocess.
In the preprocess, I am actually doing Tensor calculations. Indeed, one of the inputs of the model is the template.

The template is basically computed once since it is based on the first bounding box and is used throughout the whole tracking process in the video. But since I can’t use the backend anymore, I can’t do these calculations outside of a model. And I don’t want to recompute at every single iteration of the tracking process the template tensor.

Therefore, I am not really sure what is the best solution. Should I just switch back to some sort of array and compute it once at the beginning of a tracking process and convert it to a Tensor and use it at each iteration? Or if I want to directly compute the Tensor, do I need to update my model by using FunctionalTensor?

The operations I’m doing on this Tensor are: Reshape, division by a scalar and subtraction by a scalar. (I’m basically reshaping the image to a format the model can understand and normalizing it)

Thanks in advance,
Matteo

Easy, convert your old backend to code to the new functional API.
This way you can save all those operations into a model, which you can use at runtime :slight_smile:
https://docs.unity3d.com/Packages/com.unity.sentis@2.0/manual/create-a-new-model.html