Class BinaryOutcomeImageLabeller

Direct Known Subclasses:
BinaryClassifierImageLabeller, DescriptiveNameContainsImageLabeller

public abstract class BinaryOutcomeImageLabeller extends ImageLabeller<NoSharedState>
Abstract base class for image labellers that produce binary outcomes (positive or negative).
Author:
Owen Feehan
  • Constructor Details

    • BinaryOutcomeImageLabeller

      public BinaryOutcomeImageLabeller()
  • Method Details

    • initialize

      public NoSharedState initialize(Path pathForBinding) throws InitializeException
      Description copied from class: ImageLabeller
      Initializes the labeller. Should be called once before calling any other methods.
      Specified by:
      initialize in class ImageLabeller<NoSharedState>
      Parameters:
      pathForBinding - a Path that can be used by the labeller to make file path decisions
      Returns:
      the initialized shared-state of type T
      Throws:
      InitializeException - if initialization fails
    • allLabels

      public Set<String> allLabels(NoSharedState sharedState)
      Description copied from class: ImageLabeller
      Returns a set of identifiers for all groups that can be outputted by the labeller.

      This method should be callable at any time.

      Specified by:
      allLabels in class ImageLabeller<NoSharedState>
      Parameters:
      sharedState - the initialized shared-state returned by ImageLabeller.initialize(Path)
      Returns:
      a Set of String labels
    • classificationString

      protected static String classificationString(boolean positive)
      Converts a boolean classification result to its string representation.
      Parameters:
      positive - true if the classification is positive, false if negative
      Returns:
      POSITIVE if true, NEGATIVE if false