Class SharedStateSegmentInstance<T extends InferenceModel>
Object
SharedStateSegmentInstance<T>
- Type Parameters:
T
- model-type in pool
Shared-state for instance segmentation.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionSharedStateSegmentInstance
(ConcurrentModelPool<T> modelPool, FeatureTableCalculator<FeatureInputSingleObject> featureTable, LabelHeaders identifierHeaders, String outputNameFeatures, FeatureExporterContext context) Creates a new instance of SharedStateSegmentInstance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Writes all the results that have been collected as a CSV file, and closes open I/O handles and memory structures.createCalculationContext
(ExecutionTimeRecorder executionTimeRecorder, InputOutputContext ioContext) Creates aFeatureCalculationContext
for calculating features to later use this exporter.The concurrent model pool for inference.
-
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 poolfeatureTable
- the feature table calculatoridentifierHeaders
- the label headers for identifiersoutputNameFeatures
- the output name for featurescontext
- 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 aFeatureCalculationContext
for calculating features to later use this exporter.- Parameters:
executionTimeRecorder
- records execution-times.ioContext
- IO-context.- Returns:
- a newly created context.
-
closeAndWriteOutputs
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
The concurrent model pool for inference.
-