Interface BlobFunction<T>

Type Parameters:
T - preferred tensor format for the framework

public interface BlobFunction<T>
Convert OpenCV Mats into blobs (tensors) for use with a deep learning framework.
Author:
Pete Bankhead
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    fromBlob(T blob)
    Convert a blob (generally the result of a prediction) to a list of mats.
    toBlob(Mat... mats)
    Convert one or more mats to a blob.
  • Method Details

    • toBlob

      T toBlob(Mat... mats)
      Convert one or more mats to a blob. This is intended primarily for cases where each input mat corresponds to an image, and the length of the input array corresponds to the batch size.
      Parameters:
      mats -
      Returns:
    • fromBlob

      List<Mat> fromBlob(T blob)
      Convert a blob (generally the result of a prediction) to a list of mats. The length of the output list corresponds to the batch size.

      Note that while this is typically used for blobs that are images, implementing classes should sensibly handle cases where the number of dimensions indicates a different kind of output.

      Parameters:
      blob -
      Returns: