Package id.dope4j.io

Record Class OutputTensor

Object
Record
OutputTensor

public record OutputTensor(NDArray tensor, NDArray beliefMaps, AffinityFields affinities) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    OutputTensor(NDArray tensor, NDArray beliefMaps, NDArray affinities)
     
    OutputTensor(NDArray tensor, NDArray beliefMaps, AffinityFields affinities)
    Creates an instance of a OutputTensor record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the affinities record component.
    NDArray
    Tensor which represents Belief Maps for all keypoints.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    NDArray
    Raw tensor as returned by the network
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OutputTensor

      public OutputTensor(NDArray tensor, NDArray beliefMaps, NDArray affinities)
    • OutputTensor

      public OutputTensor(NDArray tensor, NDArray beliefMaps, AffinityFields affinities)
      Creates an instance of a OutputTensor record class.
      Parameters:
      tensor - the value for the tensor record component
      beliefMaps - the value for the beliefMaps record component
      affinities - the value for the affinities record component
  • Method Details

    • tensor

      public NDArray tensor()
      Raw tensor as returned by the network
    • beliefMaps

      public NDArray beliefMaps()
      Tensor which represents Belief Maps for all keypoints.

      There expected to be DopeConstants.BELIEF_MAPS_COUNT Belief Maps - one for each 8 vertices of object cuboid + 1 for cuboid center point.

      For example beliefMaps[i][x][y] describes confidence of the network that vertex Vi of object's cuboid is located at (x, y) coordinates of the input image.

      Because on image there may be multiple of similar objects it means that on one beliefMaps[i] there can be multiple of different Vi vertices detected, which belongs to different objects on the image.

      For memory purposes this effectively is a reference to subarray inside tensor.

    • affinities

      public AffinityFields affinities()
      Returns the value of the affinities record component.
      Returns:
      the value of the affinities record component
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.