Skip to content

delta_t argument ignored in prediction stage of Trackastra.track()? #58

@aarpon

Description

@aarpon

From our experiments, it looks that delta_t has little if no effect on the end result of tracking.

Indeed, trackastra.model.model_api.Trackastra.track() calls trackastra.model.model_api.Trackastra._predict() without forwarding **kwargs, as follows:

        predictions = self._predict(
            imgs,
            masks,
            normalize_imgs=normalize_imgs,
            progbar_class=progbar_class,
            n_workers=n_workers,
            batch_size=batch_size or self.batch_size,
        )

The _predict() method, in turns, calls

        predictions = predict_windows(
            windows=windows,
            features=features,
            model=self.transformer,
            edge_threshold=edge_threshold,
            spatial_dim=masks.ndim - 1,
            progbar_class=progbar_class,
            batch_size=batch_size,
        )

The method predict_windows() takes delta_t as input argument, but it defaults to 1:

def predict_windows(
    windows: list[dict],
    # features: list[WRFeatures],
    # model: TrackingTransformer,
    features: list,
    model,
    intra_window_weight: float = 0,
    delta_t: int = 1,
    edge_threshold: float = 0.05,
    spatial_dim: int = 3,
    batch_size: int = 1,
    progbar_class=tqdm,
) -> dict:
...

In contrast, delta_t seems to be passed to trackastra.model.model_api.Trackastra._track_from_predictions() via **kwargs:

track_graph = self._track_from_predictions(predictions, mode=mode, **kwargs)

So, is it correct that delta_t seems to be ignored in the prediction stage and only be used in building the graph for the solver? If this is true, this seems to strongly limit (or even nullify) the effect of delta_t > 1 in graph construction, since the prediction path appears to generate associations only up to delta_t = 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions