Skip to content

Predictions

Note

The ArrayLike type is expected to be a np.ndarray or a torch.Tensor.

mozuma.predictions.BatchModelPrediction dataclass

Class defining the accepted types for model's predictions

Attributes:

Name Type Description
features ArrayLike | None

Features or embeddings.

Dimensions=(dataset_size, feature_dims...)

label_scores ArrayLike | None

Score for each predicted label.

Dimensions=(dataset_size, n_labels)

frames Sequence[BatchVideoFramesPrediction[ArrayLike]] | None

Prediction for each frame and video. See BatchVideoFramesPrediction.

Sequence length=dataset_size

bounding_boxes Sequence[BatchBoundingBoxesPrediction[ArrayLike]] | None

Prediction for each bounding_box and image. See BatchBoundingBoxesPrediction.

Sequence length=dataset_size

mozuma.predictions.BatchBoundingBoxesPrediction dataclass

Results of bounding box extraction on an images

Attributes:

Name Type Description
bounding_boxes ArrayLike

Array of bounding box coordinates.

Dimensions=(n_boxes, 4).

scores ArrayLike | None

Array of scores for each bounding boxes.

Dimensions=(n_boxes, 1).

features ArrayLike | None

Array of features for each bounding boxes.

Dimensions=(n_boxes, features_dims...).

mozuma.predictions.BatchVideoFramesPrediction dataclass

Result of video frames extraction on a video

Attributes:

Name Type Description
frame_indices Sequence[int]

The frame index in the source video

features ArrayLike | None

The features of the video frames.

Dimensions=(n_frames, features_dims...)