Class SharedStateSegmentInstance<T extends InferenceModel>

Object
SharedStateSegmentInstance<T>
Type Parameters:
T - model-type in pool

public class SharedStateSegmentInstance<T extends InferenceModel> extends Object
Shared-state for instance segmentation.
Author:
Owen Feehan
  • Constructor Details

    • SharedStateSegmentInstance

      public SharedStateSegmentInstance(ConcurrentModelPool<T> modelPool, FeatureTableCalculator<FeatureInputSingleObject> featureTable, LabelHeaders identifierHeaders, String outputNameFeatures, FeatureExporterContext context) throws CreateException
      Creates a new instance of SharedStateSegmentInstance.
      Parameters:
      modelPool - the concurrent model pool
      featureTable - the feature table calculator
      identifierHeaders - the label headers for identifiers
      outputNameFeatures - the output name for features
      context - the feature exporter context
      Throws:
      CreateException - if there's an error creating the feature exporter
  • Method Details

    • createCalculationContext

      public FeatureCalculationContext<FeatureTableCalculator<FeatureInputSingleObject>> createCalculationContext(ExecutionTimeRecorder executionTimeRecorder, InputOutputContext ioContext)
      Creates a FeatureCalculationContext for calculating features to later use this exporter.
      Parameters:
      executionTimeRecorder - records execution-times.
      ioContext - IO-context.
      Returns:
      a newly created context.
    • closeAndWriteOutputs

      public void closeAndWriteOutputs(ExportFeaturesStyle style) throws OutputWriteFailedException
      Writes all the results that have been collected as a CSV file, and closes open I/O handles and memory structures.
      Parameters:
      style - the style for exporting features
      Throws:
      OutputWriteFailedException - if any output cannot be written, or there is an error closing open I/O.
    • getModelPool

      public ConcurrentModelPool<T> getModelPool()
      The concurrent model pool for inference.