Operator Types#
-
class IOperator#
IOperator Interface for Operator.
An Operator is a data processing unit which can be initialized with list of predefined parameters and can generate list of output properties with specific types for each list of input properties of specific types.
Subclassed by aidi::opers::ClassificationInfer, aidi::opers::ClassificationLabeler, aidi::opers::DetectionInfer, aidi::opers::DetectionLaber, aidi::opers::ImageGrabber, aidi::opers::LocationFilter, aidi::opers::LocationInfer, aidi::opers::LocationLabeler, aidi::opers::LocationObjectMatcher, aidi::opers::OCRFilter, aidi::opers::OCRInfer, aidi::opers::OCRLabeler, aidi::opers::OCRStringMatcher, aidi::opers::PolygonsFilter, aidi::opers::RegionsMatcher, aidi::opers::SegmentationFeatureMapFilter, aidi::opers::SegmentationInfer, aidi::opers::SegmentationLabeler, aidi::opers::SegmentationTRTInfer, aidi::opers::ViewFilter, aidi::opers::ViewTransformer
Public Types
-
using PropList = std::vector<std::shared_ptr<props::IProperty>>#
Vector of props::IProperty’s shared pointer.
-
using ParamList = std::vector<std::shared_ptr<param::IParameter>>#
Vector of param::IParameter’s shared pointer.
Public Functions
-
virtual void initialize(const ParamList ¶m)#
Interface to initialize the operator with the given parameters. The derived class should implement this method to initialize the operator.
- Parameters:
param – List of parameters, all should be derived from param::IParameter.
-
virtual void execute(const PropList &inputs, PropList outputs) const#
Initialize the operator with the given properties and generate the output properties. This function is called after the operator is initialized.
- Parameters:
inputs – [in] List of input properties. All properties in the input list is readonly.
outputs – [out] List of output properties. All output properties are allocated by the caller in advance. The implementer of the Operator can no longer modify the address of the property object in the
execute
phase, nor can it delete or add a property object, but can only modify the value of each property object.
-
template<typename OperatorType>
inline const OperatorType &as() const# Convert the operator into its derived type. Caller should make sure the type is correct. or std::bad_cast will be thrown.
- Template Parameters:
OperatorType – The derived class of IOperator.
- Returns:
const OperatorType& The derived type of the operator.
-
using PropList = std::vector<std::shared_ptr<props::IProperty>>#
InputTool Operators#
-
class ImageGrabber : public aidi::opers::IOperator#
Base class of image grabber operator.
Image grabber operator is used to grab image from camera or read image from file.
Subclassed by aidi::opers::CameraImageGrabber, aidi::opers::FileImageGrabber
-
class CameraImageGrabber : public aidi::opers::ImageGrabber#
Image grabber operator for camera.
-
class FileImageGrabber : public aidi::opers::ImageGrabber#
Image grabber operator for file.
Segmentation Operators#
-
class PolygonsFilter : public aidi::opers::IOperator#
PolygonsFilter is an operator to filter list of polygon regions with some common thresholds or customized python filter script.
Public Functions
-
virtual void initialize(const IOperator::ParamList ¶m) override#
Interface to initialize the operator with the given parameters. The derived class should implement this method to initialize the operator.
- Parameters:
param – List of parameters, all should be derived from param::IParameter.
-
virtual void execute(const IOperator::PropList &inputs, IOperator::PropList outputs) const override#
Initialize the operator with the given properties and generate the output properties. This function is called after the operator is initialized.
- Parameters:
inputs – [in] List of input properties. All properties in the input list is readonly.
outputs – [out] List of output properties. All output properties are allocated by the caller in advance. The implementer of the Operator can no longer modify the address of the property object in the
execute
phase, nor can it delete or add a property object, but can only modify the value of each property object.
-
virtual void initialize(const IOperator::ParamList ¶m) override#
-
class SegmentationFeatureMapFilter : public aidi::opers::IOperator#
Segmentation feature map filter.
Public Functions
-
virtual void initialize(const IOperator::ParamList ¶m) override#
Initialize the SegmentationFeatureMapFilter with param FeatureMapFilterParameters which contains thresholds of each class and dilate pixel factor.
- Parameters:
param – FeatureMapFilterParameters.
-
virtual void execute(const IOperator::PropList &inputs, IOperator::PropList outputs) const override#
Filter the input feature maps of Segmentation with FeatureMapFilterParameters and convert the results into PolygonRegionList.
- Parameters:
inputs – The feature maps of Segmentation.
outputs – The PolygonRegionList of the results after filtering.
- Throws:
excepts::InvalidArgument – Throws if the parameter outputs is not empty.
-
virtual void initialize(const IOperator::ParamList ¶m) override#
-
class RegionsMatcher : public aidi::opers::IOperator#
Operator to compare the predicted regions with the ground truth to get the category (in [TP, FP, TN, FN]) of each region.
Public Functions
-
virtual void initialize(const IOperator::ParamList ¶m) override#
Interface to initialize the operator with the given parameters. The derived class should implement this method to initialize the operator.
- Parameters:
param – List of parameters, all should be derived from param::IParameter.
-
virtual void execute(const IOperator::PropList &inputs, IOperator::PropList outputs) const override#
Initialize the operator with the given properties and generate the output properties. This function is called after the operator is initialized.
- Parameters:
inputs – [in] List of input properties. All properties in the input list is readonly.
outputs – [out] List of output properties. All output properties are allocated by the caller in advance. The implementer of the Operator can no longer modify the address of the property object in the
execute
phase, nor can it delete or add a property object, but can only modify the value of each property object.
-
virtual void initialize(const IOperator::ParamList ¶m) override#
OCR Operators#
Location Operators#
Classification Operators#
Detection Operators#
View Transformer Tool#
-
class ViewFilter : public aidi::opers::IOperator#
ViewFilter is an operator to filter the defect regions by comparing the evaluation factors such as the score, area, side length, x-y axial length with the parameter set by user. ViewFilter can also figure out the views which contains no defect region.
Public Functions
-
virtual void initialize(const IOperator::ParamList ¶m) override#
Interface to initialize the operator with the given parameters. The derived class should implement this method to initialize the operator.
- Parameters:
param – List of parameters, all should be derived from param::IParameter.
-
virtual void execute(const IOperator::PropList &inputs, IOperator::PropList outputs) const override#
Initialize the operator with the given properties and generate the output properties. This function is called after the operator is initialized.
- Parameters:
inputs – [in] List of input properties. All properties in the input list is readonly.
outputs – [out] List of output properties. All output properties are allocated by the caller in advance. The implementer of the Operator can no longer modify the address of the property object in the
execute
phase, nor can it delete or add a property object, but can only modify the value of each property object.
-
virtual void initialize(const IOperator::ParamList ¶m) override#
-
class ViewTransformer : public aidi::opers::IOperator#
ViewTransformer is an operator that transforms the result of the previous tool’s detection output with translation, scaling, rotation, masking and other transformation parameters to obtain new view windows that can be used as input to the next tool.
Public Functions
-
virtual void initialize(const IOperator::ParamList ¶m) override#
Interface to initialize the operator with the given parameters. The derived class should implement this method to initialize the operator.
- Parameters:
param – List of parameters, all should be derived from param::IParameter.
-
virtual void execute(const IOperator::PropList &inputs, IOperator::PropList outputs) const override#
Initialize the operator with the given properties and generate the output properties. This function is called after the operator is initialized.
- Parameters:
inputs – [in] List of input properties. All properties in the input list is readonly.
outputs – [out] List of output properties. All output properties are allocated by the caller in advance. The implementer of the Operator can no longer modify the address of the property object in the
execute
phase, nor can it delete or add a property object, but can only modify the value of each property object.
-
virtual void initialize(const IOperator::ParamList ¶m) override#