Configurator Types#
IConfigurator#
-
class IConfigurator#
Configurator interface.
Subclassed by visionflow::confs::AssemblyVerificationFeatureFilterConf, visionflow::confs::AssemblyVerificationTemplateConf, visionflow::confs::AssemblyVerificationTrainer, visionflow::confs::AssemblyVerificationTrainerConf, visionflow::confs::BaseColorConf, visionflow::confs::ClassificationInferConf, visionflow::confs::ClassificationRegionMatchResultCounter, visionflow::confs::ClassificationTrainer, visionflow::confs::ClassificationTrainerConf, visionflow::confs::CustomConf, visionflow::confs::DetectionInferConf, visionflow::confs::DetectionTrainer, visionflow::confs::DetectionTrainerConf, visionflow::confs::FeatureMapFilterConf, visionflow::confs::GlobalMaskConf, visionflow::confs::ImageMeanConf, visionflow::confs::InferenceBatchSizeConf, visionflow::confs::InputImageConf, visionflow::confs::IntegrationClassifierConf, visionflow::confs::LabelClassesConf, visionflow::confs::LocationFeatureFilterConf, visionflow::confs::LocationRegionMatchResultCounter, visionflow::confs::LocationTemplateConf, visionflow::confs::LocationTrainer, visionflow::confs::LocationTrainerConf, visionflow::confs::OCRFeatureFilterConf, visionflow::confs::OCRInferConf, visionflow::confs::OCRRegionMatchResultCounter, visionflow::confs::OCRTemplateConf, visionflow::confs::OCRTrainer, visionflow::confs::OCRTrainerConf, visionflow::confs::OCRUniversalModelConf, visionflow::confs::OCRUniversalModelParamConf, visionflow::confs::PolygonsFilterConf, visionflow::confs::RegionMatchResultCounter, visionflow::confs::SegmentationTrainer, visionflow::confs::SegmentationTrainerConf, visionflow::confs::TRTCalibrator, visionflow::confs::TRTCalibratorConf, visionflow::confs::TRTFloatConverter, visionflow::confs::TRTInt8Converter, visionflow::confs::UnsuperClassificationInferConf, visionflow::confs::UnsuperClassificationTrainer, visionflow::confs::UnsuperClassificationTrainerConf, visionflow::confs::UnsuperSegmentationInferConf, visionflow::confs::UnsuperSegmentationTrainer, visionflow::confs::UnsuperSegmentationTrainerConf, visionflow::confs::ViewFilterConf, visionflow::confs::ViewTransformerConf
Public Functions
-
virtual void initialize(const IService &service)#
Interface to initialize the configurator.
You can initialize the configurator with context, parameters and properties set provided by the service object through the service interface IService::load_context(), IService::input_parameters() and IService::property_sets()
- Parameters:
service – The Configurator service. see IService for more details.
-
virtual TaskStatus execute(IService &service)#
Interface to execute the configurator to generate output parameters.
In this interface, you can execute your configure process and call IService::on_progress to report the progress. After the configure process success, you can call IService::save_context and IService::output_parameters to save the context and output parameters in this method.
The framework will call this method after the initialize method, but it’s not guaranteed this method will always be called after the initialize and before destroy.
We do not recommend you change the configurator member variables in this method although the interface is not limited. In principle, you’d better make the necessary changes in the initialization interface as much as possible.
- Parameters:
service – The Configurator service. see IService for more details.
- Returns:
TaskStatus The code status of the configurator’s execute result.
-
template<typename ConfiguratorType>
inline const ConfiguratorType &as() const# Convert the abstract configurator to a concrete configurator.
- Template Parameters:
ConfiguratorType – The concrete configurator type.
- Returns:
const ConfiguratorType& The concrete configurator.
-
template<typename ConfiguratorType>
inline ConfiguratorType &as()# Convert the abstract configurator to a concrete configurator.
- Template Parameters:
ConfiguratorType – The concrete configurator type.
- Returns:
ConfiguratorType& The concrete configurator.
-
virtual void initialize(const IService &service)#
IService#
-
class IService#
Service interface for configurator.
The service object will be created before any configurator initialize and passed to the configurator to provide all required data for configure. At the end of the configure process, the service will be call to save the context and output parameters generated by the configurator.
Subclassed by visionflow::ConfigProjectImplAdapter, visionflow::ConfigureRuntimeProjectFilterAdapter
Public Types
-
using ParamList = std::vector<std::shared_ptr<param::IParameter>>#
Vector of param::IParameter’s shared pointer.
-
using ParamRefList = std::vector<std::reference_wrapper<param::IParameter>>#
Vector of param::IParameter.
Public Functions
-
virtual bool context_exists() const = 0#
Check if previous context exists or not.
- Returns:
true if previous context exists.
- Returns:
false if previous context not exists.
-
virtual visionflow::Buffer load_context() const = 0#
Get Context saved after the previous execution, which will be empty if it’s the first execution or the previous execution has not saved any context. You can call context_exists() to check if context exists before get it.
- Returns:
visionflow::Buffer The context buffer saved after the previous execution.
-
virtual void save_context(const Buffer &context) = 0#
Save current configurator context.
After the configure process success, you can call this method to save current context which maybe useful for the next execution.
- Parameters:
context – The current configurator context.
-
virtual ParamList input_parameters() const = 0#
Get the input parameters required by the configurator.
- Returns:
ParamList The input parameters required by the configurator.
-
virtual std::vector<const data::IReadOnlyPropertySet*> property_sets() const = 0#
Get the property set vector required by the configurator.
- Returns:
std::vector<data::IReadOnlyPropertySet*> The property set vector required by the configurator.
-
virtual void output_parameters(const ParamRefList ¶ms) = 0#
Save the output parameters generated by the configurator through the service.
- Parameters:
params – The output parameters generated by the configurator.
-
virtual TaskCtrlSignal on_progress(int total, int progress, const std::string &progress_info) = 0#
Report the configure process status.
- Parameters:
total – The total number of configure process. You can set total to 0 if you don’t know the total number, and -1 when error happens.
progress – The current progress of the configure process. You should make sure that progress is greater than 0 and less than or equal to total if total is not 0 and -1.
progress_info – The current progress message, formatted as json, content format like (Note that not all fields exist in the content):
{ "Loss": { "nacc": 0.704343, "pacc": 0.912434 }, "Time Left": 189.24, "Message": "Some string" }
- Returns:
TaskCtrlSignal Signal to control the task.
-
template<typename ParamTypes>
inline auto input_parameters() const# Get the input parameters object and convert input parameters abstract pointer to concrete parameter pointer.
- Template Parameters:
ParamTypes – The required input parameters type.
- Returns:
tuple of parameter’s shared pointer with concrete type.
-
template<typename InputProps>
inline auto property_sets() const# Get the property set vector required by the configurator.
- Template Parameters:
InputProps – The required input property types.
- Returns:
std::vector<data::IReadOnlyPropertySet*> The property set vector required by the configurator.
-
using ParamList = std::vector<std::shared_ptr<param::IParameter>>#
confs::Factory#
-
class Factory : public visionflow::detail::Factory<Meta, IConfigurator>, public visionflow::detail::CreatorMutableMixin<Meta, Creator>#
-
using visionflow::confs::Creator = std::function<std::shared_ptr<IConfigurator>()>#
Configurator creator.
CustomConf#
-
class CustomConf : public visionflow::confs::IConfigurator#
Base Configurator class to generate any user-defined parameters.
This class is a virtual node symbol for the stream graph with no meaningful implementation. You can inherit this class and implement the your own logic to generate the parameters, and register it to the Factory. Or you can also generate the parameters by yourself without this class.
InputImageConf#
-
class InputImageConf : public visionflow::confs::IConfigurator#
Configurator class to generate input image parameter.
LabelClassesConf#
-
class LabelClassesConf : public visionflow::confs::IConfigurator#
Configurator class to generate label classes parameter.
BaseColorConf#
-
class BaseColorConf : public visionflow::confs::IConfigurator#
Configurator to config input images’ base color.
SegmentationTrainerConf#
-
class SegmentationTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set Segmentation module trainer options.
UnsuperSegmentationTrainerConf#
-
class UnsuperSegmentationTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set Unsuper Segmentation module trainer options.
UnsuperClassificationTrainerConf#
-
class UnsuperClassificationTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set Unsuper Classification module trainer options.
InferenceConf#
-
class InferenceBatchSizeConf : public visionflow::confs::IConfigurator#
Configurator to set inference input batch size.
UnsuperClassificationInferConf#
-
class UnsuperClassificationInferConf : public visionflow::confs::IConfigurator#
Configurator to set unsuper classification infering param.
UnsuperSegmentationInferConf#
-
class UnsuperSegmentationInferConf : public visionflow::confs::IConfigurator#
Configurator to set unsuper segmentatioon infering param.
TRTCalibratorConf#
-
class TRTCalibratorConf : public visionflow::confs::IConfigurator#
Configurator to set TRTCalibrator’s params.
TRTCalibrator#
-
class TRTCalibrator : public visionflow::confs::IConfigurator#
TensorRT Int8 Calibrator.
TRTFloatConverter#
-
class TRTFloatConverter : public visionflow::confs::IConfigurator#
Configurator to convert model into TensortRT float model.
TRTInt8Converter#
-
class TRTInt8Converter : public visionflow::confs::IConfigurator#
Configurator to convert model into TensortRT int8 model.
FeatureMapFilterConf#
-
class FeatureMapFilterConf : public visionflow::confs::IConfigurator#
Configurator to filter FeatureMap.
PolygonsFilterConf#
-
class PolygonsFilterConf : public visionflow::confs::IConfigurator#
Configurator to filter Polygons.
ImageMeanConf#
-
class ImageMeanConf : public visionflow::confs::IConfigurator#
ImageMeanConf Configurator class to compute the image mean values in the views.
Public Functions
-
virtual void initialize(const IService &service) override#
Interface to initialize the configurator.
You can initialize the configurator with context, parameters and properties set provided by the service object through the service interface IService::load_context(), IService::input_parameters() and IService::property_sets()
- Parameters:
service – The Configurator service. see IService for more details.
-
virtual TaskStatus execute(IService &service) override#
Interface to execute the configurator to generate output parameters.
In this interface, you can execute your configure process and call IService::on_progress to report the progress. After the configure process success, you can call IService::save_context and IService::output_parameters to save the context and output parameters in this method.
The framework will call this method after the initialize method, but it’s not guaranteed this method will always be called after the initialize and before destroy.
We do not recommend you change the configurator member variables in this method although the interface is not limited. In principle, you’d better make the necessary changes in the initialization interface as much as possible.
- Parameters:
service – The Configurator service. see IService for more details.
- Returns:
TaskStatus The code status of the configurator’s execute result.
-
virtual void initialize(const IService &service) override#
GlobalMaskConf#
-
class GlobalMaskConf : public visionflow::confs::IConfigurator#
Configurator to generate the global mask or other binary/complex training parameters.
RegionMatchResultCounter#
-
class RegionMatchResultCounter : public visionflow::confs::IConfigurator#
A configurator to count region match results.
Public Functions
-
virtual void initialize(const IService &service) override#
Interface to initialize the configurator.
You can initialize the configurator with context, parameters and properties set provided by the service object through the service interface IService::load_context(), IService::input_parameters() and IService::property_sets()
- Parameters:
service – The Configurator service. see IService for more details.
-
virtual TaskStatus execute(IService &service) override#
Interface to execute the configurator to generate output parameters.
In this interface, you can execute your configure process and call IService::on_progress to report the progress. After the configure process success, you can call IService::save_context and IService::output_parameters to save the context and output parameters in this method.
The framework will call this method after the initialize method, but it’s not guaranteed this method will always be called after the initialize and before destroy.
We do not recommend you change the configurator member variables in this method although the interface is not limited. In principle, you’d better make the necessary changes in the initialization interface as much as possible.
- Parameters:
service – The Configurator service. see IService for more details.
- Returns:
TaskStatus The code status of the configurator’s execute result.
-
virtual void initialize(const IService &service) override#
ClassificationRegionMatchResultCounter#
-
class ClassificationRegionMatchResultCounter : public visionflow::confs::IConfigurator#
A configurator to count classification region match results.
Public Functions
-
virtual void initialize(const IService &service) override#
Interface to initialize the configurator.
You can initialize the configurator with context, parameters and properties set provided by the service object through the service interface IService::load_context(), IService::input_parameters() and IService::property_sets()
- Parameters:
service – The Configurator service. see IService for more details.
-
virtual TaskStatus execute(IService &service) override#
Interface to execute the configurator to generate output parameters.
In this interface, you can execute your configure process and call IService::on_progress to report the progress. After the configure process success, you can call IService::save_context and IService::output_parameters to save the context and output parameters in this method.
The framework will call this method after the initialize method, but it’s not guaranteed this method will always be called after the initialize and before destroy.
We do not recommend you change the configurator member variables in this method although the interface is not limited. In principle, you’d better make the necessary changes in the initialization interface as much as possible.
- Parameters:
service – The Configurator service. see IService for more details.
- Returns:
TaskStatus The code status of the configurator’s execute result.
-
virtual void initialize(const IService &service) override#
OCRRegionMatchResultCounter#
-
class OCRRegionMatchResultCounter : public visionflow::confs::IConfigurator#
A configurator to count ocr region match results.
Public Functions
-
virtual void initialize(const IService &service) override#
Interface to initialize the configurator.
You can initialize the configurator with context, parameters and properties set provided by the service object through the service interface IService::load_context(), IService::input_parameters() and IService::property_sets()
- Parameters:
service – The Configurator service. see IService for more details.
-
virtual TaskStatus execute(IService &service) override#
Interface to execute the configurator to generate output parameters.
In this interface, you can execute your configure process and call IService::on_progress to report the progress. After the configure process success, you can call IService::save_context and IService::output_parameters to save the context and output parameters in this method.
The framework will call this method after the initialize method, but it’s not guaranteed this method will always be called after the initialize and before destroy.
We do not recommend you change the configurator member variables in this method although the interface is not limited. In principle, you’d better make the necessary changes in the initialization interface as much as possible.
- Parameters:
service – The Configurator service. see IService for more details.
- Returns:
TaskStatus The code status of the configurator’s execute result.
-
virtual void initialize(const IService &service) override#
LocationRegionMatchResultCounter#
-
class LocationRegionMatchResultCounter : public visionflow::confs::IConfigurator#
A configurator to count location region match results.
Public Functions
-
virtual void initialize(const IService &service) override#
Interface to initialize the configurator.
You can initialize the configurator with context, parameters and properties set provided by the service object through the service interface IService::load_context(), IService::input_parameters() and IService::property_sets()
- Parameters:
service – The Configurator service. see IService for more details.
-
virtual TaskStatus execute(IService &service) override#
Interface to execute the configurator to generate output parameters.
In this interface, you can execute your configure process and call IService::on_progress to report the progress. After the configure process success, you can call IService::save_context and IService::output_parameters to save the context and output parameters in this method.
The framework will call this method after the initialize method, but it’s not guaranteed this method will always be called after the initialize and before destroy.
We do not recommend you change the configurator member variables in this method although the interface is not limited. In principle, you’d better make the necessary changes in the initialization interface as much as possible.
- Parameters:
service – The Configurator service. see IService for more details.
- Returns:
TaskStatus The code status of the configurator’s execute result.
-
virtual void initialize(const IService &service) override#
SegmentationTrainer#
-
class SegmentationTrainer : public visionflow::confs::IConfigurator#
Configurator to train segmentation model.
UnsuperSegmentationTrainer#
-
class UnsuperSegmentationTrainer : public visionflow::confs::IConfigurator#
Configurator to train unsuper segmentation model.
UnsuperClassificationTrainer#
-
class UnsuperClassificationTrainer : public visionflow::confs::IConfigurator#
Configurator to train unsuper classification model.
OCRTrainer#
-
class OCRTrainer : public visionflow::confs::IConfigurator#
OCR model trainer.
OCRUniversalModelConf#
-
class OCRUniversalModelConf : public visionflow::confs::IConfigurator#
OCR universal model configurator.
OCRFeatureFilterConf#
-
class OCRFeatureFilterConf : public visionflow::confs::IConfigurator#
LocationFeatureFilterConf#
-
class LocationFeatureFilterConf : public visionflow::confs::IConfigurator#
AssemblyVerificationFeatureFilterConf#
-
class AssemblyVerificationFeatureFilterConf : public visionflow::confs::IConfigurator#
visionflow::confs::OCRInferConf#
-
class OCRInferConf : public visionflow::confs::IConfigurator#
OCR inference parameters’ configurator.
visionflow::confs::OCRUniversalModelParamConf#
-
class OCRUniversalModelParamConf : public visionflow::confs::IConfigurator#
OCR Universal model parameters’ configurator.
visionflow::confs::OCRTemplateConf#
-
class OCRTemplateConf : public visionflow::confs::IConfigurator#
visionflow::confs::OCRTrainerConf#
-
class OCRTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set OCR module trainer options.
visionflow::confs::LocationTemplateConf#
-
class LocationTemplateConf : public visionflow::confs::IConfigurator#
visionflow::confs::LocationTrainer#
-
class LocationTrainer : public visionflow::confs::IConfigurator#
Location Tool model trainer.
visionflow::confs::LocationTrainerConf#
-
class LocationTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set Locaiton module trainer options.
visionflow::confs::AssemblyVerificationTemplateConf#
-
class AssemblyVerificationTemplateConf : public visionflow::confs::IConfigurator#
visionflow::confs::AssemblyVerificationTrainer#
-
class AssemblyVerificationTrainer : public visionflow::confs::IConfigurator#
AssemblyVerification Tool model trainer.
visionflow::confs::AssemblyVerificationTrainerConf#
-
class AssemblyVerificationTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set AssemblyVerification module trainer options.
visionflow::confs::ClassificationInferConf#
-
class ClassificationInferConf : public visionflow::confs::IConfigurator#
Classification inference parameters’ configurator.
visionflow::confs::ClassificationTrainerConf#
-
class ClassificationTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set Classification module trainer options.
visionflow::confs::ClassificationTrainer#
-
class ClassificationTrainer : public visionflow::confs::IConfigurator#
visionflow::confs::DetectionInferConf#
-
class DetectionInferConf : public visionflow::confs::IConfigurator#
Detection inference parameters’ configurator.
visionflow::confs::DetectionTrainer#
-
class DetectionTrainer : public visionflow::confs::IConfigurator#
visionflow::confs::DetectionTrainerConf#
-
class DetectionTrainerConf : public visionflow::confs::IConfigurator#
Configurator to set Detection module trainer options.
visionflow::confs::ViewFilterConf#
-
class ViewFilterConf : public visionflow::confs::IConfigurator#
Configurator to config the filter parameter before view transformer.
visionflow::confs::ViewTransformerConf#
-
class ViewTransformerConf : public visionflow::confs::IConfigurator#
Configurator to config the view transformer.
visionflow::confs::IntegrationClassifierConf#
-
class IntegrationClassifierConf : public visionflow::confs::IConfigurator#