Parameter Types#
IParameter#
-
class IParameter#
Subclassed by visionflow::param::BinaryPacks, visionflow::param::CameraCalibrationEvaluation, visionflow::param::CameraCalibrationTrainingParameters, visionflow::param::GaugeParameters, visionflow::param::GeometrySearchFeatureModelList, visionflow::param::IAveragePrecisionList, visionflow::param::IPrecisionEvaluation, visionflow::param::ITableList, visionflow::param::LabelClasses, visionflow::param::ModelHealth, visionflow::param::SchemableParameter, visionflow::param::ViewTransformParameterList
ISchemable#
-
struct ISchemable#
Json Schemable Class API.
A Json Schemable Class is a class that can be serialized to/deserialized from Json and can be validated by Json Schema.
Subclassed by visionflow::param::AssemblyVerificationLayOutArea, visionflow::param::AssemblyVerificationMaxInputSize, visionflow::param::AssemblyVerificationModelParameters, visionflow::param::AssemblyVerificationTargetParameters, visionflow::param::AxialSideLengthRange, visionflow::param::CategoryAreaAugment, visionflow::param::ChooseIDReader1DTypes, visionflow::param::ChooseIDReader2DTypes, visionflow::param::ClassificationInputShape, visionflow::param::Code128Parameters, visionflow::param::Code39Parameters, visionflow::param::Code93Parameters, visionflow::param::DMECC200Parameters, visionflow::param::DataAugmentation, visionflow::param::DefectSimulation, visionflow::param::DetectionInputShape, visionflow::param::DetectionTrainingStrategy, visionflow::param::ELAssemblyVerificationObjectRule, visionflow::param::ELAssemblyVerificationRegionRule, visionflow::param::Ean13Parameters, visionflow::param::Ean8Parameters, visionflow::param::ExampleAugRotate, visionflow::param::ExampleAugShift, visionflow::param::FilterScript, visionflow::param::GeoAugDistortion, visionflow::param::GeoAugScale, visionflow::param::GeoAugShift, visionflow::param::GeoAugSlightRotation, visionflow::param::GeometryAugmentation, visionflow::param::GeometrySearchDuplicate, visionflow::param::IDReader1DParameters, visionflow::param::IDReader2DParameters, visionflow::param::ImageAugBrightness, visionflow::param::ImageAugColorFilter, visionflow::param::ImageAugContrast, visionflow::param::ImageAugIlluminationGradient, visionflow::param::ImageAugNoise, visionflow::param::ImageAugSmoothingOrSharpening, visionflow::param::ImageAugmentation, visionflow::param::ImagePreprocessArithmParameters, visionflow::param::ImagePreprocessCirclePolarParameters, visionflow::param::ImagePreprocessCvtColorParameters, visionflow::param::ImagePreprocessFilter2DParameters, visionflow::param::ImagePreprocessFlipParameters, visionflow::param::ImagePreprocessGammaTransParameters, visionflow::param::ImagePreprocessHighPassFilterParameters, visionflow::param::ImagePreprocessLowPassFilterParameters, visionflow::param::ImagePreprocessLutParameters, visionflow::param::ImagePreprocessMorphParameters, visionflow::param::ImagePreprocessParameters, visionflow::param::ImagePreprocessParametersList, visionflow::param::ImagePreprocessResizeParameters, visionflow::param::ImagePreprocessSharpenParameters, visionflow::param::KeyPointNode, visionflow::param::LabeledGeometryAugmentation, visionflow::param::LocationMaxInputSize, visionflow::param::LocationModelParameters, visionflow::param::LocationTargetParameters, visionflow::param::LossCurve, visionflow::param::MicroQRCParameters, visionflow::param::MultiNameKeyPointNode, visionflow::param::NodeMatchTemplate, visionflow::param::OCRAnnulusParameters, visionflow::param::OCRArea, visionflow::param::OCRNodeTemplate, visionflow::param::OCRNodeTemplateArea, visionflow::param::OCRStringTemplate, visionflow::param::OCRStringTemplateArea, visionflow::param::PropertyObjectId, visionflow::param::QRCM1Parameters, visionflow::param::QRCM2Parameters, visionflow::param::QRCParameters, visionflow::param::RegularExpression, visionflow::param::SchemableParameter, visionflow::param::SegmentationImageSplit, visionflow::param::SegmentationInputShape, visionflow::param::SegmentationModelParameters, visionflow::param::SegmentationTrainingSampleStrategy, visionflow::param::SetGeometrySearchDownSampleRatioManually, visionflow::param::SetGeometrySearchFeatChainMagRelativeThreshManually, visionflow::param::SetGeometrySearchGranularityManually, visionflow::param::SetGeometrySearchNoiseThreshManually, visionflow::param::SideLengthRange, visionflow::param::SingleClassPolygonsFilterParameters, visionflow::param::TypeValuePair, visionflow::param::UnsuperClassificationInputShape, visionflow::param::UnsuperDefectRadius, visionflow::param::UnsuperSegmentationInputShape, visionflow::param::UnsuperSegmentationModelParameters, visionflow::param::UnsuperSegmentationSamplingParameters, visionflow::param::UpcaParameters, visionflow::param::UpceParameters
Public Functions
-
virtual const std::string &schema_str() const = 0#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const = 0#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
const void* The nlohmann::json object pointer
-
virtual visionflow::Buffer to_json() const = 0#
Serialize the parameter group to schema-validatable json string.
- Returns:
visionflow::Buffer the schema-validatable json string.
-
virtual ISchemable &from_json(const visionflow::Buffer &json_str) = 0#
Deserialize the parameter group from schema-validatable json string.
See also
validate(const std::string &json_str, std::string *error_message = nullptr)
- Parameters:
json_str – [in] the schema-validatable json string.
- Throws:
visionflow::excepts::InvalidJson – if the json string is invalid.
visionflow::excepts::JsonSchemaValidationError – if the json string is not serialized from this parameter type or validation the json with json schema failed.
- Returns:
ISchemable& the reference of the parameter.
-
bool validate(const visionflow::Buffer &json_str, std::string *error_message = nullptr) const#
Validate the parameter json string with json schema.
- Parameters:
json_str – [in] the json string.
error_message – [out] the error message if the json string is invalid, otherwise empty.
- Throws:
visionflow::excepts::InvalidJson – if the json string is invalid.
- Returns:
bool true if the json string is valid, otherwise false.
-
virtual const std::string &schema_str() const = 0#
SchemableParameter#
-
struct SchemableParameter : public virtual visionflow::param::ISchemable, public virtual visionflow::param::IParameter#
SchemableParameter feature interface for IParameter classes.
Subclassed by visionflow::param::AssemblyVerificationFilterParameters, visionflow::param::AssemblyVerificationTemplates, visionflow::param::AssemblyVerificationTrainingParameters, visionflow::param::BaseColor, visionflow::param::CameraCalibrationInferParameters, visionflow::param::CameraCalibrationPixelScale, visionflow::param::ClassificationTrainingParameters, visionflow::param::DetectionInferParameters, visionflow::param::DetectionTrainingParameters, visionflow::param::ELAssemblyVerificationInferParameters, visionflow::param::ELAssemblyVerificationTrainingParameters, visionflow::param::ELClassificationTrainingParameters, visionflow::param::ELOCRInferParameters, visionflow::param::ELOCRTrainingParameters, visionflow::param::ELUnsuperClassificationInferenceParameters, visionflow::param::ELUnsuperClassificationTrainingParameters, visionflow::param::ELUnsuperSegmentationInferParameters, visionflow::param::ELUnsuperSegmentationTrainingParameters, visionflow::param::ExampleAugments, visionflow::param::FeatureMapFilterParameters, visionflow::param::GeometrySearchInferParameters, visionflow::param::GeometrySearchTrainingParameters, visionflow::param::IDReaderDecoderParameters, visionflow::param::IDReaderLocationModelParameters, visionflow::param::ImageMean, visionflow::param::ImagePreprocessParametersListSet, visionflow::param::InferenceBatchSize, visionflow::param::InputImageParam, visionflow::param::IntegrationClassifyParameter, visionflow::param::LocationFilterParameters, visionflow::param::LocationTemplates, visionflow::param::LocationTrainingParameters, visionflow::param::OCRInferParameters, visionflow::param::OCRTemplates, visionflow::param::OCRTrainingParameters, visionflow::param::OCRUniversalModelParameters, visionflow::param::PolygonsFilterParameters, visionflow::param::PropertyObjectIdSet, visionflow::param::RegionCalculationParameter, visionflow::param::SampleRecommendationParameter, visionflow::param::SegmentationInferenceParameters, visionflow::param::SegmentationTrainingParameters, visionflow::param::TRTCalibParameters, visionflow::param::TrainingLog, visionflow::param::TrainingSetRecommendParameter, visionflow::param::UnsuperClassificationInferenceParameters, visionflow::param::UnsuperClassificationTrainingParameters, visionflow::param::UnsuperSegmentationInferenceParameters, visionflow::param::UnsuperSegmentationTrainingParameters, visionflow::param::VLMDetectionInferenceParameters, visionflow::param::VLMDetectionTrainingParameters, visionflow::param::VLMDetectionUniversalParameters, visionflow::param::ViewFilterParameters
Customize Parameters#
-
class BinaryPacks : public visionflow::param::IParameter#
Parameter to store list of binary data with name.
Public Functions
-
void insert(const std::string &key, const visionflow::Buffer &buffer)#
Insert a new binary data into the BinaryPacks. Old data with the same key will be replaced.
See also
See also
get(const std::string &key)
Note
The data in the buffer will not be copied, Which means that if you modify the data content in the Buffer later, the data in the inserted Buffer will also be modified. If this is not the behavior you expect, you can call visionflow::Buffer::clone_data() explicitly like below:
binary_packs.insert("my-data", buffer.clone_data());
- Parameters:
key – The key of the binary data.
buffer – The binary data.
-
void remove(const std::string &key)#
Remove binary data specified by the key. Do nothing if the key not found.
- Parameters:
key – The key of the binary data to be removed.
-
bool contains(const std::string &key) const#
Check if the binary data exists in the container.
- Parameters:
key – The key of the binary data
- Returns:
True if exists. Else false.
-
const visionflow::Buffer &get(const std::string &key) const#
Get the binary data specified by the key.
See also
insert(const std::string &key, const visionflow::Buffer &buffer) for more details.
Note
Do not modify the data in the buffer with out clone,
- Parameters:
key –
- Returns:
const visionflow::Buffer & The reference of the binary data.
-
std::vector<std::string> keys() const#
Get all keys in the BinaryPacks.
- Returns:
std::vector<std::string> The keys list.
-
void clear()#
Clear the container.
-
void insert(const std::string &key, const visionflow::Buffer &buffer)#
-
class TypeValuePair : public visionflow::param::ISchemable#
TypeValuePair Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::string &get_type() const#
Get The python type.
A string representing the type of the python object.
See also
- Returns:
const std::string & The python type
-
TypeValuePair &set_type(std::string type)#
Set The python type with std::string value.
A string representing the type of the python object.
See also
- Parameters:
type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TypeValuePair the reference of this object.
-
const std::string &get_value() const#
Get The python value.
A string representing the value of the python object.
See also
- Returns:
const std::string & The python value
-
TypeValuePair &set_value(std::string value)#
Set The python value with std::string value.
A string representing the value of the python object.
See also
- Parameters:
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TypeValuePair the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ObjectTypeValue#
Public Functions
-
ObjectTypeValue()#
Default constructor. Set type to “string” and value to “”.
-
const std::string &get_type() const#
Get The python type.
A string representing the type of the python object.
See also
- Returns:
const std::string & The python type
-
ObjectTypeValue &set_type(const std::string &type)#
Set The python type with std::string value.
A string representing the type of the python object.
See also
- Parameters:
type – the value to set. Should be one of “bool”, “number”, “string”
- Throws:
visionflow::excepts::InvalidArgument – if type is not one of “bool”, “number”, “string”.
- Returns:
ObjectTypeValue& the reference of this object.
-
const std::string &get_value() const#
Get The python value.
A string representing the value of the python object.
See also
- Returns:
const std::string & The python value
-
ObjectTypeValue &set_value(const std::string &value)#
Set The python value with std::string value.
A string representing the value of the python object.
See also
- Parameters:
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ObjectTypeValue& the reference of this object.
-
ObjectTypeValue()#
InputImage Parameters#
-
enum visionflow::param::ColorType#
Values:
-
enumerator kGray = 1#
-
enumerator kBGR = 3#
-
enumerator kGray = 1#
-
class BaseColor : public visionflow::param::SchemableParameter#
BaseColor Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ColorType &get_color() const#
Get Color Space.
Convert all images into Gray or BGR color space
See also
- Returns:
const ColorType & Color Space
-
BaseColor &set_color(ColorType color)#
Set Color Space with ColorType value.
Convert all images into Gray or BGR color space
See also
- Parameters:
color – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
BaseColor the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageMean : public visionflow::param::SchemableParameter#
ImageMean Parameter class generated by jinja2 automatically.
Image mean parameters
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<double> &get_values() const#
Get image mean.
image mean values ordered same as image channels
See also
- Returns:
const std::vector<double> & image mean
-
ImageMean &set_values(std::vector<double> values)#
Set image mean with std::vector<double> value.
image mean values ordered same as image channels
See also
- Parameters:
values – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageMean the reference of this object.
-
double get_values(size_t index) const#
Get value in image mean with index.
Warning
The index must be less than get_values_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
double value in image mean at index.
-
size_t get_values_size() const#
Get the size of image mean.
- Returns:
size_t the size of image mean
-
virtual const std::string &schema_str() const override#
-
class InputImageParam : public visionflow::param::SchemableParameter#
InputImageParam Parameter class generated by jinja2 automatically.
输入图像相关参数,用于控制工程的输入图像格式规范.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_visual_size() const#
Get Visual Image Size.
一个visionflow.Image允许包含的可视图象数量, 多数情况下, 使用默认值1即可。若需要将多张图像当作一张图像处理, 可以设置为大于1的值。
See also
- Returns:
int Visual Image Size
-
InputImageParam &set_visual_size(int visual_size)#
Set Visual Image Size with int value.
一个visionflow.Image允许包含的可视图象数量, 多数情况下, 使用默认值1即可。若需要将多张图像当作一张图像处理, 可以设置为大于1的值。
See also
- Parameters:
visual_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
InputImageParam the reference of this object.
-
int get_thumbnail_image_size() const#
Get Thumbnail Size.
The maximum size of the long side of the thumbnail, the longest side is 512 by default, the maximum can not exceed 512.
See also
- Returns:
int Thumbnail Size
-
InputImageParam &set_thumbnail_image_size(int thumbnail_image_size)#
Set Thumbnail Size with int value.
The maximum size of the long side of the thumbnail, the longest side is 512 by default, the maximum can not exceed 512.
See also
- Parameters:
thumbnail_image_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
InputImageParam the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class LabelClasses : public visionflow::param::IParameter#
LabelClasses is a parameter to manage label categories.
Public Functions
-
void add(const std::string &label_name)#
Add a label name into the label categories container.
- Parameters:
label_name – The label name to be added.
-
void remove(const std::string &label_name)#
Remove a label name from the label categories container.
- Parameters:
label_name – The label name to be removed.
-
size_t size() const#
Get the number of label categories.
- Returns:
The number of label categories.
-
inline bool empty() const#
Check if the container is empty.
- Returns:
bool True if the container is empty.
-
bool contains(const std::string &label_name) const#
Check if the label categories container contains the label name.
- Parameters:
label_name – The label name to be checked.
- Returns:
True if the label categories container contains the label name.
-
std::vector<std::string> get() const#
Get all label names in the label categories container as a vector.
- Returns:
std::vector<std::string> The label names in the label categories
-
void clear()#
Clear the label categories container.
-
void add(const std::string &label_name)#
EvaluationMetrics Parameters#
-
enum visionflow::param::MetricsEvaluationType#
Values:
-
enumerator kImage = 0#
evaluation metrics of all images.
-
enumerator kAllView = 1#
evaluation metrics of all views.
-
enumerator kTestView = 2#
evaluation metrics of all test set views.
-
enumerator kTrainView = 3#
evaluation metrics of all train set views.
-
enumerator kAllRegion = 4#
evaluation metrics of all regions.
-
enumerator kTestRegion = 5#
evaluation metrics of all test set regions.
-
enumerator kTrainRegion = 6#
evaluation metrics of all train set regions.
-
enumerator kAllPixel = 7#
evaluation metrics of all pixels.
-
enumerator kTestPixel = 8#
evaluation metrics of all test set pixels.
-
enumerator kTrainPixel = 9#
evaluation metrics of all train set pixels.
-
enumerator kImage = 0#
-
enum visionflow::param::PrecisionEvaluationType#
Values:
-
enumerator kAngle = 0#
Precision evaluation of angle.
-
enumerator kPosition = 1#
Precision evaluationfor of position.
-
enumerator kAngle = 0#
-
class Table#
Public Functions
-
size_t rows() const#
The number of rows.
- Returns:
size_t
-
size_t cols() const#
The number of columns.
- Returns:
size_t
-
const std::vector<std::string> &row_header() const#
Get the row header.
- Returns:
std::vector<std::string> The row header.
-
const std::vector<std::string> &col_header() const#
Get the column header.
- Returns:
std::vector<std::string> The column header.
-
std::vector<int> row_data(size_t row) const#
Get the data of one row.
- Parameters:
row – The index of rows.
- Throws:
excepts::DataNotFound – If no such the row.
- Returns:
std::vector<int> The data of one row.
-
std::vector<int> col_data(size_t col) const#
Get the data of one column.
- Parameters:
col – The index of columns.
- Throws:
excepts::DataNotFound – If no such the column.
- Returns:
std::vector<int> The data of one column.
-
int data(size_t row, size_t col) const#
Get the data of the specific position in the table.
- Parameters:
row – The index of rows.
col – The index of columns.
- Throws:
excepts::DataNotFound – If no such the row or column.
- Returns:
int
-
int &data(size_t row, size_t col)#
Get the reference of the data of the specific position in the table.
- Parameters:
row – The index of rows.
col – The index of columns.
- Throws:
excepts::DataNotFound – If no such the row or column.
- Returns:
NO_DISCARD&
-
Table &reset_header(const std::vector<std::string> &row_header, const std::vector<std::string> &col_header)#
Reset the header of the table.
Note
If no header is set at construction time,then the first task is to reset header. The number of rows and columns of this matrix will be initialized by the length of the row and column header. If the header has been set before, the reset header will clear the previous data, please be careful.
- Parameters:
row_header – The header of row.
col_header – The header of column.
- Returns:
-
Table &set_row_data(size_t row, const std::vector<int> &data)#
Set the data of one row.
- Parameters:
row – The index of rows.
data –
- Throws:
excepts::DataNotFound – If no such the row.
excepts::InvalidArgument – The data size does not meet the row number requirement of the table.
- Returns:
-
Table &set_col_data(size_t col, const std::vector<int> &data)#
Set the data of one column.
- Parameters:
col – The index of columns.
data –
- Throws:
excepts::DataNotFound – If no such the column.
excepts::InvalidArgument – The data size does not meet the column number requirement of the table.
- Returns:
-
Table &set_data(size_t row, size_t col, int data)#
Set the data of the specific position in the table.
- Parameters:
row – The index of rows.
col – The index of columns.
data –
- Throws:
excepts::DataNotFound – If no such the row or column.
- Returns:
-
size_t rows() const#
-
class DataMetrics#
Public Functions
-
float maximum() const#
Get the maximum.
- Returns:
NO_DISCARD
-
float minimum() const#
Get the minimum.
- Returns:
NO_DISCARD
-
float average() const#
Get the average.
- Returns:
NO_DISCARD
-
float standard_deviation() const#
Get the standard deviation.
- Returns:
NO_DISCARD
-
DataMetrics &set_maximum(float value)#
Set the maximum.
- Parameters:
value –
- Returns:
-
DataMetrics &set_minimum(float value)#
Set the minimum.
- Parameters:
value –
- Returns:
-
DataMetrics &set_average(float value)#
Set the average.
- Parameters:
value –
- Returns:
-
DataMetrics &set_standard_deviation(float value)#
Set the standard deviation.
- Parameters:
value –
- Returns:
-
float maximum() const#
-
class AveragePrecision#
Public Functions
-
AveragePrecision &set_average_precision(const std::string &key, float average_precision)#
Set the specified average precision.
- Parameters:
key –
average_precision –
-
float average_precision(const std::string &key) const#
Get the specified average precision.
- Parameters:
key –
- Returns:
NO_DISCARD
-
float mean_average_precision() const#
Get the mean average precision.
- Returns:
NO_DISCARD
-
std::vector<std::string> keys() const#
Get the keys.
- Returns:
NO_DISCARD const&
-
float precision() const#
Get the precision.
Note
Returns -1, if there is no precision property.
- Returns:
NO_DISCARD
-
float recall() const#
Get the recall.
Note
Returns -1, if there is no recall property.
- Returns:
NO_DISCARD
-
AveragePrecision &set_precision(float precision)#
Set the precision.
- Parameters:
precision –
- Returns:
-
AveragePrecision &set_recall(float recall)#
Set the recall.
- Parameters:
recall –
- Returns:
-
AveragePrecision &set_average_precision(const std::string &key, float average_precision)#
-
struct IPrecisionEvaluation : public virtual visionflow::param::IParameter#
IPrecisionEvaluation feature interface for IParameter classes.
Subclassed by visionflow::param::LocationModelEvaluationMetrics
Public Functions
-
virtual std::set<PrecisionEvaluationType> precision_evaluation_keys() const = 0#
Get the types of precision evaluation in this map.
- Returns:
std::set<PrecisionEvaluationType>
-
virtual const DataMetrics &precision_evaluation(PrecisionEvaluationType type) const = 0#
Get the precision evaluation with the type.
- Parameters:
type –
- Returns:
NO_DISCARD
-
virtual DataMetrics &precision_evaluation(PrecisionEvaluationType type) = 0#
Get the reference precision evaluation with the type.
- Parameters:
type –
- Returns:
NO_DISCARD
-
virtual IPrecisionEvaluation &set_precision_evaluation(PrecisionEvaluationType type, const DataMetrics &data_metrics) = 0#
Set the precision evaluation with the type.
- Parameters:
type –
data_metrics –
- Returns:
-
virtual std::set<PrecisionEvaluationType> precision_evaluation_keys() const = 0#
-
struct ITableList : public virtual visionflow::param::IParameter#
ITableList feature interface for IParameter classes.
Subclassed by visionflow::param::LocationModelEvaluationMetrics, visionflow::param::ModelEvaluationMetrics
Public Functions
-
virtual std::vector<MetricsEvaluationType> table_keys() const = 0#
Get the types of table in this map.
- Returns:
std::vector<MetricsEvaluationType>
-
virtual const Table &table(MetricsEvaluationType type) const = 0#
Get the table with the type.
- Parameters:
type –
- Returns:
NO_DISCARD
-
virtual Table &table(MetricsEvaluationType type) = 0#
Get the reference table with the type.
- Parameters:
type –
- Returns:
NO_DISCARD
-
virtual ITableList &set_table(MetricsEvaluationType type, const Table &table) = 0#
Set the table.
- Parameters:
type –
table –
- Returns:
-
virtual std::vector<MetricsEvaluationType> table_keys() const = 0#
-
struct IAveragePrecisionList : public virtual visionflow::param::IParameter#
IAveragePrecisionList feature interface for IParameter classes.
Subclassed by visionflow::param::LocationModelEvaluationMetrics, visionflow::param::ModelEvaluationMetrics
Public Functions
-
virtual std::vector<MetricsEvaluationType> average_precision_keys() const = 0#
Get the types of average_precision in this map.
- Returns:
std::vector<MetricsEvaluationType>
-
virtual const AveragePrecision &average_precision(MetricsEvaluationType type) const = 0#
Get the average precision with the type.
- Parameters:
type –
- Returns:
NO_DISCARD
-
virtual AveragePrecision &average_precision(MetricsEvaluationType type) = 0#
Get the reference average precision with the type.
- Parameters:
type –
- Returns:
NO_DISCARD
-
virtual IAveragePrecisionList &set_average_precision(MetricsEvaluationType type, const AveragePrecision &average_precision) = 0#
Set the average precision.
- Parameters:
type –
average_precision –
- Returns:
-
virtual std::vector<MetricsEvaluationType> average_precision_keys() const = 0#
-
class ModelEvaluationMetrics : public virtual visionflow::param::ITableList, public virtual visionflow::param::IAveragePrecisionList#
Public Functions
-
virtual std::vector<MetricsEvaluationType> table_keys() const override#
Get the types of table in this map.
- Returns:
std::vector<MetricsEvaluationType>
-
virtual const Table &table(MetricsEvaluationType type) const override#
Get the table with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The table with the type does not exist.
- Returns:
NO_DISCARD
-
virtual Table &table(MetricsEvaluationType type) override#
Get the reference table with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The table with the type does not exist.
- Returns:
NO_DISCARD
-
virtual ModelEvaluationMetrics &set_table(MetricsEvaluationType type, const Table &table) override#
Set the table.
- Parameters:
type –
table –
- Returns:
-
virtual std::vector<MetricsEvaluationType> average_precision_keys() const override#
Get the types of average_precision in this map.
- Returns:
std::vector<MetricsEvaluationType>
-
virtual const AveragePrecision &average_precision(MetricsEvaluationType type) const override#
Get the average precision with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The average precision with the type does not exist.
- Returns:
NO_DISCARD
-
virtual AveragePrecision &average_precision(MetricsEvaluationType type) override#
Get the reference average precision with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The average precision with the type does not exist.
- Returns:
NO_DISCARD
-
virtual ModelEvaluationMetrics &set_average_precision(MetricsEvaluationType type, const AveragePrecision &average_precision) override#
Set the average precision.
- Parameters:
type –
average_precision –
- Returns:
-
virtual std::vector<MetricsEvaluationType> table_keys() const override#
-
class LocationModelEvaluationMetrics : public virtual visionflow::param::ITableList, public virtual visionflow::param::IPrecisionEvaluation, public virtual visionflow::param::IAveragePrecisionList#
Public Functions
-
virtual std::vector<MetricsEvaluationType> table_keys() const override#
Get the types of table in this map.
- Returns:
std::vector<MetricsEvaluationType>
-
virtual const Table &table(MetricsEvaluationType type) const override#
Get the table with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The table with the type does not exist.
- Returns:
NO_DISCARD
-
virtual Table &table(MetricsEvaluationType type) override#
Get the reference table with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The table with the type does not exist.
- Returns:
NO_DISCARD
-
virtual LocationModelEvaluationMetrics &set_table(MetricsEvaluationType type, const Table &table) override#
Set the table.
- Parameters:
type –
table –
- Returns:
-
virtual std::set<PrecisionEvaluationType> precision_evaluation_keys() const override#
Get the types of precision evaluation in this map.
- Returns:
std::set<PrecisionEvaluationType>
-
virtual const DataMetrics &precision_evaluation(PrecisionEvaluationType type) const override#
Get the precision evaluation with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The precision evaluation with the type does not exist.
- Returns:
NO_DISCARD
-
virtual DataMetrics &precision_evaluation(PrecisionEvaluationType type) override#
Get the reference precision evaluation with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The precision evaluation with the type does not exist.
- Returns:
NO_DISCARD
-
virtual LocationModelEvaluationMetrics &set_precision_evaluation(PrecisionEvaluationType type, const DataMetrics &data_metrics) override#
Set the precision evaluation with the type.
- Parameters:
type –
data_metrics –
- Returns:
-
virtual std::vector<MetricsEvaluationType> average_precision_keys() const override#
Get the types of average_precision in this map.
- Returns:
std::vector<MetricsEvaluationType>
-
virtual const AveragePrecision &average_precision(MetricsEvaluationType type) const override#
Get the average precision with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The average precision with the type does not exist.
- Returns:
NO_DISCARD
-
virtual AveragePrecision &average_precision(MetricsEvaluationType type) override#
Get the reference average precision with the type.
- Parameters:
type –
- Throws:
excepts::DataNotFound – The average precision with the type does not exist.
- Returns:
NO_DISCARD
-
virtual LocationModelEvaluationMetrics &set_average_precision(MetricsEvaluationType type, const AveragePrecision &average_precision) override#
Set the average precision.
- Parameters:
type –
average_precision –
- Returns:
-
virtual std::vector<MetricsEvaluationType> table_keys() const override#
-
class ModelHealth : public visionflow::param::IParameter#
Model health.
DataAugmentation Parameters#
-
class GeoAugSlightRotation : public visionflow::param::ISchemable#
GeoAugSlightRotation Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
GeoAugSlightRotation &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugSlightRotation the reference of this object.
-
const std::vector<double> &get_range() const#
Get Angle Range.
Slight rotation angle range (min, max)
See also
- Returns:
const std::vector<double> & Angle Range
-
GeoAugSlightRotation &set_range(std::vector<double> range)#
Set Angle Range with std::vector<double> value.
Slight rotation angle range (min, max)
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugSlightRotation the reference of this object.
-
bool range_contains(double value) const#
Check if the Angle Range contains the value.
- Returns:
bool true if the Angle Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Angle Range.
See also
- Returns:
const std::vector<double> & left point value of Angle Range
-
double get_range_right() const#
Get the right point value of Angle Range.
See also
- Returns:
const std::vector<double> & the right point value of Angle Range
-
GeoAugSlightRotation &set_range_left(double range_left)#
Set left point value of Angle Range with std::vector<double> value.
Slight rotation angle range (min, max)
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugSlightRotation the reference of this object.
-
GeoAugSlightRotation &set_range_right(double range_right)#
Set the right point value of Angle Range with std::vector<double> value.
Slight rotation angle range (min, max)
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugSlightRotation the reference of this object.
-
int get_step() const#
Get Angle Step.
Slight rotation angle step
See also
- Returns:
int Angle Step
-
GeoAugSlightRotation &set_step(int step)#
Set Angle Step with int value.
Slight rotation angle step
See also
- Parameters:
step – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugSlightRotation the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class GeoAugShift : public visionflow::param::ISchemable#
GeoAugShift Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
GeoAugShift &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugShift the reference of this object.
-
double get_shift_vertical() const#
Get Vertical Shift.
Vertical shift
See also
- Returns:
double Vertical Shift
-
GeoAugShift &set_shift_vertical(double shift_vertical)#
Set Vertical Shift with double value.
Vertical shift
See also
- Parameters:
shift_vertical – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugShift the reference of this object.
-
double get_shift_horizontal() const#
Get Horizontal Shift.
Horizontal shift
See also
- Returns:
double Horizontal Shift
-
GeoAugShift &set_shift_horizontal(double shift_horizontal)#
Set Horizontal Shift with double value.
Horizontal shift
See also
- Parameters:
shift_horizontal – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugShift the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class GeoAugScale : public visionflow::param::ISchemable#
GeoAugScale Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
GeoAugScale &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugScale the reference of this object.
-
const std::vector<double> &get_range() const#
Get Scale Range.
Scale range (min, max)
See also
- Returns:
const std::vector<double> & Scale Range
-
GeoAugScale &set_range(std::vector<double> range)#
Set Scale Range with std::vector<double> value.
Scale range (min, max)
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugScale the reference of this object.
-
bool range_contains(double value) const#
Check if the Scale Range contains the value.
- Returns:
bool true if the Scale Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Scale Range.
See also
- Returns:
const std::vector<double> & left point value of Scale Range
-
double get_range_right() const#
Get the right point value of Scale Range.
See also
- Returns:
const std::vector<double> & the right point value of Scale Range
-
GeoAugScale &set_range_left(double range_left)#
Set left point value of Scale Range with std::vector<double> value.
Scale range (min, max)
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugScale the reference of this object.
-
GeoAugScale &set_range_right(double range_right)#
Set the right point value of Scale Range with std::vector<double> value.
Scale range (min, max)
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugScale the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class CategoryAreaAugment : public visionflow::param::ISchemable#
CategoryAreaAugment Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
CategoryAreaAugment &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
CategoryAreaAugment the reference of this object.
-
const std::vector<double> &get_range() const#
Get Label Augment Scale Range.
Label will be scale according to range
See also
- Returns:
const std::vector<double> & Label Augment Scale Range
-
CategoryAreaAugment &set_range(std::vector<double> range)#
Set Label Augment Scale Range with std::vector<double> value.
Label will be scale according to range
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
CategoryAreaAugment the reference of this object.
-
bool range_contains(double value) const#
Check if the Label Augment Scale Range contains the value.
- Returns:
bool true if the Label Augment Scale Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Label Augment Scale Range.
See also
- Returns:
const std::vector<double> & left point value of Label Augment Scale Range
-
double get_range_right() const#
Get the right point value of Label Augment Scale Range.
See also
- Returns:
const std::vector<double> & the right point value of Label Augment Scale Range
-
CategoryAreaAugment &set_range_left(double range_left)#
Set left point value of Label Augment Scale Range with std::vector<double> value.
Label will be scale according to range
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
CategoryAreaAugment the reference of this object.
-
CategoryAreaAugment &set_range_right(double range_right)#
Set the right point value of Label Augment Scale Range with std::vector<double> value.
Label will be scale according to range
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
CategoryAreaAugment the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class GeoAugDistortion : public visionflow::param::ISchemable#
GeoAugDistortion Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
GeoAugDistortion &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugDistortion the reference of this object.
-
const std::vector<double> &get_range() const#
Get Distortion Strength Range.
Distortion Strength range, From 0 to 2, the distortion effect gradually increases
See also
- Returns:
const std::vector<double> & Distortion Strength Range
-
GeoAugDistortion &set_range(std::vector<double> range)#
Set Distortion Strength Range with std::vector<double> value.
Distortion Strength range, From 0 to 2, the distortion effect gradually increases
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugDistortion the reference of this object.
-
bool range_contains(double value) const#
Check if the Distortion Strength Range contains the value.
- Returns:
bool true if the Distortion Strength Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Distortion Strength Range.
See also
- Returns:
const std::vector<double> & left point value of Distortion Strength Range
-
double get_range_right() const#
Get the right point value of Distortion Strength Range.
See also
- Returns:
const std::vector<double> & the right point value of Distortion Strength Range
-
GeoAugDistortion &set_range_left(double range_left)#
Set left point value of Distortion Strength Range with std::vector<double> value.
Distortion Strength range, From 0 to 2, the distortion effect gradually increases
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugDistortion the reference of this object.
-
GeoAugDistortion &set_range_right(double range_right)#
Set the right point value of Distortion Strength Range with std::vector<double> value.
Distortion Strength range, From 0 to 2, the distortion effect gradually increases
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeoAugDistortion the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class GeometryAugmentation : public visionflow::param::ISchemable#
GeometryAugmentation Parameter class generated by jinja2 automatically.
Geometry augmentation parameters
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_flip_vertical() const#
Get Vertical Flip.
Flip training images vertically randomly with a probability of 0.5
See also
- Returns:
bool Vertical Flip
-
GeometryAugmentation &set_flip_vertical(bool flip_vertical)#
Set Vertical Flip with bool value.
Flip training images vertically randomly with a probability of 0.5
See also
- Parameters:
flip_vertical – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
bool get_flip_horizontal() const#
Get Horizontal Flip.
Flip training images horizontally randomly with a probability of 0.5
See also
- Returns:
bool Horizontal Flip
-
GeometryAugmentation &set_flip_horizontal(bool flip_horizontal)#
Set Horizontal Flip with bool value.
Flip training images horizontally randomly with a probability of 0.5
See also
- Parameters:
flip_horizontal – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
bool get_rotate_90() const#
Get Vertical Rotation.
Rotate the training image by a multiple of 90 degrees at random
See also
- Returns:
bool Vertical Rotation
-
GeometryAugmentation &set_rotate_90(bool rotate_90)#
Set Vertical Rotation with bool value.
Rotate the training image by a multiple of 90 degrees at random
See also
- Parameters:
rotate_90 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
bool get_rotate_180() const#
Get Centrosymmetric Rotation.
Rotate the training image by a multiple of 180 degrees at random
See also
- Returns:
bool Centrosymmetric Rotation
-
GeometryAugmentation &set_rotate_180(bool rotate_180)#
Set Centrosymmetric Rotation with bool value.
Rotate the training image by a multiple of 180 degrees at random
See also
- Parameters:
rotate_180 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
const GeoAugSlightRotation &get_slight_rotate() const#
Get Slight Rotation.
Randomly rotate the training data slightly in a certain angle range
See also
- Returns:
const GeoAugSlightRotation & Slight Rotation
-
GeometryAugmentation &set_slight_rotate(GeoAugSlightRotation slight_rotate)#
Set Slight Rotation with GeoAugSlightRotation value.
Randomly rotate the training data slightly in a certain angle range
See also
- Parameters:
slight_rotate – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
GeoAugSlightRotation &get_slight_rotate()#
Get mutable reference of Slight Rotation.
Randomly rotate the training data slightly in a certain angle range
- Returns:
GeometryAugmentation& the mutable reference of the group.
-
const GeoAugShift &get_shift() const#
Get Shift.
Randomly shift the training data horizontally and vertically by a certain proportion
See also
- Returns:
const GeoAugShift & Shift
-
GeometryAugmentation &set_shift(GeoAugShift shift)#
Set Shift with GeoAugShift value.
Randomly shift the training data horizontally and vertically by a certain proportion
See also
- Parameters:
shift – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
GeoAugShift &get_shift()#
Get mutable reference of Shift.
Randomly shift the training data horizontally and vertically by a certain proportion
- Returns:
GeometryAugmentation& the mutable reference of the group.
-
const GeoAugScale &get_scale() const#
Get Scale.
Randomly scale the training data by a certain proportion
See also
- Returns:
const GeoAugScale & Scale
-
GeometryAugmentation &set_scale(GeoAugScale scale)#
Set Scale with GeoAugScale value.
Randomly scale the training data by a certain proportion
See also
- Parameters:
scale – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
GeoAugScale &get_scale()#
Get mutable reference of Scale.
Randomly scale the training data by a certain proportion
- Returns:
GeometryAugmentation& the mutable reference of the group.
-
const GeoAugDistortion &get_distortion() const#
Get Distortion.
Randomly distort the training data to simulate image distortion caused by factors such as lens aging.
See also
- Returns:
const GeoAugDistortion & Distortion
-
GeometryAugmentation &set_distortion(GeoAugDistortion distortion)#
Set Distortion with GeoAugDistortion value.
Randomly distort the training data to simulate image distortion caused by factors such as lens aging.
See also
- Parameters:
distortion – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
GeoAugDistortion &get_distortion()#
Get mutable reference of Distortion.
Randomly distort the training data to simulate image distortion caused by factors such as lens aging.
- Returns:
GeometryAugmentation& the mutable reference of the group.
-
bool get_crop() const#
Get Crop Overflow Area.
Crop out spill areas caused by geometric transformations (translation, rotation) to keep the image size unchanged
See also
- Returns:
bool Crop Overflow Area
-
GeometryAugmentation &set_crop(bool crop)#
Set Crop Overflow Area with bool value.
Crop out spill areas caused by geometric transformations (translation, rotation) to keep the image size unchanged
See also
- Parameters:
crop – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometryAugmentation the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class LabeledGeometryAugmentation : public visionflow::param::ISchemable#
LabeledGeometryAugmentation Parameter class generated by jinja2 automatically.
Defect geometry augmentation parameters
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::map<std::string, CategoryAreaAugment> &get_scale() const#
Get LabeledScale.
There is an area difference between the target defect and the training set But no obviously texture difference.
See also
- Returns:
const std::map<std::string, CategoryAreaAugment> & LabeledScale
-
LabeledGeometryAugmentation &set_scale(std::map<std::string, CategoryAreaAugment> scale)#
Set LabeledScale with std::map<std::string, CategoryAreaAugment> value.
There is an area difference between the target defect and the training set But no obviously texture difference.
See also
- Parameters:
scale – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LabeledGeometryAugmentation the reference of this object.
-
const CategoryAreaAugment &get_scale(const std::string &key) const#
Get value in LabeledScale with key.
Warning
The key must be exist in LabeledScale. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, CategoryAreaAugment> & value in LabeledScale at key.
-
LabeledGeometryAugmentation &set_scale(const std::string &key, CategoryAreaAugment value)#
Set value in LabeledScale with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LabeledGeometryAugmentation the reference of this object.
-
bool scale_contains(const std::string &key) const#
Check if the key is exist in LabeledScale.
- Returns:
bool true if the key is exist in LabeledScale, otherwise false.
-
size_t get_scale_size() const#
Get the size of LabeledScale.
- Returns:
size_t the size of LabeledScale
-
CategoryAreaAugment &get_scale(const std::string &key)#
Get mutable reference of value in LabeledScale with key. A new key and default value will be created if the key does not exist.
- Returns:
CategoryAreaAugment& the mutable reference of value in LabeledScale at key.
-
virtual const std::string &schema_str() const override#
-
class DefectSimulation : public visionflow::param::ISchemable#
DefectSimulation Parameter class generated by jinja2 automatically.
Defect simulation parameters
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_scale_enable() const#
Get Defect Scale Simulation.
Scale the defect to possible sizes to accommodate changes in defect size
See also
- Returns:
bool Defect Scale Simulation
-
DefectSimulation &set_scale_enable(bool scale_enable)#
Set Defect Scale Simulation with bool value.
Scale the defect to possible sizes to accommodate changes in defect size
See also
- Parameters:
scale_enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DefectSimulation the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageAugBrightness : public visionflow::param::ISchemable#
ImageAugBrightness Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ImageAugBrightness &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugBrightness the reference of this object.
-
const std::vector<double> &get_range() const#
Get Brightness Range.
The illumination intensity range 0~1 for reduction, and 1~2 for enhancement.
See also
- Returns:
const std::vector<double> & Brightness Range
-
ImageAugBrightness &set_range(std::vector<double> range)#
Set Brightness Range with std::vector<double> value.
The illumination intensity range 0~1 for reduction, and 1~2 for enhancement.
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugBrightness the reference of this object.
-
bool range_contains(double value) const#
Check if the Brightness Range contains the value.
- Returns:
bool true if the Brightness Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Brightness Range.
See also
- Returns:
const std::vector<double> & left point value of Brightness Range
-
double get_range_right() const#
Get the right point value of Brightness Range.
See also
- Returns:
const std::vector<double> & the right point value of Brightness Range
-
ImageAugBrightness &set_range_left(double range_left)#
Set left point value of Brightness Range with std::vector<double> value.
The illumination intensity range 0~1 for reduction, and 1~2 for enhancement.
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugBrightness the reference of this object.
-
ImageAugBrightness &set_range_right(double range_right)#
Set the right point value of Brightness Range with std::vector<double> value.
The illumination intensity range 0~1 for reduction, and 1~2 for enhancement.
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugBrightness the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageAugContrast : public visionflow::param::ISchemable#
ImageAugContrast Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ImageAugContrast &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugContrast the reference of this object.
-
const std::vector<double> &get_range() const#
Get Contrast Range.
The contrast range 0~1 for reduction, and 1~2 for enhancement.
See also
- Returns:
const std::vector<double> & Contrast Range
-
ImageAugContrast &set_range(std::vector<double> range)#
Set Contrast Range with std::vector<double> value.
The contrast range 0~1 for reduction, and 1~2 for enhancement.
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugContrast the reference of this object.
-
bool range_contains(double value) const#
Check if the Contrast Range contains the value.
- Returns:
bool true if the Contrast Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Contrast Range.
See also
- Returns:
const std::vector<double> & left point value of Contrast Range
-
double get_range_right() const#
Get the right point value of Contrast Range.
See also
- Returns:
const std::vector<double> & the right point value of Contrast Range
-
ImageAugContrast &set_range_left(double range_left)#
Set left point value of Contrast Range with std::vector<double> value.
The contrast range 0~1 for reduction, and 1~2 for enhancement.
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugContrast the reference of this object.
-
ImageAugContrast &set_range_right(double range_right)#
Set the right point value of Contrast Range with std::vector<double> value.
The contrast range 0~1 for reduction, and 1~2 for enhancement.
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugContrast the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageAugColorFilter : public visionflow::param::ISchemable#
ImageAugColorFilter Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ImageAugColorFilter &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugColorFilter the reference of this object.
-
const std::vector<double> &get_range() const#
Get Color Filter Range.
Color Filter Range 0~2 from low to high.
See also
- Returns:
const std::vector<double> & Color Filter Range
-
ImageAugColorFilter &set_range(std::vector<double> range)#
Set Color Filter Range with std::vector<double> value.
Color Filter Range 0~2 from low to high.
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugColorFilter the reference of this object.
-
bool range_contains(double value) const#
Check if the Color Filter Range contains the value.
- Returns:
bool true if the Color Filter Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Color Filter Range.
See also
- Returns:
const std::vector<double> & left point value of Color Filter Range
-
double get_range_right() const#
Get the right point value of Color Filter Range.
See also
- Returns:
const std::vector<double> & the right point value of Color Filter Range
-
ImageAugColorFilter &set_range_left(double range_left)#
Set left point value of Color Filter Range with std::vector<double> value.
Color Filter Range 0~2 from low to high.
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugColorFilter the reference of this object.
-
ImageAugColorFilter &set_range_right(double range_right)#
Set the right point value of Color Filter Range with std::vector<double> value.
Color Filter Range 0~2 from low to high.
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugColorFilter the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageAugNoise : public visionflow::param::ISchemable#
ImageAugNoise Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ImageAugNoise &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugNoise the reference of this object.
-
const std::vector<double> &get_range() const#
Get Noise Range.
Noise Range 0~2 from low to high.
See also
- Returns:
const std::vector<double> & Noise Range
-
ImageAugNoise &set_range(std::vector<double> range)#
Set Noise Range with std::vector<double> value.
Noise Range 0~2 from low to high.
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugNoise the reference of this object.
-
bool range_contains(double value) const#
Check if the Noise Range contains the value.
- Returns:
bool true if the Noise Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Noise Range.
See also
- Returns:
const std::vector<double> & left point value of Noise Range
-
double get_range_right() const#
Get the right point value of Noise Range.
See also
- Returns:
const std::vector<double> & the right point value of Noise Range
-
ImageAugNoise &set_range_left(double range_left)#
Set left point value of Noise Range with std::vector<double> value.
Noise Range 0~2 from low to high.
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugNoise the reference of this object.
-
ImageAugNoise &set_range_right(double range_right)#
Set the right point value of Noise Range with std::vector<double> value.
Noise Range 0~2 from low to high.
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugNoise the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageAugIlluminationGradient : public visionflow::param::ISchemable#
ImageAugIlluminationGradient Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ImageAugIlluminationGradient &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugIlluminationGradient the reference of this object.
-
const std::vector<double> &get_range() const#
Get Illumination Gradient Range.
Illumination Gradient Range 0~2 from low to high.
See also
- Returns:
const std::vector<double> & Illumination Gradient Range
-
ImageAugIlluminationGradient &set_range(std::vector<double> range)#
Set Illumination Gradient Range with std::vector<double> value.
Illumination Gradient Range 0~2 from low to high.
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugIlluminationGradient the reference of this object.
-
bool range_contains(double value) const#
Check if the Illumination Gradient Range contains the value.
- Returns:
bool true if the Illumination Gradient Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Illumination Gradient Range.
See also
- Returns:
const std::vector<double> & left point value of Illumination Gradient Range
-
double get_range_right() const#
Get the right point value of Illumination Gradient Range.
See also
- Returns:
const std::vector<double> & the right point value of Illumination Gradient Range
-
ImageAugIlluminationGradient &set_range_left(double range_left)#
Set left point value of Illumination Gradient Range with std::vector<double> value.
Illumination Gradient Range 0~2 from low to high.
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugIlluminationGradient the reference of this object.
-
ImageAugIlluminationGradient &set_range_right(double range_right)#
Set the right point value of Illumination Gradient Range with std::vector<double> value.
Illumination Gradient Range 0~2 from low to high.
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugIlluminationGradient the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageAugSmoothingOrSharpening : public visionflow::param::ISchemable#
ImageAugSmoothingOrSharpening Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ImageAugSmoothingOrSharpening &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugSmoothingOrSharpening the reference of this object.
-
const std::vector<double> &get_range() const#
Get Smoothing/Sharpening Range.
Randomly smooth or sharpen training images, where -1 to 0 indicates smoothing and 0 to 1 indicates sharpening.
See also
- Returns:
const std::vector<double> & Smoothing/Sharpening Range
-
ImageAugSmoothingOrSharpening &set_range(std::vector<double> range)#
Set Smoothing/Sharpening Range with std::vector<double> value.
Randomly smooth or sharpen training images, where -1 to 0 indicates smoothing and 0 to 1 indicates sharpening.
See also
- Parameters:
range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugSmoothingOrSharpening the reference of this object.
-
bool range_contains(double value) const#
Check if the Smoothing/Sharpening Range contains the value.
- Returns:
bool true if the Smoothing/Sharpening Range contains the value, otherwise false.
-
double get_range_left() const#
Get left point value of Smoothing/Sharpening Range.
See also
- Returns:
const std::vector<double> & left point value of Smoothing/Sharpening Range
-
double get_range_right() const#
Get the right point value of Smoothing/Sharpening Range.
See also
- Returns:
const std::vector<double> & the right point value of Smoothing/Sharpening Range
-
ImageAugSmoothingOrSharpening &set_range_left(double range_left)#
Set left point value of Smoothing/Sharpening Range with std::vector<double> value.
Randomly smooth or sharpen training images, where -1 to 0 indicates smoothing and 0 to 1 indicates sharpening.
See also
- Parameters:
range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugSmoothingOrSharpening the reference of this object.
-
ImageAugSmoothingOrSharpening &set_range_right(double range_right)#
Set the right point value of Smoothing/Sharpening Range with std::vector<double> value.
Randomly smooth or sharpen training images, where -1 to 0 indicates smoothing and 0 to 1 indicates sharpening.
See also
- Parameters:
range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugSmoothingOrSharpening the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImageAugmentation : public visionflow::param::ISchemable#
ImageAugmentation Parameter class generated by jinja2 automatically.
Image Augmentation Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImageAugBrightness &get_brightness() const#
Get Illumination Augmentation.
Augmenting training data with linear gray scale transformations
See also
- Returns:
const ImageAugBrightness & Illumination Augmentation
-
ImageAugmentation &set_brightness(ImageAugBrightness brightness)#
Set Illumination Augmentation with ImageAugBrightness value.
Augmenting training data with linear gray scale transformations
See also
- Parameters:
brightness – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugmentation the reference of this object.
-
ImageAugBrightness &get_brightness()#
Get mutable reference of Illumination Augmentation.
Augmenting training data with linear gray scale transformations
- Returns:
ImageAugmentation& the mutable reference of the group.
-
const ImageAugContrast &get_contrast() const#
Get Contrast Augmentation.
Augmenting training data by adjusting the contrast of the image while keeping the overall brightness of the image essentially unchanged to simulate the effect of different lighting conditions with different contrast.
See also
- Returns:
const ImageAugContrast & Contrast Augmentation
-
ImageAugmentation &set_contrast(ImageAugContrast contrast)#
Set Contrast Augmentation with ImageAugContrast value.
Augmenting training data by adjusting the contrast of the image while keeping the overall brightness of the image essentially unchanged to simulate the effect of different lighting conditions with different contrast.
See also
- Parameters:
contrast – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugmentation the reference of this object.
-
ImageAugContrast &get_contrast()#
Get mutable reference of Contrast Augmentation.
Augmenting training data by adjusting the contrast of the image while keeping the overall brightness of the image essentially unchanged to simulate the effect of different lighting conditions with different contrast.
- Returns:
ImageAugmentation& the mutable reference of the group.
-
const ImageAugNoise &get_noise() const#
Get Noise Augmentation.
Augmenting training data with adding gaussian noise to the image to simulate random noise generated by the camera or external environment.
See also
- Returns:
const ImageAugNoise & Noise Augmentation
-
ImageAugmentation &set_noise(ImageAugNoise noise)#
Set Noise Augmentation with ImageAugNoise value.
Augmenting training data with adding gaussian noise to the image to simulate random noise generated by the camera or external environment.
See also
- Parameters:
noise – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugmentation the reference of this object.
-
ImageAugNoise &get_noise()#
Get mutable reference of Noise Augmentation.
Augmenting training data with adding gaussian noise to the image to simulate random noise generated by the camera or external environment.
- Returns:
ImageAugmentation& the mutable reference of the group.
-
const ImageAugSmoothingOrSharpening &get_blur() const#
Get Smoothing/Sharpening.
Simulate scenes with inaccurate lens focus by smoothing or sharpening the image
See also
- Returns:
const ImageAugSmoothingOrSharpening & Smoothing/Sharpening
-
ImageAugmentation &set_blur(ImageAugSmoothingOrSharpening blur)#
Set Smoothing/Sharpening with ImageAugSmoothingOrSharpening value.
Simulate scenes with inaccurate lens focus by smoothing or sharpening the image
See also
- Parameters:
blur – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugmentation the reference of this object.
-
ImageAugSmoothingOrSharpening &get_blur()#
Get mutable reference of Smoothing/Sharpening.
Simulate scenes with inaccurate lens focus by smoothing or sharpening the image
- Returns:
ImageAugmentation& the mutable reference of the group.
-
const ImageAugColorFilter &get_color_filter() const#
Get Color Filter.
Simulate the different colors lighting effects by adding filters (only color images are supported), the color filter intensity controls the max intensity of the allowed color filters.
See also
- Returns:
const ImageAugColorFilter & Color Filter
-
ImageAugmentation &set_color_filter(ImageAugColorFilter color_filter)#
Set Color Filter with ImageAugColorFilter value.
Simulate the different colors lighting effects by adding filters (only color images are supported), the color filter intensity controls the max intensity of the allowed color filters.
See also
- Parameters:
color_filter – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugmentation the reference of this object.
-
ImageAugColorFilter &get_color_filter()#
Get mutable reference of Color Filter.
Simulate the different colors lighting effects by adding filters (only color images are supported), the color filter intensity controls the max intensity of the allowed color filters.
- Returns:
ImageAugmentation& the mutable reference of the group.
-
const ImageAugIlluminationGradient &get_illumination_gradient() const#
Get Illumination Gradient.
Simulate the illumination intensity changing gradient caused by the shift of the light position.
See also
- Returns:
const ImageAugIlluminationGradient & Illumination Gradient
-
ImageAugmentation &set_illumination_gradient(ImageAugIlluminationGradient illumination_gradient)#
Set Illumination Gradient with ImageAugIlluminationGradient value.
Simulate the illumination intensity changing gradient caused by the shift of the light position.
See also
- Parameters:
illumination_gradient – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImageAugmentation the reference of this object.
-
ImageAugIlluminationGradient &get_illumination_gradient()#
Get mutable reference of Illumination Gradient.
Simulate the illumination intensity changing gradient caused by the shift of the light position.
- Returns:
ImageAugmentation& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class DataAugmentation : public visionflow::param::ISchemable#
DataAugmentation Parameter class generated by jinja2 automatically.
Data Augmentation Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const GeometryAugmentation &get_geometry_augmentation() const#
Get Geometry Augmentation.
Geometry augmentation parameters. Enable the type of geometric changes that may exist in the real-world scenarios, by randomly geometrically augmenting the original training dataset to simulate that similar pictures may appear in the real-world scenarios, the corresponding generalization ability of the model can be improved.
See also
- Returns:
const GeometryAugmentation & Geometry Augmentation
-
DataAugmentation &set_geometry_augmentation(GeometryAugmentation geometry_augmentation)#
Set Geometry Augmentation with GeometryAugmentation value.
Geometry augmentation parameters. Enable the type of geometric changes that may exist in the real-world scenarios, by randomly geometrically augmenting the original training dataset to simulate that similar pictures may appear in the real-world scenarios, the corresponding generalization ability of the model can be improved.
See also
- Parameters:
geometry_augmentation – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DataAugmentation the reference of this object.
-
GeometryAugmentation &get_geometry_augmentation()#
Get mutable reference of Geometry Augmentation.
Geometry augmentation parameters. Enable the type of geometric changes that may exist in the real-world scenarios, by randomly geometrically augmenting the original training dataset to simulate that similar pictures may appear in the real-world scenarios, the corresponding generalization ability of the model can be improved.
- Returns:
DataAugmentation& the mutable reference of the group.
-
const ImageAugmentation &get_image_augmentation() const#
Get Image Augmentation.
Image augmentation parameters. By enabling parameters corresponding to imaging variations that may occur in real-world scenarios, and applying random image quality augmentation to the training data, the model’s generalization performance can be improved.
See also
- Returns:
const ImageAugmentation & Image Augmentation
-
DataAugmentation &set_image_augmentation(ImageAugmentation image_augmentation)#
Set Image Augmentation with ImageAugmentation value.
Image augmentation parameters. By enabling parameters corresponding to imaging variations that may occur in real-world scenarios, and applying random image quality augmentation to the training data, the model’s generalization performance can be improved.
See also
- Parameters:
image_augmentation – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DataAugmentation the reference of this object.
-
ImageAugmentation &get_image_augmentation()#
Get mutable reference of Image Augmentation.
Image augmentation parameters. By enabling parameters corresponding to imaging variations that may occur in real-world scenarios, and applying random image quality augmentation to the training data, the model’s generalization performance can be improved.
- Returns:
DataAugmentation& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
ImagePreprocess Parameters#
-
enum visionflow::param::ImagePreprocessType#
Values:
-
enumerator kArithm = 0#
-
enumerator kHighPassFilter = 1#
-
enumerator kLowPassFilter = 2#
-
enumerator kFilter2D = 3#
-
enumerator kMorph = 4#
-
enumerator kLut = 5#
-
enumerator kSharpening = 6#
-
enumerator kHistEqu = 7#
-
enumerator kGammaTrans = 8#
-
enumerator kCvtColor = 9#
-
enumerator kFlip = 10#
-
enumerator kResize = 11#
-
enumerator kCirclePolar = 12#
-
enumerator kArithm = 0#
-
enum visionflow::param::ImagePreprocessArithmType#
Values:
-
enumerator kArithmAdd = 0#
-
enumerator kArithmSub = 1#
-
enumerator kArithmMul = 2#
-
enumerator kArithmDiv = 3#
-
enumerator kArithmAdd = 0#
-
class ImagePreprocessArithmParameters : public visionflow::param::ISchemable#
ImagePreprocessArithmParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImagePreprocessArithmType &get_arithm_type() const#
Get Arithmetic Type.
Arithmetic Type
See also
- Returns:
const ImagePreprocessArithmType & Arithmetic Type
-
ImagePreprocessArithmParameters &set_arithm_type(ImagePreprocessArithmType arithm_type)#
Set Arithmetic Type with ImagePreprocessArithmType value.
Arithmetic Type
See also
- Parameters:
arithm_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessArithmParameters the reference of this object.
-
double get_scalar() const#
Get Second operand in arithmetic.
Execute each image pixel operate with scalar
See also
- Returns:
double Second operand in arithmetic
-
ImagePreprocessArithmParameters &set_scalar(double scalar)#
Set Second operand in arithmetic with double value.
Execute each image pixel operate with scalar
See also
- Parameters:
scalar – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessArithmParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
enum visionflow::param::ImagePreprocessFilterType#
Values:
-
enumerator kFilterGaussian = 0#
-
enumerator kFilterMean = 1#
-
enumerator kFilterMedian = 2#
-
enumerator kFilterGaussian = 0#
-
enum visionflow::param::ImagePreprocessBorderType#
Values:
-
enumerator kBorderConstant = 0#
-
enumerator kBorderReplicate = 1#
-
enumerator kBorderReflect = 2#
-
enumerator kBorderReflect101 = 4#
-
enumerator kBorderTransparent = 5#
-
enumerator kBorderConstant = 0#
-
class ImagePreprocessHighPassFilterParameters : public visionflow::param::ISchemable#
ImagePreprocessHighPassFilterParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImagePreprocessFilterType &get_filter_type() const#
Get High Pass Filter Type.
High Pass Filter Type
See also
- Returns:
const ImagePreprocessFilterType & High Pass Filter Type
-
ImagePreprocessHighPassFilterParameters &set_filter_type(ImagePreprocessFilterType filter_type)#
Set High Pass Filter Type with ImagePreprocessFilterType value.
High Pass Filter Type
See also
- Parameters:
filter_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
int get_ksize_w() const#
Get Width of kernel.
Width of kernel
See also
- Returns:
int Width of kernel
-
ImagePreprocessHighPassFilterParameters &set_ksize_w(int ksize_w)#
Set Width of kernel with int value.
Width of kernel
See also
- Parameters:
ksize_w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
int get_ksize_h() const#
Get Height of kernel.
Height of kernel. Note : median_blur doesn’t use this.
See also
- Returns:
int Height of kernel
-
ImagePreprocessHighPassFilterParameters &set_ksize_h(int ksize_h)#
Set Height of kernel with int value.
Height of kernel. Note : median_blur doesn’t use this.
See also
- Parameters:
ksize_h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
double get_alpha() const#
Get alpha.
Multiple of difference between src and dst
See also
- Returns:
double alpha
-
ImagePreprocessHighPassFilterParameters &set_alpha(double alpha)#
Set alpha with double value.
Multiple of difference between src and dst
See also
- Parameters:
alpha – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
double get_beta() const#
Get beta.
Added value to the difference
See also
- Returns:
double beta
-
ImagePreprocessHighPassFilterParameters &set_beta(double beta)#
Set beta with double value.
Added value to the difference
See also
- Parameters:
beta – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
double get_sigma_x() const#
Get Standard deviation in X direction.
Gaussian kernel standard deviation in X direction (only used for kFilterGaussian)
See also
- Returns:
double Standard deviation in X direction
-
ImagePreprocessHighPassFilterParameters &set_sigma_x(double sigma_x)#
Set Standard deviation in X direction with double value.
Gaussian kernel standard deviation in X direction (only used for kFilterGaussian)
See also
- Parameters:
sigma_x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
double get_sigma_y() const#
Get Standard deviation in Y direction.
Gaussian kernel standard deviation in Y direction. If sigma_y is zero, it is set to be equal to sigma_x, if both sigmas are zeros, they are computed from ksize_w and ksize_h. (only used for kFilterGaussian)
See also
- Returns:
double Standard deviation in Y direction
-
ImagePreprocessHighPassFilterParameters &set_sigma_y(double sigma_y)#
Set Standard deviation in Y direction with double value.
Gaussian kernel standard deviation in Y direction. If sigma_y is zero, it is set to be equal to sigma_x, if both sigmas are zeros, they are computed from ksize_w and ksize_h. (only used for kFilterGaussian)
See also
- Parameters:
sigma_y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
const ImagePreprocessBorderType &get_border_type() const#
Get Border Type.
Border Type
See also
- Returns:
const ImagePreprocessBorderType & Border Type
-
ImagePreprocessHighPassFilterParameters &set_border_type(ImagePreprocessBorderType border_type)#
Set Border Type with ImagePreprocessBorderType value.
Border Type
See also
- Parameters:
border_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessHighPassFilterParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessLowPassFilterParameters : public visionflow::param::ISchemable#
ImagePreprocessLowPassFilterParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImagePreprocessFilterType &get_filter_type() const#
Get Low Pass Filter Type.
Low Pass Filter Type
See also
- Returns:
const ImagePreprocessFilterType & Low Pass Filter Type
-
ImagePreprocessLowPassFilterParameters &set_filter_type(ImagePreprocessFilterType filter_type)#
Set Low Pass Filter Type with ImagePreprocessFilterType value.
Low Pass Filter Type
See also
- Parameters:
filter_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessLowPassFilterParameters the reference of this object.
-
int get_ksize_w() const#
Get Width of kernel.
Width of kernel
See also
- Returns:
int Width of kernel
-
ImagePreprocessLowPassFilterParameters &set_ksize_w(int ksize_w)#
Set Width of kernel with int value.
Width of kernel
See also
- Parameters:
ksize_w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessLowPassFilterParameters the reference of this object.
-
int get_ksize_h() const#
Get Height of kernel.
Height of kernel. Note : median_blur doesn’t use this.
See also
- Returns:
int Height of kernel
-
ImagePreprocessLowPassFilterParameters &set_ksize_h(int ksize_h)#
Set Height of kernel with int value.
Height of kernel. Note : median_blur doesn’t use this.
See also
- Parameters:
ksize_h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessLowPassFilterParameters the reference of this object.
-
double get_sigma_x() const#
Get Standard deviation in X direction.
Gaussian kernel standard deviation in X direction (only used for kFilterGaussian)
See also
- Returns:
double Standard deviation in X direction
-
ImagePreprocessLowPassFilterParameters &set_sigma_x(double sigma_x)#
Set Standard deviation in X direction with double value.
Gaussian kernel standard deviation in X direction (only used for kFilterGaussian)
See also
- Parameters:
sigma_x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessLowPassFilterParameters the reference of this object.
-
double get_sigma_y() const#
Get Standard deviation in Y direction.
Gaussian kernel standard deviation in Y direction. If sigma_y is zero, it is set to be equal to sigma_x, if both sigmas are zeros, they are computed from ksize_w and ksize_h. (only used for kFilterGaussian)
See also
- Returns:
double Standard deviation in Y direction
-
ImagePreprocessLowPassFilterParameters &set_sigma_y(double sigma_y)#
Set Standard deviation in Y direction with double value.
Gaussian kernel standard deviation in Y direction. If sigma_y is zero, it is set to be equal to sigma_x, if both sigmas are zeros, they are computed from ksize_w and ksize_h. (only used for kFilterGaussian)
See also
- Parameters:
sigma_y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessLowPassFilterParameters the reference of this object.
-
const ImagePreprocessBorderType &get_border_type() const#
Get Border Type.
Border Type
See also
- Returns:
const ImagePreprocessBorderType & Border Type
-
ImagePreprocessLowPassFilterParameters &set_border_type(ImagePreprocessBorderType border_type)#
Set Border Type with ImagePreprocessBorderType value.
Border Type
See also
- Parameters:
border_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessLowPassFilterParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessFilter2DParameters : public visionflow::param::ISchemable#
ImagePreprocessFilter2DParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_ksize() const#
Get Size of kernel.
Size of kernel
See also
- Returns:
int Size of kernel
-
ImagePreprocessFilter2DParameters &set_ksize(int ksize)#
Set Size of kernel with int value.
Size of kernel
See also
- Parameters:
ksize – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessFilter2DParameters the reference of this object.
-
const std::vector<double> &get_kernel() const#
Get Filter2D kernel.
convolution kernel, a single-channel floating point matrix, it has ksize * ksize elements and in row precedence
See also
- Returns:
const std::vector<double> & Filter2D kernel
-
ImagePreprocessFilter2DParameters &set_kernel(std::vector<double> kernel)#
Set Filter2D kernel with std::vector<double> value.
convolution kernel, a single-channel floating point matrix, it has ksize * ksize elements and in row precedence
See also
- Parameters:
kernel – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessFilter2DParameters the reference of this object.
-
double get_kernel(size_t index) const#
Get value in Filter2D kernel with index.
Warning
The index must be less than get_kernel_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
double value in Filter2D kernel at index.
-
size_t get_kernel_size() const#
Get the size of Filter2D kernel.
- Returns:
size_t the size of Filter2D kernel
-
virtual const std::string &schema_str() const override#
-
enum visionflow::param::ImagePreprocessMorphType#
Values:
-
enumerator kMorphErode = 0#
-
enumerator kMorphDilate = 1#
-
enumerator kMorphOpen = 2#
-
enumerator kMorphClose = 3#
-
enumerator kMorphErode = 0#
-
enum visionflow::param::ImagePreprocessMorphShape#
Values:
-
enumerator kMorphRect = 0#
-
enumerator kMorphCross = 1#
-
enumerator kMorphEllipse = 2#
-
enumerator kMorphRect = 0#
-
class ImagePreprocessMorphParameters : public visionflow::param::ISchemable#
ImagePreprocessMorphParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImagePreprocessMorphType &get_morph_type() const#
Get Morphology Type.
Morphology Type
See also
- Returns:
const ImagePreprocessMorphType & Morphology Type
-
ImagePreprocessMorphParameters &set_morph_type(ImagePreprocessMorphType morph_type)#
Set Morphology Type with ImagePreprocessMorphType value.
Morphology Type
See also
- Parameters:
morph_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessMorphParameters the reference of this object.
-
const ImagePreprocessMorphShape &get_morph_shape() const#
Get Morphology Shape.
Morphology Shape
See also
- Returns:
const ImagePreprocessMorphShape & Morphology Shape
-
ImagePreprocessMorphParameters &set_morph_shape(ImagePreprocessMorphShape morph_shape)#
Set Morphology Shape with ImagePreprocessMorphShape value.
Morphology Shape
See also
- Parameters:
morph_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessMorphParameters the reference of this object.
-
int get_ksize_w() const#
Get Width of kernel.
Width of kernel
See also
- Returns:
int Width of kernel
-
ImagePreprocessMorphParameters &set_ksize_w(int ksize_w)#
Set Width of kernel with int value.
Width of kernel
See also
- Parameters:
ksize_w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessMorphParameters the reference of this object.
-
int get_ksize_h() const#
Get Height of kernel.
Height of kernel
See also
- Returns:
int Height of kernel
-
ImagePreprocessMorphParameters &set_ksize_h(int ksize_h)#
Set Height of kernel with int value.
Height of kernel
See also
- Parameters:
ksize_h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessMorphParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessLutParameters : public visionflow::param::ISchemable#
ImagePreprocessLutParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<int> &get_lut() const#
Get Look up table.
Look up table
See also
- Returns:
const std::vector<int> & Look up table
-
ImagePreprocessLutParameters &set_lut(std::vector<int> lut)#
Set Look up table with std::vector<int> value.
Look up table
See also
- Parameters:
lut – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessLutParameters the reference of this object.
-
int get_lut(size_t index) const#
Get value in Look up table with index.
Warning
The index must be less than get_lut_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
int value in Look up table at index.
-
size_t get_lut_size() const#
Get the size of Look up table.
- Returns:
size_t the size of Look up table
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessSharpenParameters : public visionflow::param::ISchemable#
ImagePreprocessSharpenParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_ksize_w() const#
Get Width of kernel.
Width of kernel
See also
- Returns:
int Width of kernel
-
ImagePreprocessSharpenParameters &set_ksize_w(int ksize_w)#
Set Width of kernel with int value.
Width of kernel
See also
- Parameters:
ksize_w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessSharpenParameters the reference of this object.
-
int get_ksize_h() const#
Get Height of kernel.
Height of kernel
See also
- Returns:
int Height of kernel
-
ImagePreprocessSharpenParameters &set_ksize_h(int ksize_h)#
Set Height of kernel with int value.
Height of kernel
See also
- Parameters:
ksize_h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessSharpenParameters the reference of this object.
-
double get_factor() const#
Get Sharpening factor.
Sharpening factor
See also
- Returns:
double Sharpening factor
-
ImagePreprocessSharpenParameters &set_factor(double factor)#
Set Sharpening factor with double value.
Sharpening factor
See also
- Parameters:
factor – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessSharpenParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessGammaTransParameters : public visionflow::param::ISchemable#
ImagePreprocessGammaTransParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_gamma() const#
Get Gamma Parameters.
Gamma Parameters
See also
- Returns:
double Gamma Parameters
-
ImagePreprocessGammaTransParameters &set_gamma(double gamma)#
Set Gamma Parameters with double value.
Gamma Parameters
See also
- Parameters:
gamma – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessGammaTransParameters the reference of this object.
-
int get_alpha() const#
Get Alpha Parameters.
Alpha Parameters
See also
- Returns:
int Alpha Parameters
-
ImagePreprocessGammaTransParameters &set_alpha(int alpha)#
Set Alpha Parameters with int value.
Alpha Parameters
See also
- Parameters:
alpha – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessGammaTransParameters the reference of this object.
-
int get_beta() const#
Get Beta Parameters.
Beta Parameters
See also
- Returns:
int Beta Parameters
-
ImagePreprocessGammaTransParameters &set_beta(int beta)#
Set Beta Parameters with int value.
Beta Parameters
See also
- Parameters:
beta – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessGammaTransParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
enum visionflow::param::ImagePreprocessColorConversionType#
Values:
-
enumerator kColorBGR2BGRA = 0#
-
enumerator kColorBGRA2BGR = 1#
-
enumerator kColorBGR2RGBA = 2#
-
enumerator kColorRGBA2BGR = 3#
-
enumerator kColorBGR2RGB = 4#
-
enumerator kColorBGRA2RGBA = 5#
-
enumerator kColorBGR2Gray = 6#
-
enumerator kColorRGB2Gray = 7#
-
enumerator kColorGray2BGR = 8#
-
enumerator kColorGray2BGRA = 9#
-
enumerator kColorBGRA2Gray = 10#
-
enumerator kColorRGBA2Gray = 11#
-
enumerator kColorBGR2YCrCb = 36#
-
enumerator kColorRGB2YCrCb = 37#
-
enumerator kColorYCrCb2BGR = 38#
-
enumerator kColorYCrCb2RGB = 39#
-
enumerator kColorBGR2HSV = 40#
-
enumerator kColorRGB2HSV = 41#
-
enumerator kColorBGR2Lab = 44#
-
enumerator kColorRGB2Lab = 45#
-
enumerator kColorBGR2Luv = 50#
-
enumerator kColorRGB2Luv = 51#
-
enumerator kColorBGR2HLS = 52#
-
enumerator kColorRGB2HLS = 53#
-
enumerator kColorHSV2BGR = 54#
-
enumerator kColorHSV2RGB = 55#
-
enumerator kColorBGR2YUV = 82#
-
enumerator kColorRGB2YUV = 83#
-
enumerator kColorYUV2BGR = 84#
-
enumerator kColorYUV2RGB = 85#
-
enumerator kColorBGR2BGRA = 0#
-
class ImagePreprocessCvtColorParameters : public visionflow::param::ISchemable#
ImagePreprocessCvtColorParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImagePreprocessColorConversionType &get_cvt_type() const#
Get Color Conversion Type.
Color Conversion Type
See also
- Returns:
const ImagePreprocessColorConversionType & Color Conversion Type
-
ImagePreprocessCvtColorParameters &set_cvt_type(ImagePreprocessColorConversionType cvt_type)#
Set Color Conversion Type with ImagePreprocessColorConversionType value.
Color Conversion Type
See also
- Parameters:
cvt_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCvtColorParameters the reference of this object.
-
const std::vector<double> &get_coeffs() const#
Get Color Conversion Coefficients.
User-defined vector of coefficients for converting color images to grayscale images. Only used in kColorBGR2Gray, kColorRGB2Gray, kColorBGRA2Gray and kColorRGBA2Gray. 0 <= coefficients <= 1. The sum of the coefficients should be less than or equal to 1. When the coeffs is empty, the default value {0.114F, 0.587F, 0.299F} will be used. If one coeffs is 1, it extracts corresponding channel from source image. The of result is a single-channel image.
See also
- Returns:
const std::vector<double> & Color Conversion Coefficients
-
ImagePreprocessCvtColorParameters &set_coeffs(std::vector<double> coeffs)#
Set Color Conversion Coefficients with std::vector<double> value.
User-defined vector of coefficients for converting color images to grayscale images. Only used in kColorBGR2Gray, kColorRGB2Gray, kColorBGRA2Gray and kColorRGBA2Gray. 0 <= coefficients <= 1. The sum of the coefficients should be less than or equal to 1. When the coeffs is empty, the default value {0.114F, 0.587F, 0.299F} will be used. If one coeffs is 1, it extracts corresponding channel from source image. The of result is a single-channel image.
See also
- Parameters:
coeffs – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCvtColorParameters the reference of this object.
-
double get_coeffs(size_t index) const#
Get value in Color Conversion Coefficients with index.
Warning
The index must be less than get_coeffs_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
double value in Color Conversion Coefficients at index.
-
size_t get_coeffs_size() const#
Get the size of Color Conversion Coefficients.
- Returns:
size_t the size of Color Conversion Coefficients
-
virtual const std::string &schema_str() const override#
-
enum visionflow::param::ImagePreprocessFlipType#
Values:
-
enumerator kFlipVertical = 0#
-
enumerator kFlipHorizontal = 1#
-
enumerator kFlipBoth = 2#
-
enumerator kFlip45 = 3#
-
enumerator kFlip135 = 4#
-
enumerator kFlipVertical = 0#
-
class ImagePreprocessFlipParameters : public visionflow::param::ISchemable#
ImagePreprocessFlipParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImagePreprocessFlipType &get_flip_type() const#
Get Flip Type.
Flip Type
See also
- Returns:
const ImagePreprocessFlipType & Flip Type
-
ImagePreprocessFlipParameters &set_flip_type(ImagePreprocessFlipType flip_type)#
Set Flip Type with ImagePreprocessFlipType value.
Flip Type
See also
- Parameters:
flip_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessFlipParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
enum visionflow::param::ImagePreprocessInterMethod#
Values:
-
enumerator kInterNearest = 0#
-
enumerator kInterLinear = 1#
-
enumerator kInterCubic = 2#
-
enumerator kInterArea = 3#
-
enumerator kInterNearest = 0#
-
class ImagePreprocessResizeParameters : public visionflow::param::ISchemable#
ImagePreprocessResizeParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_dst_w() const#
Get Target Width.
Target Width
See also
- Returns:
int Target Width
-
ImagePreprocessResizeParameters &set_dst_w(int dst_w)#
Set Target Width with int value.
Target Width
See also
- Parameters:
dst_w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessResizeParameters the reference of this object.
-
int get_dst_h() const#
Get Target Height.
Target Height
See also
- Returns:
int Target Height
-
ImagePreprocessResizeParameters &set_dst_h(int dst_h)#
Set Target Height with int value.
Target Height
See also
- Parameters:
dst_h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessResizeParameters the reference of this object.
-
double get_x_scale() const#
Get Scale factor in x direction.
Scale factor in x direction, only used when both dst_w and dst_h is zero.
See also
- Returns:
double Scale factor in x direction
-
ImagePreprocessResizeParameters &set_x_scale(double x_scale)#
Set Scale factor in x direction with double value.
Scale factor in x direction, only used when both dst_w and dst_h is zero.
See also
- Parameters:
x_scale – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessResizeParameters the reference of this object.
-
double get_y_scale() const#
Get Scale factor in y direction.
Scale factor in y direction, only used when both dst_w and dst_h is zero.
See also
- Returns:
double Scale factor in y direction
-
ImagePreprocessResizeParameters &set_y_scale(double y_scale)#
Set Scale factor in y direction with double value.
Scale factor in y direction, only used when both dst_w and dst_h is zero.
See also
- Parameters:
y_scale – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessResizeParameters the reference of this object.
-
const ImagePreprocessInterMethod &get_inter_method() const#
Get Interpolation Method.
Interpolation Method
See also
- Returns:
const ImagePreprocessInterMethod & Interpolation Method
-
ImagePreprocessResizeParameters &set_inter_method(ImagePreprocessInterMethod inter_method)#
Set Interpolation Method with ImagePreprocessInterMethod value.
Interpolation Method
See also
- Parameters:
inter_method – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessResizeParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessCirclePolarParameters : public visionflow::param::ISchemable#
ImagePreprocessCirclePolarParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_x() const#
Get X-Value.
X-coordinate of the center point of the annular section
See also
- Returns:
double X-Value
-
ImagePreprocessCirclePolarParameters &set_x(double x)#
Set X-Value with double value.
X-coordinate of the center point of the annular section
See also
- Parameters:
x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
double get_y() const#
Get Y-Value.
Y-coordinate of the center point of the annular section
See also
- Returns:
double Y-Value
-
ImagePreprocessCirclePolarParameters &set_y(double y)#
Set Y-Value with double value.
Y-coordinate of the center point of the annular section
See also
- Parameters:
y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
double get_start_radius() const#
Get Start Radius.
Start radius of the annular section
See also
- Returns:
double Start Radius
-
ImagePreprocessCirclePolarParameters &set_start_radius(double start_radius)#
Set Start Radius with double value.
Start radius of the annular section
See also
- Parameters:
start_radius – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
double get_end_radius() const#
Get End Radius.
End radius of the annular section
See also
- Returns:
double End Radius
-
ImagePreprocessCirclePolarParameters &set_end_radius(double end_radius)#
Set End Radius with double value.
End radius of the annular section
See also
- Parameters:
end_radius – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
double get_start_angle() const#
Get Start Angle.
Start angle (Degree) of the annular section
See also
- Returns:
double Start Angle
-
ImagePreprocessCirclePolarParameters &set_start_angle(double start_angle)#
Set Start Angle with double value.
Start angle (Degree) of the annular section
See also
- Parameters:
start_angle – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
double get_end_angle() const#
Get End Angle.
End angle (Degree) of the annular section
See also
- Returns:
double End Angle
-
ImagePreprocessCirclePolarParameters &set_end_angle(double end_angle)#
Set End Angle with double value.
End angle (Degree) of the annular section
See also
- Parameters:
end_angle – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
int get_dst_w() const#
Get Target Width.
Target Width. If both dst_w and dst_h is zero, it will be set adaptively with given annulus.
See also
- Returns:
int Target Width
-
ImagePreprocessCirclePolarParameters &set_dst_w(int dst_w)#
Set Target Width with int value.
Target Width. If both dst_w and dst_h is zero, it will be set adaptively with given annulus.
See also
- Parameters:
dst_w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
int get_dst_h() const#
Get Target Height.
Target Height. If both dst_w and dst_h is zero, it will be set adaptively with given annulus.
See also
- Returns:
int Target Height
-
ImagePreprocessCirclePolarParameters &set_dst_h(int dst_h)#
Set Target Height with int value.
Target Height. If both dst_w and dst_h is zero, it will be set adaptively with given annulus.
See also
- Parameters:
dst_h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
const ImagePreprocessInterMethod &get_inter_method() const#
Get Interpolation Method.
Interpolation Method
See also
- Returns:
const ImagePreprocessInterMethod & Interpolation Method
-
ImagePreprocessCirclePolarParameters &set_inter_method(ImagePreprocessInterMethod inter_method)#
Set Interpolation Method with ImagePreprocessInterMethod value.
Interpolation Method
See also
- Parameters:
inter_method – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
const ImagePreprocessBorderType &get_border_type() const#
Get Border Type.
Border Type
See also
- Returns:
const ImagePreprocessBorderType & Border Type
-
ImagePreprocessCirclePolarParameters &set_border_type(ImagePreprocessBorderType border_type)#
Set Border Type with ImagePreprocessBorderType value.
Border Type
See also
- Parameters:
border_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessCirclePolarParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessParameters : public visionflow::param::ISchemable#
ImagePreprocessParameters Parameter class generated by jinja2 automatically.
Image Preprocess Parameter Group
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImagePreprocessType &get_type() const#
Get Image Preprocess Type.
Image Preprocess Type
See also
- Returns:
const ImagePreprocessType & Image Preprocess Type
-
ImagePreprocessParameters &set_type(ImagePreprocessType type)#
Set Image Preprocess Type with ImagePreprocessType value.
Image Preprocess Type
See also
- Parameters:
type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
const ImagePreprocessArithmParameters &get_arithm() const#
Get Arithm Parameters.
Arithm Parameters
See also
- Returns:
const ImagePreprocessArithmParameters & Arithm Parameters
-
ImagePreprocessParameters &set_arithm(ImagePreprocessArithmParameters arithm)#
Set Arithm Parameters with ImagePreprocessArithmParameters value.
Arithm Parameters
See also
- Parameters:
arithm – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessArithmParameters &get_arithm()#
Get mutable reference of Arithm Parameters.
Arithm Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessHighPassFilterParameters &get_high_pass_filter() const#
Get High Pass Filter Parameters.
High Pass Filter Parameters
See also
- Returns:
const ImagePreprocessHighPassFilterParameters & High Pass Filter Parameters
-
ImagePreprocessParameters &set_high_pass_filter(ImagePreprocessHighPassFilterParameters high_pass_filter)#
Set High Pass Filter Parameters with ImagePreprocessHighPassFilterParameters value.
High Pass Filter Parameters
See also
- Parameters:
high_pass_filter – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessHighPassFilterParameters &get_high_pass_filter()#
Get mutable reference of High Pass Filter Parameters.
High Pass Filter Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessLowPassFilterParameters &get_low_pass_filter() const#
Get Low Pass Filter Parameters.
Low Pass Filter Parameters
See also
- Returns:
const ImagePreprocessLowPassFilterParameters & Low Pass Filter Parameters
-
ImagePreprocessParameters &set_low_pass_filter(ImagePreprocessLowPassFilterParameters low_pass_filter)#
Set Low Pass Filter Parameters with ImagePreprocessLowPassFilterParameters value.
Low Pass Filter Parameters
See also
- Parameters:
low_pass_filter – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessLowPassFilterParameters &get_low_pass_filter()#
Get mutable reference of Low Pass Filter Parameters.
Low Pass Filter Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessFilter2DParameters &get_filter2d() const#
Get Filter2D Parameters.
Filter2D Parameters
See also
- Returns:
const ImagePreprocessFilter2DParameters & Filter2D Parameters
-
ImagePreprocessParameters &set_filter2d(ImagePreprocessFilter2DParameters filter2d)#
Set Filter2D Parameters with ImagePreprocessFilter2DParameters value.
Filter2D Parameters
See also
- Parameters:
filter2d – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessFilter2DParameters &get_filter2d()#
Get mutable reference of Filter2D Parameters.
Filter2D Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessMorphParameters &get_morph() const#
Get Morphology Parameters.
Morphology Parameters
See also
- Returns:
const ImagePreprocessMorphParameters & Morphology Parameters
-
ImagePreprocessParameters &set_morph(ImagePreprocessMorphParameters morph)#
Set Morphology Parameters with ImagePreprocessMorphParameters value.
Morphology Parameters
See also
- Parameters:
morph – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessMorphParameters &get_morph()#
Get mutable reference of Morphology Parameters.
Morphology Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessLutParameters &get_lut() const#
Get Lut Parameters.
Lut Parameters
See also
- Returns:
const ImagePreprocessLutParameters & Lut Parameters
-
ImagePreprocessParameters &set_lut(ImagePreprocessLutParameters lut)#
Set Lut Parameters with ImagePreprocessLutParameters value.
Lut Parameters
See also
- Parameters:
lut – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessLutParameters &get_lut()#
Get mutable reference of Lut Parameters.
Lut Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessSharpenParameters &get_sharpen() const#
Get Sharpen Parameters.
Sharpen Parameters
See also
- Returns:
const ImagePreprocessSharpenParameters & Sharpen Parameters
-
ImagePreprocessParameters &set_sharpen(ImagePreprocessSharpenParameters sharpen)#
Set Sharpen Parameters with ImagePreprocessSharpenParameters value.
Sharpen Parameters
See also
- Parameters:
sharpen – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessSharpenParameters &get_sharpen()#
Get mutable reference of Sharpen Parameters.
Sharpen Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessGammaTransParameters &get_gamma_trans() const#
Get Gamma Transformation Parameters.
Gamma Transformation Parameters
See also
- Returns:
const ImagePreprocessGammaTransParameters & Gamma Transformation Parameters
-
ImagePreprocessParameters &set_gamma_trans(ImagePreprocessGammaTransParameters gamma_trans)#
Set Gamma Transformation Parameters with ImagePreprocessGammaTransParameters value.
Gamma Transformation Parameters
See also
- Parameters:
gamma_trans – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessGammaTransParameters &get_gamma_trans()#
Get mutable reference of Gamma Transformation Parameters.
Gamma Transformation Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessCvtColorParameters &get_cvt_color() const#
Get Color Conversion Parameters.
Color Conversion Parameters
See also
- Returns:
const ImagePreprocessCvtColorParameters & Color Conversion Parameters
-
ImagePreprocessParameters &set_cvt_color(ImagePreprocessCvtColorParameters cvt_color)#
Set Color Conversion Parameters with ImagePreprocessCvtColorParameters value.
Color Conversion Parameters
See also
- Parameters:
cvt_color – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessCvtColorParameters &get_cvt_color()#
Get mutable reference of Color Conversion Parameters.
Color Conversion Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessFlipParameters &get_flip() const#
Get Flip Parameters.
Flip Parameters
See also
- Returns:
const ImagePreprocessFlipParameters & Flip Parameters
-
ImagePreprocessParameters &set_flip(ImagePreprocessFlipParameters flip)#
Set Flip Parameters with ImagePreprocessFlipParameters value.
Flip Parameters
See also
- Parameters:
flip – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessFlipParameters &get_flip()#
Get mutable reference of Flip Parameters.
Flip Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessResizeParameters &get_resize() const#
Get Resize Parameters.
Resize Parameters
See also
- Returns:
const ImagePreprocessResizeParameters & Resize Parameters
-
ImagePreprocessParameters &set_resize(ImagePreprocessResizeParameters resize)#
Set Resize Parameters with ImagePreprocessResizeParameters value.
Resize Parameters
See also
- Parameters:
resize – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessResizeParameters &get_resize()#
Get mutable reference of Resize Parameters.
Resize Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
const ImagePreprocessCirclePolarParameters &get_circle_polar() const#
Get Circle Polar Parameters.
Circle Polar Parameters
See also
- Returns:
const ImagePreprocessCirclePolarParameters & Circle Polar Parameters
-
ImagePreprocessParameters &set_circle_polar(ImagePreprocessCirclePolarParameters circle_polar)#
Set Circle Polar Parameters with ImagePreprocessCirclePolarParameters value.
Circle Polar Parameters
See also
- Parameters:
circle_polar – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParameters the reference of this object.
-
ImagePreprocessCirclePolarParameters &get_circle_polar()#
Get mutable reference of Circle Polar Parameters.
Circle Polar Parameters
- Returns:
ImagePreprocessParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessParametersList : public visionflow::param::ISchemable#
ImagePreprocessParametersList Parameter class generated by jinja2 automatically.
Parameter list for a single visible image in an Image
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<ImagePreprocessParameters> &get_params_list() const#
Get Image Preprocess Parameter List.
Image Preprocess Parameter List for a single visible image, each propressing function will be executed in sequence, and only the final result will be saved.
See also
- Returns:
const std::vector<ImagePreprocessParameters> & Image Preprocess Parameter List
-
ImagePreprocessParametersList &set_params_list(std::vector<ImagePreprocessParameters> params_list)#
Set Image Preprocess Parameter List with std::vector<ImagePreprocessParameters> value.
Image Preprocess Parameter List for a single visible image, each propressing function will be executed in sequence, and only the final result will be saved.
See also
- Parameters:
params_list – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParametersList the reference of this object.
-
const ImagePreprocessParameters &get_params_list(size_t index) const#
Get value in Image Preprocess Parameter List with index.
Warning
The index must be less than get_params_list_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const ImagePreprocessParameters & value in Image Preprocess Parameter List at index.
-
size_t get_params_list_size() const#
Get the size of Image Preprocess Parameter List.
- Returns:
size_t the size of Image Preprocess Parameter List
-
ImagePreprocessParameters &get_params_list(size_t index)#
Get mutable reference of value in Image Preprocess Parameter List with index.
Warning
The index must be less than get_params_list_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
ImagePreprocessParameters& the mutable reference of value in Image Preprocess Parameter List at index.
-
virtual const std::string &schema_str() const override#
-
class ImagePreprocessParametersListSet : public visionflow::param::SchemableParameter#
ImagePreprocessParametersListSet Parameter class generated by jinja2 automatically.
Parameter group for a set of Image Preprocess Parameter
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<ImagePreprocessParametersList> &get_img_preproc_params() const#
Get Image Preprocess Parameter Sets.
Image Preprocess Parameter Sets. Each ImagePreprocessParametersList in set means a series of preprocessing mothods for a visual image in Image
See also
- Returns:
const std::vector<ImagePreprocessParametersList> & Image Preprocess Parameter Sets
-
ImagePreprocessParametersListSet &set_img_preproc_params(std::vector<ImagePreprocessParametersList> img_preproc_params)#
Set Image Preprocess Parameter Sets with std::vector<ImagePreprocessParametersList> value.
Image Preprocess Parameter Sets. Each ImagePreprocessParametersList in set means a series of preprocessing mothods for a visual image in Image
See also
- Parameters:
img_preproc_params – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ImagePreprocessParametersListSet the reference of this object.
-
const ImagePreprocessParametersList &get_img_preproc_params(size_t index) const#
Get value in Image Preprocess Parameter Sets with index.
Warning
The index must be less than get_img_preproc_params_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const ImagePreprocessParametersList & value in Image Preprocess Parameter Sets at index.
-
size_t get_img_preproc_params_size() const#
Get the size of Image Preprocess Parameter Sets.
- Returns:
size_t the size of Image Preprocess Parameter Sets
-
ImagePreprocessParametersList &get_img_preproc_params(size_t index)#
Get mutable reference of value in Image Preprocess Parameter Sets with index.
Warning
The index must be less than get_img_preproc_params_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
ImagePreprocessParametersList& the mutable reference of value in Image Preprocess Parameter Sets at index.
-
virtual const std::string &schema_str() const override#
Segmentation Training Parameters#
-
class SegmentationInputShape : public visionflow::param::ISchemable#
SegmentationInputShape Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
SegmentationInputShape &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationInputShape the reference of this object.
-
int get_base_input_width() const#
Get Base Input Width.
Base Input Width
See also
- Returns:
int Base Input Width
-
SegmentationInputShape &set_base_input_width(int base_input_width)#
Set Base Input Width with int value.
Base Input Width
See also
- Parameters:
base_input_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationInputShape the reference of this object.
-
int get_base_input_height() const#
Get Base Input Height.
Base Input Height
See also
- Returns:
int Base Input Height
-
SegmentationInputShape &set_base_input_height(int base_input_height)#
Set Base Input Height with int value.
Base Input Height
See also
- Parameters:
base_input_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationInputShape the reference of this object.
-
virtual const std::string &schema_str() const override#
-
enum visionflow::param::ImageSplitMode#
Values:
-
enumerator kAuto = 0#
-
enumerator kManual = 1#
-
enumerator kAuto = 0#
-
class SegmentationImageSplit : public visionflow::param::ISchemable#
SegmentationImageSplit Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const ImageSplitMode &get_split_set_method() const#
Get Split Method.
Auto : The algorithm adapts the recommended resolution levelManual according to the original map size and minimum marking size: the resolution level is based on manual setting Brief description of algorithm : The algorithm scales the short edge of the image to 256*resolution level before feeding to the network, and the long edge scales equally to the input network.
See also
- Returns:
const ImageSplitMode & Split Method
-
SegmentationImageSplit &set_split_set_method(ImageSplitMode split_set_method)#
Set Split Method with ImageSplitMode value.
Auto : The algorithm adapts the recommended resolution levelManual according to the original map size and minimum marking size: the resolution level is based on manual setting Brief description of algorithm : The algorithm scales the short edge of the image to 256*resolution level before feeding to the network, and the long edge scales equally to the input network.
See also
- Parameters:
split_set_method – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationImageSplit the reference of this object.
-
int get_max_split() const#
Get Resolution Level.
The short side of the image input will be scaled to (base_size*Resolution Level), and the long side will be scaled proportionally. When the max precision set is higher than the required precision of the algorithm, the precision will be automatically reduced. The applied precision can be acquired from figuration files of the trained model
See also
- Returns:
int Resolution Level
-
SegmentationImageSplit &set_max_split(int max_split)#
Set Resolution Level with int value.
The short side of the image input will be scaled to (base_size*Resolution Level), and the long side will be scaled proportionally. When the max precision set is higher than the required precision of the algorithm, the precision will be automatically reduced. The applied precision can be acquired from figuration files of the trained model
See also
- Parameters:
max_split – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationImageSplit the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class SegmentationModelParameters : public visionflow::param::ISchemable#
SegmentationModelParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::string &get_model_arch() const#
Get Model Architecture.
The ‘Tiny Defects’ model has better detection effect on small defects, and the ‘Comprehensive Model’ has better comprehensive effect. Recommended to use the ‘Comprehensive Model’ when the detection effect of the Tiny Defects model is poor. ‘Contrastive Model’ is only for contrastive segmentation. The ‘High Precision Model’ detects defect edges more finer, allowing resolution level to be reduced by 1/2 to 3/4 compared to the ‘Tiny Defects’ model and the ‘Comprehensive Model’.
See also
- Returns:
const std::string & Model Architecture
-
SegmentationModelParameters &set_model_arch(std::string model_arch)#
Set Model Architecture with std::string value.
The ‘Tiny Defects’ model has better detection effect on small defects, and the ‘Comprehensive Model’ has better comprehensive effect. Recommended to use the ‘Comprehensive Model’ when the detection effect of the Tiny Defects model is poor. ‘Contrastive Model’ is only for contrastive segmentation. The ‘High Precision Model’ detects defect edges more finer, allowing resolution level to be reduced by 1/2 to 3/4 compared to the ‘Tiny Defects’ model and the ‘Comprehensive Model’.
See also
- Parameters:
model_arch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationModelParameters the reference of this object.
-
bool get_shift_stable() const#
Get With Shift Stable.
With shift stable, the adaptability of the model to the slight shift of the target can be improved, but the training and inference speed will be 20 percent slower
See also
- Returns:
bool With Shift Stable
-
SegmentationModelParameters &set_shift_stable(bool shift_stable)#
Set With Shift Stable with bool value.
With shift stable, the adaptability of the model to the slight shift of the target can be improved, but the training and inference speed will be 20 percent slower
See also
- Parameters:
shift_stable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationModelParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class SegmentationTrainingSampleStrategy : public visionflow::param::ISchemable#
SegmentationTrainingSampleStrategy Parameter class generated by jinja2 automatically.
Segmentation training parameters to control the the input data.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_hard_case_rate() const#
Get Sample Rate of Hard Case.
The larger the value set, the higher the attention to the hard case
See also
- Returns:
double Sample Rate of Hard Case
-
SegmentationTrainingSampleStrategy &set_hard_case_rate(double hard_case_rate)#
Set Sample Rate of Hard Case with double value.
The larger the value set, the higher the attention to the hard case
See also
- Parameters:
hard_case_rate – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingSampleStrategy the reference of this object.
-
int get_hard_case_split() const#
Get Hard Case Split.
Number of hard case discrete coordinates, Default value is recommended.
See also
- Returns:
int Hard Case Split
-
SegmentationTrainingSampleStrategy &set_hard_case_split(int hard_case_split)#
Set Hard Case Split with int value.
Number of hard case discrete coordinates, Default value is recommended.
See also
- Parameters:
hard_case_split – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingSampleStrategy the reference of this object.
-
const SegmentationImageSplit &get_image_split() const#
Get Image Split.
Image Split Parameters
See also
- Returns:
const SegmentationImageSplit & Image Split
-
SegmentationTrainingSampleStrategy &set_image_split(SegmentationImageSplit image_split)#
Set Image Split with SegmentationImageSplit value.
Image Split Parameters
See also
- Parameters:
image_split – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingSampleStrategy the reference of this object.
-
SegmentationImageSplit &get_image_split()#
Get mutable reference of Image Split.
Image Split Parameters
- Returns:
SegmentationTrainingSampleStrategy& the mutable reference of the group.
-
const SegmentationInputShape &get_input_shape() const#
Get Customize Network Input Shape.
Customize Network Input Shape
See also
- Returns:
const SegmentationInputShape & Customize Network Input Shape
-
SegmentationTrainingSampleStrategy &set_input_shape(SegmentationInputShape input_shape)#
Set Customize Network Input Shape with SegmentationInputShape value.
Customize Network Input Shape
See also
- Parameters:
input_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingSampleStrategy the reference of this object.
-
SegmentationInputShape &get_input_shape()#
Get mutable reference of Customize Network Input Shape.
Customize Network Input Shape
- Returns:
SegmentationTrainingSampleStrategy& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class SegmentationTrainingParameters : public visionflow::param::SchemableParameter#
SegmentationTrainingParameters Parameter class generated by jinja2 automatically.
Segmentation Training Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
SegmentationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Returns:
int Training Batch Size
-
SegmentationTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
const SegmentationTrainingSampleStrategy &get_sampling_strategy() const#
Get Sampling Strategy.
Sampling Strategy Parameters
See also
- Returns:
const SegmentationTrainingSampleStrategy & Sampling Strategy
-
SegmentationTrainingParameters &set_sampling_strategy(SegmentationTrainingSampleStrategy sampling_strategy)#
Set Sampling Strategy with SegmentationTrainingSampleStrategy value.
Sampling Strategy Parameters
See also
- Parameters:
sampling_strategy – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
SegmentationTrainingSampleStrategy &get_sampling_strategy()#
Get mutable reference of Sampling Strategy.
Sampling Strategy Parameters
- Returns:
SegmentationTrainingParameters& the mutable reference of the group.
-
const TrainingMode &get_training_mode() const#
Get Training Mode.
Normal Train is the default mode for training a new model. Increment Train will retrain on previous model knowledge.
See also
- Returns:
const TrainingMode & Training Mode
-
SegmentationTrainingParameters &set_training_mode(TrainingMode training_mode)#
Set Training Mode with TrainingMode value.
Normal Train is the default mode for training a new model. Increment Train will retrain on previous model knowledge.
See also
- Parameters:
training_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
bool get_train_with_view_mask() const#
Get Train With View Masks.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Returns:
bool Train With View Masks
-
SegmentationTrainingParameters &set_train_with_view_mask(bool train_with_view_mask)#
Set Train With View Masks with bool value.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Parameters:
train_with_view_mask – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
const std::vector<uint32_t> &get_training_image_pages() const#
Get Select Visual Image Pages.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Returns:
const std::vector<uint32_t> & Select Visual Image Pages
-
SegmentationTrainingParameters &set_training_image_pages(std::vector<uint32_t> training_image_pages)#
Set Select Visual Image Pages with std::vector<uint32_t> value.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Parameters:
training_image_pages – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
uint32_t get_training_image_pages(size_t index) const#
Get value in Select Visual Image Pages with index.
Warning
The index must be less than get_training_image_pages_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
uint32_t value in Select Visual Image Pages at index.
-
size_t get_training_image_pages_size() const#
Get the size of Select Visual Image Pages.
- Returns:
size_t the size of Select Visual Image Pages
-
bool get_only_check() const#
Get Only Check.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Returns:
bool Only Check
-
SegmentationTrainingParameters &set_only_check(bool only_check)#
Set Only Check with bool value.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Parameters:
only_check – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
const SegmentationModelParameters &get_model_param() const#
Get Model Parameters.
Select the appropriate basic model according to different detection targets and speed requirements
See also
- Returns:
const SegmentationModelParameters & Model Parameters
-
SegmentationTrainingParameters &set_model_param(SegmentationModelParameters model_param)#
Set Model Parameters with SegmentationModelParameters value.
Select the appropriate basic model according to different detection targets and speed requirements
See also
- Parameters:
model_param – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
SegmentationModelParameters &get_model_param()#
Get mutable reference of Model Parameters.
Select the appropriate basic model according to different detection targets and speed requirements
- Returns:
SegmentationTrainingParameters& the mutable reference of the group.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
SegmentationTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
SegmentationTrainingParameters& the mutable reference of the group.
-
const DefectSimulation &get_defect_simulation() const#
Get Defect Simulation.
Defect simulation parameters. Enable to allow defects to appear in different positions, angles, and sizes in the same image, there by increasing the possibility of combining defects with the background, the corresponding generalization ability of the model can be improved.
See also
- Returns:
const DefectSimulation & Defect Simulation
-
SegmentationTrainingParameters &set_defect_simulation(DefectSimulation defect_simulation)#
Set Defect Simulation with DefectSimulation value.
Defect simulation parameters. Enable to allow defects to appear in different positions, angles, and sizes in the same image, there by increasing the possibility of combining defects with the background, the corresponding generalization ability of the model can be improved.
See also
- Parameters:
defect_simulation – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationTrainingParameters the reference of this object.
-
DefectSimulation &get_defect_simulation()#
Get mutable reference of Defect Simulation.
Defect simulation parameters. Enable to allow defects to appear in different positions, angles, and sizes in the same image, there by increasing the possibility of combining defects with the background, the corresponding generalization ability of the model can be improved.
- Returns:
SegmentationTrainingParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
Segmentation Inference Parameters#
-
class SegmentationInferenceParameters : public visionflow::param::SchemableParameter#
SegmentationInferenceParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_infer_score() const#
Get Inference Feature Map.
Inference to get the feature map with pixel score or not. This option is only used for Segmentation tool. In the segmentation tool, disabling this option can significantly improve the inference speed but might result in the absence of accurate scoring for regions.
See also
- Returns:
bool Inference Feature Map
-
SegmentationInferenceParameters &set_infer_score(bool infer_score)#
Set Inference Feature Map with bool value.
Inference to get the feature map with pixel score or not. This option is only used for Segmentation tool. In the segmentation tool, disabling this option can significantly improve the inference speed but might result in the absence of accurate scoring for regions.
See also
- Parameters:
infer_score – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SegmentationInferenceParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
Unsuper Segmentation Training Parameters#
-
class UnsuperSegmentationInputShape : public visionflow::param::ISchemable#
UnsuperSegmentationInputShape Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
UnsuperSegmentationInputShape &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationInputShape the reference of this object.
-
int get_sampling_width() const#
Get Sampling Input Width.
Sampling Input Width
See also
- Returns:
int Sampling Input Width
-
UnsuperSegmentationInputShape &set_sampling_width(int sampling_width)#
Set Sampling Input Width with int value.
Sampling Input Width
See also
- Parameters:
sampling_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationInputShape the reference of this object.
-
int get_sampling_height() const#
Get Sampling Input Height.
Sampling Input Height
See also
- Returns:
int Sampling Input Height
-
UnsuperSegmentationInputShape &set_sampling_height(int sampling_height)#
Set Sampling Input Height with int value.
Sampling Input Height
See also
- Parameters:
sampling_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationInputShape the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class UnsuperSegmentationTrainingParameters : public visionflow::param::SchemableParameter#
UnsuperSegmentationTrainingParameters Parameter class generated by jinja2 automatically.
Unsuper Segmentation Training Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
UnsuperSegmentationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Returns:
int Batch Size
-
UnsuperSegmentationTrainingParameters &set_batch_size(int batch_size)#
Set Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationTrainingParameters the reference of this object.
-
const std::vector<uint32_t> &get_training_image_pages() const#
Get Select Visual Image Pages.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Returns:
const std::vector<uint32_t> & Select Visual Image Pages
-
UnsuperSegmentationTrainingParameters &set_training_image_pages(std::vector<uint32_t> training_image_pages)#
Set Select Visual Image Pages with std::vector<uint32_t> value.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Parameters:
training_image_pages – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationTrainingParameters the reference of this object.
-
uint32_t get_training_image_pages(size_t index) const#
Get value in Select Visual Image Pages with index.
Warning
The index must be less than get_training_image_pages_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
uint32_t value in Select Visual Image Pages at index.
-
size_t get_training_image_pages_size() const#
Get the size of Select Visual Image Pages.
- Returns:
size_t the size of Select Visual Image Pages
-
const UnsuperSegmentationSamplingParameters &get_sampling_strategy() const#
Get Sampling Strategy.
Sampling Parameters
See also
- Returns:
const UnsuperSegmentationSamplingParameters & Sampling Strategy
-
UnsuperSegmentationTrainingParameters &set_sampling_strategy(UnsuperSegmentationSamplingParameters sampling_strategy)#
Set Sampling Strategy with UnsuperSegmentationSamplingParameters value.
Sampling Parameters
See also
- Parameters:
sampling_strategy – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationTrainingParameters the reference of this object.
-
UnsuperSegmentationSamplingParameters &get_sampling_strategy()#
Get mutable reference of Sampling Strategy.
Sampling Parameters
- Returns:
UnsuperSegmentationTrainingParameters& the mutable reference of the group.
-
bool get_train_with_view_mask() const#
Get Train With View Masks.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Returns:
bool Train With View Masks
-
UnsuperSegmentationTrainingParameters &set_train_with_view_mask(bool train_with_view_mask)#
Set Train With View Masks with bool value.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Parameters:
train_with_view_mask – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationTrainingParameters the reference of this object.
-
const UnsuperSegmentationModelParameters &get_model_param() const#
Get Model Parameters.
Model Parameters
See also
- Returns:
const UnsuperSegmentationModelParameters & Model Parameters
-
UnsuperSegmentationTrainingParameters &set_model_param(UnsuperSegmentationModelParameters model_param)#
Set Model Parameters with UnsuperSegmentationModelParameters value.
Model Parameters
See also
- Parameters:
model_param – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationTrainingParameters the reference of this object.
-
UnsuperSegmentationModelParameters &get_model_param()#
Get mutable reference of Model Parameters.
Model Parameters
- Returns:
UnsuperSegmentationTrainingParameters& the mutable reference of the group.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
UnsuperSegmentationTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
UnsuperSegmentationTrainingParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class UnsuperSegmentationSamplingParameters : public visionflow::param::ISchemable#
UnsuperSegmentationSamplingParameters Parameter class generated by jinja2 automatically.
Unsuper Segmentation Training Sample Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const UnsuperSegmentationInputShape &get_sampling_input_shape() const#
Get Customize Network Input Shape.
Custom model input size. When this parameter group is enabled, input images will be resized to the custom size before training.
See also
- Returns:
const UnsuperSegmentationInputShape & Customize Network Input Shape
-
UnsuperSegmentationSamplingParameters &set_sampling_input_shape(UnsuperSegmentationInputShape sampling_input_shape)#
Set Customize Network Input Shape with UnsuperSegmentationInputShape value.
Custom model input size. When this parameter group is enabled, input images will be resized to the custom size before training.
See also
- Parameters:
sampling_input_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationSamplingParameters the reference of this object.
-
UnsuperSegmentationInputShape &get_sampling_input_shape()#
Get mutable reference of Customize Network Input Shape.
Custom model input size. When this parameter group is enabled, input images will be resized to the custom size before training.
- Returns:
UnsuperSegmentationSamplingParameters& the mutable reference of the group.
-
bool get_local_sampling() const#
Get Local Sampling Strategy.
when enable : Crop a patch(Input Shape) of image to train instead of whole image, increasing train speed but might make performance decline when image is complex
See also
- Returns:
bool Local Sampling Strategy
-
UnsuperSegmentationSamplingParameters &set_local_sampling(bool local_sampling)#
Set Local Sampling Strategy with bool value.
when enable : Crop a patch(Input Shape) of image to train instead of whole image, increasing train speed but might make performance decline when image is complex
See also
- Parameters:
local_sampling – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationSamplingParameters the reference of this object.
-
int get_sampling_resolution() const#
Get Sampling Resolution Level.
The short side of the image input will be scaled to (Sampling Input Size * Sampling Resolution), and the long side will be scaled proportionally.
See also
- Returns:
int Sampling Resolution Level
-
UnsuperSegmentationSamplingParameters &set_sampling_resolution(int sampling_resolution)#
Set Sampling Resolution Level with int value.
The short side of the image input will be scaled to (Sampling Input Size * Sampling Resolution), and the long side will be scaled proportionally.
See also
- Parameters:
sampling_resolution – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationSamplingParameters the reference of this object.
-
bool get_image_consistent_optimize() const#
Get High Consistent Image.
Enable when image looks like the same in all region, such as texture image, it helps speed up train and might get better performance in such kind of image
See also
- Returns:
bool High Consistent Image
-
UnsuperSegmentationSamplingParameters &set_image_consistent_optimize(bool image_consistent_optimize)#
Set High Consistent Image with bool value.
Enable when image looks like the same in all region, such as texture image, it helps speed up train and might get better performance in such kind of image
See also
- Parameters:
image_consistent_optimize – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationSamplingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class UnsuperSegmentationModelParameters : public visionflow::param::ISchemable#
UnsuperSegmentationModelParameters Parameter class generated by jinja2 automatically.
Unsuper Segmentation Model Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::string &get_model_arch() const#
Get Model Architecture.
High-Precision-Model training slow but get better result, using for complex image; Training Fast Model training fast but might get worse performance than High-Precision-Model
See also
- Returns:
const std::string & Model Architecture
-
UnsuperSegmentationModelParameters &set_model_arch(std::string model_arch)#
Set Model Architecture with std::string value.
High-Precision-Model training slow but get better result, using for complex image; Training Fast Model training fast but might get worse performance than High-Precision-Model
See also
- Parameters:
model_arch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationModelParameters the reference of this object.
-
bool get_add_logical_model() const#
Get Logical Defect Detect.
increase detect performance for logical defect,such as character lost or duplicate, but increasing training and inference speed
See also
- Returns:
bool Logical Defect Detect
-
UnsuperSegmentationModelParameters &set_add_logical_model(bool add_logical_model)#
Set Logical Defect Detect with bool value.
increase detect performance for logical defect,such as character lost or duplicate, but increasing training and inference speed
See also
- Parameters:
add_logical_model – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationModelParameters the reference of this object.
-
bool get_contrastive_mode() const#
Get Contrastive Mode.
With this option enabled, use contrastive detection. This mode is only applicable to the multi-visual image composed of two images, first visual image is the image that need to be detected for defects, and second visual image is the OK image that does not contain defects.
See also
- Returns:
bool Contrastive Mode
-
UnsuperSegmentationModelParameters &set_contrastive_mode(bool contrastive_mode)#
Set Contrastive Mode with bool value.
With this option enabled, use contrastive detection. This mode is only applicable to the multi-visual image composed of two images, first visual image is the image that need to be detected for defects, and second visual image is the OK image that does not contain defects.
See also
- Parameters:
contrastive_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationModelParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
Unsuper Classification Training Parameters#
-
class UnsuperClassificationInputShape : public visionflow::param::ISchemable#
UnsuperClassificationInputShape Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
UnsuperClassificationInputShape &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationInputShape the reference of this object.
-
int get_base_input_width() const#
Get Base Input Width.
Base Input Width
See also
- Returns:
int Base Input Width
-
UnsuperClassificationInputShape &set_base_input_width(int base_input_width)#
Set Base Input Width with int value.
Base Input Width
See also
- Parameters:
base_input_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationInputShape the reference of this object.
-
int get_base_input_height() const#
Get Base Input Height.
Base Input Height
See also
- Returns:
int Base Input Height
-
UnsuperClassificationInputShape &set_base_input_height(int base_input_height)#
Set Base Input Height with int value.
Base Input Height
See also
- Parameters:
base_input_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationInputShape the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class UnsuperClassificationTrainingParameters : public visionflow::param::SchemableParameter#
UnsuperClassificationTrainingParameters Parameter class generated by jinja2 automatically.
Unsuper Classification Training Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
UnsuperClassificationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Returns:
int Training Batch Size
-
UnsuperClassificationTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationTrainingParameters the reference of this object.
-
const std::vector<uint32_t> &get_training_image_pages() const#
Get Select Visual Image Pages.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Returns:
const std::vector<uint32_t> & Select Visual Image Pages
-
UnsuperClassificationTrainingParameters &set_training_image_pages(std::vector<uint32_t> training_image_pages)#
Set Select Visual Image Pages with std::vector<uint32_t> value.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Parameters:
training_image_pages – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationTrainingParameters the reference of this object.
-
uint32_t get_training_image_pages(size_t index) const#
Get value in Select Visual Image Pages with index.
Warning
The index must be less than get_training_image_pages_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
uint32_t value in Select Visual Image Pages at index.
-
size_t get_training_image_pages_size() const#
Get the size of Select Visual Image Pages.
- Returns:
size_t the size of Select Visual Image Pages
-
const UnsuperClassificationInputShape &get_input_shape() const#
Get Customize Network Input Shape.
Custom model input size. When this parameter group is enabled, input images will be resized to the custom size before training.
See also
- Returns:
const UnsuperClassificationInputShape & Customize Network Input Shape
-
UnsuperClassificationTrainingParameters &set_input_shape(UnsuperClassificationInputShape input_shape)#
Set Customize Network Input Shape with UnsuperClassificationInputShape value.
Custom model input size. When this parameter group is enabled, input images will be resized to the custom size before training.
See also
- Parameters:
input_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationTrainingParameters the reference of this object.
-
UnsuperClassificationInputShape &get_input_shape()#
Get mutable reference of Customize Network Input Shape.
Custom model input size. When this parameter group is enabled, input images will be resized to the custom size before training.
- Returns:
UnsuperClassificationTrainingParameters& the mutable reference of the group.
-
const std::string &get_model_arch() const#
Get Model Architecture.
Currently only one baseline model
See also
- Returns:
const std::string & Model Architecture
-
UnsuperClassificationTrainingParameters &set_model_arch(std::string model_arch)#
Set Model Architecture with std::string value.
Currently only one baseline model
See also
- Parameters:
model_arch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationTrainingParameters the reference of this object.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
UnsuperClassificationTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
UnsuperClassificationTrainingParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
Unsuper Segmentation Inference Parameters#
-
class UnsuperDefectRadius : public visionflow::param::ISchemable#
UnsuperDefectRadius Parameter class generated by jinja2 automatically.
Parameters using for define defect size
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_auto_set() const#
Get Automatic Setting.
Network adjust defect radius automatically
See also
- Returns:
bool Automatic Setting
-
UnsuperDefectRadius &set_auto_set(bool auto_set)#
Set Automatic Setting with bool value.
Network adjust defect radius automatically
See also
- Parameters:
auto_set – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperDefectRadius the reference of this object.
-
int get_size() const#
Get Defect Radius.
Defect radius size
See also
- Returns:
int Defect Radius
-
UnsuperDefectRadius &set_size(int size)#
Set Defect Radius with int value.
Defect radius size
See also
- Parameters:
size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperDefectRadius the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class UnsuperSegmentationInferenceParameters : public visionflow::param::SchemableParameter#
UnsuperSegmentationInferenceParameters Parameter class generated by jinja2 automatically.
UnsuperSegmentationInferenceParameters
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_minimum_defect_size() const#
Get Minimum Defect Size.
Minimum detect that customer want to detect, but too small will increase overkill
See also
- Returns:
int Minimum Defect Size
-
UnsuperSegmentationInferenceParameters &set_minimum_defect_size(int minimum_defect_size)#
Set Minimum Defect Size with int value.
Minimum detect that customer want to detect, but too small will increase overkill
See also
- Parameters:
minimum_defect_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationInferenceParameters the reference of this object.
-
int get_sampling_density() const#
Get Sampling Density.
smaller value will make result more precise, but increase inference time
See also
- Returns:
int Sampling Density
-
UnsuperSegmentationInferenceParameters &set_sampling_density(int sampling_density)#
Set Sampling Density with int value.
smaller value will make result more precise, but increase inference time
See also
- Parameters:
sampling_density – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperSegmentationInferenceParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
Unsuper Classification Inference Parameters#
-
class UnsuperClassificationInferenceParameters : public visionflow::param::SchemableParameter#
UnsuperClassificationInferenceParameters Parameter class generated by jinja2 automatically.
Parameters using for unsuper classification inference
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_ng_thresh() const#
Get NG Threshold.
Image will be set to ok when score < NG Threshold, and set to ng when score > NG Threshold
See also
- Returns:
double NG Threshold
-
UnsuperClassificationInferenceParameters &set_ng_thresh(double ng_thresh)#
Set NG Threshold with double value.
Image will be set to ok when score < NG Threshold, and set to ng when score > NG Threshold
See also
- Parameters:
ng_thresh – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationInferenceParameters the reference of this object.
-
const UnsuperDefectRadius &get_defect_radius() const#
Get Defect Radius.
Expected defect size
See also
- Returns:
const UnsuperDefectRadius & Defect Radius
-
UnsuperClassificationInferenceParameters &set_defect_radius(UnsuperDefectRadius defect_radius)#
Set Defect Radius with UnsuperDefectRadius value.
Expected defect size
See also
- Parameters:
defect_radius – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UnsuperClassificationInferenceParameters the reference of this object.
-
UnsuperDefectRadius &get_defect_radius()#
Get mutable reference of Defect Radius.
Expected defect size
- Returns:
UnsuperClassificationInferenceParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
Filter Parameters#
-
class AxialSideLengthRange : public visionflow::param::ISchemable#
AxialSideLengthRange Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
AxialSideLengthRange &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
const std::vector<int> &get_x_axis_side_range() const#
Get X-Axis Side Length Range.
The X-axis side length range of regions you want to keep.
See also
- Returns:
const std::vector<int> & X-Axis Side Length Range
-
AxialSideLengthRange &set_x_axis_side_range(std::vector<int> x_axis_side_range)#
Set X-Axis Side Length Range with std::vector<int> value.
The X-axis side length range of regions you want to keep.
See also
- Parameters:
x_axis_side_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
bool x_axis_side_range_contains(int value) const#
Check if the X-Axis Side Length Range contains the value.
- Returns:
bool true if the X-Axis Side Length Range contains the value, otherwise false.
-
int get_x_axis_side_range_left() const#
Get left point value of X-Axis Side Length Range.
See also
- Returns:
const std::vector<int> & left point value of X-Axis Side Length Range
-
int get_x_axis_side_range_right() const#
Get the right point value of X-Axis Side Length Range.
See also
- Returns:
const std::vector<int> & the right point value of X-Axis Side Length Range
-
AxialSideLengthRange &set_x_axis_side_range_left(int x_axis_side_range_left)#
Set left point value of X-Axis Side Length Range with std::vector<int> value.
The X-axis side length range of regions you want to keep.
See also
- Parameters:
x_axis_side_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
AxialSideLengthRange &set_x_axis_side_range_right(int x_axis_side_range_right)#
Set the right point value of X-Axis Side Length Range with std::vector<int> value.
The X-axis side length range of regions you want to keep.
See also
- Parameters:
x_axis_side_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
const std::vector<int> &get_y_axis_side_range() const#
Get Y-Axis Side Length Range.
The Y-axis side length range of regions you want to keep.
See also
- Returns:
const std::vector<int> & Y-Axis Side Length Range
-
AxialSideLengthRange &set_y_axis_side_range(std::vector<int> y_axis_side_range)#
Set Y-Axis Side Length Range with std::vector<int> value.
The Y-axis side length range of regions you want to keep.
See also
- Parameters:
y_axis_side_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
bool y_axis_side_range_contains(int value) const#
Check if the Y-Axis Side Length Range contains the value.
- Returns:
bool true if the Y-Axis Side Length Range contains the value, otherwise false.
-
int get_y_axis_side_range_left() const#
Get left point value of Y-Axis Side Length Range.
See also
- Returns:
const std::vector<int> & left point value of Y-Axis Side Length Range
-
int get_y_axis_side_range_right() const#
Get the right point value of Y-Axis Side Length Range.
See also
- Returns:
const std::vector<int> & the right point value of Y-Axis Side Length Range
-
AxialSideLengthRange &set_y_axis_side_range_left(int y_axis_side_range_left)#
Set left point value of Y-Axis Side Length Range with std::vector<int> value.
The Y-axis side length range of regions you want to keep.
See also
- Parameters:
y_axis_side_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
AxialSideLengthRange &set_y_axis_side_range_right(int y_axis_side_range_right)#
Set the right point value of Y-Axis Side Length Range with std::vector<int> value.
The Y-axis side length range of regions you want to keep.
See also
- Parameters:
y_axis_side_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
const std::vector<double> &get_x_y_ratio_range() const#
Get X/Y Ratio Range.
The range of the ratio of X-axis side length to the Y-axis side length of the regions that you want to keep.
See also
- Returns:
const std::vector<double> & X/Y Ratio Range
-
AxialSideLengthRange &set_x_y_ratio_range(std::vector<double> x_y_ratio_range)#
Set X/Y Ratio Range with std::vector<double> value.
The range of the ratio of X-axis side length to the Y-axis side length of the regions that you want to keep.
See also
- Parameters:
x_y_ratio_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
bool x_y_ratio_range_contains(double value) const#
Check if the X/Y Ratio Range contains the value.
- Returns:
bool true if the X/Y Ratio Range contains the value, otherwise false.
-
double get_x_y_ratio_range_left() const#
Get left point value of X/Y Ratio Range.
See also
- Returns:
const std::vector<double> & left point value of X/Y Ratio Range
-
double get_x_y_ratio_range_right() const#
Get the right point value of X/Y Ratio Range.
See also
- Returns:
const std::vector<double> & the right point value of X/Y Ratio Range
-
AxialSideLengthRange &set_x_y_ratio_range_left(double x_y_ratio_range_left)#
Set left point value of X/Y Ratio Range with std::vector<double> value.
The range of the ratio of X-axis side length to the Y-axis side length of the regions that you want to keep.
See also
- Parameters:
x_y_ratio_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
AxialSideLengthRange &set_x_y_ratio_range_right(double x_y_ratio_range_right)#
Set the right point value of X/Y Ratio Range with std::vector<double> value.
The range of the ratio of X-axis side length to the Y-axis side length of the regions that you want to keep.
See also
- Parameters:
x_y_ratio_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AxialSideLengthRange the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class SideLengthRange : public visionflow::param::ISchemable#
SideLengthRange Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
SideLengthRange &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
bool get_on_rotate_rect() const#
Get Filter On Min-Area-Rect.
The “Longer Side Length Range” and “Shorter Side Length Range” will be applied to the min-area rotate rectangle of each region if this option is enabled, otherwise, they will be applied to the axial bounding rect.
See also
- Returns:
bool Filter On Min-Area-Rect
-
SideLengthRange &set_on_rotate_rect(bool on_rotate_rect)#
Set Filter On Min-Area-Rect with bool value.
The “Longer Side Length Range” and “Shorter Side Length Range” will be applied to the min-area rotate rectangle of each region if this option is enabled, otherwise, they will be applied to the axial bounding rect.
See also
- Parameters:
on_rotate_rect – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
const std::vector<int> &get_longer_side_range() const#
Get Longer Side Length Range.
The longer side length range of regions you want to keep.
See also
- Returns:
const std::vector<int> & Longer Side Length Range
-
SideLengthRange &set_longer_side_range(std::vector<int> longer_side_range)#
Set Longer Side Length Range with std::vector<int> value.
The longer side length range of regions you want to keep.
See also
- Parameters:
longer_side_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
bool longer_side_range_contains(int value) const#
Check if the Longer Side Length Range contains the value.
- Returns:
bool true if the Longer Side Length Range contains the value, otherwise false.
-
int get_longer_side_range_left() const#
Get left point value of Longer Side Length Range.
See also
- Returns:
const std::vector<int> & left point value of Longer Side Length Range
-
int get_longer_side_range_right() const#
Get the right point value of Longer Side Length Range.
See also
- Returns:
const std::vector<int> & the right point value of Longer Side Length Range
-
SideLengthRange &set_longer_side_range_left(int longer_side_range_left)#
Set left point value of Longer Side Length Range with std::vector<int> value.
The longer side length range of regions you want to keep.
See also
- Parameters:
longer_side_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
SideLengthRange &set_longer_side_range_right(int longer_side_range_right)#
Set the right point value of Longer Side Length Range with std::vector<int> value.
The longer side length range of regions you want to keep.
See also
- Parameters:
longer_side_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
const std::vector<int> &get_shorter_side_range() const#
Get Shorter Side Length Range.
The shorter side length range of regions you want to keep.
See also
- Returns:
const std::vector<int> & Shorter Side Length Range
-
SideLengthRange &set_shorter_side_range(std::vector<int> shorter_side_range)#
Set Shorter Side Length Range with std::vector<int> value.
The shorter side length range of regions you want to keep.
See also
- Parameters:
shorter_side_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
bool shorter_side_range_contains(int value) const#
Check if the Shorter Side Length Range contains the value.
- Returns:
bool true if the Shorter Side Length Range contains the value, otherwise false.
-
int get_shorter_side_range_left() const#
Get left point value of Shorter Side Length Range.
See also
- Returns:
const std::vector<int> & left point value of Shorter Side Length Range
-
int get_shorter_side_range_right() const#
Get the right point value of Shorter Side Length Range.
See also
- Returns:
const std::vector<int> & the right point value of Shorter Side Length Range
-
SideLengthRange &set_shorter_side_range_left(int shorter_side_range_left)#
Set left point value of Shorter Side Length Range with std::vector<int> value.
The shorter side length range of regions you want to keep.
See also
- Parameters:
shorter_side_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
SideLengthRange &set_shorter_side_range_right(int shorter_side_range_right)#
Set the right point value of Shorter Side Length Range with std::vector<int> value.
The shorter side length range of regions you want to keep.
See also
- Parameters:
shorter_side_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
const std::vector<double> &get_aspect_ratio_range() const#
Get Aspect Ratio Range.
The range of the ratio of the short side to the long side of the regions that you want to keep.
See also
- Returns:
const std::vector<double> & Aspect Ratio Range
-
SideLengthRange &set_aspect_ratio_range(std::vector<double> aspect_ratio_range)#
Set Aspect Ratio Range with std::vector<double> value.
The range of the ratio of the short side to the long side of the regions that you want to keep.
See also
- Parameters:
aspect_ratio_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
bool aspect_ratio_range_contains(double value) const#
Check if the Aspect Ratio Range contains the value.
- Returns:
bool true if the Aspect Ratio Range contains the value, otherwise false.
-
double get_aspect_ratio_range_left() const#
Get left point value of Aspect Ratio Range.
See also
- Returns:
const std::vector<double> & left point value of Aspect Ratio Range
-
double get_aspect_ratio_range_right() const#
Get the right point value of Aspect Ratio Range.
See also
- Returns:
const std::vector<double> & the right point value of Aspect Ratio Range
-
SideLengthRange &set_aspect_ratio_range_left(double aspect_ratio_range_left)#
Set left point value of Aspect Ratio Range with std::vector<double> value.
The range of the ratio of the short side to the long side of the regions that you want to keep.
See also
- Parameters:
aspect_ratio_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
SideLengthRange &set_aspect_ratio_range_right(double aspect_ratio_range_right)#
Set the right point value of Aspect Ratio Range with std::vector<double> value.
The range of the ratio of the short side to the long side of the regions that you want to keep.
See also
- Parameters:
aspect_ratio_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SideLengthRange the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class FilterScript : public visionflow::param::ISchemable#
FilterScript Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
FilterScript &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
FilterScript the reference of this object.
-
const std::string &get_filter_script() const#
Get Filter Script.
The python filter script.
See also
- Returns:
const std::string & Filter Script
-
FilterScript &set_filter_script(std::string filter_script)#
Set Filter Script with std::string value.
The python filter script.
See also
- Parameters:
filter_script – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
FilterScript the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class SingleClassPolygonsFilterParameters : public visionflow::param::ISchemable#
SingleClassPolygonsFilterParameters Parameter class generated by jinja2 automatically.
Common Regions filter parameters to filter regions.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
SingleClassPolygonsFilterParameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SingleClassPolygonsFilterParameters the reference of this object.
-
double get_score_threshold() const#
Get Score Threshold.
Only retains regions with score greater than this threshold.
See also
- Returns:
double Score Threshold
-
SingleClassPolygonsFilterParameters &set_score_threshold(double score_threshold)#
Set Score Threshold with double value.
Only retains regions with score greater than this threshold.
See also
- Parameters:
score_threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SingleClassPolygonsFilterParameters the reference of this object.
-
const std::vector<int> &get_area_range() const#
Get Area Range.
The area range of the regions you want to keep
See also
- Returns:
const std::vector<int> & Area Range
-
SingleClassPolygonsFilterParameters &set_area_range(std::vector<int> area_range)#
Set Area Range with std::vector<int> value.
The area range of the regions you want to keep
See also
- Parameters:
area_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SingleClassPolygonsFilterParameters the reference of this object.
-
bool area_range_contains(int value) const#
Check if the Area Range contains the value.
- Returns:
bool true if the Area Range contains the value, otherwise false.
-
int get_area_range_left() const#
Get left point value of Area Range.
See also
- Returns:
const std::vector<int> & left point value of Area Range
-
int get_area_range_right() const#
Get the right point value of Area Range.
See also
- Returns:
const std::vector<int> & the right point value of Area Range
-
SingleClassPolygonsFilterParameters &set_area_range_left(int area_range_left)#
Set left point value of Area Range with std::vector<int> value.
The area range of the regions you want to keep
See also
- Parameters:
area_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SingleClassPolygonsFilterParameters the reference of this object.
-
SingleClassPolygonsFilterParameters &set_area_range_right(int area_range_right)#
Set the right point value of Area Range with std::vector<int> value.
The area range of the regions you want to keep
See also
- Parameters:
area_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SingleClassPolygonsFilterParameters the reference of this object.
-
const AxialSideLengthRange &get_axial_side_filter() const#
Get Axial-Side-Length Filter.
Filter regions with X/Y-axis side length.
See also
- Returns:
const AxialSideLengthRange & Axial-Side-Length Filter
-
SingleClassPolygonsFilterParameters &set_axial_side_filter(AxialSideLengthRange axial_side_filter)#
Set Axial-Side-Length Filter with AxialSideLengthRange value.
Filter regions with X/Y-axis side length.
See also
- Parameters:
axial_side_filter – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SingleClassPolygonsFilterParameters the reference of this object.
-
AxialSideLengthRange &get_axial_side_filter()#
Get mutable reference of Axial-Side-Length Filter.
Filter regions with X/Y-axis side length.
- Returns:
SingleClassPolygonsFilterParameters& the mutable reference of the group.
-
const SideLengthRange &get_side_filter() const#
Get Side-Length Filter.
Filter regions with Side length
See also
- Returns:
const SideLengthRange & Side-Length Filter
-
SingleClassPolygonsFilterParameters &set_side_filter(SideLengthRange side_filter)#
Set Side-Length Filter with SideLengthRange value.
Filter regions with Side length
See also
- Parameters:
side_filter – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SingleClassPolygonsFilterParameters the reference of this object.
-
SideLengthRange &get_side_filter()#
Get mutable reference of Side-Length Filter.
Filter regions with Side length
- Returns:
SingleClassPolygonsFilterParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class PolygonsFilterParameters : public visionflow::param::SchemableParameter#
PolygonsFilterParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::map<std::string, SingleClassPolygonsFilterParameters> &get_class_thresholds() const#
Get Class Polygon Thresholds.
Polygon thresholds (area, side-length,etc.) named with the label categories according to which to filter the polygons.
See also
- Returns:
const std::map<std::string, SingleClassPolygonsFilterParameters> & Class Polygon Thresholds
-
PolygonsFilterParameters &set_class_thresholds(std::map<std::string, SingleClassPolygonsFilterParameters> class_thresholds)#
Set Class Polygon Thresholds with std::map<std::string, SingleClassPolygonsFilterParameters> value.
Polygon thresholds (area, side-length,etc.) named with the label categories according to which to filter the polygons.
See also
- Parameters:
class_thresholds – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PolygonsFilterParameters the reference of this object.
-
const SingleClassPolygonsFilterParameters &get_class_thresholds(const std::string &key) const#
Get value in Class Polygon Thresholds with key.
Warning
The key must be exist in Class Polygon Thresholds. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, SingleClassPolygonsFilterParameters> & value in Class Polygon Thresholds at key.
-
PolygonsFilterParameters &set_class_thresholds(const std::string &key, SingleClassPolygonsFilterParameters value)#
Set value in Class Polygon Thresholds with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PolygonsFilterParameters the reference of this object.
-
bool class_thresholds_contains(const std::string &key) const#
Check if the key is exist in Class Polygon Thresholds.
- Returns:
bool true if the key is exist in Class Polygon Thresholds, otherwise false.
-
size_t get_class_thresholds_size() const#
Get the size of Class Polygon Thresholds.
- Returns:
size_t the size of Class Polygon Thresholds
-
SingleClassPolygonsFilterParameters &get_class_thresholds(const std::string &key)#
Get mutable reference of value in Class Polygon Thresholds with key. A new key and default value will be created if the key does not exist.
- Returns:
SingleClassPolygonsFilterParameters& the mutable reference of value in Class Polygon Thresholds at key.
-
const SingleClassPolygonsFilterParameters &get_additional_threshold() const#
Get Additional Probability Thresholds.
Additional polygon threshold for other label categories not in “Class Polygon Thresholds”. The filter operator will filter all feature maps whose label category is not in “Class Polygon Thresholds” with the additional threshold.
See also
- Returns:
const SingleClassPolygonsFilterParameters & Additional Probability Thresholds
-
PolygonsFilterParameters &set_additional_threshold(SingleClassPolygonsFilterParameters additional_threshold)#
Set Additional Probability Thresholds with SingleClassPolygonsFilterParameters value.
Additional polygon threshold for other label categories not in “Class Polygon Thresholds”. The filter operator will filter all feature maps whose label category is not in “Class Polygon Thresholds” with the additional threshold.
See also
- Parameters:
additional_threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PolygonsFilterParameters the reference of this object.
-
SingleClassPolygonsFilterParameters &get_additional_threshold()#
Get mutable reference of Additional Probability Thresholds.
Additional polygon threshold for other label categories not in “Class Polygon Thresholds”. The filter operator will filter all feature maps whose label category is not in “Class Polygon Thresholds” with the additional threshold.
- Returns:
PolygonsFilterParameters& the mutable reference of the group.
-
const FilterScript &get_script_filter() const#
Get Custom python filter script.
Filter regions with customized python script.
See also
- Returns:
const FilterScript & Custom python filter script
-
PolygonsFilterParameters &set_script_filter(FilterScript script_filter)#
Set Custom python filter script with FilterScript value.
Filter regions with customized python script.
See also
- Parameters:
script_filter – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PolygonsFilterParameters the reference of this object.
-
FilterScript &get_script_filter()#
Get mutable reference of Custom python filter script.
Filter regions with customized python script.
- Returns:
PolygonsFilterParameters& the mutable reference of the group.
-
const std::map<std::string, TypeValuePair> &get_user_vars() const#
Get User Defined Variables.
The key of the map is the name of the python object and the value of the map is a pair of string which means type-value of the python object.
See also
- Returns:
const std::map<std::string, TypeValuePair> & User Defined Variables
-
PolygonsFilterParameters &set_user_vars(std::map<std::string, TypeValuePair> user_vars)#
Set User Defined Variables with std::map<std::string, TypeValuePair> value.
The key of the map is the name of the python object and the value of the map is a pair of string which means type-value of the python object.
See also
- Parameters:
user_vars – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PolygonsFilterParameters the reference of this object.
-
const TypeValuePair &get_user_vars(const std::string &key) const#
Get value in User Defined Variables with key.
Warning
The key must be exist in User Defined Variables. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, TypeValuePair> & value in User Defined Variables at key.
-
PolygonsFilterParameters &set_user_vars(const std::string &key, TypeValuePair value)#
Set value in User Defined Variables with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PolygonsFilterParameters the reference of this object.
-
bool user_vars_contains(const std::string &key) const#
Check if the key is exist in User Defined Variables.
- Returns:
bool true if the key is exist in User Defined Variables, otherwise false.
-
size_t get_user_vars_size() const#
Get the size of User Defined Variables.
- Returns:
size_t the size of User Defined Variables
-
TypeValuePair &get_user_vars(const std::string &key)#
Get mutable reference of value in User Defined Variables with key. A new key and default value will be created if the key does not exist.
- Returns:
TypeValuePair& the mutable reference of value in User Defined Variables at key.
-
virtual const std::string &schema_str() const override#
-
class FeatureMapFilterParameters : public visionflow::param::SchemableParameter#
FeatureMapFilterParameters Parameter class generated by jinja2 automatically.
Parameters to config the feature map filter.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::map<std::string, double> &get_class_thresholds() const#
Get Class Probability Thresholds.
Thresholds named with the label categories according to which to binarize the feature map.
See also
- Returns:
const std::map<std::string, double> & Class Probability Thresholds
-
FeatureMapFilterParameters &set_class_thresholds(std::map<std::string, double> class_thresholds)#
Set Class Probability Thresholds with std::map<std::string, double> value.
Thresholds named with the label categories according to which to binarize the feature map.
See also
- Parameters:
class_thresholds – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
FeatureMapFilterParameters the reference of this object.
-
double get_class_thresholds(const std::string &key) const#
Get value in Class Probability Thresholds with key.
Warning
The key must be exist in Class Probability Thresholds. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, double> & value in Class Probability Thresholds at key.
-
FeatureMapFilterParameters &set_class_thresholds(const std::string &key, double value)#
Set value in Class Probability Thresholds with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
FeatureMapFilterParameters the reference of this object.
-
bool class_thresholds_contains(const std::string &key) const#
Check if the key is exist in Class Probability Thresholds.
- Returns:
bool true if the key is exist in Class Probability Thresholds, otherwise false.
-
size_t get_class_thresholds_size() const#
Get the size of Class Probability Thresholds.
- Returns:
size_t the size of Class Probability Thresholds
-
double get_additional_threshold() const#
Get Additional Probability Thresholds.
Additional threshold for other label categories not in “Class Probability Thresholds”. The visionflow::opers::FeatureMapFilter will filter all feature maps whose label category is not in “Class Probability Thresholds” with the additional threshold.
See also
- Returns:
double Additional Probability Thresholds
-
FeatureMapFilterParameters &set_additional_threshold(double additional_threshold)#
Set Additional Probability Thresholds with double value.
Additional threshold for other label categories not in “Class Probability Thresholds”. The visionflow::opers::FeatureMapFilter will filter all feature maps whose label category is not in “Class Probability Thresholds” with the additional threshold.
See also
- Parameters:
additional_threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
FeatureMapFilterParameters the reference of this object.
-
int get_dilate_pixels() const#
Get Dilate Pixels.
Dilate the filtered regions by the specified pixels. This option can be used to merge closely scattered defects together.
See also
- Returns:
int Dilate Pixels
-
FeatureMapFilterParameters &set_dilate_pixels(int dilate_pixels)#
Set Dilate Pixels with int value.
Dilate the filtered regions by the specified pixels. This option can be used to merge closely scattered defects together.
See also
- Parameters:
dilate_pixels – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
FeatureMapFilterParameters the reference of this object.
-
bool get_enable_polygon_score() const#
Get Calculate Defect Region Score.
Provide every defect region score(0~1), bigger value means the region has more possibility to be a defect
See also
- Returns:
bool Calculate Defect Region Score
-
FeatureMapFilterParameters &set_enable_polygon_score(bool enable_polygon_score)#
Set Calculate Defect Region Score with bool value.
Provide every defect region score(0~1), bigger value means the region has more possibility to be a defect
See also
- Parameters:
enable_polygon_score – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
FeatureMapFilterParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
Training logs#
-
class LossCurve : public visionflow::param::ISchemable#
LossCurve Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<double> &get_values() const#
Get values.
A loss curve
See also
- Returns:
const std::vector<double> & values
-
LossCurve &set_values(std::vector<double> values)#
Set values with std::vector<double> value.
A loss curve
See also
- Parameters:
values – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LossCurve the reference of this object.
-
double get_values(size_t index) const#
Get value in values with index.
Warning
The index must be less than get_values_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
double value in values at index.
-
size_t get_values_size() const#
Get the size of values.
- Returns:
size_t the size of values
-
virtual const std::string &schema_str() const override#
-
class TrainingLog : public visionflow::param::SchemableParameter#
TrainingLog Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int64_t get_start_at() const#
Get Start Time.
The training task start time.
See also
- Returns:
int64_t Start Time
-
TrainingLog &set_start_at(int64_t start_at)#
Set Start Time with int64_t value.
The training task start time.
See also
- Parameters:
start_at – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TrainingLog the reference of this object.
-
int64_t get_end_at() const#
Get End Time.
The training task finish time.
See also
- Returns:
int64_t End Time
-
TrainingLog &set_end_at(int64_t end_at)#
Set End Time with int64_t value.
The training task finish time.
See also
- Parameters:
end_at – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TrainingLog the reference of this object.
-
const std::map<std::string, LossCurve> &get_loss() const#
Get Loss.
Loss curves with name. Note that curve named
VFLOW-EPOCH-INDEXis the epoch index of each loss data, and note thatVFLOW-EPOCH-INDEXis not exists in the data generated by the old version library.See also
- Returns:
const std::map<std::string, LossCurve> & Loss
-
TrainingLog &set_loss(std::map<std::string, LossCurve> loss)#
Set Loss with std::map<std::string, LossCurve> value.
Loss curves with name. Note that curve named
VFLOW-EPOCH-INDEXis the epoch index of each loss data, and note thatVFLOW-EPOCH-INDEXis not exists in the data generated by the old version library.See also
- Parameters:
loss – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TrainingLog the reference of this object.
-
const LossCurve &get_loss(const std::string &key) const#
Get value in Loss with key.
Warning
The key must be exist in Loss. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, LossCurve> & value in Loss at key.
-
TrainingLog &set_loss(const std::string &key, LossCurve value)#
Set value in Loss with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TrainingLog the reference of this object.
-
bool loss_contains(const std::string &key) const#
Check if the key is exist in Loss.
- Returns:
bool true if the key is exist in Loss, otherwise false.
-
size_t get_loss_size() const#
Get the size of Loss.
- Returns:
size_t the size of Loss
-
virtual const std::string &schema_str() const override#
Training Mode#
-
enum visionflow::param::TrainingMode#
Values:
-
enumerator kNormalTrain = 0#
-
enumerator kIncrementalTrain = 1#
-
enumerator kNormalTrain = 0#
Inference Type#
Ungrouped Parameters#
-
class InferenceBatchSize : public visionflow::param::SchemableParameter#
InferenceBatchSize Parameter class generated by jinja2 automatically.
Inference BatchSize and Inference Mode. Currently only contains batch size. It may need to be refactored in the future.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_batch_size() const#
Get Inference Batch Size.
The batch size for inference. You can set it to the number of pictures you wish to infer at the same time. Usually the default value of 1 is sufficient. Note that if you set larger batches without giving enough images per inference, it may actually slow down inference.
See also
- Returns:
int Inference Batch Size
-
InferenceBatchSize &set_batch_size(int batch_size)#
Set Inference Batch Size with int value.
The batch size for inference. You can set it to the number of pictures you wish to infer at the same time. Usually the default value of 1 is sufficient. Note that if you set larger batches without giving enough images per inference, it may actually slow down inference.
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
InferenceBatchSize the reference of this object.
-
const InferType &get_infer_mode() const#
Get Inference Mode.
The running mode of inference. The default value is QuickStart. The following options are available: ‘Quick Start’ mode start quickly but inference little slower;’Fast Processing High Precision’ mode initialize slower but inference faster; ‘Fast Processing’ mode initialize slower but inference fastest and maybe lose some accuracy.
See also
- Returns:
const InferType & Inference Mode
-
InferenceBatchSize &set_infer_mode(InferType infer_mode)#
Set Inference Mode with InferType value.
The running mode of inference. The default value is QuickStart. The following options are available: ‘Quick Start’ mode start quickly but inference little slower;’Fast Processing High Precision’ mode initialize slower but inference faster; ‘Fast Processing’ mode initialize slower but inference fastest and maybe lose some accuracy.
See also
- Parameters:
infer_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
InferenceBatchSize the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class TRTCalibParameters : public visionflow::param::SchemableParameter#
TRTCalibParameters Parameter class generated by jinja2 automatically.
TensorRT Int8 Calibrator Parameters
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_place_holder() const#
Get PlaceHolder.
See also
- Returns:
bool PlaceHolder
-
TRTCalibParameters &set_place_holder(bool place_holder)#
Set PlaceHolder with bool value.
See also
- Parameters:
place_holder – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TRTCalibParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
GeometrySearch Parameters#
-
enum visionflow::param::TemplateMode#
Values:
-
enumerator kValueByPixel = 0#
-
enumerator kValueByRatio = 1#
-
enumerator kValueByPixel = 0#
-
class KeyPointNode : public visionflow::param::ISchemable#
KeyPointNode Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_x() const#
Get X-Value.
X-direction coordinate value of the center of the key point. When the template models set to kValueByPixel, X-Value should be set using pixel value. When the template models set to kValueByRatio, X-Value should be set using ratio value. When the Area Value Type is modified, X-Value needs to be modified.
See also
- Returns:
double X-Value
-
KeyPointNode &set_x(double x)#
Set X-Value with double value.
X-direction coordinate value of the center of the key point. When the template models set to kValueByPixel, X-Value should be set using pixel value. When the template models set to kValueByRatio, X-Value should be set using ratio value. When the Area Value Type is modified, X-Value needs to be modified.
See also
- Parameters:
x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
KeyPointNode the reference of this object.
-
double get_y() const#
Get Y-Value.
Y-direction coordinate value of the center of the key point. When the template models set to kValueByPixel, Y-Value should be set using pixel value. When the template models set to kValueByRatio, Y-Value should be set using ratio value. When the Area Value Type is modified, Y-Value needs to be modified.
See also
- Returns:
double Y-Value
-
KeyPointNode &set_y(double y)#
Set Y-Value with double value.
Y-direction coordinate value of the center of the key point. When the template models set to kValueByPixel, Y-Value should be set using pixel value. When the template models set to kValueByRatio, Y-Value should be set using ratio value. When the Area Value Type is modified, Y-Value needs to be modified.
See also
- Parameters:
y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
KeyPointNode the reference of this object.
-
const std::string &get_name() const#
Get Name.
The name that can be matched by the node
See also
- Returns:
const std::string & Name
-
KeyPointNode &set_name(std::string name)#
Set Name with std::string value.
The name that can be matched by the node
See also
- Parameters:
name – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
KeyPointNode the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class MultiNameKeyPointNode : public visionflow::param::ISchemable#
MultiNameKeyPointNode Parameter class generated by jinja2 automatically.
Define the position of the node and a set of names that can be matched by the node.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_x() const#
Get X-Value.
X-direction coordinate value of the key point, specified either in absolute pixel or relative ratio, depending on the chosen TemplateMode. If using kValueByRatio mode, the value is relative to the view width.
See also
- Returns:
double X-Value
-
MultiNameKeyPointNode &set_x(double x)#
Set X-Value with double value.
X-direction coordinate value of the key point, specified either in absolute pixel or relative ratio, depending on the chosen TemplateMode. If using kValueByRatio mode, the value is relative to the view width.
See also
- Parameters:
x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
MultiNameKeyPointNode the reference of this object.
-
double get_y() const#
Get Y-Value.
Y-direction coordinate value of the key point, specified either in absolute pixel or relative ratio, depending on the chosen TemplateMode. If using kValueByRatio mode, the value is relative to the view height.
See also
- Returns:
double Y-Value
-
MultiNameKeyPointNode &set_y(double y)#
Set Y-Value with double value.
Y-direction coordinate value of the key point, specified either in absolute pixel or relative ratio, depending on the chosen TemplateMode. If using kValueByRatio mode, the value is relative to the view height.
See also
- Parameters:
y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
MultiNameKeyPointNode the reference of this object.
-
const std::vector<std::string> &get_names() const#
Get Names.
The names that can be matched by the node
See also
- Returns:
const std::vector<std::string> & Names
-
MultiNameKeyPointNode &set_names(std::vector<std::string> names)#
Set Names with std::vector<std::string> value.
The names that can be matched by the node
See also
- Parameters:
names – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
MultiNameKeyPointNode the reference of this object.
-
const std::string &get_names(size_t index) const#
Get value in Names with index.
Warning
The index must be less than get_names_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::string & value in Names at index.
-
size_t get_names_size() const#
Get the size of Names.
- Returns:
size_t the size of Names
-
virtual const std::string &schema_str() const override#
GeometrySearch Training Parameters#
-
class SetGeometrySearchGranularityManually : public visionflow::param::ISchemable#
SetGeometrySearchGranularityManually Parameter class generated by jinja2 automatically.
GeometrySearch granularity parameter group
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
SetGeometrySearchGranularityManually &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchGranularityManually the reference of this object.
-
double get_granularity() const#
Get Granularity.
Customize granularity. Granularity indicates the scale of feature point. Higher granularity will generate more sparse and fewer feature points. Higher granularity will also speed up the infer process but with lower accuracy. We do not recommend to set to 1. 2 or higher will be a better choice for most applications.
See also
- Returns:
double Granularity
-
SetGeometrySearchGranularityManually &set_granularity(double granularity)#
Set Granularity with double value.
Customize granularity. Granularity indicates the scale of feature point. Higher granularity will generate more sparse and fewer feature points. Higher granularity will also speed up the infer process but with lower accuracy. We do not recommend to set to 1. 2 or higher will be a better choice for most applications.
See also
- Parameters:
granularity – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchGranularityManually the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class SetGeometrySearchNoiseThreshManually : public visionflow::param::ISchemable#
SetGeometrySearchNoiseThreshManually Parameter class generated by jinja2 automatically.
GeometrySearch noise threshold.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
SetGeometrySearchNoiseThreshManually &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchNoiseThreshManually the reference of this object.
-
int get_noise_thresh() const#
Get Noise Threshold.
Noise Threshold. Feature points with lower gradient magnitude than noise threshold will be ignore. Suggestive value: 20~60.
See also
- Returns:
int Noise Threshold
-
SetGeometrySearchNoiseThreshManually &set_noise_thresh(int noise_thresh)#
Set Noise Threshold with int value.
Noise Threshold. Feature points with lower gradient magnitude than noise threshold will be ignore. Suggestive value: 20~60.
See also
- Parameters:
noise_thresh – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchNoiseThreshManually the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class SetGeometrySearchFeatChainMagRelativeThreshManually : public visionflow::param::ISchemable#
SetGeometrySearchFeatChainMagRelativeThreshManually Parameter class generated by jinja2 automatically.
GeometrySearch feature chain magnitude threshold
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
SetGeometrySearchFeatChainMagRelativeThreshManually &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchFeatChainMagRelativeThreshManually the reference of this object.
-
double get_total_magnitude_relative_thresh() const#
Get Magnitude Relative Threshold.
Set relative total gradient magnitude threshold for feature chains.The actual threshold will be max length of chains * relative threshold.
- Returns:
double Magnitude Relative Threshold
-
SetGeometrySearchFeatChainMagRelativeThreshManually &set_total_magnitude_relative_thresh(double total_magnitude_relative_thresh)#
Set Magnitude Relative Threshold with double value.
Set relative total gradient magnitude threshold for feature chains.The actual threshold will be max length of chains * relative threshold.
- Parameters:
total_magnitude_relative_thresh – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchFeatChainMagRelativeThreshManually the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class SetGeometrySearchDownSampleRatioManually : public visionflow::param::ISchemable#
SetGeometrySearchDownSampleRatioManually Parameter class generated by jinja2 automatically.
GeometrySearch down sample ratio.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
SetGeometrySearchDownSampleRatioManually &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchDownSampleRatioManually the reference of this object.
-
double get_down_sample_ratio() const#
Get Down sample ratio.
Image down sample ratio during training and inference. Higher down sample ratio will effectively speed up training and inference with some degree of accuracy loss. Suggestive value: 2~8.
See also
- Returns:
double Down sample ratio
-
SetGeometrySearchDownSampleRatioManually &set_down_sample_ratio(double down_sample_ratio)#
Set Down sample ratio with double value.
Image down sample ratio during training and inference. Higher down sample ratio will effectively speed up training and inference with some degree of accuracy loss. Suggestive value: 2~8.
See also
- Parameters:
down_sample_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SetGeometrySearchDownSampleRatioManually the reference of this object.
-
virtual const std::string &schema_str() const override#
GeometrySearch Inference Parameters#
-
enum visionflow::param::GeometrySearchSearchMode#
Values:
-
enumerator kQuick = 0#
-
enumerator kFine = 1#
-
enumerator kRobustFine = 2#
-
enumerator kQuick = 0#
-
class GeometrySearchDuplicate : public visionflow::param::ISchemable#
GeometrySearchDuplicate Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_target_overlap_ratio() const#
Get Target Overlap Ratio.
Minimum overlap ratio of two targets to be regard as duplicate.overlap =max(1-2*abs(cx1-cx2)/(w1+w2),0)*max(1-2*abs(cy1-cy2)/(h1+h2), 0)
See also
- Returns:
double Target Overlap Ratio
-
GeometrySearchDuplicate &set_target_overlap_ratio(double target_overlap_ratio)#
Set Target Overlap Ratio with double value.
Minimum overlap ratio of two targets to be regard as duplicate.overlap =max(1-2*abs(cx1-cx2)/(w1+w2),0)*max(1-2*abs(cy1-cy2)/(h1+h2), 0)
See also
- Parameters:
target_overlap_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchDuplicate the reference of this object.
-
double get_scale_duplicate() const#
Get Scale Duplicate Ratio.
Maximum scale ration of two target of be regard as duplicate, only have effect when Target Overlap Ratio if larger than Target Overlap Ratio threshold.
See also
- Returns:
double Scale Duplicate Ratio
-
GeometrySearchDuplicate &set_scale_duplicate(double scale_duplicate)#
Set Scale Duplicate Ratio with double value.
Maximum scale ration of two target of be regard as duplicate, only have effect when Target Overlap Ratio if larger than Target Overlap Ratio threshold.
See also
- Parameters:
scale_duplicate – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchDuplicate the reference of this object.
-
int get_rotate_duplicate() const#
Get Rotate Duplicate Ratio.
Maximum rotate difference (in degree) of two target of be regard as duplicate, only have effect when Target Overlap Ratio if larger than Target Overlap Ratio threshold.
See also
- Returns:
int Rotate Duplicate Ratio
-
GeometrySearchDuplicate &set_rotate_duplicate(int rotate_duplicate)#
Set Rotate Duplicate Ratio with int value.
Maximum rotate difference (in degree) of two target of be regard as duplicate, only have effect when Target Overlap Ratio if larger than Target Overlap Ratio threshold.
See also
- Parameters:
rotate_duplicate – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchDuplicate the reference of this object.
-
virtual const std::string &schema_str() const override#
CameraCalibration Training Parameters#
-
enum visionflow::param::FreedomDegreeType#
the type of freedom degree
Values:
-
enumerator kFreedomDegreeNonlinear = 0#
nonlinear
-
enumerator kFreedomDegreeTranslationRotationScale = 1#
translation, rotation and scale
-
enumerator kFreedomDegreeAffine = 2#
affine
-
enumerator kFreedomDegreePerspective = 3#
perspective
-
enumerator kFreedomDegreeNonlinear = 0#
-
enum visionflow::param::CalibrationBoardType#
the type of calibration board
Values:
-
enumerator kAQBoardRect = 0#
Calibration board with black dots on white background.
-
enumerator kChessBoard = 1#
checkerboard
-
enumerator kAQBoardRect = 0#
Polarity Mode Parameters#
OCR Parameters#
-
class RegularExpression : public visionflow::param::ISchemable#
RegularExpression Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
RegularExpression &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
RegularExpression the reference of this object.
-
const std::string &get_pattern() const#
Get Pattern.
Regular expression pattern.
See also
- Returns:
const std::string & Pattern
-
RegularExpression &set_pattern(std::string pattern)#
Set Pattern with std::string value.
Regular expression pattern.
See also
- Parameters:
pattern – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
RegularExpression the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class OCRArea : public visionflow::param::ISchemable#
OCRArea Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_x() const#
Get X-Value.
X-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, X-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value should be set using ratio value. When the template mode is modified, X-Value needs to be modified.
See also
- Returns:
double X-Value
-
OCRArea &set_x(double x)#
Set X-Value with double value.
X-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, X-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value should be set using ratio value. When the template mode is modified, X-Value needs to be modified.
See also
- Parameters:
x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRArea the reference of this object.
-
double get_y() const#
Get Y-Value.
Y-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, Y-Value should be set using pixel value. When the template mode is set to kValueByRatio, Y-Value should be set using ratio value. When the template mode is modified, Y-Value needs to be modified.
See also
- Returns:
double Y-Value
-
OCRArea &set_y(double y)#
Set Y-Value with double value.
Y-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, Y-Value should be set using pixel value. When the template mode is set to kValueByRatio, Y-Value should be set using ratio value. When the template mode is modified, Y-Value needs to be modified.
See also
- Parameters:
y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRArea the reference of this object.
-
double get_w() const#
Get W-Value.
width of the area. When the template mode is set to kValueByPixel, W-Value should be set using pixel value. When the template mode is set to kValueByRatio, W-Value should be set using ratio value. When the template mode is modified, W-Value needs to be modified.
See also
- Returns:
double W-Value
-
OCRArea &set_w(double w)#
Set W-Value with double value.
width of the area. When the template mode is set to kValueByPixel, W-Value should be set using pixel value. When the template mode is set to kValueByRatio, W-Value should be set using ratio value. When the template mode is modified, W-Value needs to be modified.
See also
- Parameters:
w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRArea the reference of this object.
-
double get_h() const#
Get H-Value.
height of the area. When the template mode is set to kValueByPixel, H-Value should be set using pixel value. When the template mode is set to kValueRatio, H-Value should be set using ratio value. When the template mode is modified, H-Value needs to be modified.
See also
- Returns:
double H-Value
-
OCRArea &set_h(double h)#
Set H-Value with double value.
height of the area. When the template mode is set to kValueByPixel, H-Value should be set using pixel value. When the template mode is set to kValueRatio, H-Value should be set using ratio value. When the template mode is modified, H-Value needs to be modified.
See also
- Parameters:
h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRArea the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class OCRStringTemplateArea : public visionflow::param::ISchemable#
OCRStringTemplateArea Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const OCRArea &get_area() const#
Get Area Parameters.
Parameters defining the base area for OCR, including X, Y, W, H values.
See also
- Returns:
const OCRArea & Area Parameters
-
OCRStringTemplateArea &set_area(OCRArea area)#
Set Area Parameters with OCRArea value.
Parameters defining the base area for OCR, including X, Y, W, H values.
See also
- Parameters:
area – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
OCRArea &get_area()#
Get mutable reference of Area Parameters.
Parameters defining the base area for OCR, including X, Y, W, H values.
- Returns:
OCRStringTemplateArea& the mutable reference of the group.
-
int get_max_matches() const#
Get Maximum Matches.
Maximum number of templates to remain within view. Results are sorted based on the deviation of characters from the string, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Returns:
int Maximum Matches
-
OCRStringTemplateArea &set_max_matches(int max_matches)#
Set Maximum Matches with int value.
Maximum number of templates to remain within view. Results are sorted based on the deviation of characters from the string, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Parameters:
max_matches – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
int get_min_length() const#
Get Minimum String Length.
String shorter than the minimum length will be ignored.
See also
- Returns:
int Minimum String Length
-
OCRStringTemplateArea &set_min_length(int min_length)#
Set Minimum String Length with int value.
String shorter than the minimum length will be ignored.
See also
- Parameters:
min_length – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
double get_max_char_interval() const#
Get Maximum Character Interval.
The maximum interval between characters in a string, Two characters with interval longer than this threshold will be matched into two different strings.
See also
- Returns:
double Maximum Character Interval
-
OCRStringTemplateArea &set_max_char_interval(double max_char_interval)#
Set Maximum Character Interval with double value.
The maximum interval between characters in a string, Two characters with interval longer than this threshold will be matched into two different strings.
See also
- Parameters:
max_char_interval – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
int get_main_direction() const#
Get String Main Direction.
Direction of strings based on statistics. (It is specified that the positive x-axis direction is 0 degrees, positive values representing the direction towards the positive y-axis, negative values indicating the direction towards the negative y-axis.)
See also
- Returns:
int String Main Direction
-
OCRStringTemplateArea &set_main_direction(int main_direction)#
Set String Main Direction with int value.
Direction of strings based on statistics. (It is specified that the positive x-axis direction is 0 degrees, positive values representing the direction towards the positive y-axis, negative values indicating the direction towards the negative y-axis.)
See also
- Parameters:
main_direction – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
int get_angle_range() const#
Get Rotate Angle Range.
The rotate angle range of the string, which means that the string can be rotated slightly within an angular range centered on the main direction.
See also
- Returns:
int Rotate Angle Range
-
OCRStringTemplateArea &set_angle_range(int angle_range)#
Set Rotate Angle Range with int value.
The rotate angle range of the string, which means that the string can be rotated slightly within an angular range centered on the main direction.
See also
- Parameters:
angle_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
const RegularExpression &get_regular_expression() const#
Get Regular Expression.
Regular expression matching parameters.
See also
- Returns:
const RegularExpression & Regular Expression
-
OCRStringTemplateArea &set_regular_expression(RegularExpression regular_expression)#
Set Regular Expression with RegularExpression value.
Regular expression matching parameters.
See also
- Parameters:
regular_expression – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
RegularExpression &get_regular_expression()#
Get mutable reference of Regular Expression.
Regular expression matching parameters.
- Returns:
OCRStringTemplateArea& the mutable reference of the group.
-
const RegularExpression &get_string_filter_template() const#
Get String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Returns:
const RegularExpression & String Filter Template
-
OCRStringTemplateArea &set_string_filter_template(RegularExpression string_filter_template)#
Set String Filter Template with RegularExpression value.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Parameters:
string_filter_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
RegularExpression &get_string_filter_template()#
Get mutable reference of String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
- Returns:
OCRStringTemplateArea& the mutable reference of the group.
-
const RegularExpression &get_string_fix_template() const#
Get String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Returns:
const RegularExpression & String Fix Template
-
OCRStringTemplateArea &set_string_fix_template(RegularExpression string_fix_template)#
Set String Fix Template with RegularExpression value.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Parameters:
string_fix_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplateArea the reference of this object.
-
RegularExpression &get_string_fix_template()#
Get mutable reference of String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
- Returns:
OCRStringTemplateArea& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class OCRNodeTemplateArea : public visionflow::param::ISchemable#
OCRNodeTemplateArea Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const OCRArea &get_area() const#
Get Area Parameters.
Parameters defining the base area for OCR, including X, Y, W, H values.
See also
- Returns:
const OCRArea & Area Parameters
-
OCRNodeTemplateArea &set_area(OCRArea area)#
Set Area Parameters with OCRArea value.
Parameters defining the base area for OCR, including X, Y, W, H values.
See also
- Parameters:
area – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
OCRArea &get_area()#
Get mutable reference of Area Parameters.
Parameters defining the base area for OCR, including X, Y, W, H values.
- Returns:
OCRNodeTemplateArea& the mutable reference of the group.
-
int get_max_matches() const#
Get Maximum Matches.
Maximum number of templates to remain within view. Results are sorted based on the match distance in ascending order, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Returns:
int Maximum Matches
-
OCRNodeTemplateArea &set_max_matches(int max_matches)#
Set Maximum Matches with int value.
Maximum number of templates to remain within view. Results are sorted based on the match distance in ascending order, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Parameters:
max_matches – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
const std::vector<MultiNameKeyPointNode> &get_points() const#
Get Keypoints.
The key points of the template.
See also
- Returns:
const std::vector<MultiNameKeyPointNode> & Keypoints
-
OCRNodeTemplateArea &set_points(std::vector<MultiNameKeyPointNode> points)#
Set Keypoints with std::vector<MultiNameKeyPointNode> value.
The key points of the template.
See also
- Parameters:
points – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
const MultiNameKeyPointNode &get_points(size_t index) const#
Get value in Keypoints with index.
Warning
The index must be less than get_points_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const MultiNameKeyPointNode & value in Keypoints at index.
-
size_t get_points_size() const#
Get the size of Keypoints.
- Returns:
size_t the size of Keypoints
-
MultiNameKeyPointNode &get_points(size_t index)#
Get mutable reference of value in Keypoints with index.
Warning
The index must be less than get_points_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
MultiNameKeyPointNode& the mutable reference of value in Keypoints at index.
-
double get_max_distance() const#
Get Max Distance.
The maximum allowed distance between the template keypoints and the keypoints to be matched. Results with a distance greater than this value will be filtered out. The value can be either in absolute pixel or relative to the view height, depending on the template_mode.
See also
- Returns:
double Max Distance
-
OCRNodeTemplateArea &set_max_distance(double max_distance)#
Set Max Distance with double value.
The maximum allowed distance between the template keypoints and the keypoints to be matched. Results with a distance greater than this value will be filtered out. The value can be either in absolute pixel or relative to the view height, depending on the template_mode.
See also
- Parameters:
max_distance – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
bool get_is_scalable() const#
Get Target Scalable.
Enable this option if the size of target to be matched is not fixed. And you should set the target scale range.
See also
- Returns:
bool Target Scalable
-
OCRNodeTemplateArea &set_is_scalable(bool is_scalable)#
Set Target Scalable with bool value.
Enable this option if the size of target to be matched is not fixed. And you should set the target scale range.
See also
- Parameters:
is_scalable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
const std::vector<double> &get_scale_range() const#
Get Scale Range.
The target scale range.
See also
- Returns:
const std::vector<double> & Scale Range
-
OCRNodeTemplateArea &set_scale_range(std::vector<double> scale_range)#
Set Scale Range with std::vector<double> value.
The target scale range.
See also
- Parameters:
scale_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
bool scale_range_contains(double value) const#
Check if the Scale Range contains the value.
- Returns:
bool true if the Scale Range contains the value, otherwise false.
-
double get_scale_range_left() const#
Get left point value of Scale Range.
See also
- Returns:
const std::vector<double> & left point value of Scale Range
-
double get_scale_range_right() const#
Get the right point value of Scale Range.
See also
- Returns:
const std::vector<double> & the right point value of Scale Range
-
OCRNodeTemplateArea &set_scale_range_left(double scale_range_left)#
Set left point value of Scale Range with std::vector<double> value.
The target scale range.
See also
- Parameters:
scale_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
OCRNodeTemplateArea &set_scale_range_right(double scale_range_right)#
Set the right point value of Scale Range with std::vector<double> value.
The target scale range.
See also
- Parameters:
scale_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
bool get_is_rotatable() const#
Get Target Rotatable.
Enable this option if the angle of target to be matched is not fixed, And you should set the target rotate angle range.
See also
- Returns:
bool Target Rotatable
-
OCRNodeTemplateArea &set_is_rotatable(bool is_rotatable)#
Set Target Rotatable with bool value.
Enable this option if the angle of target to be matched is not fixed, And you should set the target rotate angle range.
See also
- Parameters:
is_rotatable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
const std::vector<int> &get_rotate_range() const#
Get Rotate Range (Degree).
The target rotate range.
See also
- Returns:
const std::vector<int> & Rotate Range (Degree)
-
OCRNodeTemplateArea &set_rotate_range(std::vector<int> rotate_range)#
Set Rotate Range (Degree) with std::vector<int> value.
The target rotate range.
See also
- Parameters:
rotate_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
bool rotate_range_contains(int value) const#
Check if the Rotate Range (Degree) contains the value.
- Returns:
bool true if the Rotate Range (Degree) contains the value, otherwise false.
-
int get_rotate_range_left() const#
Get left point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<int> & left point value of Rotate Range (Degree)
-
int get_rotate_range_right() const#
Get the right point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<int> & the right point value of Rotate Range (Degree)
-
OCRNodeTemplateArea &set_rotate_range_left(int rotate_range_left)#
Set left point value of Rotate Range (Degree) with std::vector<int> value.
The target rotate range.
See also
- Parameters:
rotate_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
OCRNodeTemplateArea &set_rotate_range_right(int rotate_range_right)#
Set the right point value of Rotate Range (Degree) with std::vector<int> value.
The target rotate range.
See also
- Parameters:
rotate_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
const RegularExpression &get_string_filter_template() const#
Get String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Returns:
const RegularExpression & String Filter Template
-
OCRNodeTemplateArea &set_string_filter_template(RegularExpression string_filter_template)#
Set String Filter Template with RegularExpression value.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Parameters:
string_filter_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
RegularExpression &get_string_filter_template()#
Get mutable reference of String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
- Returns:
OCRNodeTemplateArea& the mutable reference of the group.
-
const RegularExpression &get_string_fix_template() const#
Get String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Returns:
const RegularExpression & String Fix Template
-
OCRNodeTemplateArea &set_string_fix_template(RegularExpression string_fix_template)#
Set String Fix Template with RegularExpression value.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Parameters:
string_fix_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplateArea the reference of this object.
-
RegularExpression &get_string_fix_template()#
Get mutable reference of String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
- Returns:
OCRNodeTemplateArea& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class OCRNodeTemplate : public visionflow::param::ISchemable#
OCRNodeTemplate Parameter class generated by jinja2 automatically.
Node template is used to match strings of any shape.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
OCRNodeTemplate &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const TemplateMode &get_template_mode() const#
Get Template Mode.
Determines the unit of measurement for template areas.
Value By Pixelindicates measurement in pixel values, whileValue By Ratiouses relative ratios.See also
- Returns:
const TemplateMode & Template Mode
-
OCRNodeTemplate &set_template_mode(TemplateMode template_mode)#
Set Template Mode with TemplateMode value.
Determines the unit of measurement for template areas.
Value By Pixelindicates measurement in pixel values, whileValue By Ratiouses relative ratios.See also
- Parameters:
template_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
int get_max_matches() const#
Get Maximum Matches.
Maximum number of templates to remain within view. Results are sorted based on the match distance in ascending order, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Returns:
int Maximum Matches
-
OCRNodeTemplate &set_max_matches(int max_matches)#
Set Maximum Matches with int value.
Maximum number of templates to remain within view. Results are sorted based on the match distance in ascending order, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Parameters:
max_matches – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const std::vector<MultiNameKeyPointNode> &get_points() const#
Get Keypoints.
The key points of the template.
See also
- Returns:
const std::vector<MultiNameKeyPointNode> & Keypoints
-
OCRNodeTemplate &set_points(std::vector<MultiNameKeyPointNode> points)#
Set Keypoints with std::vector<MultiNameKeyPointNode> value.
The key points of the template.
See also
- Parameters:
points – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const MultiNameKeyPointNode &get_points(size_t index) const#
Get value in Keypoints with index.
Warning
The index must be less than get_points_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const MultiNameKeyPointNode & value in Keypoints at index.
-
size_t get_points_size() const#
Get the size of Keypoints.
- Returns:
size_t the size of Keypoints
-
MultiNameKeyPointNode &get_points(size_t index)#
Get mutable reference of value in Keypoints with index.
Warning
The index must be less than get_points_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
MultiNameKeyPointNode& the mutable reference of value in Keypoints at index.
-
double get_max_distance() const#
Get Max Distance.
The maximum allowed distance between the template keypoints and the keypoints to be matched. Results with a distance greater than this value will be filtered out. The value can be either in absolute pixel or relative to the view height, depending on the template_mode.
See also
- Returns:
double Max Distance
-
OCRNodeTemplate &set_max_distance(double max_distance)#
Set Max Distance with double value.
The maximum allowed distance between the template keypoints and the keypoints to be matched. Results with a distance greater than this value will be filtered out. The value can be either in absolute pixel or relative to the view height, depending on the template_mode.
See also
- Parameters:
max_distance – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
bool get_is_scalable() const#
Get Target Scalable.
Enable this option if the size of target to be matched is not fixed. And you should set the target scale range.
See also
- Returns:
bool Target Scalable
-
OCRNodeTemplate &set_is_scalable(bool is_scalable)#
Set Target Scalable with bool value.
Enable this option if the size of target to be matched is not fixed. And you should set the target scale range.
See also
- Parameters:
is_scalable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const std::vector<double> &get_scale_range() const#
Get Scale Range.
The target scale range.
See also
- Returns:
const std::vector<double> & Scale Range
-
OCRNodeTemplate &set_scale_range(std::vector<double> scale_range)#
Set Scale Range with std::vector<double> value.
The target scale range.
See also
- Parameters:
scale_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
bool scale_range_contains(double value) const#
Check if the Scale Range contains the value.
- Returns:
bool true if the Scale Range contains the value, otherwise false.
-
double get_scale_range_left() const#
Get left point value of Scale Range.
See also
- Returns:
const std::vector<double> & left point value of Scale Range
-
double get_scale_range_right() const#
Get the right point value of Scale Range.
See also
- Returns:
const std::vector<double> & the right point value of Scale Range
-
OCRNodeTemplate &set_scale_range_left(double scale_range_left)#
Set left point value of Scale Range with std::vector<double> value.
The target scale range.
See also
- Parameters:
scale_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
OCRNodeTemplate &set_scale_range_right(double scale_range_right)#
Set the right point value of Scale Range with std::vector<double> value.
The target scale range.
See also
- Parameters:
scale_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
bool get_is_rotatable() const#
Get Target Rotatable.
Enable this option if the angle of target to be matched is not fixed, And you should set the target rotate angle range.
See also
- Returns:
bool Target Rotatable
-
OCRNodeTemplate &set_is_rotatable(bool is_rotatable)#
Set Target Rotatable with bool value.
Enable this option if the angle of target to be matched is not fixed, And you should set the target rotate angle range.
See also
- Parameters:
is_rotatable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const std::vector<int> &get_rotate_range() const#
Get Rotate Range (Degree).
The target rotate range.
See also
- Returns:
const std::vector<int> & Rotate Range (Degree)
-
OCRNodeTemplate &set_rotate_range(std::vector<int> rotate_range)#
Set Rotate Range (Degree) with std::vector<int> value.
The target rotate range.
See also
- Parameters:
rotate_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
bool rotate_range_contains(int value) const#
Check if the Rotate Range (Degree) contains the value.
- Returns:
bool true if the Rotate Range (Degree) contains the value, otherwise false.
-
int get_rotate_range_left() const#
Get left point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<int> & left point value of Rotate Range (Degree)
-
int get_rotate_range_right() const#
Get the right point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<int> & the right point value of Rotate Range (Degree)
-
OCRNodeTemplate &set_rotate_range_left(int rotate_range_left)#
Set left point value of Rotate Range (Degree) with std::vector<int> value.
The target rotate range.
See also
- Parameters:
rotate_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
OCRNodeTemplate &set_rotate_range_right(int rotate_range_right)#
Set the right point value of Rotate Range (Degree) with std::vector<int> value.
The target rotate range.
See also
- Parameters:
rotate_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const RegularExpression &get_string_filter_template() const#
Get String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Returns:
const RegularExpression & String Filter Template
-
OCRNodeTemplate &set_string_filter_template(RegularExpression string_filter_template)#
Set String Filter Template with RegularExpression value.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Parameters:
string_filter_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
RegularExpression &get_string_filter_template()#
Get mutable reference of String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
- Returns:
OCRNodeTemplate& the mutable reference of the group.
-
const RegularExpression &get_string_fix_template() const#
Get String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Returns:
const RegularExpression & String Fix Template
-
OCRNodeTemplate &set_string_fix_template(RegularExpression string_fix_template)#
Set String Fix Template with RegularExpression value.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Parameters:
string_fix_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
RegularExpression &get_string_fix_template()#
Get mutable reference of String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
- Returns:
OCRNodeTemplate& the mutable reference of the group.
-
const std::map<std::string, OCRArea> &get_areas() const#
Get Areas.
The areas inside the template. The key of the map is the name of area. The value of the map is the parameter of area.
See also
- Returns:
const std::map<std::string, OCRArea> & Areas
-
OCRNodeTemplate &set_areas(std::map<std::string, OCRArea> areas)#
Set Areas with std::map<std::string, OCRArea> value.
The areas inside the template. The key of the map is the name of area. The value of the map is the parameter of area.
See also
- Parameters:
areas – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const OCRArea &get_areas(const std::string &key) const#
Get value in Areas with key.
Warning
The key must be exist in Areas. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, OCRArea> & value in Areas at key.
-
OCRNodeTemplate &set_areas(const std::string &key, OCRArea value)#
Set value in Areas with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
bool areas_contains(const std::string &key) const#
Check if the key is exist in Areas.
- Returns:
bool true if the key is exist in Areas, otherwise false.
-
size_t get_areas_size() const#
Get the size of Areas.
- Returns:
size_t the size of Areas
-
OCRArea &get_areas(const std::string &key)#
Get mutable reference of value in Areas with key. A new key and default value will be created if the key does not exist.
- Returns:
OCRArea& the mutable reference of value in Areas at key.
-
const std::map<std::string, OCRNodeTemplateArea> &get_node_template_areas() const#
Get Areas.
A dictionary mapping unique identifiers to OCRNodeTemplateArea objects. Each key-value pair defines a unique ‘area’ and its matching rules for node template matching. The matching operation is strictly applied within these specified areas.
See also
- Returns:
const std::map<std::string, OCRNodeTemplateArea> & Areas
-
OCRNodeTemplate &set_node_template_areas(std::map<std::string, OCRNodeTemplateArea> node_template_areas)#
Set Areas with std::map<std::string, OCRNodeTemplateArea> value.
A dictionary mapping unique identifiers to OCRNodeTemplateArea objects. Each key-value pair defines a unique ‘area’ and its matching rules for node template matching. The matching operation is strictly applied within these specified areas.
See also
- Parameters:
node_template_areas – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
const OCRNodeTemplateArea &get_node_template_areas(const std::string &key) const#
Get value in Areas with key.
Warning
The key must be exist in Areas. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, OCRNodeTemplateArea> & value in Areas at key.
-
OCRNodeTemplate &set_node_template_areas(const std::string &key, OCRNodeTemplateArea value)#
Set value in Areas with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRNodeTemplate the reference of this object.
-
bool node_template_areas_contains(const std::string &key) const#
Check if the key is exist in Areas.
- Returns:
bool true if the key is exist in Areas, otherwise false.
-
size_t get_node_template_areas_size() const#
Get the size of Areas.
- Returns:
size_t the size of Areas
-
OCRNodeTemplateArea &get_node_template_areas(const std::string &key)#
Get mutable reference of value in Areas with key. A new key and default value will be created if the key does not exist.
- Returns:
OCRNodeTemplateArea& the mutable reference of value in Areas at key.
-
virtual const std::string &schema_str() const override#
-
class OCRStringTemplate : public visionflow::param::ISchemable#
OCRStringTemplate Parameter class generated by jinja2 automatically.
String template is used to control how to match characters into strings.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
OCRStringTemplate &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
int get_max_matches() const#
Get Maximum Matches.
Maximum number of templates to remain within view. Results are sorted based on the deviation of characters from the string, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Returns:
int Maximum Matches
-
OCRStringTemplate &set_max_matches(int max_matches)#
Set Maximum Matches with int value.
Maximum number of templates to remain within view. Results are sorted based on the deviation of characters from the string, and only the top ‘max_matches’ results are retained. All results are provided by default.
See also
- Parameters:
max_matches – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
int get_min_length() const#
Get Minimum String Length.
String shorter than the minimum length will be ignored.
See also
- Returns:
int Minimum String Length
-
OCRStringTemplate &set_min_length(int min_length)#
Set Minimum String Length with int value.
String shorter than the minimum length will be ignored.
See also
- Parameters:
min_length – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
double get_max_char_interval() const#
Get Maximum Character Interval.
The maximum interval between characters in a string, Two characters with interval longer than this threshold will be matched into two different strings.
See also
- Returns:
double Maximum Character Interval
-
OCRStringTemplate &set_max_char_interval(double max_char_interval)#
Set Maximum Character Interval with double value.
The maximum interval between characters in a string, Two characters with interval longer than this threshold will be matched into two different strings.
See also
- Parameters:
max_char_interval – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
int get_main_direction() const#
Get String Main Direction.
Direction of strings based on statistics. (It is specified that the positive x-axis direction is 0 degrees, positive values representing the direction towards the positive y-axis, negative values indicating the direction towards the negative y-axis.)
See also
- Returns:
int String Main Direction
-
OCRStringTemplate &set_main_direction(int main_direction)#
Set String Main Direction with int value.
Direction of strings based on statistics. (It is specified that the positive x-axis direction is 0 degrees, positive values representing the direction towards the positive y-axis, negative values indicating the direction towards the negative y-axis.)
See also
- Parameters:
main_direction – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
int get_angle_range() const#
Get Rotate Angle Range.
The rotate angle range of the string, which means that the string can be rotated slightly within an angular range centered on the main direction.
See also
- Returns:
int Rotate Angle Range
-
OCRStringTemplate &set_angle_range(int angle_range)#
Set Rotate Angle Range with int value.
The rotate angle range of the string, which means that the string can be rotated slightly within an angular range centered on the main direction.
See also
- Parameters:
angle_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
const RegularExpression &get_regular_expression() const#
Get Regular Expression.
Regular expression matching parameters.
See also
- Returns:
const RegularExpression & Regular Expression
-
OCRStringTemplate &set_regular_expression(RegularExpression regular_expression)#
Set Regular Expression with RegularExpression value.
Regular expression matching parameters.
See also
- Parameters:
regular_expression – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
RegularExpression &get_regular_expression()#
Get mutable reference of Regular Expression.
Regular expression matching parameters.
- Returns:
OCRStringTemplate& the mutable reference of the group.
-
const RegularExpression &get_string_filter_template() const#
Get String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Returns:
const RegularExpression & String Filter Template
-
OCRStringTemplate &set_string_filter_template(RegularExpression string_filter_template)#
Set String Filter Template with RegularExpression value.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
See also
- Parameters:
string_filter_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
RegularExpression &get_string_filter_template()#
Get mutable reference of String Filter Template.
This parameter serves as a filter for the output strings. The user-defined rules in this template determine the expected character types in the output strings. Any string that does not match the template will be filtered out from the final results.
- Returns:
OCRStringTemplate& the mutable reference of the group.
-
const RegularExpression &get_string_fix_template() const#
Get String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Returns:
const RegularExpression & String Fix Template
-
OCRStringTemplate &set_string_fix_template(RegularExpression string_fix_template)#
Set String Fix Template with RegularExpression value.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
See also
- Parameters:
string_fix_template – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
RegularExpression &get_string_fix_template()#
Get mutable reference of String Fix Template.
This parameter is used to correct the output strings based on user-defined rules. It defines the expected character types in the output strings. If the output strings do not match the template, they will be corrected.
- Returns:
OCRStringTemplate& the mutable reference of the group.
-
const TemplateMode &get_template_mode() const#
Get Template Mode.
Set the value type of the central coordinates of the region and the width and height of the area. When the template mode is set to kValueByPixel, X-Value Y-Value W-Value H-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value Y-Value W-Value H-Value should be set using ratio value. When the template mode is modified, X-Value Y-Value W-Value H-Value needs to be modified.
See also
- Returns:
const TemplateMode & Template Mode
-
OCRStringTemplate &set_template_mode(TemplateMode template_mode)#
Set Template Mode with TemplateMode value.
Set the value type of the central coordinates of the region and the width and height of the area. When the template mode is set to kValueByPixel, X-Value Y-Value W-Value H-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value Y-Value W-Value H-Value should be set using ratio value. When the template mode is modified, X-Value Y-Value W-Value H-Value needs to be modified.
See also
- Parameters:
template_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
const std::map<std::string, OCRArea> &get_areas() const#
Get Areas.
The areas inside the template. The key of the map is the name of area. The value of the map is the parameter of area.
See also
- Returns:
const std::map<std::string, OCRArea> & Areas
-
OCRStringTemplate &set_areas(std::map<std::string, OCRArea> areas)#
Set Areas with std::map<std::string, OCRArea> value.
The areas inside the template. The key of the map is the name of area. The value of the map is the parameter of area.
See also
- Parameters:
areas – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
const OCRArea &get_areas(const std::string &key) const#
Get value in Areas with key.
Warning
The key must be exist in Areas. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, OCRArea> & value in Areas at key.
-
OCRStringTemplate &set_areas(const std::string &key, OCRArea value)#
Set value in Areas with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
bool areas_contains(const std::string &key) const#
Check if the key is exist in Areas.
- Returns:
bool true if the key is exist in Areas, otherwise false.
-
size_t get_areas_size() const#
Get the size of Areas.
- Returns:
size_t the size of Areas
-
OCRArea &get_areas(const std::string &key)#
Get mutable reference of value in Areas with key. A new key and default value will be created if the key does not exist.
- Returns:
OCRArea& the mutable reference of value in Areas at key.
-
const std::map<std::string, OCRStringTemplateArea> &get_string_template_areas() const#
Get Areas.
A dictionary mapping unique identifiers to OCRStringTemplateArea objects. Each key-value pair defines an ‘area’ and its matching rules for string template matching. The matching operation is strictly applied within these specified areas.
See also
- Returns:
const std::map<std::string, OCRStringTemplateArea> & Areas
-
OCRStringTemplate &set_string_template_areas(std::map<std::string, OCRStringTemplateArea> string_template_areas)#
Set Areas with std::map<std::string, OCRStringTemplateArea> value.
A dictionary mapping unique identifiers to OCRStringTemplateArea objects. Each key-value pair defines an ‘area’ and its matching rules for string template matching. The matching operation is strictly applied within these specified areas.
See also
- Parameters:
string_template_areas – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
const OCRStringTemplateArea &get_string_template_areas(const std::string &key) const#
Get value in Areas with key.
Warning
The key must be exist in Areas. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, OCRStringTemplateArea> & value in Areas at key.
-
OCRStringTemplate &set_string_template_areas(const std::string &key, OCRStringTemplateArea value)#
Set value in Areas with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRStringTemplate the reference of this object.
-
bool string_template_areas_contains(const std::string &key) const#
Check if the key is exist in Areas.
- Returns:
bool true if the key is exist in Areas, otherwise false.
-
size_t get_string_template_areas_size() const#
Get the size of Areas.
- Returns:
size_t the size of Areas
-
OCRStringTemplateArea &get_string_template_areas(const std::string &key)#
Get mutable reference of value in Areas with key. A new key and default value will be created if the key does not exist.
- Returns:
OCRStringTemplateArea& the mutable reference of value in Areas at key.
-
virtual const std::string &schema_str() const override#
-
class OCRInferParameters : public visionflow::param::SchemableParameter#
OCRInferParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_target_feat_width() const#
Get Target Character Width.
The target character width in inference data.
See also
- Returns:
double Target Character Width
-
OCRInferParameters &set_target_feat_width(double target_feat_width)#
Set Target Character Width with double value.
The target character width in inference data.
See also
- Parameters:
target_feat_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRInferParameters the reference of this object.
-
double get_target_feat_height() const#
Get Target Character Height.
The target character height in inference data.
See also
- Returns:
double Target Character Height
-
OCRInferParameters &set_target_feat_height(double target_feat_height)#
Set Target Character Height with double value.
The target character height in inference data.
See also
- Parameters:
target_feat_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRInferParameters the reference of this object.
-
double get_threshold() const#
Get Confidence Threshold.
Greater than this threshold will be determined as a target.
See also
- Returns:
double Confidence Threshold
-
OCRInferParameters &set_threshold(double threshold)#
Set Confidence Threshold with double value.
Greater than this threshold will be determined as a target.
See also
- Parameters:
threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRInferParameters the reference of this object.
-
double get_density() const#
Get Search Density.
Filter out duplicate results using NMS. A higher value will retain fewer results.
See also
- Returns:
double Search Density
-
OCRInferParameters &set_density(double density)#
Set Search Density with double value.
Filter out duplicate results using NMS. A higher value will retain fewer results.
See also
- Parameters:
density – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRInferParameters the reference of this object.
-
const std::vector<std::string> &get_allowed_chars() const#
Get Allowed Character Set.
All characters in the inference result belong to the character set.
See also
- Returns:
const std::vector<std::string> & Allowed Character Set
-
OCRInferParameters &set_allowed_chars(std::vector<std::string> allowed_chars)#
Set Allowed Character Set with std::vector<std::string> value.
All characters in the inference result belong to the character set.
See also
- Parameters:
allowed_chars – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRInferParameters the reference of this object.
-
const std::string &get_allowed_chars(size_t index) const#
Get value in Allowed Character Set with index.
Warning
The index must be less than get_allowed_chars_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::string & value in Allowed Character Set at index.
-
size_t get_allowed_chars_size() const#
Get the size of Allowed Character Set.
- Returns:
size_t the size of Allowed Character Set
-
virtual const std::string &schema_str() const override#
-
class OCRUniversalModelParameters : public visionflow::param::SchemableParameter#
OCRUniversalModelParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
OCRUniversalModelParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRUniversalModelParameters the reference of this object.
-
const OCRAnnulusParameters &get_annulus_recognition() const#
Get Annulus Character Recognition.
Annulus Character Recognition Parameters
See also
- Returns:
const OCRAnnulusParameters & Annulus Character Recognition
-
OCRUniversalModelParameters &set_annulus_recognition(OCRAnnulusParameters annulus_recognition)#
Set Annulus Character Recognition with OCRAnnulusParameters value.
Annulus Character Recognition Parameters
See also
- Parameters:
annulus_recognition – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRUniversalModelParameters the reference of this object.
-
OCRAnnulusParameters &get_annulus_recognition()#
Get mutable reference of Annulus Character Recognition.
Annulus Character Recognition Parameters
- Returns:
OCRUniversalModelParameters& the mutable reference of the group.
-
const PolarityMode &get_polarity() const#
Get Character Polarity.
The polarity of the characters and background in the image. ‘Black On White’ refers to black characters on a white background, ‘White On Black’ refers to white characters on a black background, and ‘Unspecified’ refers to the polarity is not specified or could be either of the former two options.
See also
- Returns:
const PolarityMode & Character Polarity
-
OCRUniversalModelParameters &set_polarity(PolarityMode polarity)#
Set Character Polarity with PolarityMode value.
The polarity of the characters and background in the image. ‘Black On White’ refers to black characters on a white background, ‘White On Black’ refers to white characters on a black background, and ‘Unspecified’ refers to the polarity is not specified or could be either of the former two options.
See also
- Parameters:
polarity – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRUniversalModelParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class OCRTemplates : public visionflow::param::SchemableParameter#
OCRTemplates Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::map<std::string, OCRStringTemplate> &get_string_templates() const#
Get String Templates.
String templates.
See also
- Returns:
const std::map<std::string, OCRStringTemplate> & String Templates
-
OCRTemplates &set_string_templates(std::map<std::string, OCRStringTemplate> string_templates)#
Set String Templates with std::map<std::string, OCRStringTemplate> value.
String templates.
See also
- Parameters:
string_templates – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTemplates the reference of this object.
-
const OCRStringTemplate &get_string_templates(const std::string &key) const#
Get value in String Templates with key.
Warning
The key must be exist in String Templates. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, OCRStringTemplate> & value in String Templates at key.
-
OCRTemplates &set_string_templates(const std::string &key, OCRStringTemplate value)#
Set value in String Templates with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTemplates the reference of this object.
-
bool string_templates_contains(const std::string &key) const#
Check if the key is exist in String Templates.
- Returns:
bool true if the key is exist in String Templates, otherwise false.
-
size_t get_string_templates_size() const#
Get the size of String Templates.
- Returns:
size_t the size of String Templates
-
OCRStringTemplate &get_string_templates(const std::string &key)#
Get mutable reference of value in String Templates with key. A new key and default value will be created if the key does not exist.
- Returns:
OCRStringTemplate& the mutable reference of value in String Templates at key.
-
const std::map<std::string, OCRNodeTemplate> &get_node_templates() const#
Get Node Templates.
Node templates.
See also
- Returns:
const std::map<std::string, OCRNodeTemplate> & Node Templates
-
OCRTemplates &set_node_templates(std::map<std::string, OCRNodeTemplate> node_templates)#
Set Node Templates with std::map<std::string, OCRNodeTemplate> value.
Node templates.
See also
- Parameters:
node_templates – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTemplates the reference of this object.
-
const OCRNodeTemplate &get_node_templates(const std::string &key) const#
Get value in Node Templates with key.
Warning
The key must be exist in Node Templates. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, OCRNodeTemplate> & value in Node Templates at key.
-
OCRTemplates &set_node_templates(const std::string &key, OCRNodeTemplate value)#
Set value in Node Templates with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTemplates the reference of this object.
-
bool node_templates_contains(const std::string &key) const#
Check if the key is exist in Node Templates.
- Returns:
bool true if the key is exist in Node Templates, otherwise false.
-
size_t get_node_templates_size() const#
Get the size of Node Templates.
- Returns:
size_t the size of Node Templates
-
OCRNodeTemplate &get_node_templates(const std::string &key)#
Get mutable reference of value in Node Templates with key. A new key and default value will be created if the key does not exist.
- Returns:
OCRNodeTemplate& the mutable reference of value in Node Templates at key.
-
virtual const std::string &schema_str() const override#
-
class OCRAnnulusParameters : public visionflow::param::ISchemable#
OCRAnnulusParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
OCRAnnulusParameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRAnnulusParameters the reference of this object.
-
double get_x() const#
Get Center X.
The x-coordinate of the center of the annulus, set according to the percentage of the view height.
See also
- Returns:
double Center X
-
OCRAnnulusParameters &set_x(double x)#
Set Center X with double value.
The x-coordinate of the center of the annulus, set according to the percentage of the view height.
See also
- Parameters:
x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRAnnulusParameters the reference of this object.
-
double get_y() const#
Get Center Y.
The y-coordinate of the center of the annulus, set according to the percentage of the view height.
See also
- Returns:
double Center Y
-
OCRAnnulusParameters &set_y(double y)#
Set Center Y with double value.
The y-coordinate of the center of the annulus, set according to the percentage of the view height.
See also
- Parameters:
y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRAnnulusParameters the reference of this object.
-
double get_inner_radius() const#
Get Inner Radius.
The inner radius of the annulus, set according to the percentage of the view height.
See also
- Returns:
double Inner Radius
-
OCRAnnulusParameters &set_inner_radius(double inner_radius)#
Set Inner Radius with double value.
The inner radius of the annulus, set according to the percentage of the view height.
See also
- Parameters:
inner_radius – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRAnnulusParameters the reference of this object.
-
double get_outer_radius() const#
Get Outer Radius.
The outer radius of the annulus, set according to the percentage of the view height.
See also
- Returns:
double Outer Radius
-
OCRAnnulusParameters &set_outer_radius(double outer_radius)#
Set Outer Radius with double value.
The outer radius of the annulus, set according to the percentage of the view height.
See also
- Parameters:
outer_radius – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRAnnulusParameters the reference of this object.
-
double get_start_angle() const#
Get Start Angle.
It is specified that the positive x-axis direction is 0 degrees, positive values representing the direction towards the negative y-axis, negative values indicating the direction towards the positive y-axis.
See also
- Returns:
double Start Angle
-
OCRAnnulusParameters &set_start_angle(double start_angle)#
Set Start Angle with double value.
It is specified that the positive x-axis direction is 0 degrees, positive values representing the direction towards the negative y-axis, negative values indicating the direction towards the positive y-axis.
See also
- Parameters:
start_angle – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRAnnulusParameters the reference of this object.
-
double get_angle_range() const#
Get Angle Range.
The range of angle in which the annulus is unwrapped, if the angle is greater than 360 degrees or less than -360 degrees, the excess part will be unwrapped repeatedly. Positive values representing the direction towards the negative y-axis, negative values indicating the direction towards the positive y-axis.
See also
- Returns:
double Angle Range
-
OCRAnnulusParameters &set_angle_range(double angle_range)#
Set Angle Range with double value.
The range of angle in which the annulus is unwrapped, if the angle is greater than 360 degrees or less than -360 degrees, the excess part will be unwrapped repeatedly. Positive values representing the direction towards the negative y-axis, negative values indicating the direction towards the positive y-axis.
See also
- Parameters:
angle_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRAnnulusParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class OCRTrainingParameters : public visionflow::param::SchemableParameter#
OCRTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
OCRTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16.
See also
- Returns:
int Training Batch Size
-
OCRTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16.
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
OCRTrainingParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
const TrainingMode &get_training_mode() const#
Get Training Mode.
Normal Train is the default mode for training a new model. Increment Train will retrain on previous model knowledge.
See also
- Returns:
const TrainingMode & Training Mode
-
OCRTrainingParameters &set_training_mode(TrainingMode training_mode)#
Set Training Mode with TrainingMode value.
Normal Train is the default mode for training a new model. Increment Train will retrain on previous model knowledge.
See also
- Parameters:
training_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
double get_sampling_ratio() const#
Get Sampling Ratio.
The proportion of new data in incremental training. This parameter is only applicable when the training mode is set to ‘Incremental Train’.
See also
- Returns:
double Sampling Ratio
-
OCRTrainingParameters &set_sampling_ratio(double sampling_ratio)#
Set Sampling Ratio with double value.
The proportion of new data in incremental training. This parameter is only applicable when the training mode is set to ‘Incremental Train’.
See also
- Parameters:
sampling_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
bool get_only_check() const#
Get Only Check.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Returns:
bool Only Check
-
OCRTrainingParameters &set_only_check(bool only_check)#
Set Only Check with bool value.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Parameters:
only_check – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
double get_step_ratio() const#
Get Learning Rate Update Step Ratio.
The ratio of iterations after which the learning rate is decreased.
See also
- Returns:
double Learning Rate Update Step Ratio
-
OCRTrainingParameters &set_step_ratio(double step_ratio)#
Set Learning Rate Update Step Ratio with double value.
The ratio of iterations after which the learning rate is decreased.
See also
- Parameters:
step_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
int get_sigma() const#
Get Gaussian Kernel Size.
Determines the spread of Gaussian distribution used to generate heatmap. A larger value will result in a larger area of distribution, vice versa.
See also
- Returns:
int Gaussian Kernel Size
-
OCRTrainingParameters &set_sigma(int sigma)#
Set Gaussian Kernel Size with int value.
Determines the spread of Gaussian distribution used to generate heatmap. A larger value will result in a larger area of distribution, vice versa.
See also
- Parameters:
sigma – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
int get_training_feature_size() const#
Get Training Feature Size.
The desired size to which the input features are scaled
See also
- Returns:
int Training Feature Size
-
OCRTrainingParameters &set_training_feature_size(int training_feature_size)#
Set Training Feature Size with int value.
The desired size to which the input features are scaled
See also
- Parameters:
training_feature_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
const OCRAnnulusParameters &get_annulus_recognition() const#
Get Annulus Character Recognition.
Annulus character recognition parameters for recognizing characters arranged in a circular pattern.
See also
- Returns:
const OCRAnnulusParameters & Annulus Character Recognition
-
OCRTrainingParameters &set_annulus_recognition(OCRAnnulusParameters annulus_recognition)#
Set Annulus Character Recognition with OCRAnnulusParameters value.
Annulus character recognition parameters for recognizing characters arranged in a circular pattern.
See also
- Parameters:
annulus_recognition – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
OCRAnnulusParameters &get_annulus_recognition()#
Get mutable reference of Annulus Character Recognition.
Annulus character recognition parameters for recognizing characters arranged in a circular pattern.
- Returns:
OCRTrainingParameters& the mutable reference of the group.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
OCRTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
OCRTrainingParameters& the mutable reference of the group.
-
const PolarityMode &get_polarity() const#
Get Character Polarity.
The polarity of the characters and background in the image. ‘Black On White’ refers to black characters on a white background, ‘White On Black’ refers to white characters on a black background, and ‘Unspecified’ refers to the polarity is not specified or could be either of the former two options.
See also
- Returns:
const PolarityMode & Character Polarity
-
OCRTrainingParameters &set_polarity(PolarityMode polarity)#
Set Character Polarity with PolarityMode value.
The polarity of the characters and background in the image. ‘Black On White’ refers to black characters on a white background, ‘White On Black’ refers to white characters on a black background, and ‘Unspecified’ refers to the polarity is not specified or could be either of the former two options.
See also
- Parameters:
polarity – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
OCRTrainingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
Location Tool Parameters#
-
class LocationMaxInputSize : public visionflow::param::ISchemable#
LocationMaxInputSize Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
LocationMaxInputSize &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationMaxInputSize the reference of this object.
-
int get_max_side_len() const#
Get Max Input Size.
Scale the long edge of the input image to the maximum side length, and scale the short edge equally. If the algorithm calculates that the required maximum edge length is smaller than this parameter, the maximum edge length will be set automatically.
See also
- Returns:
int Max Input Size
-
LocationMaxInputSize &set_max_side_len(int max_side_len)#
Set Max Input Size with int value.
Scale the long edge of the input image to the maximum side length, and scale the short edge equally. If the algorithm calculates that the required maximum edge length is smaller than this parameter, the maximum edge length will be set automatically.
See also
- Parameters:
max_side_len – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationMaxInputSize the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class LocationModelParameters : public visionflow::param::ISchemable#
LocationModelParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::string &get_model_arch() const#
Get Model Architecture.
There are two different model architectures: the High-Precision-Location model and Fast-Location model, The high-precision version is suitable for scenarios with positioning accuracy up to 1 pixel, and the fast version is suitable for most scenarios with shorter training, inference time and lower GPU memory requirements.
See also
- Returns:
const std::string & Model Architecture
-
LocationModelParameters &set_model_arch(std::string model_arch)#
Set Model Architecture with std::string value.
There are two different model architectures: the High-Precision-Location model and Fast-Location model, The high-precision version is suitable for scenarios with positioning accuracy up to 1 pixel, and the fast version is suitable for most scenarios with shorter training, inference time and lower GPU memory requirements.
See also
- Parameters:
model_arch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationModelParameters the reference of this object.
-
bool get_train_angle() const#
Get Training With Angle.
Enable this option to training the model with the angle information in the label
See also
- Returns:
bool Training With Angle
-
LocationModelParameters &set_train_angle(bool train_angle)#
Set Training With Angle with bool value.
Enable this option to training the model with the angle information in the label
See also
- Parameters:
train_angle – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationModelParameters the reference of this object.
-
bool get_train_rect() const#
Get Training With Rect Size.
Enable this option to training the model with the the rectangle size information of the target box
See also
- Returns:
bool Training With Rect Size
-
LocationModelParameters &set_train_rect(bool train_rect)#
Set Training With Rect Size with bool value.
Enable this option to training the model with the the rectangle size information of the target box
See also
- Parameters:
train_rect – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationModelParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class LocationTargetParameters : public visionflow::param::ISchemable#
LocationTargetParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_min_target_width() const#
Get Minimum Target Width.
The Minimum target width (Pixel value in X-axis direction)
See also
- Returns:
double Minimum Target Width
-
LocationTargetParameters &set_min_target_width(double min_target_width)#
Set Minimum Target Width with double value.
The Minimum target width (Pixel value in X-axis direction)
See also
- Parameters:
min_target_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTargetParameters the reference of this object.
-
double get_min_target_height() const#
Get Minimum Target Height.
The Minimum target height (Pixel value in Y-axis direction)
See also
- Returns:
double Minimum Target Height
-
LocationTargetParameters &set_min_target_height(double min_target_height)#
Set Minimum Target Height with double value.
The Minimum target height (Pixel value in Y-axis direction)
See also
- Parameters:
min_target_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTargetParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class NodeMatchTemplate : public visionflow::param::ISchemable#
NodeMatchTemplate Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
NodeMatchTemplate &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
const TemplateMode &get_template_mode() const#
Get Template Mode.
Set the value type of points and offset. When the template mode is set to kValueByPixel, the Coordinates of points and the offset should be set using pixel value. When the template mode is set to kValueByRatio, the Coordinates of points and the offset should be set using ratio value. When the Area Value Type is modified, the Coordinates of points and the offset should be modified.
See also
- Returns:
const TemplateMode & Template Mode
-
NodeMatchTemplate &set_template_mode(TemplateMode template_mode)#
Set Template Mode with TemplateMode value.
Set the value type of points and offset. When the template mode is set to kValueByPixel, the Coordinates of points and the offset should be set using pixel value. When the template mode is set to kValueByRatio, the Coordinates of points and the offset should be set using ratio value. When the Area Value Type is modified, the Coordinates of points and the offset should be modified.
See also
- Parameters:
template_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
int get_max_match_results_num() const#
Get Max Match Results Num.
the maximum number of template matching results. When the value is - 1, the maximum number of matching results is not limited.
See also
- Returns:
int Max Match Results Num
-
NodeMatchTemplate &set_max_match_results_num(int max_match_results_num)#
Set Max Match Results Num with int value.
the maximum number of template matching results. When the value is - 1, the maximum number of matching results is not limited.
See also
- Parameters:
max_match_results_num – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
int get_max_miss_points_num() const#
Get Max Miss Points Num.
The number of points allowed to be missed during matching
See also
- Returns:
int Max Miss Points Num
-
NodeMatchTemplate &set_max_miss_points_num(int max_miss_points_num)#
Set Max Miss Points Num with int value.
The number of points allowed to be missed during matching
See also
- Parameters:
max_miss_points_num – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
const std::vector<KeyPointNode> &get_points() const#
Get Keypoints.
The key points of the template
See also
- Returns:
const std::vector<KeyPointNode> & Keypoints
-
NodeMatchTemplate &set_points(std::vector<KeyPointNode> points)#
Set Keypoints with std::vector<KeyPointNode> value.
The key points of the template
See also
- Parameters:
points – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
const KeyPointNode &get_points(size_t index) const#
Get value in Keypoints with index.
Warning
The index must be less than get_points_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const KeyPointNode & value in Keypoints at index.
-
size_t get_points_size() const#
Get the size of Keypoints.
- Returns:
size_t the size of Keypoints
-
KeyPointNode &get_points(size_t index)#
Get mutable reference of value in Keypoints with index.
Warning
The index must be less than get_points_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
KeyPointNode& the mutable reference of value in Keypoints at index.
-
double get_max_distance() const#
Get Max Distance.
The maximum allowed distance between the template keypoints and the keypoints to be matched. Results with a distance greater than this value will be filtered out. The value can be either in absolute pixel or relative to the view height, depending on the template_mode.
See also
- Returns:
double Max Distance
-
NodeMatchTemplate &set_max_distance(double max_distance)#
Set Max Distance with double value.
The maximum allowed distance between the template keypoints and the keypoints to be matched. Results with a distance greater than this value will be filtered out. The value can be either in absolute pixel or relative to the view height, depending on the template_mode.
See also
- Parameters:
max_distance – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
bool get_is_scalable() const#
Get Target Scalable.
Enable this option if the scale of target to be matched is not fixed, And you should set the target scale range
See also
- Returns:
bool Target Scalable
-
NodeMatchTemplate &set_is_scalable(bool is_scalable)#
Set Target Scalable with bool value.
Enable this option if the scale of target to be matched is not fixed, And you should set the target scale range
See also
- Parameters:
is_scalable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
const std::vector<double> &get_scale_range() const#
Get Scale Range.
The target scale range
See also
- Returns:
const std::vector<double> & Scale Range
-
NodeMatchTemplate &set_scale_range(std::vector<double> scale_range)#
Set Scale Range with std::vector<double> value.
The target scale range
See also
- Parameters:
scale_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
bool scale_range_contains(double value) const#
Check if the Scale Range contains the value.
- Returns:
bool true if the Scale Range contains the value, otherwise false.
-
double get_scale_range_left() const#
Get left point value of Scale Range.
See also
- Returns:
const std::vector<double> & left point value of Scale Range
-
double get_scale_range_right() const#
Get the right point value of Scale Range.
See also
- Returns:
const std::vector<double> & the right point value of Scale Range
-
NodeMatchTemplate &set_scale_range_left(double scale_range_left)#
Set left point value of Scale Range with std::vector<double> value.
The target scale range
See also
- Parameters:
scale_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
NodeMatchTemplate &set_scale_range_right(double scale_range_right)#
Set the right point value of Scale Range with std::vector<double> value.
The target scale range
See also
- Parameters:
scale_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
bool get_is_rotatable() const#
Get Target Rotatable.
Enable this option if the angle of target to be matched is not fixed, And you should set the target rotate angle range
See also
- Returns:
bool Target Rotatable
-
NodeMatchTemplate &set_is_rotatable(bool is_rotatable)#
Set Target Rotatable with bool value.
Enable this option if the angle of target to be matched is not fixed, And you should set the target rotate angle range
See also
- Parameters:
is_rotatable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
const std::vector<double> &get_rotate_range() const#
Get Rotate Range (Degree).
The target rotate range
See also
- Returns:
const std::vector<double> & Rotate Range (Degree)
-
NodeMatchTemplate &set_rotate_range(std::vector<double> rotate_range)#
Set Rotate Range (Degree) with std::vector<double> value.
The target rotate range
See also
- Parameters:
rotate_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
bool rotate_range_contains(double value) const#
Check if the Rotate Range (Degree) contains the value.
- Returns:
bool true if the Rotate Range (Degree) contains the value, otherwise false.
-
double get_rotate_range_left() const#
Get left point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<double> & left point value of Rotate Range (Degree)
-
double get_rotate_range_right() const#
Get the right point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<double> & the right point value of Rotate Range (Degree)
-
NodeMatchTemplate &set_rotate_range_left(double rotate_range_left)#
Set left point value of Rotate Range (Degree) with std::vector<double> value.
The target rotate range
See also
- Parameters:
rotate_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
NodeMatchTemplate &set_rotate_range_right(double rotate_range_right)#
Set the right point value of Rotate Range (Degree) with std::vector<double> value.
The target rotate range
See also
- Parameters:
rotate_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
double get_template_angle() const#
Get Template angle (Degree).
Template angle is calculated and displayed the software in real time
See also
- Returns:
double Template angle (Degree)
-
NodeMatchTemplate &set_template_angle(double template_angle)#
Set Template angle (Degree) with double value.
Template angle is calculated and displayed the software in real time
See also
- Parameters:
template_angle – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
NodeMatchTemplate the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class LocationTemplates : public visionflow::param::SchemableParameter#
LocationTemplates Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::map<std::string, NodeMatchTemplate> &get_node_templates() const#
Get Node Templates.
Location node match templates
See also
- Returns:
const std::map<std::string, NodeMatchTemplate> & Node Templates
-
LocationTemplates &set_node_templates(std::map<std::string, NodeMatchTemplate> node_templates)#
Set Node Templates with std::map<std::string, NodeMatchTemplate> value.
Location node match templates
See also
- Parameters:
node_templates – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTemplates the reference of this object.
-
const NodeMatchTemplate &get_node_templates(const std::string &key) const#
Get value in Node Templates with key.
Warning
The key must be exist in Node Templates. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, NodeMatchTemplate> & value in Node Templates at key.
-
LocationTemplates &set_node_templates(const std::string &key, NodeMatchTemplate value)#
Set value in Node Templates with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTemplates the reference of this object.
-
bool node_templates_contains(const std::string &key) const#
Check if the key is exist in Node Templates.
- Returns:
bool true if the key is exist in Node Templates, otherwise false.
-
size_t get_node_templates_size() const#
Get the size of Node Templates.
- Returns:
size_t the size of Node Templates
-
NodeMatchTemplate &get_node_templates(const std::string &key)#
Get mutable reference of value in Node Templates with key. A new key and default value will be created if the key does not exist.
- Returns:
NodeMatchTemplate& the mutable reference of value in Node Templates at key.
-
virtual const std::string &schema_str() const override#
-
class LocationTrainingParameters : public visionflow::param::SchemableParameter#
LocationTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
LocationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Returns:
int Training Batch Size
-
LocationTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTrainingParameters the reference of this object.
-
const std::vector<uint32_t> &get_training_image_pages() const#
Get Select Visual Image Pages.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Returns:
const std::vector<uint32_t> & Select Visual Image Pages
-
LocationTrainingParameters &set_training_image_pages(std::vector<uint32_t> training_image_pages)#
Set Select Visual Image Pages with std::vector<uint32_t> value.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Parameters:
training_image_pages – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTrainingParameters the reference of this object.
-
uint32_t get_training_image_pages(size_t index) const#
Get value in Select Visual Image Pages with index.
Warning
The index must be less than get_training_image_pages_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
uint32_t value in Select Visual Image Pages at index.
-
size_t get_training_image_pages_size() const#
Get the size of Select Visual Image Pages.
- Returns:
size_t the size of Select Visual Image Pages
-
const LocationMaxInputSize &get_input_shape() const#
Get Customize Network Input Shape.
Setting the length of the long side of the network input.
See also
- Returns:
const LocationMaxInputSize & Customize Network Input Shape
-
LocationTrainingParameters &set_input_shape(LocationMaxInputSize input_shape)#
Set Customize Network Input Shape with LocationMaxInputSize value.
Setting the length of the long side of the network input.
See also
- Parameters:
input_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTrainingParameters the reference of this object.
-
LocationMaxInputSize &get_input_shape()#
Get mutable reference of Customize Network Input Shape.
Setting the length of the long side of the network input.
- Returns:
LocationTrainingParameters& the mutable reference of the group.
-
const LocationModelParameters &get_model_param() const#
Get Model param.
Location model parameters
See also
- Returns:
const LocationModelParameters & Model param
-
LocationTrainingParameters &set_model_param(LocationModelParameters model_param)#
Set Model param with LocationModelParameters value.
Location model parameters
See also
- Parameters:
model_param – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTrainingParameters the reference of this object.
-
LocationModelParameters &get_model_param()#
Get mutable reference of Model param.
Location model parameters
- Returns:
LocationTrainingParameters& the mutable reference of the group.
-
const LocationTargetParameters &get_target_feature() const#
Get Target Feature.
Location Target Feature Parameters
See also
- Returns:
const LocationTargetParameters & Target Feature
-
LocationTrainingParameters &set_target_feature(LocationTargetParameters target_feature)#
Set Target Feature with LocationTargetParameters value.
Location Target Feature Parameters
See also
- Parameters:
target_feature – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTrainingParameters the reference of this object.
-
LocationTargetParameters &get_target_feature()#
Get mutable reference of Target Feature.
Location Target Feature Parameters
- Returns:
LocationTrainingParameters& the mutable reference of the group.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
LocationTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
LocationTrainingParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class LocationFilterParameters : public visionflow::param::SchemableParameter#
LocationFilterParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_threshold() const#
Get Confidence Threshold.
Keypoints with confidence greater than this threshold will be determined as a character target.
See also
- Returns:
double Confidence Threshold
-
LocationFilterParameters &set_threshold(double threshold)#
Set Confidence Threshold with double value.
Keypoints with confidence greater than this threshold will be determined as a character target.
See also
- Parameters:
threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationFilterParameters the reference of this object.
-
double get_target_overlap_ratio() const#
Get Target Overlap Ratio.
Some redundant points will be removed to ensure that the intersection ratio between points within each category does not exceed this value.target_overlap_ratio = intersection_area/Union_area.
See also
- Returns:
double Target Overlap Ratio
-
LocationFilterParameters &set_target_overlap_ratio(double target_overlap_ratio)#
Set Target Overlap Ratio with double value.
Some redundant points will be removed to ensure that the intersection ratio between points within each category does not exceed this value.target_overlap_ratio = intersection_area/Union_area.
See also
- Parameters:
target_overlap_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
LocationFilterParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
AssemblyVerification Tool Parameters#
-
class AssemblyVerificationMaxInputSize : public visionflow::param::ISchemable#
AssemblyVerificationMaxInputSize Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
AssemblyVerificationMaxInputSize &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationMaxInputSize the reference of this object.
-
int get_max_side_len() const#
Get Max Input Size.
Scale the long edge of the input image to the maximum side length, and scale the short edge equally. If the algorithm calculates that the required maximum edge length is smaller than this parameter, the maximum edge length will be set automatically.
See also
- Returns:
int Max Input Size
-
AssemblyVerificationMaxInputSize &set_max_side_len(int max_side_len)#
Set Max Input Size with int value.
Scale the long edge of the input image to the maximum side length, and scale the short edge equally. If the algorithm calculates that the required maximum edge length is smaller than this parameter, the maximum edge length will be set automatically.
See also
- Parameters:
max_side_len – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationMaxInputSize the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class AssemblyVerificationModelParameters : public visionflow::param::ISchemable#
AssemblyVerificationModelParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_train_angle() const#
Get Training With Angle.
Enable this option to training the model with the angle information in the label
See also
- Returns:
bool Training With Angle
-
AssemblyVerificationModelParameters &set_train_angle(bool train_angle)#
Set Training With Angle with bool value.
Enable this option to training the model with the angle information in the label
See also
- Parameters:
train_angle – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationModelParameters the reference of this object.
-
bool get_train_rect() const#
Get Training With Rect Size.
Enable this option to training the model with the the rectangle size information of the target box
See also
- Returns:
bool Training With Rect Size
-
AssemblyVerificationModelParameters &set_train_rect(bool train_rect)#
Set Training With Rect Size with bool value.
Enable this option to training the model with the the rectangle size information of the target box
See also
- Parameters:
train_rect – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationModelParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class AssemblyVerificationTargetParameters : public visionflow::param::ISchemable#
AssemblyVerificationTargetParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_min_target_width() const#
Get Minimum Target Width.
The Minimum target width (Pixel value in X-axis direction)
See also
- Returns:
double Minimum Target Width
-
AssemblyVerificationTargetParameters &set_min_target_width(double min_target_width)#
Set Minimum Target Width with double value.
The Minimum target width (Pixel value in X-axis direction)
See also
- Parameters:
min_target_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTargetParameters the reference of this object.
-
double get_min_target_height() const#
Get Minimum Target Height.
The Minimum target height (Pixel value in Y-axis direction)
See also
- Returns:
double Minimum Target Height
-
AssemblyVerificationTargetParameters &set_min_target_height(double min_target_height)#
Set Minimum Target Height with double value.
The Minimum target height (Pixel value in Y-axis direction)
See also
- Parameters:
min_target_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTargetParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class AssemblyVerificationLayOutArea : public visionflow::param::ISchemable#
AssemblyVerificationLayOutArea Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_x() const#
Get X-Value.
X-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, X-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value should be set using ratio value. When the template mode is modified, X-Value needs to be modified.
See also
- Returns:
double X-Value
-
AssemblyVerificationLayOutArea &set_x(double x)#
Set X-Value with double value.
X-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, X-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value should be set using ratio value. When the template mode is modified, X-Value needs to be modified.
See also
- Parameters:
x – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
double get_y() const#
Get Y-Value.
Y-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, Y-Value should be set using pixel value. When the template mode is set to kValueByRatio, Y-Value should be set using ratio value. When the template mode is modified, Y-Value needs to be modified.
See also
- Returns:
double Y-Value
-
AssemblyVerificationLayOutArea &set_y(double y)#
Set Y-Value with double value.
Y-direction coordinate value of the center of the area. When the template mode is set to kValueByPixel, Y-Value should be set using pixel value. When the template mode is set to kValueByRatio, Y-Value should be set using ratio value. When the template mode is modified, Y-Value needs to be modified.
See also
- Parameters:
y – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
double get_w() const#
Get W-Value.
width of the area. When the template mode is set to kValueByPixel, W-Value should be set using pixel value. When the template mode is set to kValueByRatio, W-Value should be set using ratio value. When the template mode is modified, W-Value needs to be modified.
See also
- Returns:
double W-Value
-
AssemblyVerificationLayOutArea &set_w(double w)#
Set W-Value with double value.
width of the area. When the template mode is set to kValueByPixel, W-Value should be set using pixel value. When the template mode is set to kValueByRatio, W-Value should be set using ratio value. When the template mode is modified, W-Value needs to be modified.
See also
- Parameters:
w – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
double get_h() const#
Get H-Value.
height of the area. When the template mode is set to kValueByPixel, H-Value should be set using pixel value. When the template mode is set to kValueRatio, H-Value should be set using ratio value. When the template mode is modified, H-Value needs to be modified.
See also
- Returns:
double H-Value
-
AssemblyVerificationLayOutArea &set_h(double h)#
Set H-Value with double value.
height of the area. When the template mode is set to kValueByPixel, H-Value should be set using pixel value. When the template mode is set to kValueRatio, H-Value should be set using ratio value. When the template mode is modified, H-Value needs to be modified.
See also
- Parameters:
h – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
const std::vector<std::string> &get_target_category() const#
Get Target Category.
Categories of targets in the area
See also
- Returns:
const std::vector<std::string> & Target Category
-
AssemblyVerificationLayOutArea &set_target_category(std::vector<std::string> target_category)#
Set Target Category with std::vector<std::string> value.
Categories of targets in the area
See also
- Parameters:
target_category – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
const std::string &get_target_category(size_t index) const#
Get value in Target Category with index.
Warning
The index must be less than get_target_category_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::string & value in Target Category at index.
-
size_t get_target_category_size() const#
Get the size of Target Category.
- Returns:
size_t the size of Target Category
-
int get_target_number() const#
Get Target Number.
Number of targets in the region
See also
- Returns:
int Target Number
-
AssemblyVerificationLayOutArea &set_target_number(int target_number)#
Set Target Number with int value.
Number of targets in the region
See also
- Parameters:
target_number – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
bool get_use_target_angle_range() const#
Get Use Target Angle Range.
Enable this option if the angle of target to be matched needs to belimited, And you should set the target angle range.
See also
- Returns:
bool Use Target Angle Range
-
AssemblyVerificationLayOutArea &set_use_target_angle_range(bool use_target_angle_range)#
Set Use Target Angle Range with bool value.
Enable this option if the angle of target to be matched needs to belimited, And you should set the target angle range.
See also
- Parameters:
use_target_angle_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
const std::vector<double> &get_target_angle_range() const#
Get Target Angle Range (Degree).
The angle range target limited to
See also
- Returns:
const std::vector<double> & Target Angle Range (Degree)
-
AssemblyVerificationLayOutArea &set_target_angle_range(std::vector<double> target_angle_range)#
Set Target Angle Range (Degree) with std::vector<double> value.
The angle range target limited to
See also
- Parameters:
target_angle_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
bool target_angle_range_contains(double value) const#
Check if the Target Angle Range (Degree) contains the value.
- Returns:
bool true if the Target Angle Range (Degree) contains the value, otherwise false.
-
double get_target_angle_range_left() const#
Get left point value of Target Angle Range (Degree).
See also
- Returns:
const std::vector<double> & left point value of Target Angle Range (Degree)
-
double get_target_angle_range_right() const#
Get the right point value of Target Angle Range (Degree).
See also
- Returns:
const std::vector<double> & the right point value of Target Angle Range (Degree)
-
AssemblyVerificationLayOutArea &set_target_angle_range_left(double target_angle_range_left)#
Set left point value of Target Angle Range (Degree) with std::vector<double> value.
The angle range target limited to
See also
- Parameters:
target_angle_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
AssemblyVerificationLayOutArea &set_target_angle_range_right(double target_angle_range_right)#
Set the right point value of Target Angle Range (Degree) with std::vector<double> value.
The angle range target limited to
See also
- Parameters:
target_angle_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationLayOutArea the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class AssemblyVerificationTemplates : public visionflow::param::SchemableParameter#
AssemblyVerificationTemplates Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const TemplateMode &get_template_mode() const#
Get Template Mode.
Set the Value Type of the central coordinates of the region and the width and height of the area. When the template mode is set to kValueByPixel, X-Value Y-Value W-Value H-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value Y-Value W-Value H-Value should be set using ratio value. When the template mode is modified, X-Value Y-Value W-Value H-Value needs to be modified.
See also
- Returns:
const TemplateMode & Template Mode
-
AssemblyVerificationTemplates &set_template_mode(TemplateMode template_mode)#
Set Template Mode with TemplateMode value.
Set the Value Type of the central coordinates of the region and the width and height of the area. When the template mode is set to kValueByPixel, X-Value Y-Value W-Value H-Value should be set using pixel value. When the template mode is set to kValueByRatio, X-Value Y-Value W-Value H-Value should be set using ratio value. When the template mode is modified, X-Value Y-Value W-Value H-Value needs to be modified.
See also
- Parameters:
template_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTemplates the reference of this object.
-
const std::map<std::string, AssemblyVerificationLayOutArea> &get_areas() const#
Get Areas.
The areas inside the template. The key of the map is the name of area. The value of the map is the parameter of area.
See also
- Returns:
const std::map<std::string, AssemblyVerificationLayOutArea> & Areas
-
AssemblyVerificationTemplates &set_areas(std::map<std::string, AssemblyVerificationLayOutArea> areas)#
Set Areas with std::map<std::string, AssemblyVerificationLayOutArea> value.
The areas inside the template. The key of the map is the name of area. The value of the map is the parameter of area.
See also
- Parameters:
areas – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTemplates the reference of this object.
-
const AssemblyVerificationLayOutArea &get_areas(const std::string &key) const#
Get value in Areas with key.
Warning
The key must be exist in Areas. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, AssemblyVerificationLayOutArea> & value in Areas at key.
-
AssemblyVerificationTemplates &set_areas(const std::string &key, AssemblyVerificationLayOutArea value)#
Set value in Areas with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTemplates the reference of this object.
-
bool areas_contains(const std::string &key) const#
Check if the key is exist in Areas.
- Returns:
bool true if the key is exist in Areas, otherwise false.
-
size_t get_areas_size() const#
Get the size of Areas.
- Returns:
size_t the size of Areas
-
AssemblyVerificationLayOutArea &get_areas(const std::string &key)#
Get mutable reference of value in Areas with key. A new key and default value will be created if the key does not exist.
- Returns:
AssemblyVerificationLayOutArea& the mutable reference of value in Areas at key.
-
virtual const std::string &schema_str() const override#
-
class AssemblyVerificationTrainingParameters : public visionflow::param::SchemableParameter#
AssemblyVerificationTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
AssemblyVerificationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Returns:
int Training Batch Size
-
AssemblyVerificationTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTrainingParameters the reference of this object.
-
const std::vector<uint32_t> &get_training_image_pages() const#
Get Select Visual Image Pages.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Returns:
const std::vector<uint32_t> & Select Visual Image Pages
-
AssemblyVerificationTrainingParameters &set_training_image_pages(std::vector<uint32_t> training_image_pages)#
Set Select Visual Image Pages with std::vector<uint32_t> value.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Parameters:
training_image_pages – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTrainingParameters the reference of this object.
-
uint32_t get_training_image_pages(size_t index) const#
Get value in Select Visual Image Pages with index.
Warning
The index must be less than get_training_image_pages_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
uint32_t value in Select Visual Image Pages at index.
-
size_t get_training_image_pages_size() const#
Get the size of Select Visual Image Pages.
- Returns:
size_t the size of Select Visual Image Pages
-
const AssemblyVerificationMaxInputSize &get_input_shape() const#
Get Customize Network Input Shape.
Setting the length of the long side of the network input.
See also
- Returns:
const AssemblyVerificationMaxInputSize & Customize Network Input Shape
-
AssemblyVerificationTrainingParameters &set_input_shape(AssemblyVerificationMaxInputSize input_shape)#
Set Customize Network Input Shape with AssemblyVerificationMaxInputSize value.
Setting the length of the long side of the network input.
See also
- Parameters:
input_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTrainingParameters the reference of this object.
-
AssemblyVerificationMaxInputSize &get_input_shape()#
Get mutable reference of Customize Network Input Shape.
Setting the length of the long side of the network input.
- Returns:
AssemblyVerificationTrainingParameters& the mutable reference of the group.
-
const AssemblyVerificationModelParameters &get_model_param() const#
Get Model param.
AssemblyVerification model parameters
See also
- Returns:
const AssemblyVerificationModelParameters & Model param
-
AssemblyVerificationTrainingParameters &set_model_param(AssemblyVerificationModelParameters model_param)#
Set Model param with AssemblyVerificationModelParameters value.
AssemblyVerification model parameters
See also
- Parameters:
model_param – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTrainingParameters the reference of this object.
-
AssemblyVerificationModelParameters &get_model_param()#
Get mutable reference of Model param.
AssemblyVerification model parameters
- Returns:
AssemblyVerificationTrainingParameters& the mutable reference of the group.
-
const AssemblyVerificationTargetParameters &get_target_feature() const#
Get Target Feature.
AssemblyVerification Target Feature Parameters
See also
- Returns:
const AssemblyVerificationTargetParameters & Target Feature
-
AssemblyVerificationTrainingParameters &set_target_feature(AssemblyVerificationTargetParameters target_feature)#
Set Target Feature with AssemblyVerificationTargetParameters value.
AssemblyVerification Target Feature Parameters
See also
- Parameters:
target_feature – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTrainingParameters the reference of this object.
-
AssemblyVerificationTargetParameters &get_target_feature()#
Get mutable reference of Target Feature.
AssemblyVerification Target Feature Parameters
- Returns:
AssemblyVerificationTrainingParameters& the mutable reference of the group.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
AssemblyVerificationTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
AssemblyVerificationTrainingParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class AssemblyVerificationFilterParameters : public visionflow::param::SchemableParameter#
AssemblyVerificationFilterParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_threshold() const#
Get Confidence Threshold.
Keypoints with confidence greater than this threshold will be determined as a character target.
See also
- Returns:
double Confidence Threshold
-
AssemblyVerificationFilterParameters &set_threshold(double threshold)#
Set Confidence Threshold with double value.
Keypoints with confidence greater than this threshold will be determined as a character target.
See also
- Parameters:
threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationFilterParameters the reference of this object.
-
double get_density() const#
Get Search Density.
Keep only one result within the radius of target size * density
See also
- Returns:
double Search Density
-
AssemblyVerificationFilterParameters &set_density(double density)#
Set Search Density with double value.
Keep only one result within the radius of target size * density
See also
- Parameters:
density – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
AssemblyVerificationFilterParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
Classification Tool Parameters#
-
class ClassificationInputShape : public visionflow::param::ISchemable#
ClassificationInputShape Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ClassificationInputShape &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationInputShape the reference of this object.
-
int get_base_input_width() const#
Get Input Image Width.
Base Input Width
See also
- Returns:
int Input Image Width
-
ClassificationInputShape &set_base_input_width(int base_input_width)#
Set Input Image Width with int value.
Base Input Width
See also
- Parameters:
base_input_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationInputShape the reference of this object.
-
int get_base_input_height() const#
Get Input Image Height.
Base Input Height
See also
- Returns:
int Input Image Height
-
ClassificationInputShape &set_base_input_height(int base_input_height)#
Set Input Image Height with int value.
Base Input Height
See also
- Parameters:
base_input_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationInputShape the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ClassificationTrainingParameters : public visionflow::param::SchemableParameter#
ClassificationTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
ClassificationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Returns:
int Training Batch Size
-
ClassificationTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16. The classification module needs to be set larger, generally 32, 64
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
const ClassificationInputShape &get_input_shape() const#
Get Customize Network Input Shape.
Customize the model input shape. With this parameter group enabled, the input image will be resized into the customized shape before training.
See also
- Returns:
const ClassificationInputShape & Customize Network Input Shape
-
ClassificationTrainingParameters &set_input_shape(ClassificationInputShape input_shape)#
Set Customize Network Input Shape with ClassificationInputShape value.
Customize the model input shape. With this parameter group enabled, the input image will be resized into the customized shape before training.
See also
- Parameters:
input_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
ClassificationInputShape &get_input_shape()#
Get mutable reference of Customize Network Input Shape.
Customize the model input shape. With this parameter group enabled, the input image will be resized into the customized shape before training.
- Returns:
ClassificationTrainingParameters& the mutable reference of the group.
-
const std::vector<uint32_t> &get_training_image_pages() const#
Get Select Visual Image Pages.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Returns:
const std::vector<uint32_t> & Select Visual Image Pages
-
ClassificationTrainingParameters &set_training_image_pages(std::vector<uint32_t> training_image_pages)#
Set Select Visual Image Pages with std::vector<uint32_t> value.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Parameters:
training_image_pages – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
uint32_t get_training_image_pages(size_t index) const#
Get value in Select Visual Image Pages with index.
Warning
The index must be less than get_training_image_pages_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
uint32_t value in Select Visual Image Pages at index.
-
size_t get_training_image_pages_size() const#
Get the size of Select Visual Image Pages.
- Returns:
size_t the size of Select Visual Image Pages
-
const TrainingMode &get_training_mode() const#
Get Training Mode.
Normal Train is the default mode for training a new model. Increment Train will retrain on previous model knowledge.
See also
- Returns:
const TrainingMode & Training Mode
-
ClassificationTrainingParameters &set_training_mode(TrainingMode training_mode)#
Set Training Mode with TrainingMode value.
Normal Train is the default mode for training a new model. Increment Train will retrain on previous model knowledge.
See also
- Parameters:
training_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
bool get_only_check() const#
Get Only Check.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Returns:
bool Only Check
-
ClassificationTrainingParameters &set_only_check(bool only_check)#
Set Only Check with bool value.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Parameters:
only_check – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
const std::string &get_model_arch() const#
Get Model Architecture.
The Fast-Model is suitable for most scenarios, but the classification accuracy may be reduced in scenarios with more categories (more than 10 categories) and lower differentiation between categories, in which you can use the High-Precision-Model, although this will result in a slightly longer training and inference time.
See also
- Returns:
const std::string & Model Architecture
-
ClassificationTrainingParameters &set_model_arch(std::string model_arch)#
Set Model Architecture with std::string value.
The Fast-Model is suitable for most scenarios, but the classification accuracy may be reduced in scenarios with more categories (more than 10 categories) and lower differentiation between categories, in which you can use the High-Precision-Model, although this will result in a slightly longer training and inference time.
See also
- Parameters:
model_arch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
ClassificationTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
ClassificationTrainingParameters& the mutable reference of the group.
-
bool get_with_contrastive() const#
Get With Contrastive Learning.
With this option enabled, The algorithm will try to improve the model performance by comparing the difference between sample and defective image. This mode is only applicable to the mixed images composed of a sample image and a defective image, it’s not applicable to single-image-samples or mixed images composed of different photos of the same defect. The algorithm supports selecting multiple image pages from the mixed images to form two image groups. Image group 1 will be compared with image group 2. You can consider image group 1 as the defective image group and image group 2 as the sample image group, or vice versa. The training image page list will be split into two halves, with the first half forming image group 1 and the second half forming image group 2. For example, if the training image pages are set to [0, 2, 1, 3], the images corresponding to [0, 2] will form image group 1, and will be compared with image group 2 formed by [1, 3].
See also
- Returns:
bool With Contrastive Learning
-
ClassificationTrainingParameters &set_with_contrastive(bool with_contrastive)#
Set With Contrastive Learning with bool value.
With this option enabled, The algorithm will try to improve the model performance by comparing the difference between sample and defective image. This mode is only applicable to the mixed images composed of a sample image and a defective image, it’s not applicable to single-image-samples or mixed images composed of different photos of the same defect. The algorithm supports selecting multiple image pages from the mixed images to form two image groups. Image group 1 will be compared with image group 2. You can consider image group 1 as the defective image group and image group 2 as the sample image group, or vice versa. The training image page list will be split into two halves, with the first half forming image group 1 and the second half forming image group 2. For example, if the training image pages are set to [0, 2, 1, 3], the images corresponding to [0, 2] will form image group 1, and will be compared with image group 2 formed by [1, 3].
See also
- Parameters:
with_contrastive – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ClassificationTrainingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
EL Classification Tool Parameters#
-
class ELClassificationTrainingParameters : public visionflow::param::SchemableParameter#
ELClassificationTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
ELClassificationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELClassificationTrainingParameters the reference of this object.
-
uint32_t get_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
ELClassificationTrainingParameters &set_image_page(uint32_t image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELClassificationTrainingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
EL Unsuper Classification Tool Parameters#
-
class ELUnsuperClassificationTrainingParameters : public visionflow::param::SchemableParameter#
ELUnsuperClassificationTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
ELUnsuperClassificationTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperClassificationTrainingParameters the reference of this object.
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
ELUnsuperClassificationTrainingParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperClassificationTrainingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ELUnsuperClassificationInferenceParameters : public visionflow::param::SchemableParameter#
ELUnsuperClassificationInferenceParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_ng_thresh() const#
Get NG Threshold.
Image will be set to ok when score < NG Threshold, and set to ng when score > NG Threshold
See also
- Returns:
double NG Threshold
-
ELUnsuperClassificationInferenceParameters &set_ng_thresh(double ng_thresh)#
Set NG Threshold with double value.
Image will be set to ok when score < NG Threshold, and set to ng when score > NG Threshold
See also
- Parameters:
ng_thresh – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperClassificationInferenceParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
Detection Tool Parameters#
-
class DetectionTrainingParameters : public visionflow::param::SchemableParameter#
DetectionTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
DetectionTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
const std::vector<uint32_t> &get_training_image_pages() const#
Get Select Visual Image Pages.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Returns:
const std::vector<uint32_t> & Select Visual Image Pages
-
DetectionTrainingParameters &set_training_image_pages(std::vector<uint32_t> training_image_pages)#
Set Select Visual Image Pages with std::vector<uint32_t> value.
The indices of the visual images pages to be trained. If empty, all visual image pages will be trained.
See also
- Parameters:
training_image_pages – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
uint32_t get_training_image_pages(size_t index) const#
Get value in Select Visual Image Pages with index.
Warning
The index must be less than get_training_image_pages_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
uint32_t value in Select Visual Image Pages at index.
-
size_t get_training_image_pages_size() const#
Get the size of Select Visual Image Pages.
- Returns:
size_t the size of Select Visual Image Pages
-
bool get_train_with_view_mask() const#
Get Train With View Masks.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Returns:
bool Train With View Masks
-
DetectionTrainingParameters &set_train_with_view_mask(bool train_with_view_mask)#
Set Train With View Masks with bool value.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Parameters:
train_with_view_mask – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16.
See also
- Returns:
int Training Batch Size
-
DetectionTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16.
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
double get_lr_decay() const#
Get Learning Rate Decay.
The learning rate is multiplied by this value every epoch. The larger the value, the faster the learning rate decreases
See also
- Returns:
double Learning Rate Decay
-
DetectionTrainingParameters &set_lr_decay(double lr_decay)#
Set Learning Rate Decay with double value.
The learning rate is multiplied by this value every epoch. The larger the value, the faster the learning rate decreases
See also
- Parameters:
lr_decay – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
const std::string &get_model_arch() const#
Get Model Architecture.
There are three different detection models, all of which support multi-categories detection.
See also
- Returns:
const std::string & Model Architecture
-
DetectionTrainingParameters &set_model_arch(std::string model_arch)#
Set Model Architecture with std::string value.
There are three different detection models, all of which support multi-categories detection.
See also
- Parameters:
model_arch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
int get_max_size() const#
Get Max Length.
To resize input images, the longer side is scaled down to match the maximum edge length while the shorter side is scaled proportionally. If the calculated maximum edge length is smaller than the given parameter, the algorithm will automatically adjust the maximum edge length. Setting a larger maximum edge length can improve detection accuracy, but it also requires longer training and inference time and higher GPU memory usage.
See also
- Returns:
int Max Length
-
DetectionTrainingParameters &set_max_size(int max_size)#
Set Max Length with int value.
To resize input images, the longer side is scaled down to match the maximum edge length while the shorter side is scaled proportionally. If the calculated maximum edge length is smaller than the given parameter, the algorithm will automatically adjust the maximum edge length. Setting a larger maximum edge length can improve detection accuracy, but it also requires longer training and inference time and higher GPU memory usage.
See also
- Parameters:
max_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
const DetectionInputShape &get_input_shape() const#
Get Customize Network Input Shape.
Customize Network Input Shape
See also
- Returns:
const DetectionInputShape & Customize Network Input Shape
-
DetectionTrainingParameters &set_input_shape(DetectionInputShape input_shape)#
Set Customize Network Input Shape with DetectionInputShape value.
Customize Network Input Shape
See also
- Parameters:
input_shape – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
DetectionInputShape &get_input_shape()#
Get mutable reference of Customize Network Input Shape.
Customize Network Input Shape
- Returns:
DetectionTrainingParameters& the mutable reference of the group.
-
const DetectionTrainingStrategy &get_train_tricks() const#
Get train tricks.
Detection Strategy Parameters
See also
- Returns:
const DetectionTrainingStrategy & train tricks
-
DetectionTrainingParameters &set_train_tricks(DetectionTrainingStrategy train_tricks)#
Set train tricks with DetectionTrainingStrategy value.
Detection Strategy Parameters
See also
- Parameters:
train_tricks – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
DetectionTrainingStrategy &get_train_tricks()#
Get mutable reference of train tricks.
Detection Strategy Parameters
- Returns:
DetectionTrainingParameters& the mutable reference of the group.
-
const DataAugmentation &get_augmentations() const#
Get Data Augmentation.
Data Augmentation Parameters
See also
- Returns:
const DataAugmentation & Data Augmentation
-
DetectionTrainingParameters &set_augmentations(DataAugmentation augmentations)#
Set Data Augmentation with DataAugmentation value.
Data Augmentation Parameters
See also
- Parameters:
augmentations – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingParameters the reference of this object.
-
DataAugmentation &get_augmentations()#
Get mutable reference of Data Augmentation.
Data Augmentation Parameters
- Returns:
DetectionTrainingParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class DetectionInferParameters : public visionflow::param::SchemableParameter#
DetectionInferParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_max_target_num() const#
Get Maximum Target Count.
Retain only the top N targets with the highest confidence score
See also
- Returns:
int Maximum Target Count
-
DetectionInferParameters &set_max_target_num(int max_target_num)#
Set Maximum Target Count with int value.
Retain only the top N targets with the highest confidence score
See also
- Parameters:
max_target_num – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionInferParameters the reference of this object.
-
bool get_filter_by_class() const#
Get Filter By Class.
When this parameter is enabled, the output boxes will be filtered separately by category.
See also
- Returns:
bool Filter By Class
-
DetectionInferParameters &set_filter_by_class(bool filter_by_class)#
Set Filter By Class with bool value.
When this parameter is enabled, the output boxes will be filtered separately by category.
See also
- Parameters:
filter_by_class – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionInferParameters the reference of this object.
-
double get_target_overlap_ratio() const#
Get Target Overlap Ratio.
Some redundant boxes will be removed to ensure that the intersection ratio between boxes does not exceed this value. target_overlap_ratio = intersection_area / Union_area.
See also
- Returns:
double Target Overlap Ratio
-
DetectionInferParameters &set_target_overlap_ratio(double target_overlap_ratio)#
Set Target Overlap Ratio with double value.
Some redundant boxes will be removed to ensure that the intersection ratio between boxes does not exceed this value. target_overlap_ratio = intersection_area / Union_area.
See also
- Parameters:
target_overlap_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionInferParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class DetectionTrainingStrategy : public visionflow::param::ISchemable#
DetectionTrainingStrategy Parameter class generated by jinja2 automatically.
Detection training tricks
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_auto_anchor() const#
Get Auto Anchor.
Auto anchor will automatically adjust the preset anchor size based on the image label
See also
- Returns:
bool Auto Anchor
-
DetectionTrainingStrategy &set_auto_anchor(bool auto_anchor)#
Set Auto Anchor with bool value.
Auto anchor will automatically adjust the preset anchor size based on the image label
See also
- Parameters:
auto_anchor – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionTrainingStrategy the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class DetectionInputShape : public visionflow::param::ISchemable#
DetectionInputShape Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
DetectionInputShape &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionInputShape the reference of this object.
-
int get_base_input_width() const#
Get Base Input Width.
Base Input Width
See also
- Returns:
int Base Input Width
-
DetectionInputShape &set_base_input_width(int base_input_width)#
Set Base Input Width with int value.
Base Input Width
See also
- Parameters:
base_input_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionInputShape the reference of this object.
-
int get_base_input_height() const#
Get Base Input Height.
Base Input Height
See also
- Returns:
int Base Input Height
-
DetectionInputShape &set_base_input_height(int base_input_height)#
Set Base Input Height with int value.
Base Input Height
See also
- Parameters:
base_input_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DetectionInputShape the reference of this object.
-
virtual const std::string &schema_str() const override#
GeometrySearch Tool Parameters#
-
class GeometrySearchTrainingParameters : public visionflow::param::SchemableParameter#
GeometrySearchTrainingParameters Parameter class generated by jinja2 automatically.
GeometrySearch Training Parameter Group
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
GeometrySearchTrainingParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchTrainingParameters the reference of this object.
-
const SetGeometrySearchGranularityManually &get_granularity() const#
Get Manual Granularity Setting.
Enable manual setting of granularity; if not enabled, parameters will be auto-tuned. Feature chain granularity. Larger granularity will be faster precision.
See also
- Returns:
const SetGeometrySearchGranularityManually & Manual Granularity Setting
-
GeometrySearchTrainingParameters &set_granularity(SetGeometrySearchGranularityManually granularity)#
Set Manual Granularity Setting with SetGeometrySearchGranularityManually value.
Enable manual setting of granularity; if not enabled, parameters will be auto-tuned. Feature chain granularity. Larger granularity will be faster precision.
See also
- Parameters:
granularity – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchTrainingParameters the reference of this object.
-
SetGeometrySearchGranularityManually &get_granularity()#
Get mutable reference of Manual Granularity Setting.
Enable manual setting of granularity; if not enabled, parameters will be auto-tuned. Feature chain granularity. Larger granularity will be faster precision.
- Returns:
GeometrySearchTrainingParameters& the mutable reference of the group.
-
const SetGeometrySearchNoiseThreshManually &get_noise_thresh() const#
Get Manual Noise Threshold.
Enable manual setting of noise threshold; if not enabled, the threshold will be auto-tuned. Noise threshold of feature point gradient magnitude.
See also
- Returns:
const SetGeometrySearchNoiseThreshManually & Manual Noise Threshold
-
GeometrySearchTrainingParameters &set_noise_thresh(SetGeometrySearchNoiseThreshManually noise_thresh)#
Set Manual Noise Threshold with SetGeometrySearchNoiseThreshManually value.
Enable manual setting of noise threshold; if not enabled, the threshold will be auto-tuned. Noise threshold of feature point gradient magnitude.
See also
- Parameters:
noise_thresh – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchTrainingParameters the reference of this object.
-
SetGeometrySearchNoiseThreshManually &get_noise_thresh()#
Get mutable reference of Manual Noise Threshold.
Enable manual setting of noise threshold; if not enabled, the threshold will be auto-tuned. Noise threshold of feature point gradient magnitude.
- Returns:
GeometrySearchTrainingParameters& the mutable reference of the group.
-
const SetGeometrySearchFeatChainMagRelativeThreshManually &get_total_magnitude_relative_thresh() const#
Get Manual Magnitude Relative Threshold.
Enable manual setting of the total magnitude relative threshold; if not enabled, the threshold will be auto-tuned. Auto set relative total gradient magnitude threshold for feature chains.
- Returns:
const SetGeometrySearchFeatChainMagRelativeThreshManually & Manual Magnitude Relative Threshold
-
GeometrySearchTrainingParameters &set_total_magnitude_relative_thresh(SetGeometrySearchFeatChainMagRelativeThreshManually total_magnitude_relative_thresh)#
Set Manual Magnitude Relative Threshold with SetGeometrySearchFeatChainMagRelativeThreshManually value.
Enable manual setting of the total magnitude relative threshold; if not enabled, the threshold will be auto-tuned. Auto set relative total gradient magnitude threshold for feature chains.
- Parameters:
total_magnitude_relative_thresh – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchTrainingParameters the reference of this object.
-
SetGeometrySearchFeatChainMagRelativeThreshManually &get_total_magnitude_relative_thresh()#
Get mutable reference of Manual Magnitude Relative Threshold.
Enable manual setting of the total magnitude relative threshold; if not enabled, the threshold will be auto-tuned. Auto set relative total gradient magnitude threshold for feature chains.
- Returns:
GeometrySearchTrainingParameters& the mutable reference of the group.
-
const SetGeometrySearchDownSampleRatioManually &get_down_sample_ratio() const#
Get Manual Down Sample.
Enable manual setting of the down sample ratio; if not enabled, the ratio will be auto-tuned. Select image down sample ratio to speed up training and inference.
See also
- Returns:
const SetGeometrySearchDownSampleRatioManually & Manual Down Sample
-
GeometrySearchTrainingParameters &set_down_sample_ratio(SetGeometrySearchDownSampleRatioManually down_sample_ratio)#
Set Manual Down Sample with SetGeometrySearchDownSampleRatioManually value.
Enable manual setting of the down sample ratio; if not enabled, the ratio will be auto-tuned. Select image down sample ratio to speed up training and inference.
See also
- Parameters:
down_sample_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchTrainingParameters the reference of this object.
-
SetGeometrySearchDownSampleRatioManually &get_down_sample_ratio()#
Get mutable reference of Manual Down Sample.
Enable manual setting of the down sample ratio; if not enabled, the ratio will be auto-tuned. Select image down sample ratio to speed up training and inference.
- Returns:
GeometrySearchTrainingParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class GeometrySearchInferParameters : public visionflow::param::SchemableParameter#
GeometrySearchInferParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_threshold() const#
Get Match Score.
Similarity between the target and the template, the higher the score, the more accurate the matched targets are, and the fewer the quantity.
See also
- Returns:
double Match Score
-
GeometrySearchInferParameters &set_threshold(double threshold)#
Set Match Score with double value.
Similarity between the target and the template, the higher the score, the more accurate the matched targets are, and the fewer the quantity.
See also
- Parameters:
threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
int get_max_match_results_num() const#
Get Max Match Results Num Per View.
The maximum number of searching results per view. When the value is 0, the maximum number of searching results is not limited.
See also
- Returns:
int Max Match Results Num Per View
-
GeometrySearchInferParameters &set_max_match_results_num(int max_match_results_num)#
Set Max Match Results Num Per View with int value.
The maximum number of searching results per view. When the value is 0, the maximum number of searching results is not limited.
See also
- Parameters:
max_match_results_num – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
const std::vector<double> &get_rotate_range() const#
Get Rotate Range (Degree).
The target rotate range
See also
- Returns:
const std::vector<double> & Rotate Range (Degree)
-
GeometrySearchInferParameters &set_rotate_range(std::vector<double> rotate_range)#
Set Rotate Range (Degree) with std::vector<double> value.
The target rotate range
See also
- Parameters:
rotate_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
bool rotate_range_contains(double value) const#
Check if the Rotate Range (Degree) contains the value.
- Returns:
bool true if the Rotate Range (Degree) contains the value, otherwise false.
-
double get_rotate_range_left() const#
Get left point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<double> & left point value of Rotate Range (Degree)
-
double get_rotate_range_right() const#
Get the right point value of Rotate Range (Degree).
See also
- Returns:
const std::vector<double> & the right point value of Rotate Range (Degree)
-
GeometrySearchInferParameters &set_rotate_range_left(double rotate_range_left)#
Set left point value of Rotate Range (Degree) with std::vector<double> value.
The target rotate range
See also
- Parameters:
rotate_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
GeometrySearchInferParameters &set_rotate_range_right(double rotate_range_right)#
Set the right point value of Rotate Range (Degree) with std::vector<double> value.
The target rotate range
See also
- Parameters:
rotate_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
const std::vector<double> &get_scale_range() const#
Get Scale Range.
The target scale range
See also
- Returns:
const std::vector<double> & Scale Range
-
GeometrySearchInferParameters &set_scale_range(std::vector<double> scale_range)#
Set Scale Range with std::vector<double> value.
The target scale range
See also
- Parameters:
scale_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
bool scale_range_contains(double value) const#
Check if the Scale Range contains the value.
- Returns:
bool true if the Scale Range contains the value, otherwise false.
-
double get_scale_range_left() const#
Get left point value of Scale Range.
See also
- Returns:
const std::vector<double> & left point value of Scale Range
-
double get_scale_range_right() const#
Get the right point value of Scale Range.
See also
- Returns:
const std::vector<double> & the right point value of Scale Range
-
GeometrySearchInferParameters &set_scale_range_left(double scale_range_left)#
Set left point value of Scale Range with std::vector<double> value.
The target scale range
See also
- Parameters:
scale_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
GeometrySearchInferParameters &set_scale_range_right(double scale_range_right)#
Set the right point value of Scale Range with std::vector<double> value.
The target scale range
See also
- Parameters:
scale_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
const GeometrySearchSearchMode &get_search_mode() const#
Get Search Mode.
Search Mode
See also
- Returns:
const GeometrySearchSearchMode & Search Mode
-
GeometrySearchInferParameters &set_search_mode(GeometrySearchSearchMode search_mode)#
Set Search Mode with GeometrySearchSearchMode value.
Search Mode
See also
- Parameters:
search_mode – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
bool get_ignore_polarity() const#
Get Ignore Polarity.
In this mode, an object is recognized also if the direction of its contrast reverses, e.g., if your object can appear both as a dark shape on a light background and vice versa.
See also
- Returns:
bool Ignore Polarity
-
GeometrySearchInferParameters &set_ignore_polarity(bool ignore_polarity)#
Set Ignore Polarity with bool value.
In this mode, an object is recognized also if the direction of its contrast reverses, e.g., if your object can appear both as a dark shape on a light background and vice versa.
See also
- Parameters:
ignore_polarity – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
int get_time_limit() const#
Get Time Limit.
Tool will quit when it’s execution time exceed given time (in ms). 0 indicates no time limit.
See also
- Returns:
int Time Limit
-
GeometrySearchInferParameters &set_time_limit(int time_limit)#
Set Time Limit with int value.
Tool will quit when it’s execution time exceed given time (in ms). 0 indicates no time limit.
See also
- Parameters:
time_limit – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
const GeometrySearchDuplicate &get_overlap_ration() const#
Get Target Overlap.
Parameters to suppress near targets.
See also
- Returns:
const GeometrySearchDuplicate & Target Overlap
-
GeometrySearchInferParameters &set_overlap_ration(GeometrySearchDuplicate overlap_ration)#
Set Target Overlap with GeometrySearchDuplicate value.
Parameters to suppress near targets.
See also
- Parameters:
overlap_ration – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
GeometrySearchInferParameters the reference of this object.
-
GeometrySearchDuplicate &get_overlap_ration()#
Get mutable reference of Target Overlap.
Parameters to suppress near targets.
- Returns:
GeometrySearchInferParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
CameraCalibration Tool Parameters#
-
class CameraCalibrationTrainingParameters : public visionflow::param::IParameter#
Camera calibration training parameters should be set before initialization.
Public Functions
-
CameraCalibrationTrainingParameters &set_reference_idx(size_t reference_idx)#
The index of reference view in the input image view sequence. The algorithm establishes the coordinate system according to the reference image. The camera pose and calibration board position of the reference image should be consistent with the camera pose and target position in the inference image. A good reference image can improve the correction accuracy.
- Parameters:
reference_idx – Reference image index.
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
size_t get_reference_idx() const#
See also
-
CameraCalibrationTrainingParameters &set_freedom_degree_type(FreedomDegreeType freedom_degree_type)#
Select nonlinear camera or the calibrate type of linear camera, which including TranslationRotationScale transformation, Affine transformation and Perspective transformation.
- Parameters:
freedom_degree_type – Freedom degree type.
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
FreedomDegreeType get_freedom_degree_type() const#
See also
-
CameraCalibrationTrainingParameters &set_calibrate_board_type(CalibrationBoardType calibrate_board_type)#
Set calibrate board type.
- Parameters:
calibrate_board_type – Calibrate board type.
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
CalibrationBoardType get_calibrate_board_type() const#
See also
-
CameraCalibrationTrainingParameters &set_grid_distance(double grid_distance)#
Calibrate board feature points grid distance.
- Parameters:
grid_distance – Grid distance.
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
double get_grid_distance() const#
See also
-
CameraCalibrationTrainingParameters &set_grid_size(geometry::Size2i grid_size)#
Only valid when calibrate board type is AQBoardRect.The width represents the number of grids in the X direction of the calibrate board, and height is the number of grids in Y direction.
- Parameters:
grid_size – rows and cols of grid.
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
CameraCalibrationTrainingParameters &set_scale(double scale)#
Resize the resulting image by the scale.The default is 1.0.
- Parameters:
scale – Zoom scale equivalent to the pixel corresponding to the corrected image.
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
double get_scale() const#
See also
-
CameraCalibrationTrainingParameters &set_image_set(std::vector<visionflow::img::Image> image_set, size_t reference_idx)#
The training image set.
- Parameters:
image_set – The training image set
reference_idx – Image sequence number, the sequence number of the image set is incremented from 0. One image in the training image set is selected as the main reference image.
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
const std::vector<visionflow::img::Image> &get_image_set() const#
See also
-
CameraCalibrationTrainingParameters &set_mask_set(std::vector<geometry::MultiPolygon2f> mask_set)#
The mask set to the training image set.
- Parameters:
mask_set – The training mask set
- Returns:
CameraCalibrationTrainingParameters& the reference of this object.
-
const std::vector<geometry::MultiPolygon2f> &get_mask_set() const#
See also
-
CameraCalibrationTrainingParameters &set_reference_idx(size_t reference_idx)#
-
class CameraCalibrationInferParameters : public visionflow::param::SchemableParameter#
CameraCalibrationInferParameters Parameter class generated by jinja2 automatically.
Camera calibrate Infer Parameter Group
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<int> &get_fill_color() const#
Get Image Fill Color.
Image Fill Color values ordered same as image channels.
See also
- Returns:
const std::vector<int> & Image Fill Color
-
CameraCalibrationInferParameters &set_fill_color(std::vector<int> fill_color)#
Set Image Fill Color with std::vector<int> value.
Image Fill Color values ordered same as image channels.
See also
- Parameters:
fill_color – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
CameraCalibrationInferParameters the reference of this object.
-
int get_fill_color(size_t index) const#
Get value in Image Fill Color with index.
Warning
The index must be less than get_fill_color_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
int value in Image Fill Color at index.
-
size_t get_fill_color_size() const#
Get the size of Image Fill Color.
- Returns:
size_t the size of Image Fill Color
-
virtual const std::string &schema_str() const override#
View Transformer Parameters#
-
enum visionflow::param::ViewTransMode#
Values:
-
enumerator kByPixel = 0#
-
enumerator kByRatio = 1#
-
enumerator kByPixel = 0#
-
class ViewFilterParameters : public visionflow::param::SchemableParameter#
ViewFilterParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_with_ok_view() const#
Get With OK View.
Treating views with no detection results as detection targets
See also
- Returns:
bool With OK View
-
ViewFilterParameters &set_with_ok_view(bool with_ok_view)#
Set With OK View with bool value.
Treating views with no detection results as detection targets
See also
- Parameters:
with_ok_view – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ViewFilterParameters the reference of this object.
-
const std::map<std::string, SingleClassPolygonsFilterParameters> &get_keep_classes() const#
Get Keep Classes.
Polygon thresholds (area, side-length,etc.) named with the label categories according to which to filter the polygons.
See also
- Returns:
const std::map<std::string, SingleClassPolygonsFilterParameters> & Keep Classes
-
ViewFilterParameters &set_keep_classes(std::map<std::string, SingleClassPolygonsFilterParameters> keep_classes)#
Set Keep Classes with std::map<std::string, SingleClassPolygonsFilterParameters> value.
Polygon thresholds (area, side-length,etc.) named with the label categories according to which to filter the polygons.
See also
- Parameters:
keep_classes – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ViewFilterParameters the reference of this object.
-
const SingleClassPolygonsFilterParameters &get_keep_classes(const std::string &key) const#
Get value in Keep Classes with key.
Warning
The key must be exist in Keep Classes. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, SingleClassPolygonsFilterParameters> & value in Keep Classes at key.
-
ViewFilterParameters &set_keep_classes(const std::string &key, SingleClassPolygonsFilterParameters value)#
Set value in Keep Classes with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ViewFilterParameters the reference of this object.
-
bool keep_classes_contains(const std::string &key) const#
Check if the key is exist in Keep Classes.
- Returns:
bool true if the key is exist in Keep Classes, otherwise false.
-
size_t get_keep_classes_size() const#
Get the size of Keep Classes.
- Returns:
size_t the size of Keep Classes
-
SingleClassPolygonsFilterParameters &get_keep_classes(const std::string &key)#
Get mutable reference of value in Keep Classes with key. A new key and default value will be created if the key does not exist.
- Returns:
SingleClassPolygonsFilterParameters& the mutable reference of value in Keep Classes at key.
-
bool get_match_name_prefix() const#
Get Match Name Prefix.
Whether to match the names in this parameters as the prefix of the category name. For example, with switch this option to true, if keep_classes contains name ‘defect’, then the category named ‘defect_1’ will be kept.
See also
- Returns:
bool Match Name Prefix
-
ViewFilterParameters &set_match_name_prefix(bool match_name_prefix)#
Set Match Name Prefix with bool value.
Whether to match the names in this parameters as the prefix of the category name. For example, with switch this option to true, if keep_classes contains name ‘defect’, then the category named ‘defect_1’ will be kept.
See also
- Parameters:
match_name_prefix – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ViewFilterParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ViewTransAutoMask#
ViewTransAutoMask Parameter class generated by jinja2 automatically.
Public Functions
-
bool get_enable() const#
Get Anable View Auto Mask.
Enable this option to use the detection result from the previous module as a mask.
See also
- Returns:
bool Anable View Auto Mask
-
ViewTransAutoMask &set_enable(bool enable)#
Set Anable View Auto Mask with bool value.
Enable this option to use the detection result from the previous module as a mask.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ViewTransAutoMask& the reference of this object.
-
int get_dilate_pixel() const#
Get Dilate Pixel.
Dilate the detection result from the previous module before mask. A negative value indicate erosion operation.
See also
- Returns:
int Dilate Pixel
-
ViewTransAutoMask &set_dilate_pixel(int dilate_pixel)#
Set Dilate Pixel with int value.
Dilate the detection result from the previous module before mask. A negative value indicate erosion operation.
See also
- Parameters:
dilate_pixel – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ViewTransAutoMask& the reference of this object.
-
bool get_reverse_mask() const#
Get Reverse Mask.
Inverse masking of areas in the view that have no detection results from the previous module. Note that this option works after the dilate option if it’s not zero.
See also
- Returns:
bool Reverse Mask
-
ViewTransAutoMask &set_reverse_mask(bool reverse_mask)#
Set Reverse Mask with bool value.
Inverse masking of areas in the view that have no detection results from the previous module. Note that this option works after the dilate option if it’s not zero.
See also
- Parameters:
reverse_mask – the value to set.
- Returns:
ViewTransAutoMask& the reference of this object.
-
bool get_enable() const#
-
class ViewTransformParameter#
ViewTransformParameter Parameter class generated by jinja2 automatically.
Public Functions
-
const std::string &get_name() const#
Get the name of the parameter. The name used to identify the the transformed view type.
- Returns:
tring const& The name of the parameter.
-
ViewTransformParameter &set_name(std::string name)#
Set the name of the views to be transformed to.
- Parameters:
name – string const& The name of the views to be transformed to.
- Returns:
ViewTransformParameter& The ViewTransformParameter object.
-
ViewTransMode get_mode() const#
Get Offset Mode.
Offset by a fixed number of pixels or by a percentage depending on the size of the defect.
See also
- Returns:
ViewTransMode View Mode
-
ViewTransformParameter &set_mode(ViewTransMode mode)#
Set the view transform mode as ByPixel or ByRatio.
Generate view by a fixed number of pixels or by a percentage depending on the size of the defect.
See also
- Parameters:
mode – the The View mode.
- Returns:
ViewTransformParameter& the reference of this object.
-
const geometry::Vector2f &get_offset() const#
Get Offset Vector.
See also
- Returns:
The offset vector, Its practical use is determined by the VeiwTransOffsetMode in get_mode()
-
ViewTransformParameter &set_offset(const geometry::Vector2f &offset)#
Set View offset vector With the centre of the original test result as the reference coordinate system.
See also
- Parameters:
offset – the offset value to set.
- Returns:
ViewTransformParameter& the reference of this object.
-
const geometry::Size2f &get_window_size() const#
Get Window Size.
The view window size, The meaning of the options is determined by the Window Size Mode
The View window size mode. “DynamicPixel” mode means get the window size from the detection result from previous module and you can scale it with a fixed number of pixels; “DynamicRatio” mode means get the window size from the detection result from previous module and you can scale it by ratio; “FixedWindow” means set the view windows to a fixed size regardless of the size of the detection result from previous module.
See also
- Returns:
Window Size or Window expand size base on the detection result.
-
ViewTransformParameter &set_window_size(const geometry::Size2f &window_size)#
Set Window size.
The view window size, The meaning of the options is determined by the view mode.
See also
- Parameters:
window_size – the value to set.
- Returns:
ViewTransformParameter& the reference of this object.
-
bool get_fixed_window_size() const#
Get If the view windows size is fixed.
- Returns:
bool
-
ViewTransformParameter &set_fixed_window_size(bool fixed_window_size)#
Set this option as true to fix the view window size.
- Parameters:
fixed_window_size –
- Returns:
-
geometry::Radian get_rotate_angle() const#
Get the view rotate angle.
- Returns:
geometry::Radian the view rotate angle base on the reference coordinate system.
-
ViewTransformParameter &set_rotate_angle(const geometry::Radian &angle)#
Set the view rotate angle.
- Parameters:
angle – rotate angle.
- Returns:
ViewTransformParameter& this parameter object.
-
const ViewTransAutoMask &get_auto_mask() const#
Get Auto View Mask.
Auto view mask parameters
See also
- Returns:
const ViewTransAutoMask & Auto View Mask
-
ViewTransformParameter &set_auto_mask(const ViewTransAutoMask &auto_mask)#
Set Auto View Mask with ViewTransAutoMask value.
Auto view mask parameters
See also
- Parameters:
auto_mask – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ViewTransformParameter& the reference of this object.
-
ViewTransAutoMask &get_auto_mask()#
Get mutable reference of Auto View Mask.
Auto view mask parameters
- Returns:
ViewTransformParameter& the mutable reference of the group.
-
const geometry::MultiPolygon2f &get_manual_mask() const#
Get the manual mask object.
- Returns:
const geometry::MultiPolygon2f& Get the manual view mask.
-
ViewTransformParameter &set_manual_mask(const geometry::MultiPolygon2f &manual_mask)#
Set the manual mask object. The x-y coordinate value of the points in MultiPolygon2f should be established in the coordinate system with the upper-left corner point of the view after transforming based on the defact region and its angle.
-
const std::string &get_name() const#
-
class ViewTransformParameterList : public visionflow::param::IParameter#
Public Functions
-
std::vector<std::string> keys() const#
All view transform parameters’ names.
- Returns:
std::vector<std::string> parameter names.
-
const ViewTransformParameter &at(const std::string &view_param_name) const#
Get view specified by the name.
- Parameters:
view_param_name –
- Returns:
ViewTransformParameter const&
-
bool contains(const std::string &view_param_name) const#
Check if the list contains parameter specified by the name.
- Parameters:
view_param_name –
- Returns:
bool
-
void erase(const std::string &view_param_name)#
remove parameter from the list.
-
std::string add(ViewTransformParameter view_param)#
Add a new ViewTransformParameter instance into this list. An new id will be generated for the parameter added.
- Parameters:
view_param – The parameter to be added into this list.
- Returns:
std::string The parameter id generated by the list.
-
void update(const std::string &view_param_name, const ViewTransformParameter &view_param)#
Update view parameter specified by view_param_name with the new parameter. If parameter specified by view_param_name does not exist, the new ViewTransformParameter instance will be added into this list with key view_param_name.
- Parameters:
view_param_name – The key of the parameter to be updated. Note that the param name will be set as the region name of the ViewTransformer’s output views.
view_param – The new parameter to be updated.
-
bool get_enable_script() const#
Whether to use python script or not.
-
ViewTransformParameterList &set_enable_script(bool enable_script)#
Set whether to enable python scripts.
- Parameters:
enable_script – Enable option
- Returns:
-
const std::string &get_script() const#
Get the python script string.
See also
See also
- Returns:
The python script.
-
ViewTransformParameterList &set_script(const std::string &manual_script)#
Set the python script with std::string value. We provide a default python script to help you to implement your own script:
See also
See also
See also
Note
The python script must contain a function named “view_transform” which parameter represented input and output of opers::ViewTransformer with type param::ViewTransformParameterList, props::IRegionList, props::RawImageInfo and props::ViewList respectively. If script enabled, the opers::ViewTransformer will execute the “view_transform” function.
- Parameters:
manual_script – The python script string to be set.
- Returns:
-
const ObjectTypeValue &get_user_vars(const std::string &key) const#
Get value in User Defined Variables with key.
Warning
The key must be exist in User Defined Variables. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, ObjectTypeValue> & value in User Defined Variables at key.
-
ObjectTypeValue &get_user_vars(const std::string &key)#
Get mutable reference of value in User Defined Variables with key. A new key and default value will be created if the key does not exist.
- Returns:
ObjectTypeValue& the mutable reference of value in User Defined Variables at key.
-
ViewTransformParameterList &set_user_vars(const std::string &key, const ObjectTypeValue &value)#
Set value in User Defined Variables with key.
- Parameters:
key – the key to set.
value – the type-value pair to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IntegrationClassifyParameter& the reference of this object.
-
bool user_vars_contains(const std::string &key) const#
Check if the key is exist in User Defined Variables.
- Returns:
bool true if the key is exist in User Defined Variables, otherwise false.
-
size_t get_user_vars_size() const#
Get the size of User Defined Variables.
- Returns:
size_t the size of User Defined Variables
-
const std::map<std::string, ObjectTypeValue> &get_user_vars() const#
Get User Defined Variables.
The category name string to be used if none of the conditions are met.
See also
- Returns:
const std::map<std::string, ObjectTypeValue> & User Defined Variables
-
ViewTransformParameterList &set_user_vars(const std::map<std::string, ObjectTypeValue> &user_vars)#
Set User Defined Variables with std::map<std::string, ObjectTypeValue> value.
The category name string to be used if none of the conditions are met.
See also
- Parameters:
user_vars – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IntegrationClassifyParameter& the reference of this object.
Public Static Functions
-
static std::string GetDefaultScript()#
A default python script to help you to implement your own script:
import visionflow as vf from visionflow import geometry as geo from visionflow import param, props def view_transform( params: vf.param.ViewTransformParameterList, polys: vf.props.IRegionList, img_info: vf.props.RawImageInfo ) -> vf.props.ViewList: view_list = vf.opers.view_transform(params, polys, img_info) return view_list
Note
The python script must contain a function named “view_transform” which parameter represented input and output of opers::ViewTransformer with type param::ViewTransformParameterList, props::IRegionList, props::RawImageInfo and props::ViewList respectively. If script enabled, the opers::ViewTransformer will execute the “view_transform” function.
- Returns:
std::string The default python script.
-
std::vector<std::string> keys() const#
Sample Recommendation Parameters:#
-
class SampleRecommendationParameter : public visionflow::param::SchemableParameter#
SampleRecommendationParameter Parameter class generated by jinja2 automatically.
Parameter for the sample recommendation algorithm
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_recommend_budget() const#
Get Recommend Budget.
The ratio of views to recommend
See also
- Returns:
double Recommend Budget
-
SampleRecommendationParameter &set_recommend_budget(double recommend_budget)#
Set Recommend Budget with double value.
The ratio of views to recommend
See also
- Parameters:
recommend_budget – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SampleRecommendationParameter the reference of this object.
-
const SampleRecommendRange &get_recommend_range() const#
Get Sample Recommend Range.
Allows the user to pick from a selected range, currently supportedby the three type: UnTrainedSet, TestSet, and UnKnown.
See also
- Returns:
const SampleRecommendRange & Sample Recommend Range
-
SampleRecommendationParameter &set_recommend_range(SampleRecommendRange recommend_range)#
Set Sample Recommend Range with SampleRecommendRange value.
Allows the user to pick from a selected range, currently supportedby the three type: UnTrainedSet, TestSet, and UnKnown.
See also
- Parameters:
recommend_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
SampleRecommendationParameter the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class PropertyObjectId : public visionflow::param::ISchemable#
PropertyObjectId Parameter class generated by jinja2 automatically.
Parameter group for a object IDs in a property.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_property_id() const#
Get Property ID.
ID of the property
See also
- Returns:
int Property ID
-
PropertyObjectId &set_property_id(int property_id)#
Set Property ID with int value.
ID of the property
See also
- Parameters:
property_id – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PropertyObjectId the reference of this object.
-
const std::vector<std::string> &get_object_ids() const#
Get Object IDs.
IDs of the objects
See also
- Returns:
const std::vector<std::string> & Object IDs
-
PropertyObjectId &set_object_ids(std::vector<std::string> object_ids)#
Set Object IDs with std::vector<std::string> value.
IDs of the objects
See also
- Parameters:
object_ids – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PropertyObjectId the reference of this object.
-
const std::string &get_object_ids(size_t index) const#
Get value in Object IDs with index.
Warning
The index must be less than get_object_ids_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::string & value in Object IDs at index.
-
size_t get_object_ids_size() const#
Get the size of Object IDs.
- Returns:
size_t the size of Object IDs
-
virtual const std::string &schema_str() const override#
-
class PropertyObjectIdSet : public visionflow::param::SchemableParameter#
PropertyObjectIdSet Parameter class generated by jinja2 automatically.
Parameter group for a set of property object IDs.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<PropertyObjectId> &get_object_id_sets() const#
Get Property Object ID Sets.
Sets of object IDs in properties
See also
- Returns:
const std::vector<PropertyObjectId> & Property Object ID Sets
-
PropertyObjectIdSet &set_object_id_sets(std::vector<PropertyObjectId> object_id_sets)#
Set Property Object ID Sets with std::vector<PropertyObjectId> value.
Sets of object IDs in properties
See also
- Parameters:
object_id_sets – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
PropertyObjectIdSet the reference of this object.
-
const PropertyObjectId &get_object_id_sets(size_t index) const#
Get value in Property Object ID Sets with index.
Warning
The index must be less than get_object_id_sets_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const PropertyObjectId & value in Property Object ID Sets at index.
-
size_t get_object_id_sets_size() const#
Get the size of Property Object ID Sets.
- Returns:
size_t the size of Property Object ID Sets
-
PropertyObjectId &get_object_id_sets(size_t index)#
Get mutable reference of value in Property Object ID Sets with index.
Warning
The index must be less than get_object_id_sets_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
PropertyObjectId& the mutable reference of value in Property Object ID Sets at index.
-
virtual const std::string &schema_str() const override#
Training Set Recommend Parameters:#
-
enum visionflow::param::TrainingSetRecommendType#
Values:
-
enumerator kViewBase = 0#
-
enumerator kViewBase = 0#
-
class TrainingSetRecommendParameter : public visionflow::param::SchemableParameter#
TrainingSetRecommendParameter Parameter class generated by jinja2 automatically.
Parameter for the auto class balance
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_num_to_select() const#
Get Select Number.
The number of views to select
See also
- Returns:
int Select Number
-
TrainingSetRecommendParameter &set_num_to_select(int num_to_select)#
Set Select Number with int value.
The number of views to select
See also
- Parameters:
num_to_select – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TrainingSetRecommendParameter the reference of this object.
-
const TrainingSetRecommendType &get_algorithm_type() const#
Get Algorithm type.
The Algorithm type to be used training set recommend, currently supports three algorithms: ViewBase, PixelBase, and RegionBase.
See also
- Returns:
const TrainingSetRecommendType & Algorithm type
-
TrainingSetRecommendParameter &set_algorithm_type(TrainingSetRecommendType algorithm_type)#
Set Algorithm type with TrainingSetRecommendType value.
The Algorithm type to be used training set recommend, currently supports three algorithms: ViewBase, PixelBase, and RegionBase.
See also
- Parameters:
algorithm_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
TrainingSetRecommendParameter the reference of this object.
-
virtual const std::string &schema_str() const override#
Integration Tool Parameters:#
-
class IntegrationClassifyParameter : public visionflow::param::SchemableParameter#
IntegrationClassifyParameter Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::string &get_script() const#
- And we provide a sample script to help you to implement your own script:
@brief Get Category Script. The list of categories and conditions to be evaluated. Note that the function `integration_classifier` must exist and return a Tuple[str, Dict[str, str]] value. Dict[str, str] can be empty.
import visionflow as vf from visionflow import geometry as geo from typing import Dict, Tuple def region_covered_by(region, ring): output = geo.MultiPolygon2f() geo.difference(ring, region.polygon(), output) return len(output) == 0 classifier_condition = { "Ok": lambda sample: any( 0 < region.area() < 10000 and 0 < region.polygon().bounding_box().long_side() < 30000 and 0 < region.polygon().bounding_box().short_side() < 30000 and -45 < region.angle().degree() < 45 and 0.1 < region.score() < 1.0 and region_covered_by(region, geo.Ring2f([geo.Point2f(0,0), geo.Point2f(0,100), geo.Point2f(100,100), geo.Point2f(100,0)])) for id, region in sample["Segmentation/pred"] ), "Car": lambda sample: any( 0 < region.area() < 10000 and 0 < region.polygon().bounding_box().long_side() < 30000 and 0 < region.polygon().bounding_box().short_side() < 30000 and -45 < region.angle().degree() < 45 and 0.1 < region.score() < 1.0 and region_covered_by(region, geo.Ring2f([geo.Point2f(0,0), geo.Point2f(0,200), geo.Point2f(200,200), geo.Point2f(200,0)])) for id, region in sample["Segmentation/pred"] ) or all( 0 < region.area() < 10000 and 0 < region.polygon().bounding_box().long_side() < 30000 and 0 < region.polygon().bounding_box().short_side() < 30000 and -45 < region.angle().degree() < 45 and 0.1 < region.score() < 1.0 and region_covered_by(region, geo.Ring2f([geo.Point2f(0,0), geo.Point2f(0,200), geo.Point2f(200,200), geo.Point2f(200,0)])) for id, region in sample["Classification/pred"] ), } # 综合判定节点的入口函数,不要修改这个函数的名称、参数和返回值类型 def integration_classifier(sample: vf.ISample) -> Tuple[str, Dict[str, str]] : # 填入需输出的扩展数据 extension_data: Dict[str, str] = {} extension_data["num_of_cls_pred_region"] = str(sample.get(vf.ToolNodeId("Classification", vf.Classification.pred)).size()) extension_data["num_of_seg_pred_region"] = str(sample.get(vf.ToolNodeId("Segmentation", vf.Segmentation.pred)).size()) for category, condition in classifier_condition.items(): if condition(sample): return category, extension_data return "Other", extension_data
See also
- Returns:
const std::string & Category Script
-
IntegrationClassifyParameter &set_script(std::string script)#
- And we provide a sample script to help you to implement your own script:
@brief Set Category Script with std::string value. The list of categories and conditions to be evaluated. Note that the function `integration_classifier` must exist and return a Tuple[str, Dict[str, str]] value. Dict[str, str] can be empty.
import visionflow as vf from visionflow import geometry as geo from typing import Dict, Tuple def region_covered_by(region, ring): output = geo.MultiPolygon2f() geo.difference(ring, region.polygon(), output) return len(output) == 0 classifier_condition = { "Ok": lambda sample: any( 0 < region.area() < 10000 and 0 < region.polygon().bounding_box().long_side() < 30000 and 0 < region.polygon().bounding_box().short_side() < 30000 and -45 < region.angle().degree() < 45 and 0.1 < region.score() < 1.0 and region_covered_by(region, geo.Ring2f([geo.Point2f(0,0), geo.Point2f(0,100), geo.Point2f(100,100), geo.Point2f(100,0)])) for id, region in sample["Segmentation/pred"] ), "Car": lambda sample: any( 0 < region.area() < 10000 and 0 < region.polygon().bounding_box().long_side() < 30000 and 0 < region.polygon().bounding_box().short_side() < 30000 and -45 < region.angle().degree() < 45 and 0.1 < region.score() < 1.0 and region_covered_by(region, geo.Ring2f([geo.Point2f(0,0), geo.Point2f(0,200), geo.Point2f(200,200), geo.Point2f(200,0)])) for id, region in sample["Segmentation/pred"] ) or all( 0 < region.area() < 10000 and 0 < region.polygon().bounding_box().long_side() < 30000 and 0 < region.polygon().bounding_box().short_side() < 30000 and -45 < region.angle().degree() < 45 and 0.1 < region.score() < 1.0 and region_covered_by(region, geo.Ring2f([geo.Point2f(0,0), geo.Point2f(0,200), geo.Point2f(200,200), geo.Point2f(200,0)])) for id, region in sample["Classification/pred"] ), } # 综合判定节点的入口函数,不要修改这个函数的名称、参数和返回值类型 def integration_classifier(sample: vf.ISample) -> Tuple[str, Dict[str, str]] : # 填入需输出的扩展数据 extension_data: Dict[str, str] = {} extension_data["num_of_cls_pred_region"] = str(sample.get(vf.ToolNodeId("Classification", vf.Classification.pred)).size()) extension_data["num_of_seg_pred_region"] = str(sample.get(vf.ToolNodeId("Segmentation", vf.Segmentation.pred)).size()) for category, condition in classifier_condition.items(): if condition(sample): return category, extension_data return "Other", extension_data
See also
- Parameters:
script – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IntegrationClassifyParameter the reference of this object.
-
const std::string &get_unmatched_name() const#
Get Unmatched Class Name.
The category name string to be used if none of the conditions are met.
See also
- Returns:
const std::string & Unmatched Class Name
-
IntegrationClassifyParameter &set_unmatched_name(std::string unmatched_name)#
Set Unmatched Class Name with std::string value.
The category name string to be used if none of the conditions are met.
See also
- Parameters:
unmatched_name – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IntegrationClassifyParameter the reference of this object.
-
const std::map<std::string, TypeValuePair> &get_user_vars() const#
Get User Defined Variables.
The key of the map is the name of the python object and the value of the map is a pair of string which means type-value of the python object.
See also
- Returns:
const std::map<std::string, TypeValuePair> & User Defined Variables
-
IntegrationClassifyParameter &set_user_vars(std::map<std::string, TypeValuePair> user_vars)#
Set User Defined Variables with std::map<std::string, TypeValuePair> value.
The key of the map is the name of the python object and the value of the map is a pair of string which means type-value of the python object.
See also
- Parameters:
user_vars – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IntegrationClassifyParameter the reference of this object.
-
const TypeValuePair &get_user_vars(const std::string &key) const#
Get value in User Defined Variables with key.
Warning
The key must be exist in User Defined Variables. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, TypeValuePair> & value in User Defined Variables at key.
-
IntegrationClassifyParameter &set_user_vars(const std::string &key, TypeValuePair value)#
Set value in User Defined Variables with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IntegrationClassifyParameter the reference of this object.
-
bool user_vars_contains(const std::string &key) const#
Check if the key is exist in User Defined Variables.
- Returns:
bool true if the key is exist in User Defined Variables, otherwise false.
-
size_t get_user_vars_size() const#
Get the size of User Defined Variables.
- Returns:
size_t the size of User Defined Variables
-
TypeValuePair &get_user_vars(const std::string &key)#
Get mutable reference of value in User Defined Variables with key. A new key and default value will be created if the key does not exist.
- Returns:
TypeValuePair& the mutable reference of value in User Defined Variables at key.
-
virtual const std::string &schema_str() const override#
RegionCalculation Tool Parameters:#
-
class RegionCalculationParameter : public visionflow::param::SchemableParameter#
RegionCalculationParameter Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::string &get_script() const#
- And we provide a sample script to help you to implement your own script:
@brief Get Script. This is an algorithm script which can get a PolygonRegionList property. Note that the function `region_calculate` must exist and return a PolygonRegionList property value.
import visionflow as vf from visionflow import props, geometry def get_regions(operation, multi_polygon1, multi_polygon2, region_name): """ Generic function to create a list of PolygonRegion objects from the result of a geometric operation on two multi-polygons. """ result = operation(multi_polygon1, multi_polygon2) return [ vf.PolygonRegion().set_polygon(polygon).set_name(region_name) for polygon in result ] def region_calculate(sample: vf.ISample) -> props.PolygonRegionList: """ Calculate and return a PolygonRegionList property representing the unions and intersections of segmentation and location polygons in a sample. """ ply_region_list = props.PolygonRegionList() seg_polygons = sample.get(vf.ToolNodeId("Segmentation", vf.Segmentation.pred)).to_multi_polygons() loc_polygons = sample.get(vf.ToolNodeId("Location", vf.Location.pred_keypoints)).to_multi_polygons() unions = get_regions(geometry.union_areal, seg_polygons, loc_polygons, "union") intersections = get_regions(geometry.intersection, seg_polygons, loc_polygons, "intersection") for region in unions + intersections: ply_region_list.add(region) return ply_region_list
See also
- Returns:
const std::string & Script
-
RegionCalculationParameter &set_script(std::string script)#
- And we provide a sample script to help you to implement your own script:
@brief Set Script with std::string value. This is an algorithm script which can get a PolygonRegionList property. Note that the function `region_calculate` must exist and return a PolygonRegionList property value.
import visionflow as vf from visionflow import props, geometry def get_regions(operation, multi_polygon1, multi_polygon2, region_name): """ Generic function to create a list of PolygonRegion objects from the result of a geometric operation on two multi-polygons. """ result = operation(multi_polygon1, multi_polygon2) return [ vf.PolygonRegion().set_polygon(polygon).set_name(region_name) for polygon in result ] def region_calculate(sample: vf.ISample) -> props.PolygonRegionList: """ Calculate and return a PolygonRegionList property representing the unions and intersections of segmentation and location polygons in a sample. """ ply_region_list = props.PolygonRegionList() seg_polygons = sample.get(vf.ToolNodeId("Segmentation", vf.Segmentation.pred)).to_multi_polygons() loc_polygons = sample.get(vf.ToolNodeId("Location", vf.Location.pred_keypoints)).to_multi_polygons() unions = get_regions(geometry.union_areal, seg_polygons, loc_polygons, "union") intersections = get_regions(geometry.intersection, seg_polygons, loc_polygons, "intersection") for region in unions + intersections: ply_region_list.add(region) return ply_region_list
See also
- Parameters:
script – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
RegionCalculationParameter the reference of this object.
-
bool get_check_region_name() const#
Get Check Region Name.
Check if the region name returned by the script matches the parameter of LabelClasses.
See also
- Returns:
bool Check Region Name
-
RegionCalculationParameter &set_check_region_name(bool check_region_name)#
Set Check Region Name with bool value.
Check if the region name returned by the script matches the parameter of LabelClasses.
See also
- Parameters:
check_region_name – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
RegionCalculationParameter the reference of this object.
-
const std::map<std::string, TypeValuePair> &get_user_vars() const#
Get User Defined Variables.
The key of the map is the name of the python object and the value of the map is a pair of string which means type-value of the python object.
See also
- Returns:
const std::map<std::string, TypeValuePair> & User Defined Variables
-
RegionCalculationParameter &set_user_vars(std::map<std::string, TypeValuePair> user_vars)#
Set User Defined Variables with std::map<std::string, TypeValuePair> value.
The key of the map is the name of the python object and the value of the map is a pair of string which means type-value of the python object.
See also
- Parameters:
user_vars – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
RegionCalculationParameter the reference of this object.
-
const TypeValuePair &get_user_vars(const std::string &key) const#
Get value in User Defined Variables with key.
Warning
The key must be exist in User Defined Variables. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, TypeValuePair> & value in User Defined Variables at key.
-
RegionCalculationParameter &set_user_vars(const std::string &key, TypeValuePair value)#
Set value in User Defined Variables with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
RegionCalculationParameter the reference of this object.
-
bool user_vars_contains(const std::string &key) const#
Check if the key is exist in User Defined Variables.
- Returns:
bool true if the key is exist in User Defined Variables, otherwise false.
-
size_t get_user_vars_size() const#
Get the size of User Defined Variables.
- Returns:
size_t the size of User Defined Variables
-
TypeValuePair &get_user_vars(const std::string &key)#
Get mutable reference of value in User Defined Variables with key. A new key and default value will be created if the key does not exist.
- Returns:
TypeValuePair& the mutable reference of value in User Defined Variables at key.
-
virtual const std::string &schema_str() const override#
GeometrySearchFeatureModel Parameters:#
-
struct GeometrySearchFeaturePoint#
template match feat point structure
-
class GeometrySearchFeatureChain#
template match feature chain
Public Functions
-
size_t size() const#
Interface to get the number of feature points in this chain.
- Returns:
size_t The number of feature points in this chain.
-
inline bool empty() const#
If the feature chain is empty or not.
- Returns:
true If the feature chain is empty.
- Returns:
false If the feature chain is not empty.
-
void clear()#
clear current feature chain
-
void add(GeometrySearchFeaturePoint feat_point)#
add a new template feature point in to current chain
- Parameters:
feat_point – template match feature point
-
const GeometrySearchFeaturePoint &at(size_t idx) const#
Interface to get feature point at the given index.
- Parameters:
idx – The index of the feature point.
- Returns:
const GeometrySearchFeaturePoint& The feature point reference at the given index.
-
void set_closed(bool closed = true)#
Set the feature chain is closed or not.
- Parameters:
closed – closed or not
-
bool get_closed() const#
whether the feature is closed
- Returns:
NO_DISCARD true if feature chain is closed
-
size_t size() const#
-
class GeometrySearchFeatureModel#
template match feature model, which contains multiple template match feature chains. A model correspond to a model generated in a train region
Public Functions
-
void add(GeometrySearchFeatureChain feat_chain)#
add a new template feature chain in to current model
- Parameters:
feat_chain – template match feature chain
-
GeometrySearchFeatureModel &set_name(const std::string &model_name)#
Set the name of this feature model.
- Parameters:
model_name – The new name of this feature model.
- Returns:
GeometrySearchFeatureModel& This feature model.
-
std::string name() const#
Interface to get name of this region.
- Returns:
std::string
-
size_t size() const#
Interface to get the number of chain in this model.
- Returns:
size_t The number of feature chains in this model.
-
inline bool empty() const#
If the feature chain model is empty or not.
- Returns:
true If the feature model is empty.
- Returns:
false If the feature model is not empty.
-
void clear()#
clear current feature model
-
const GeometrySearchFeatureChain &at(size_t idx) const#
Interface to get feature chain at the given index.
- Parameters:
idx – The index of the feature chain.
- Returns:
const GeometrySearchFeatureChain& The feature chain reference at the given index.
-
void add(GeometrySearchFeatureChain feat_chain)#
-
class GeometrySearchFeatureModelList : public virtual visionflow::param::IParameter#
template match feature models class, which contains multiple template match feature models(each model represent a train region)
Public Functions
-
size_t size() const#
Interface to get the number of chain in this list.
- Returns:
size_t The number of feature chains in this list.
-
std::vector<std::string> keys() const#
Get all feature model IDs in this list.
- Returns:
std::vector<std::string> The IDs of all feature models in this list.
-
inline bool empty() const#
If the feature chain list is empty or not.
- Returns:
true If the feature chain list is empty.
- Returns:
false If the feature chain list is not empty.
-
void clear()#
clear current feature chain list
-
std::string add(GeometrySearchFeatureModel feat_model)#
add a new template feature chain in to current list
- Parameters:
feat_model – template match feature chain
- Returns:
std::string The ID of the added feature model.
-
const GeometrySearchFeatureModel &at(const std::string &model_key) const#
Interface to get feature chain at the given index.
- Parameters:
model_key – ID of model
- Returns:
const GeometrySearchFeatureModel& The feature chain reference at the given index.
-
bool contains(const std::string &model_key) const#
Whether the region with the given model ID exists in this list.
-
void erase(const std::string &model_key)#
Interface to remove the model at the given model ID. Nothing will be done if the model name is not found.
- Parameters:
model_key – The model ID to be removed
-
size_t size() const#
IDReader Inference Parameters#
-
class Code128Parameters : public visionflow::param::ISchemable#
Code128Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
Code128Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code128Parameters the reference of this object.
-
bool get_quiet_zone() const#
Get Quiet Zone.
Enable quiet zone or not.
See also
- Returns:
bool Quiet Zone
-
Code128Parameters &set_quiet_zone(bool quiet_zone)#
Set Quiet Zone with bool value.
Enable quiet zone or not.
See also
- Parameters:
quiet_zone – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code128Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
enum visionflow::param::IDReader1DCheckSumType#
Values:
-
enumerator kBarCheckSumTypeCheckNone = 0#
-
enumerator kBarCheckSumTypeVerify = 1#
-
enumerator kBarCheckSumTypeVerifyAndTransmit = 2#
-
enumerator kBarCheckSumTypeCheckNone = 0#
-
class Code39Parameters : public visionflow::param::ISchemable#
Code39Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
Code39Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code39Parameters the reference of this object.
-
bool get_quiet_zone() const#
Get Quiet Zone.
Enable quiet zone or not.
See also
- Returns:
bool Quiet Zone
-
Code39Parameters &set_quiet_zone(bool quiet_zone)#
Set Quiet Zone with bool value.
Enable quiet zone or not.
See also
- Parameters:
quiet_zone – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code39Parameters the reference of this object.
-
bool get_full_ascii() const#
Get Full ASCII.
Enable Full ASCII or not.
See also
- Returns:
bool Full ASCII
-
Code39Parameters &set_full_ascii(bool full_ascii)#
Set Full ASCII with bool value.
Enable Full ASCII or not.
See also
- Parameters:
full_ascii – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code39Parameters the reference of this object.
-
const IDReader1DCheckSumType &get_check_sum_type() const#
Get Verification Type.
The check sum type to verify the result.
See also
- Returns:
const IDReader1DCheckSumType & Verification Type
-
Code39Parameters &set_check_sum_type(IDReader1DCheckSumType check_sum_type)#
Set Verification Type with IDReader1DCheckSumType value.
The check sum type to verify the result.
See also
- Parameters:
check_sum_type – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code39Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class Code93Parameters : public visionflow::param::ISchemable#
Code93Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
Code93Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code93Parameters the reference of this object.
-
bool get_quiet_zone() const#
Get Quiet Zone.
Enable quiet zone or not.
See also
- Returns:
bool Quiet Zone
-
Code93Parameters &set_quiet_zone(bool quiet_zone)#
Set Quiet Zone with bool value.
Enable quiet zone or not.
See also
- Parameters:
quiet_zone – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Code93Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class UpcaParameters : public visionflow::param::ISchemable#
UpcaParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
UpcaParameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UpcaParameters the reference of this object.
-
bool get_quiet_zone() const#
Get Quiet Zone.
Enable quiet zone or not.
See also
- Returns:
bool Quiet Zone
-
UpcaParameters &set_quiet_zone(bool quiet_zone)#
Set Quiet Zone with bool value.
Enable quiet zone or not.
See also
- Parameters:
quiet_zone – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UpcaParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class UpceParameters : public visionflow::param::ISchemable#
UpceParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
UpceParameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UpceParameters the reference of this object.
-
bool get_quiet_zone() const#
Get Quiet Zone.
Enable quiet zone or not.
See also
- Returns:
bool Quiet Zone
-
UpceParameters &set_quiet_zone(bool quiet_zone)#
Set Quiet Zone with bool value.
Enable quiet zone or not.
See also
- Parameters:
quiet_zone – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
UpceParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class Ean13Parameters : public visionflow::param::ISchemable#
Ean13Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
Ean13Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Ean13Parameters the reference of this object.
-
bool get_quiet_zone() const#
Get Quiet Zone.
Enable quiet zone or not.
See also
- Returns:
bool Quiet Zone
-
Ean13Parameters &set_quiet_zone(bool quiet_zone)#
Set Quiet Zone with bool value.
Enable quiet zone or not.
See also
- Parameters:
quiet_zone – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Ean13Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class Ean8Parameters : public visionflow::param::ISchemable#
Ean8Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
Ean8Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Ean8Parameters the reference of this object.
-
bool get_quiet_zone() const#
Get Quiet Zone.
Enable quiet zone or not.
See also
- Returns:
bool Quiet Zone
-
Ean8Parameters &set_quiet_zone(bool quiet_zone)#
Set Quiet Zone with bool value.
Enable quiet zone or not.
See also
- Parameters:
quiet_zone – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
Ean8Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ChooseIDReader1DTypes : public visionflow::param::ISchemable#
ChooseIDReader1DTypes Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const Code128Parameters &get_code128() const#
Get Code128.
Enable Code128 and set parameters.
See also
- Returns:
const Code128Parameters & Code128
-
ChooseIDReader1DTypes &set_code128(Code128Parameters code128)#
Set Code128 with Code128Parameters value.
Enable Code128 and set parameters.
See also
- Parameters:
code128 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader1DTypes the reference of this object.
-
Code128Parameters &get_code128()#
Get mutable reference of Code128.
Enable Code128 and set parameters.
- Returns:
ChooseIDReader1DTypes& the mutable reference of the group.
-
const Code39Parameters &get_code39() const#
Get Code39.
Enable code39 and set parameters.
See also
- Returns:
const Code39Parameters & Code39
-
ChooseIDReader1DTypes &set_code39(Code39Parameters code39)#
Set Code39 with Code39Parameters value.
Enable code39 and set parameters.
See also
- Parameters:
code39 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader1DTypes the reference of this object.
-
Code39Parameters &get_code39()#
Get mutable reference of Code39.
Enable code39 and set parameters.
- Returns:
ChooseIDReader1DTypes& the mutable reference of the group.
-
const Code93Parameters &get_code93() const#
Get Code93.
Enable Code93 and set parameters.
See also
- Returns:
const Code93Parameters & Code93
-
ChooseIDReader1DTypes &set_code93(Code93Parameters code93)#
Set Code93 with Code93Parameters value.
Enable Code93 and set parameters.
See also
- Parameters:
code93 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader1DTypes the reference of this object.
-
Code93Parameters &get_code93()#
Get mutable reference of Code93.
Enable Code93 and set parameters.
- Returns:
ChooseIDReader1DTypes& the mutable reference of the group.
-
const UpcaParameters &get_upca() const#
Get UPCA.
Enable UPCA and set parameters.
See also
- Returns:
const UpcaParameters & UPCA
-
ChooseIDReader1DTypes &set_upca(UpcaParameters upca)#
Set UPCA with UpcaParameters value.
Enable UPCA and set parameters.
See also
- Parameters:
upca – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader1DTypes the reference of this object.
-
UpcaParameters &get_upca()#
Get mutable reference of UPCA.
Enable UPCA and set parameters.
- Returns:
ChooseIDReader1DTypes& the mutable reference of the group.
-
const UpceParameters &get_upce() const#
Get UPCE.
Enable UPCE and set parameters.
See also
- Returns:
const UpceParameters & UPCE
-
ChooseIDReader1DTypes &set_upce(UpceParameters upce)#
Set UPCE with UpceParameters value.
Enable UPCE and set parameters.
See also
- Parameters:
upce – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader1DTypes the reference of this object.
-
UpceParameters &get_upce()#
Get mutable reference of UPCE.
Enable UPCE and set parameters.
- Returns:
ChooseIDReader1DTypes& the mutable reference of the group.
-
const Ean13Parameters &get_ean13() const#
Get EAN13.
Enable EAN13 and set parameters.
See also
- Returns:
const Ean13Parameters & EAN13
-
ChooseIDReader1DTypes &set_ean13(Ean13Parameters ean13)#
Set EAN13 with Ean13Parameters value.
Enable EAN13 and set parameters.
See also
- Parameters:
ean13 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader1DTypes the reference of this object.
-
Ean13Parameters &get_ean13()#
Get mutable reference of EAN13.
Enable EAN13 and set parameters.
- Returns:
ChooseIDReader1DTypes& the mutable reference of the group.
-
const Ean8Parameters &get_ean8() const#
Get EAN8.
Enable EAN8 and set parameters.
See also
- Returns:
const Ean8Parameters & EAN8
-
ChooseIDReader1DTypes &set_ean8(Ean8Parameters ean8)#
Set EAN8 with Ean8Parameters value.
Enable EAN8 and set parameters.
See also
- Parameters:
ean8 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader1DTypes the reference of this object.
-
Ean8Parameters &get_ean8()#
Get mutable reference of EAN8.
Enable EAN8 and set parameters.
- Returns:
ChooseIDReader1DTypes& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class DMECC200Parameters : public visionflow::param::ISchemable#
DMECC200Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
DMECC200Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
DMECC200Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class QRCParameters : public visionflow::param::ISchemable#
QRCParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
QRCParameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
QRCParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class QRCM1Parameters : public visionflow::param::ISchemable#
QRCM1Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
QRCM1Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
QRCM1Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class QRCM2Parameters : public visionflow::param::ISchemable#
QRCM2Parameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
QRCM2Parameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
QRCM2Parameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class MicroQRCParameters : public visionflow::param::ISchemable#
MicroQRCParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
MicroQRCParameters &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
MicroQRCParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ChooseIDReader2DTypes : public visionflow::param::ISchemable#
ChooseIDReader2DTypes Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const DMECC200Parameters &get_dmecc200() const#
Get DM-ECC200.
Enable DM-ECC200 and set parameters.
See also
- Returns:
const DMECC200Parameters & DM-ECC200
-
ChooseIDReader2DTypes &set_dmecc200(DMECC200Parameters dmecc200)#
Set DM-ECC200 with DMECC200Parameters value.
Enable DM-ECC200 and set parameters.
See also
- Parameters:
dmecc200 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader2DTypes the reference of this object.
-
DMECC200Parameters &get_dmecc200()#
Get mutable reference of DM-ECC200.
Enable DM-ECC200 and set parameters.
- Returns:
ChooseIDReader2DTypes& the mutable reference of the group.
-
const QRCParameters &get_qrc() const#
Get QR.
Enable QR and set parameters.
See also
- Returns:
const QRCParameters & QR
-
ChooseIDReader2DTypes &set_qrc(QRCParameters qrc)#
Set QR with QRCParameters value.
Enable QR and set parameters.
See also
- Parameters:
qrc – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader2DTypes the reference of this object.
-
QRCParameters &get_qrc()#
Get mutable reference of QR.
Enable QR and set parameters.
- Returns:
ChooseIDReader2DTypes& the mutable reference of the group.
-
const QRCM1Parameters &get_qrcm1() const#
Get QR-CM1.
Enable QR-CM1 and set parameters.
See also
- Returns:
const QRCM1Parameters & QR-CM1
-
ChooseIDReader2DTypes &set_qrcm1(QRCM1Parameters qrcm1)#
Set QR-CM1 with QRCM1Parameters value.
Enable QR-CM1 and set parameters.
See also
- Parameters:
qrcm1 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader2DTypes the reference of this object.
-
QRCM1Parameters &get_qrcm1()#
Get mutable reference of QR-CM1.
Enable QR-CM1 and set parameters.
- Returns:
ChooseIDReader2DTypes& the mutable reference of the group.
-
const QRCM2Parameters &get_qrcm2() const#
Get QR-CM2.
Enable QR-CM2 and set parameters.
See also
- Returns:
const QRCM2Parameters & QR-CM2
-
ChooseIDReader2DTypes &set_qrcm2(QRCM2Parameters qrcm2)#
Set QR-CM2 with QRCM2Parameters value.
Enable QR-CM2 and set parameters.
See also
- Parameters:
qrcm2 – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader2DTypes the reference of this object.
-
QRCM2Parameters &get_qrcm2()#
Get mutable reference of QR-CM2.
Enable QR-CM2 and set parameters.
- Returns:
ChooseIDReader2DTypes& the mutable reference of the group.
-
const MicroQRCParameters &get_microqrc() const#
Get Micro-QR-C.
Enable Micro-QR-C and set parameters.
See also
- Returns:
const MicroQRCParameters & Micro-QR-C
-
ChooseIDReader2DTypes &set_microqrc(MicroQRCParameters microqrc)#
Set Micro-QR-C with MicroQRCParameters value.
Enable Micro-QR-C and set parameters.
See also
- Parameters:
microqrc – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ChooseIDReader2DTypes the reference of this object.
-
MicroQRCParameters &get_microqrc()#
Get mutable reference of Micro-QR-C.
Enable Micro-QR-C and set parameters.
- Returns:
ChooseIDReader2DTypes& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class IDReader1DParameters : public visionflow::param::ISchemable#
IDReader1DParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_num_scanlines() const#
Get Num Scanlines.
The number of scan lines for 1d IDReader decoder.
See also
- Returns:
int Num Scanlines
-
IDReader1DParameters &set_num_scanlines(int num_scanlines)#
Set Num Scanlines with int value.
The number of scan lines for 1d IDReader decoder.
See also
- Parameters:
num_scanlines – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader1DParameters the reference of this object.
-
const ChooseIDReader1DTypes &get_types_params() const#
Get 1D IDReader Types and Parameters.
Set decode types and parameters of 1d IDReader.
See also
- Returns:
const ChooseIDReader1DTypes & 1D IDReader Types and Parameters
-
IDReader1DParameters &set_types_params(ChooseIDReader1DTypes types_params)#
Set 1D IDReader Types and Parameters with ChooseIDReader1DTypes value.
Set decode types and parameters of 1d IDReader.
See also
- Parameters:
types_params – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader1DParameters the reference of this object.
-
ChooseIDReader1DTypes &get_types_params()#
Get mutable reference of 1D IDReader Types and Parameters.
Set decode types and parameters of 1d IDReader.
- Returns:
IDReader1DParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class IDReader2DParameters : public visionflow::param::ISchemable#
IDReader2DParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const PolarityMode &get_polarity() const#
Get 2D IDReader Polarity.
The polarity of 2D IDReader, include Unspecified, BlackOnWhite and WhiteOnBlack. Polarity refers to the contrast between the dark and light modules within the code. BlackOnWhite means the dark modules represent the encoded data, while the light modules serve as a background. WhiteOnBlack means the light modules represent the encoded data, while the dark modules serve as a background.
See also
- Returns:
const PolarityMode & 2D IDReader Polarity
-
IDReader2DParameters &set_polarity(PolarityMode polarity)#
Set 2D IDReader Polarity with PolarityMode value.
The polarity of 2D IDReader, include Unspecified, BlackOnWhite and WhiteOnBlack. Polarity refers to the contrast between the dark and light modules within the code. BlackOnWhite means the dark modules represent the encoded data, while the light modules serve as a background. WhiteOnBlack means the light modules represent the encoded data, while the dark modules serve as a background.
See also
- Parameters:
polarity – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader2DParameters the reference of this object.
-
const std::vector<int> &get_module_width_range() const#
Get Module Width Range.
Set width scale of DM symbol module. Range: 1 <= min_val <= max_val <= 100.
See also
- Returns:
const std::vector<int> & Module Width Range
-
IDReader2DParameters &set_module_width_range(std::vector<int> module_width_range)#
Set Module Width Range with std::vector<int> value.
Set width scale of DM symbol module. Range: 1 <= min_val <= max_val <= 100.
See also
- Parameters:
module_width_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader2DParameters the reference of this object.
-
bool module_width_range_contains(int value) const#
Check if the Module Width Range contains the value.
- Returns:
bool true if the Module Width Range contains the value, otherwise false.
-
int get_module_width_range_left() const#
Get left point value of Module Width Range.
See also
- Returns:
const std::vector<int> & left point value of Module Width Range
-
int get_module_width_range_right() const#
Get the right point value of Module Width Range.
See also
- Returns:
const std::vector<int> & the right point value of Module Width Range
-
IDReader2DParameters &set_module_width_range_left(int module_width_range_left)#
Set left point value of Module Width Range with std::vector<int> value.
Set width scale of DM symbol module. Range: 1 <= min_val <= max_val <= 100.
See also
- Parameters:
module_width_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader2DParameters the reference of this object.
-
IDReader2DParameters &set_module_width_range_right(int module_width_range_right)#
Set the right point value of Module Width Range with std::vector<int> value.
Set width scale of DM symbol module. Range: 1 <= min_val <= max_val <= 100.
See also
- Parameters:
module_width_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader2DParameters the reference of this object.
-
int get_time_limit() const#
Get Time Limit.
Time limit as millisecond. When value = 0, this parameter is not enabled.
See also
- Returns:
int Time Limit
-
IDReader2DParameters &set_time_limit(int time_limit)#
Set Time Limit with int value.
Time limit as millisecond. When value = 0, this parameter is not enabled.
See also
- Parameters:
time_limit – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader2DParameters the reference of this object.
-
const ChooseIDReader2DTypes &get_types_params() const#
Get 2D IDReader Types and Parameters.
Set decode types and parameters of 2d IDReader.
See also
- Returns:
const ChooseIDReader2DTypes & 2D IDReader Types and Parameters
-
IDReader2DParameters &set_types_params(ChooseIDReader2DTypes types_params)#
Set 2D IDReader Types and Parameters with ChooseIDReader2DTypes value.
Set decode types and parameters of 2d IDReader.
See also
- Parameters:
types_params – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReader2DParameters the reference of this object.
-
ChooseIDReader2DTypes &get_types_params()#
Get mutable reference of 2D IDReader Types and Parameters.
Set decode types and parameters of 2d IDReader.
- Returns:
IDReader2DParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class IDReaderDecoderParameters : public visionflow::param::SchemableParameter#
IDReaderDecoderParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_show_all_results() const#
Get Show All Results.
Enable this option to output all location results.
See also
- Returns:
bool Show All Results
-
IDReaderDecoderParameters &set_show_all_results(bool show_all_results)#
Set Show All Results with bool value.
Enable this option to output all location results.
See also
- Parameters:
show_all_results – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReaderDecoderParameters the reference of this object.
-
const IDReader1DParameters &get_idreader_1d_param() const#
Get 1D IDReader Parameters.
Parameters for 1d IDReader.
See also
- Returns:
const IDReader1DParameters & 1D IDReader Parameters
-
IDReaderDecoderParameters &set_idreader_1d_param(IDReader1DParameters idreader_1d_param)#
Set 1D IDReader Parameters with IDReader1DParameters value.
Parameters for 1d IDReader.
See also
- Parameters:
idreader_1d_param – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReaderDecoderParameters the reference of this object.
-
IDReader1DParameters &get_idreader_1d_param()#
Get mutable reference of 1D IDReader Parameters.
Parameters for 1d IDReader.
- Returns:
IDReaderDecoderParameters& the mutable reference of the group.
-
const IDReader2DParameters &get_idreader_2d_param() const#
Get 2D IDReader Parameters.
Parameters for 2d IDReader.
See also
- Returns:
const IDReader2DParameters & 2D IDReader Parameters
-
IDReaderDecoderParameters &set_idreader_2d_param(IDReader2DParameters idreader_2d_param)#
Set 2D IDReader Parameters with IDReader2DParameters value.
Parameters for 2d IDReader.
See also
- Parameters:
idreader_2d_param – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReaderDecoderParameters the reference of this object.
-
IDReader2DParameters &get_idreader_2d_param()#
Get mutable reference of 2D IDReader Parameters.
Parameters for 2d IDReader.
- Returns:
IDReaderDecoderParameters& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class IDReaderLocationModelParameters : public visionflow::param::SchemableParameter#
IDReaderLocationModelParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_input_width() const#
-
The image width for location inference input.
See also
-
IDReaderLocationModelParameters &set_input_width(int input_width)#
Set Location Input Width with int value.
The image width for location inference input.
See also
- Parameters:
input_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReaderLocationModelParameters the reference of this object.
-
int get_input_height() const#
-
The image height for location inference input.
See also
-
IDReaderLocationModelParameters &set_input_height(int input_height)#
Set Location Input Height with int value.
The image height for location inference input.
See also
- Parameters:
input_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReaderLocationModelParameters the reference of this object.
-
int get_barcode_module_width() const#
Get ID Code Module Width.
Setting the module width of 1D and 2D barcode to an appropriate value can make positioning more accurate.
See also
- Returns:
int ID Code Module Width
-
IDReaderLocationModelParameters &set_barcode_module_width(int barcode_module_width)#
Set ID Code Module Width with int value.
Setting the module width of 1D and 2D barcode to an appropriate value can make positioning more accurate.
See also
- Parameters:
barcode_module_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
IDReaderLocationModelParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
CameraCalibrationEvaluation Parameters:#
-
class CameraCalibrationImageFeaturePoints#
camera calibration feature points contain image coordinate points, world coordinate points, and remapped coordinate points.It is used to show whether the results of the camera calibration training are accurate or not.
Public Functions
-
CameraCalibrationImageFeaturePoints &set_image_points(std::vector<geometry::Point2f> image_points)#
The position of the markers on the image. This position is the one detected from the image without any processing.
- Parameters:
image_points – The position of the markers on the image.
- Returns:
CameraCalibrationImageFeaturePoints& the reference of this object.
-
CameraCalibrationImageFeaturePoints &set_world_points(std::vector<geometry::Point2f> world_points)#
The positions of the markers on the image correspond to the positions of the world coordinates. The coordinates are mapped once.
- Parameters:
world_points – world points to set.Z -axis coordinates remain at 0.*
- Returns:
CameraCalibrationImageFeaturePoints& the reference of this object.
-
CameraCalibrationImageFeaturePoints &set_reprojection_points(std::vector<geometry::Point2f> reprojection_points)#
The world coordinates are mapped to locations on the image. The coordinates are mapped twice.
- Parameters:
reprojection_points – re_projection points to set.
- Returns:
CameraCalibrationImageFeaturePoints& the reference of this object.
-
CameraCalibrationImageFeaturePoints &set_image_points(std::vector<geometry::Point2f> image_points)#
-
class CameraCalibrationEvaluation : public visionflow::param::IParameter#
Evaluation data includes root_mean_square and feature points. root_mean_square is the calibration error evaluation score; the smaller root_mean_square (root_mean_square>=0), the more accurate the calibration. camera calibration feature points contain image coordinate points, world coordinate points, and remapped coordinate points.It is used to show whether the results of the camera calibration training are accurate or not.
Public Functions
-
CameraCalibrationEvaluation &set_images_feature_points(std::vector<CameraCalibrationImageFeaturePoints> images_feature_points)#
Set feature points for all view image.
- Parameters:
images_feature_points – feature points of all train images.
- Returns:
CameraCalibrationEvaluation& the reference of this object.
-
const std::vector<CameraCalibrationImageFeaturePoints> &get_images_feature_points() const#
See also
-
void clear_images_feature_points()#
clear feature points of all view image.
-
int images_feature_points_size() const#
The number of images with feature points is recorded.
-
CameraCalibrationEvaluation &add_image_feature_points(CameraCalibrationImageFeaturePoints image_feature_points)#
add the feature points of an image.
- Parameters:
image_feature_points – feature points of a image.
- Returns:
CameraCalibrationEvaluation& the reference of this object.
-
const CameraCalibrationImageFeaturePoints &get_image_feature_points(size_t index) const#
Get the already set feature points according to the image index.
- Parameters:
index – Image index.
- Returns:
The feature point that is got.
-
CameraCalibrationEvaluation &set_root_mean_square(double root_mean_square)#
Set the root_mean_square.root_mean_square is the calibration error evaluation score; the smaller root_mean_square (root_mean_square>=0), the more accurate the calibration.
- Parameters:
root_mean_square – Set the root_mean_square.
- Returns:
CameraCalibrationEvaluation& the reference of this object.
-
double get_root_mean_square() const#
See also
set_rms();
-
CameraCalibrationEvaluation &set_calibration_messages(std::string calibration_messages)#
- calibration information is[{“type”:” “,”level”:” “,”massage”:” “}]. type is the information type.level is the Severity level of information. massage is the detail.An example is as follows. [ { The reference image cannot be found, it is possible that the reference index is out of range, or the reference image feature point detection fails. “type”:”ReferenceIndexNotFound”, “level”:”Error”, “massage”:{“reference_index”:10,”images_number”:5} }, { The number of image feature points is less than the minimum value. “type”:”ImagePointsNotEnough”, “level”:”Error”, “massage”:{“image_id”:10,”minimum_number”:5,”found_number”,”4”} }, { The image did not find all feature points. “type”:”ImagePointsNotFoundAll”, “level”:”Error”, “massage”:{“image_id”:10,”expected_number”:5,”found_number”,”4”} }, { The image did not find the calibration board, or any feature points. “type”:”BoardNotFound”, “level”:”Error”, “massage”:{“image_id”:10} }, { All images are not available “type”:”NoAvailableImages”, “level”:”Error”, “massage”:{} } ]
@brief Set the massage. @param calibration_messages Set the massage. The format of the camera
- Returns:
CameraCalibrationEvaluation& the reference of this object.
-
const std::string &get_calibration_messages() const#
See also
-
CameraCalibrationEvaluation &set_images_feature_points(std::vector<CameraCalibrationImageFeaturePoints> images_feature_points)#
CameraCalibrationPixelScale Parameters:#
-
class CameraCalibrationPixelScale : public visionflow::param::SchemableParameter#
CameraCalibrationPixelScale Parameter class generated by jinja2 automatically.
Camera calibrate Pixel Scale
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_pixel_scale() const#
Get Pixel Scale.
Pixel Scale
See also
- Returns:
double Pixel Scale
-
CameraCalibrationPixelScale &set_pixel_scale(double pixel_scale)#
Set Pixel Scale with double value.
Pixel Scale
See also
- Parameters:
pixel_scale – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
CameraCalibrationPixelScale the reference of this object.
-
virtual const std::string &schema_str() const override#
EL OCR Parameters#
-
class ELOCRInferParameters : public visionflow::param::SchemableParameter#
ELOCRInferParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_threshold() const#
Get Confidence Threshold.
Greater than this threshold will be determined as a target.
See also
- Returns:
double Confidence Threshold
-
ELOCRInferParameters &set_threshold(double threshold)#
Set Confidence Threshold with double value.
Greater than this threshold will be determined as a target.
See also
- Parameters:
threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELOCRInferParameters the reference of this object.
-
double get_density() const#
Get Search Density.
Filter out duplicate results using NMS. A higher value will retain fewer results.
See also
- Returns:
double Search Density
-
ELOCRInferParameters &set_density(double density)#
Set Search Density with double value.
Filter out duplicate results using NMS. A higher value will retain fewer results.
See also
- Parameters:
density – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELOCRInferParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ELOCRTrainingParameters : public visionflow::param::SchemableParameter#
ELOCRTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_target_char_width() const#
Get Target Character Width.
The target character width in data.
See also
- Returns:
double Target Character Width
-
ELOCRTrainingParameters &set_target_char_width(double target_char_width)#
Set Target Character Width with double value.
The target character width in data.
See also
- Parameters:
target_char_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELOCRTrainingParameters the reference of this object.
-
double get_target_char_height() const#
Get Target Character Height.
The target character height in data.
See also
- Returns:
double Target Character Height
-
ELOCRTrainingParameters &set_target_char_height(double target_char_height)#
Set Target Character Height with double value.
The target character height in data.
See also
- Parameters:
target_char_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELOCRTrainingParameters the reference of this object.
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
ELOCRTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELOCRTrainingParameters the reference of this object.
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
ELOCRTrainingParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELOCRTrainingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
EL Unsupervised Segmentation Parameters#
-
class ELUnsuperSegmentationTrainingParameters : public visionflow::param::SchemableParameter#
ELUnsuperSegmentationTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
ELUnsuperSegmentationTrainingParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperSegmentationTrainingParameters the reference of this object.
-
int get_min_defect_size() const#
Get Minimum Defect Size.
Minimum defect size in pixels.
See also
- Returns:
int Minimum Defect Size
-
ELUnsuperSegmentationTrainingParameters &set_min_defect_size(int min_defect_size)#
Set Minimum Defect Size with int value.
Minimum defect size in pixels.
See also
- Parameters:
min_defect_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperSegmentationTrainingParameters the reference of this object.
-
int get_view_shift_range() const#
Get View Alignment Error.
The range of movement of the overall content of the view that may be caused by imprecise positioning, etc. We look for detection targets within the range of possible movement of the view. The larger the possible movement of the view, the larger the range the algorithm needs to find and the slower the inference will be.
See also
- Returns:
int View Alignment Error
-
ELUnsuperSegmentationTrainingParameters &set_view_shift_range(int view_shift_range)#
Set View Alignment Error with int value.
The range of movement of the overall content of the view that may be caused by imprecise positioning, etc. We look for detection targets within the range of possible movement of the view. The larger the possible movement of the view, the larger the range the algorithm needs to find and the slower the inference will be.
See also
- Parameters:
view_shift_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperSegmentationTrainingParameters the reference of this object.
-
int get_representative_sample_size() const#
Get Representative Sample Size.
The number of sample features used for the final comparison of defects. The higher the number, the better the differentiation of the detection results, but the slower the inference.
See also
- Returns:
int Representative Sample Size
-
ELUnsuperSegmentationTrainingParameters &set_representative_sample_size(int representative_sample_size)#
Set Representative Sample Size with int value.
The number of sample features used for the final comparison of defects. The higher the number, the better the differentiation of the detection results, but the slower the inference.
See also
- Parameters:
representative_sample_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperSegmentationTrainingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ELUnsuperSegmentationInferParameters : public visionflow::param::SchemableParameter#
ELUnsuperSegmentationInferParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_distance_scale() const#
Get Distance Zoom Scale.
Scale factor for feature distance. Setting this value to a suitable value makes it easier to adjust the pixel filtering parameters.
See also
- Returns:
double Distance Zoom Scale
-
ELUnsuperSegmentationInferParameters &set_distance_scale(double distance_scale)#
Set Distance Zoom Scale with double value.
Scale factor for feature distance. Setting this value to a suitable value makes it easier to adjust the pixel filtering parameters.
See also
- Parameters:
distance_scale – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELUnsuperSegmentationInferParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
EL Assembly Verification Parameters#
-
class ELAssemblyVerificationObjectRule : public visionflow::param::ISchemable#
ELAssemblyVerificationObjectRule Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::vector<int> &get_number_range() const#
Get Number Range.
Number range of the object
See also
- Returns:
const std::vector<int> & Number Range
-
ELAssemblyVerificationObjectRule &set_number_range(std::vector<int> number_range)#
Set Number Range with std::vector<int> value.
Number range of the object
See also
- Parameters:
number_range – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationObjectRule the reference of this object.
-
bool number_range_contains(int value) const#
Check if the Number Range contains the value.
- Returns:
bool true if the Number Range contains the value, otherwise false.
-
int get_number_range_left() const#
Get left point value of Number Range.
See also
- Returns:
const std::vector<int> & left point value of Number Range
-
int get_number_range_right() const#
Get the right point value of Number Range.
See also
- Returns:
const std::vector<int> & the right point value of Number Range
-
ELAssemblyVerificationObjectRule &set_number_range_left(int number_range_left)#
Set left point value of Number Range with std::vector<int> value.
Number range of the object
See also
- Parameters:
number_range_left – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationObjectRule the reference of this object.
-
ELAssemblyVerificationObjectRule &set_number_range_right(int number_range_right)#
Set the right point value of Number Range with std::vector<int> value.
Number range of the object
See also
- Parameters:
number_range_right – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationObjectRule the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ELAssemblyVerificationRegionRule : public visionflow::param::ISchemable#
ELAssemblyVerificationRegionRule Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::map<std::string, ELAssemblyVerificationObjectRule> &get_object_rules() const#
Get Objects Number Range.
The number range of all objects categories in each region. Note that if you want a certain category not to show up in the area, you need to explicitly set the number of that category to 0.
See also
- Returns:
const std::map<std::string, ELAssemblyVerificationObjectRule> & Objects Number Range
-
ELAssemblyVerificationRegionRule &set_object_rules(std::map<std::string, ELAssemblyVerificationObjectRule> object_rules)#
Set Objects Number Range with std::map<std::string, ELAssemblyVerificationObjectRule> value.
The number range of all objects categories in each region. Note that if you want a certain category not to show up in the area, you need to explicitly set the number of that category to 0.
See also
- Parameters:
object_rules – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationRegionRule the reference of this object.
-
const ELAssemblyVerificationObjectRule &get_object_rules(const std::string &key) const#
Get value in Objects Number Range with key.
Warning
The key must be exist in Objects Number Range. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, ELAssemblyVerificationObjectRule> & value in Objects Number Range at key.
-
ELAssemblyVerificationRegionRule &set_object_rules(const std::string &key, ELAssemblyVerificationObjectRule value)#
Set value in Objects Number Range with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationRegionRule the reference of this object.
-
bool object_rules_contains(const std::string &key) const#
Check if the key is exist in Objects Number Range.
- Returns:
bool true if the key is exist in Objects Number Range, otherwise false.
-
size_t get_object_rules_size() const#
Get the size of Objects Number Range.
- Returns:
size_t the size of Objects Number Range
-
ELAssemblyVerificationObjectRule &get_object_rules(const std::string &key)#
Get mutable reference of value in Objects Number Range with key. A new key and default value will be created if the key does not exist.
- Returns:
ELAssemblyVerificationObjectRule& the mutable reference of value in Objects Number Range at key.
-
virtual const std::string &schema_str() const override#
-
class ELAssemblyVerificationTrainingParameters : public visionflow::param::SchemableParameter#
ELAssemblyVerificationTrainingParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
ELAssemblyVerificationTrainingParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationTrainingParameters the reference of this object.
-
int get_representative_sample_size() const#
Get Representative Sample Size.
The maximum number of representative objects selected per category, which can be appropriately increased when objects exhibit significant variations in morphology to achieve better detection performance.
See also
- Returns:
int Representative Sample Size
-
ELAssemblyVerificationTrainingParameters &set_representative_sample_size(int representative_sample_size)#
Set Representative Sample Size with int value.
The maximum number of representative objects selected per category, which can be appropriately increased when objects exhibit significant variations in morphology to achieve better detection performance.
See also
- Parameters:
representative_sample_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationTrainingParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ELAssemblyVerificationInferParameters : public visionflow::param::SchemableParameter#
ELAssemblyVerificationInferParameters Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
const std::map<std::string, double> &get_object_thresholds() const#
Get Object Confidence Thresholds.
Object detection confidence thresholds for each category, used to filter out low-confidence objects. If a category’s confidence threshold is not set or set to 0, an automatically adapted confidence threshold will be used.
See also
- Returns:
const std::map<std::string, double> & Object Confidence Thresholds
-
ELAssemblyVerificationInferParameters &set_object_thresholds(std::map<std::string, double> object_thresholds)#
Set Object Confidence Thresholds with std::map<std::string, double> value.
Object detection confidence thresholds for each category, used to filter out low-confidence objects. If a category’s confidence threshold is not set or set to 0, an automatically adapted confidence threshold will be used.
See also
- Parameters:
object_thresholds – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationInferParameters the reference of this object.
-
double get_object_thresholds(const std::string &key) const#
Get value in Object Confidence Thresholds with key.
Warning
The key must be exist in Object Confidence Thresholds. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, double> & value in Object Confidence Thresholds at key.
-
ELAssemblyVerificationInferParameters &set_object_thresholds(const std::string &key, double value)#
Set value in Object Confidence Thresholds with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationInferParameters the reference of this object.
-
bool object_thresholds_contains(const std::string &key) const#
Check if the key is exist in Object Confidence Thresholds.
- Returns:
bool true if the key is exist in Object Confidence Thresholds, otherwise false.
-
size_t get_object_thresholds_size() const#
Get the size of Object Confidence Thresholds.
- Returns:
size_t the size of Object Confidence Thresholds
-
const std::map<std::string, ELAssemblyVerificationRegionRule> &get_region_rules() const#
Get Region Verification Rules.
The rules for each inspection region. The key is the inspection region name. If rules for a certain region are not set, the region will not be checked.
See also
- Returns:
const std::map<std::string, ELAssemblyVerificationRegionRule> & Region Verification Rules
-
ELAssemblyVerificationInferParameters &set_region_rules(std::map<std::string, ELAssemblyVerificationRegionRule> region_rules)#
Set Region Verification Rules with std::map<std::string, ELAssemblyVerificationRegionRule> value.
The rules for each inspection region. The key is the inspection region name. If rules for a certain region are not set, the region will not be checked.
See also
- Parameters:
region_rules – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationInferParameters the reference of this object.
-
const ELAssemblyVerificationRegionRule &get_region_rules(const std::string &key) const#
Get value in Region Verification Rules with key.
Warning
The key must be exist in Region Verification Rules. otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::map<std::string, ELAssemblyVerificationRegionRule> & value in Region Verification Rules at key.
-
ELAssemblyVerificationInferParameters &set_region_rules(const std::string &key, ELAssemblyVerificationRegionRule value)#
Set value in Region Verification Rules with key.
- Parameters:
key – the key to set.
value – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ELAssemblyVerificationInferParameters the reference of this object.
-
bool region_rules_contains(const std::string &key) const#
Check if the key is exist in Region Verification Rules.
- Returns:
bool true if the key is exist in Region Verification Rules, otherwise false.
-
size_t get_region_rules_size() const#
Get the size of Region Verification Rules.
- Returns:
size_t the size of Region Verification Rules
-
ELAssemblyVerificationRegionRule &get_region_rules(const std::string &key)#
Get mutable reference of value in Region Verification Rules with key. A new key and default value will be created if the key does not exist.
- Returns:
ELAssemblyVerificationRegionRule& the mutable reference of value in Region Verification Rules at key.
-
virtual const std::string &schema_str() const override#
Gauge Tool Parameters#
-
class ScriptPipeline#
Internal class for script pipeline.
Public Functions
-
ScriptPipeline &set_pre_script(std::string pre_script)#
Set the python pre-script content. The pre-script will be executed before the pipeline, you can define some functions or global variables in the pre-script.
- Parameters:
pre_script – The pre-script content.
- Returns:
ScriptPipeline& The solving pipeline object.
-
const std::string &get_pre_script() const#
Get the pre-script object content.
- Returns:
const std::string& The pre-script content.
-
ScriptPipeline &add_item(std::string name, std::string function)#
Add a new solving item which will always be executed.
functioncould be an expression or a function name. Iffunctioncontains no argument reference (${arg}) and such item is given one or more arguments, it will be treated as a function name, all arguments given will be passed to the function call.If you want to call a function with no argument, add it as an expression
func_name().- Parameters:
name – Name of the item, should not be empty nor duplicate, can be changed with rename_item.
function – The solving script. Could be an expression or a function name.
- Throws:
excepts::DataAlreadyExists – If an solving item with this name already exists.
excepts::InvalidArgument – If the name is empty or the function is empty.
- Returns:
ScriptPipeline& The solving pipeline object.
-
ScriptPipeline &add_conditional_item(std::string name, std::string expression_condition, std::string expression_true, std::string expression_false)#
Add a new solving item. Result of this item will be the value of
expression_trueif condition evaluates to true, else the value ofexpression_false.If
expression_conditionis left empty,expression_falsemust also be empty, the call will be treated as a add_item call. If condition is not empty, one ofexpression_trueandexpression_falsecan be empty. If such branch is taken, the result will beNone.- Parameters:
name – Name of the item, should not be empty nor duplicate, can be changed with rename_item.
expression_condition – Solving script for the condition, should evaluate to a boolean value.
expression_true – Solving script for the true branch.
expression_false – Solving script for the false branch.
- Throws:
excepts::DataAlreadyExists – If an solving item with this name already exists.
excepts::InvalidArgument – If restriction above is violated.
- Returns:
ScriptPipeline& The solving pipeline object.
-
const std::string &get_item(const std::string &name) const#
Get expression or function from an unconditional solving item.
Note
Caller should use has_condition to ensure item is unconditional.
- Parameters:
name – Name of the solving item.
- Throws:
excepts::DataNotFound – If solving item does not exist.
excepts::InvalidArgument – If solving item is conditional.
- Returns:
The expression or function of the solving item.
-
std::vector<std::string> get_conditional_item(const std::string &name) const#
Get expressions from a conditional solving item.
Note
Caller should use has_condition to ensure item is conditional.
- Parameters:
name – Name of the solving item.
- Throws:
excepts::DataNotFound – If solving item does not exist.
excepts::InvalidArgument – If solving item is not conditional.
- Returns:
A vector of 3 strings, in order of: the condition expression, the value expression taken when condition is true, the value expression taken when condition is false.
-
ScriptPipeline &reset_item(const std::string &name, std::string function, bool clear_args = true)#
Reset an item to an unconditional solving item. add_item for details.
- Parameters:
name – Name of the solving item.
function – New solving script.
clear_args – If true, all arguments given to this item will be removed.
- Throws:
excepts::DataNotFound – If solving item does not exist.
- Returns:
ScriptPipeline& The solving pipeline object.
-
ScriptPipeline &reset_conditional_item(const std::string &name, std::string expression_condition, std::string expression_true, std::string expression_false, bool clear_args = true)#
Reset an item to a conditional solving item. add_conditional_item for details.
- Parameters:
name – Name of the solving item.
expression_condition – Solving script for the condition.
expression_true – Solving script for the true branch.
expression_false – Solving script for the false branch.
clear_args – If true, all arguments given to this item will be cleared.
- Throws:
excepts::DataNotFound – If solving item does not exist.
- Returns:
ScriptPipeline& The solving pipeline object.
-
ScriptPipeline &rename_item(const std::string &old_name, const std::string &new_name)#
Rename a solving item with new name.
It will also rename all items that depend on this item.
- Parameters:
old_name – The old solving item name.
new_name – The new solving item name. Note that the name should not be empty.
- Throws:
excepts::DataNotFound – If an solving item with old name does not exist.
excepts::DataAlreadyExists – If an solving item with new name already exists.
excepts::InvalidArgument – If the new name is empty.
-
bool remove_item(const std::string &name, bool auto_remove_used_by = true)#
Remove a solving item with name.
- Parameters:
name – The name of the solving item to be removed.
auto_remove_used_by – Determines whether to automatically remove items that depend on this item. If set to true, all dependent items will be recursively removed. If set to false, it will check if ther are any items using this item. If there are, it will output error messages and return false. The default setting is true.
- Returns:
bool True if the item is removed successfully. False if the item does not exist or if there are any items using this item.
-
bool contains_item(const std::string &name) const#
Check if a solving item exists.
- Parameters:
name – The name of the solving item.
- Returns:
bool True if the solving item exists. False otherwise.
-
std::vector<std::string> items(bool with_topo_sort = false, const std::vector<std::string> &activated_items = {}) const#
List the names of all solving items.
- Parameters:
with_topo_sort – Specifies whether to sort the items in topological order. If set to true, the items will be sorted accordingly. If set to false, the items will be sorted in lexicographical order. The default setting is false.
activated_items – The names of all activated items. If not empty, only listed items will be sorted and returned. Caller MUST provide all dependent items if using topological sort.
- Throws:
excepts::DataNotFound – If any item in activated_items does not exist.
- Returns:
std::vector<std::string> The names of all or designated solving items, sorted lexicographically or topologically.
-
std::vector<std::string> deps_on(const std::string &item_name, bool with_indirect = false) const#
List the dependencies of a solving item.
Results are sorted in lexicographical order, excluding the item itself. If an argument is declared in an expression item but not used, it will NOT be included in return value.
- Parameters:
item_name – The name of the solving item.
with_indirect – If true, includes the indirect dependencies. Default is false.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist.
- Returns:
std::vector<std::string> A vector of strings containing the names of the dependencies.
-
std::vector<std::string> used_by(const std::string &item_name, bool with_indirect = false) const#
List the items that use a given solving item.
Results are sorted in lexicographical order, excluding the item itself.
- Parameters:
item_name – The name of the solving item.
with_indirect – If true, includes indirect usages. Default is false.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist.
- Returns:
std::vector<std::string> A vector of strings containing the names of the items that use the given item.
-
ScriptPipeline &set_arg(const std::string &item_name, const std::string &arg_name, const std::string &arg_value, const std::string &ref_item = {})#
Sets an argument for a given item.
When the argument value is empty, it will attempt to add a reference tag. Repeated calls will overwrite the existing content.
- Parameters:
item_name – The name of the solving item.
arg_name – The name of the argument.
arg_value – The value of the argument.
ref_item – Optional the name of the solving item that the argument refers to. Default is empty.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist.
excepts::LoopConnection – If the item can not depends on referenced item.
excepts::InvalidArgument – If the argument name is empty or the argument value and referenced item are both empty.
- Returns:
ScriptPipeline& A reference to the ScriptPipeline object.
-
bool remove_arg(const std::string &item_name, const std::string &arg_name)#
Removes an argument from a given item.
- Parameters:
item_name – The name of the solving item.
arg_name – The name of the argument.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist.
- Returns:
bool True if the argument was successfully removed, false otherwise.
-
void clear_args(const std::string &item_name)#
Remove all arguments from a given item.
- Parameters:
item_name – Name of the solving item.
- Throws:
excepts::DataNotFound – If solving item with the name does not exist.
-
const std::string &get_arg_value(const std::string &item_name, const std::string &arg_name) const#
Get the value of an argument for a given item.
- Parameters:
item_name – The name of the solving item.
arg_name – The name of the argument.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist or the argument does not exist.
- Returns:
const std::string& The value of the argument.
-
bool is_variable_arg(const std::string &item_name, const std::string &arg_name) const#
Checks if an argument is variable for a given item.
A variable argument is an argument that refers to another solving item.
- Parameters:
item_name – The name of the solving item.
arg_name – The name of the argument.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist or the argument does not exist.
- Returns:
bool True if the argument is variable, false otherwise.
-
const std::string &get_arg_ref_item(const std::string &item_name, const std::string &arg_name) const#
Get the referenced item of an argument for a given item.
- Parameters:
item_name – The name of the solving item.
arg_name – The name of the argument.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist or the argument does not exist.
- Returns:
const std::string& The name of the referenced item.
-
std::vector<std::string> get_arg_names(const std::string &item_name) const#
Get the names of all arguments for a given item.
- Parameters:
item_name – The name of the solving item.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist.
- Returns:
std::vector<std::string> A vector of strings containing the names of all arguments in lexicographical order.
-
bool has_condition(const std::string &item_name) const#
Checks if a given item has a condition.
- Parameters:
item_name – The name of the solving item.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist.
- Returns:
bool True if the item has a condition, false otherwise.
-
const std::string &get_condition(const std::string &item_name) const#
Get the condition expression of given item.
- Parameters:
item_name – The name of the solving item.
- Throws:
excepts::DataNotFound – If an solving item with the name does not exist.
- Returns:
const std::string& The value of the condition, may be empty if item has no condition.
-
std::string to_script(const std::string &class_name, const std::vector<std::string> &output_items = {}) const#
Converts the script pipeline to a python script.
All items will automatically add a check to determine whether the dependency results are empty. Replace reference tags with actual item names. For the expression, an exception will be thrown for missing actual items referred to. Providing extra variables in the expression will not cause an error, but it will result in redundant dependency check and output warning messages.
Warning
The generated script does not guarantee execution success.
- Parameters:
class_name – Python Class name. A class contains the method “__call__(image, view)” and methods represents for computation of each item will be generated through the class_name to return all the item results of the script pipeline.
output_items – Desired output items. Items not needed by any output will not be included in the generated script. An empty vector(as default) means all items are outputted.
- Throws:
excepts::LogicError – If the expression is invalid.
excepts::DataNotFound – If an output item does not exist.
- Returns:
std::string A string representation of the python script.
-
bool item_add_tag(const std::string &item, const std::string &tag, const std::string &value = "")#
Add a tag to a solving item.
- Parameters:
item – Name of the solving item.
tag – Name of the tag.
value – Value of the tag. Default is empty string.
- Throws:
excepts::DataNotFound – If designated solving item does not exist.
- Returns:
bool True if the call overwrites an existing tag, false otherwise.
-
std::vector<std::string> item_add_tag(const std::vector<std::string> &items, const std::string &tag, const std::string &value = "")#
Add a tag to multiple solving items. If any item does not exist, no modification will be made.
- Parameters:
items – Names of the solving items.
tag – Name of the tag.
value – Value of the tag. Default is empty string.
- Throws:
excepts::DataNotFound – If any designated solving item does not exist.
- Returns:
std::vector<std::string> List of items whose tags are overwritten.
-
bool item_remove_tag(const std::string &item, const std::string &tag)#
Remove a tag from a solving item.
- Parameters:
item – Name of the solving item.
tag – Name of the tag.
- Throws:
excepts::DataNotFound – If designated solving item does not exist.
- Returns:
true If the tag is removed, false if the tag does not exist.\
-
bool item_remove_tag(const std::string &item, const std::string &tag, const std::string &value)#
Remove a tag from a solving item if the tag has specific value.
- Parameters:
item – Name of the solving item.
tag – Name of the tag.
value – Value of the tag. If the tag has different value, it will not be removed.
- Throws:
excepts::DataNotFound – If designated solving item does not exist.
- Returns:
true If the item no longer contains the tag, because it was removed or does not exist.
- Returns:
false If the item still contains the tag with different value.
-
std::vector<std::string> item_remove_tag(const std::vector<std::string> &items, const std::string &tag)#
Remove a tag from multiple solving items. If any item does not exist, no modification will be made.
- Parameters:
items – Names of the solving items.
tag – Name of the tag.
- Throws:
excepts::DataNotFound – If any designated solving item does not exist.
- Returns:
std::vector<std::string> List of items whose tags are removed.
-
std::vector<std::string> item_remove_tag(const std::vector<std::string> &items, const std::string &tag, const std::string &value)#
Remove a tag from multiple solving items if the tag has specific value. If any item does not exist, no modification will be made.
- Parameters:
items – Names of the solving items.
tag – Name of the tag.
value – Value of the tag. If the tag has different value, it will not be removed.
- Throws:
excepts::DataNotFound – If any designated solving item does not exist.
- Returns:
std::vector<std::string> List of items no longer containing the tag, because the tags were removed or did not exist.
-
bool item_contains_tag(const std::string &item, const std::string &tag) const#
Check if a solving item contains a tag.
- Parameters:
item – Name of the solving item.
tag – Name of the tag.
- Throws:
excepts::DataNotFound – If designated solving item does not exist.
- Returns:
bool True if the solving item contains the tag, disregarding the value.
-
bool item_contains_tag(const std::string &item, const std::string &tag, const std::string &value) const#
Check if a solving item contains a tag with specific value.
- Parameters:
item – Name of the solving item.
tag – Name of the tag.
value – Value of the tag.
- Throws:
excepts::DataNotFound – If designated solving item does not exist.
- Returns:
bool True if the solving item contains the tag and value of the tag matches.
-
std::map<std::string, std::string> item_tags(const std::string &item) const#
Get all tags and their values of a solving item.
- Parameters:
item – Name of the solving item.
- Throws:
excepts::DataNotFound – If designated solving item does not exist.
- Returns:
std::map<std::string, std::string> A map of tags and their values.
-
std::string item_tag_value(const std::string &item, const std::string &tag) const#
Get value of a tag of a solving item.
- Parameters:
item – Name of the solving item.
tag – Name of the tag.
- Throws:
excepts::DataNotFound – If designated solving item or tag does not exist.
- Returns:
std::string Value of the tag.
-
std::vector<std::string> remove_tag(const std::string &tag)#
Remove a tag from all solving items.
- Parameters:
tag – Name of the tag.
- Returns:
std::vector<std::string> List of items whose tags are removed.
-
std::vector<std::string> remove_tag(const std::string &tag, const std::string &value)#
Remove a tag from all solving items, if the tag has specific value,.
- Parameters:
tag – Name of the tag.
value – Value of the tag. If a tag has different value, it will not be removed.
- Returns:
std::vector<std::string> List of items whose tags are removed.
-
std::vector<std::string> find_tagged_item(const std::string &tag) const#
Find all solving items containing a tag.
- Parameters:
tag – Name of the tag.
- Returns:
std::vector<std::string> List of items containing the tag.
-
std::vector<std::string> find_tagged_item(const std::string &tag, const std::string &value) const#
Find all solving items containing a tag with specific value.
- Parameters:
tag – Name of the tag.
value – Value of the tag.
- Returns:
std::vector<std::string> List of items containing the tag with the specified value.
-
std::vector<std::string> all_tags() const#
Get all tag names of all solving items.
- Returns:
std::vector<std::string> List of all tag names, sorted lexicographically.
-
std::vector<std::string> all_tag_values(const std::string &tag) const#
Get all values of a tag from all solving items.
- Parameters:
tag – Name of the tag.
- Returns:
std::vector<std::string> List of all values of the tag, sorted lexicographically.
-
std::vector<std::string> reset_tag_value(const std::string &tag, const std::string &old_value, const std::string &new_value)#
Set a new value of a tag from all solving items if the tag has specific old value.
- Parameters:
tag – Name of the tag.
old_value – Value of the tag to be reset.
new_value – Value of the tag to be set.
- Returns:
std::vector<std::string> List of modified items.
-
ScriptPipeline &set_pre_script(std::string pre_script)#
-
class GaugeParameters : public visionflow::param::IParameter#
Parameter type definition for gauge tool.
Public Functions
-
GaugeParameters &set_image_page(uint32_t index)#
Set the image page which the gauge tool will process. Default value is 0 if not set. Note that if you set an invalid index, an exception will be thrown at runtime.
- Parameters:
index – The index of the image page. in [0, image_page_count)
- Returns:
GaugeParameters& Returns a reference to the current object.
-
uint32_t get_image_page() const#
Get the image page index value.
- Returns:
uint32_t Returns the index of the image page.
-
GaugeParameters &set_classes_check(bool check)#
Check the output classes names or not. If this option is set to true, the value of the region name item should be one of the output classes, otherwise, an exception will be thrown. If this option is set to false, any string will be accepted as the region name item.
- Parameters:
check – The check flag. Default value is true.
- Returns:
GaugeParameters& Returns a reference to the current object.
-
bool get_classes_check() const#
Get the categories check option value.
- Returns:
bool Returns the value of the class check option.
-
GaugeParameters &set_classes(std::vector<std::string> classes)#
Set the output classes names that the output item should be one of.
- Parameters:
classes – Output classes names.
- Returns:
GaugeParameters& Returns a reference to the current object.
-
const std::vector<std::string> &get_classes() const#
Get the output classes names set in the parameter.
- Returns:
const std::vector<std::string>& Returns a constant reference to the output class names.
-
GaugeParameters &set_gauge_pipeline(ScriptPipeline pipeline)#
Set the gauge pipeline.
- Parameters:
pipeline – The solving pipeline.
- Returns:
GaugeParameters& Returns a reference to the current object.
-
ScriptPipeline &get_gauge_pipeline()#
Get mutable gauge pipeline object.
- Returns:
ScriptPipeline& Returns a reference to the mutable gauge pipeline object.
-
const ScriptPipeline &get_gauge_pipeline() const#
Get the constant reference of the gauge pipeline.
- Returns:
const ScriptPipeline& Returns a constant reference to the gauge pipeline.
-
GaugeParameters &set_out_items(std::vector<std::string> item_names)#
Set the items that need to be saved into the output property. The item is not exist or not created by the gauge pipeline will be ignored.
- Parameters:
item_names – the names of the items that need to be saved.
- Returns:
GaugeParameters& Returns a reference to the current object.
-
const std::vector<std::string> &get_out_items() const#
Get the out items that saved into the output property.
- Returns:
const std::vector<std::string>& Returns a constant reference to the out items.
-
GaugeParameters &set_region_name_item(std::string item_name)#
Set the region name item. The region name item should be a string, and must be created by the gauge pipeline, otherwise an error will be thrown by the gauge tool when executing.
The result of the region name item will be set as the region name. If the categories check option is set to true, the result of the region name item should be one of the output classes.
- Parameters:
item_name – The name of the region name item, which should be a string object and must be created by the gauge pipeline.
- Returns:
GaugeParameters& Returns a reference to the current object.
-
const std::string &get_region_name_item() const#
Get the item name that the value of which will be set as the region name.
- Returns:
const std::string& Returns a constant reference to the name of the region name item.
-
GaugeParameters &rename_item(const std::string &old_name, const std::string &new_name)#
Rename a solving item with new name. Different with ScriptPipeline::rename_item , This function will also rename all items in out items and the region name item if the old name is in out items or the region name item.
- Parameters:
old_name – The old solving item name.
new_name – The new solving item name. Note that the name should not be empty.
- Throws:
excepts::DataNotFound – If an solving item with old name does not exist.
excepts::DataAlreadyExists – If an solving item with new name already exists.
excepts::InvalidArgument – If the new name is empty.
-
GaugeParameters &set_image_page(uint32_t index)#
VLM Detection Parameters#
-
class VLMDetectionUniversalParameters : public visionflow::param::SchemableParameter#
VLMDetectionUniversalParameters Parameter class generated by jinja2 automatically.
VLM Detection Universal Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
VLMDetectionUniversalParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionUniversalParameters the reference of this object.
-
bool get_train_with_view_mask() const#
Get Train With View Masks.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Returns:
bool Train With View Masks
-
VLMDetectionUniversalParameters &set_train_with_view_mask(bool train_with_view_mask)#
Set Train With View Masks with bool value.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Parameters:
train_with_view_mask – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionUniversalParameters the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class VLMDetectionInferenceParameters : public visionflow::param::SchemableParameter#
VLMDetectionInferenceParameters Parameter class generated by jinja2 automatically.
VLM Detection Inference Parameters Group.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
double get_target_overlap_ratio() const#
Get Target Overlap Ratio.
Some redundant boxes will be removed to ensure that the intersection ratio between boxes does not exceed this value. target_overlap_ratio = intersection_area / Union_area.
See also
- Returns:
double Target Overlap Ratio
-
VLMDetectionInferenceParameters &set_target_overlap_ratio(double target_overlap_ratio)#
Set Target Overlap Ratio with double value.
Some redundant boxes will be removed to ensure that the intersection ratio between boxes does not exceed this value. target_overlap_ratio = intersection_area / Union_area.
See also
- Parameters:
target_overlap_ratio – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionInferenceParameters the reference of this object.
-
double get_threshold() const#
Get Confidence Threshold.
Greater than this threshold will be determined as a target.
See also
- Returns:
double Confidence Threshold
-
VLMDetectionInferenceParameters &set_threshold(double threshold)#
Set Confidence Threshold with double value.
Greater than this threshold will be determined as a target.
See also
- Parameters:
threshold – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionInferenceParameters the reference of this object.
-
const std::vector<std::string> &get_inference_classes() const#
Get Detection Classes.
All categories used in detection. Each category string consists of the visible character set of ASCII and cannot contain ‘(’, ‘)’, ‘_’. In addition, there cannot be whitespace characters at the beginning and end of the string, and it cannot contain two or more consecutive spaces.
See also
- Returns:
const std::vector<std::string> & Detection Classes
-
VLMDetectionInferenceParameters &set_inference_classes(std::vector<std::string> inference_classes)#
Set Detection Classes with std::vector<std::string> value.
All categories used in detection. Each category string consists of the visible character set of ASCII and cannot contain ‘(’, ‘)’, ‘_’. In addition, there cannot be whitespace characters at the beginning and end of the string, and it cannot contain two or more consecutive spaces.
See also
- Parameters:
inference_classes – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionInferenceParameters the reference of this object.
-
const std::string &get_inference_classes(size_t index) const#
Get value in Detection Classes with index.
Warning
The index must be less than get_inference_classes_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::string & value in Detection Classes at index.
-
virtual const std::string &schema_str() const override#
-
class VLMDetectionTrainingParameters : public visionflow::param::SchemableParameter#
VLMDetectionTrainingParameters Parameter class generated by jinja2 automatically.
VLM Detection Training Parameters Group
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
int get_epoch() const#
Get Epochs.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Returns:
int Epochs
-
VLMDetectionTrainingParameters &set_epoch(int epoch)#
Set Epochs with int value.
Number of iterations to train. 1 Epoch means all selected images will be trained for 1 time.
See also
- Parameters:
epoch – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionTrainingParameters the reference of this object.
-
int get_batch_size() const#
Get Training Batch Size.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16.
See also
- Returns:
int Training Batch Size
-
VLMDetectionTrainingParameters &set_batch_size(int batch_size)#
Set Training Batch Size with int value.
The number of images involved in training in each iteration of network training. A suitable batch size can make full use of hardware and improve the convergence speed. Common values are 4, 8, and 16.
See also
- Parameters:
batch_size – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionTrainingParameters the reference of this object.
-
uint32_t get_training_image_page() const#
Get Select Visual Image Page.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Returns:
uint32_t Select Visual Image Page
-
VLMDetectionTrainingParameters &set_training_image_page(uint32_t training_image_page)#
Set Select Visual Image Page with uint32_t value.
The index of the visual image page to be trained. Use the first page as the default.
See also
- Parameters:
training_image_page – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionTrainingParameters the reference of this object.
-
bool get_train_with_view_mask() const#
Get Train With View Masks.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Returns:
bool Train With View Masks
-
VLMDetectionTrainingParameters &set_train_with_view_mask(bool train_with_view_mask)#
Set Train With View Masks with bool value.
If view masks is enabled during training, images and labels in the view mask region will be masked out before training; otherwise, view masks is only used to filter inference results.
See also
- Parameters:
train_with_view_mask – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionTrainingParameters the reference of this object.
-
bool get_only_check() const#
Get Only Check.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Returns:
bool Only Check
-
VLMDetectionTrainingParameters &set_only_check(bool only_check)#
Set Only Check with bool value.
Default is False. If set to True, the trainer will only check if it is possible to train in the given training mode without actually performing the training.
See also
- Parameters:
only_check – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionTrainingParameters the reference of this object.
-
const std::vector<std::string> &get_training_classes() const#
Get Detection Classes.
All categories used in detection. Each category string consists of the visible character set of ASCII and cannot contain ‘(’, ‘)’, ‘_’. In addition, there cannot be whitespace characters at the beginning and end of the string, and it cannot contain two or more consecutive spaces.
See also
- Returns:
const std::vector<std::string> & Detection Classes
-
VLMDetectionTrainingParameters &set_training_classes(std::vector<std::string> training_classes)#
Set Detection Classes with std::vector<std::string> value.
All categories used in detection. Each category string consists of the visible character set of ASCII and cannot contain ‘(’, ‘)’, ‘_’. In addition, there cannot be whitespace characters at the beginning and end of the string, and it cannot contain two or more consecutive spaces.
See also
- Parameters:
training_classes – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
VLMDetectionTrainingParameters the reference of this object.
-
const std::string &get_training_classes(size_t index) const#
Get value in Detection Classes with index.
Warning
The index must be less than get_training_classes_size(). otherwise, the behavior is undefined and will cause segmentation fault.
- Returns:
const std::string & value in Detection Classes at index.
-
virtual const std::string &schema_str() const override#
以下参数项仅为示例#
-
enum visionflow::param::ExampleAugmentType#
Values:
-
enumerator kExampleSelect = 0#
-
enumerator kExampleSecondSelect = 1#
-
enumerator kExampleOther = 2#
-
enumerator kExampleSelect = 0#
-
class ExampleAugRotate : public visionflow::param::ISchemable#
ExampleAugRotate Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ExampleAugRotate &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugRotate the reference of this object.
-
double get_rotate_angle() const#
Get Rotate Angle.
Rotate angle
See also
- Returns:
double Rotate Angle
-
ExampleAugRotate &set_rotate_angle(double rotate_angle)#
Set Rotate Angle with double value.
Rotate angle
See also
- Parameters:
rotate_angle – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugRotate the reference of this object.
-
bool get_flip_horizontal() const#
Get Flip Horizontal.
Flip horizontal
See also
- Returns:
bool Flip Horizontal
-
ExampleAugRotate &set_flip_horizontal(bool flip_horizontal)#
Set Flip Horizontal with bool value.
Flip horizontal
See also
- Parameters:
flip_horizontal – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugRotate the reference of this object.
-
bool get_flip_vertical() const#
Get Flip Vertical.
Flip vertical
See also
- Returns:
bool Flip Vertical
-
ExampleAugRotate &set_flip_vertical(bool flip_vertical)#
Set Flip Vertical with bool value.
Flip vertical
See also
- Parameters:
flip_vertical – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugRotate the reference of this object.
-
const ExampleAugShift &get_shift_in_rotate() const#
Get Shift.
See also
- Returns:
const ExampleAugShift & Shift
-
ExampleAugRotate &set_shift_in_rotate(ExampleAugShift shift_in_rotate)#
Set Shift with ExampleAugShift value.
See also
- Parameters:
shift_in_rotate – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugRotate the reference of this object.
-
ExampleAugShift &get_shift_in_rotate()#
Get mutable reference of Shift.
- Returns:
ExampleAugRotate& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#
-
class ExampleAugShift : public visionflow::param::ISchemable#
ExampleAugShift Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ExampleAugShift &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugShift the reference of this object.
-
double get_shift_width() const#
Get Shift Width.
Shift width
See also
- Returns:
double Shift Width
-
ExampleAugShift &set_shift_width(double shift_width)#
Set Shift Width with double value.
Shift width
See also
- Parameters:
shift_width – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugShift the reference of this object.
-
double get_shift_height() const#
Get Shift Height.
Shift height
See also
- Returns:
double Shift Height
-
ExampleAugShift &set_shift_height(double shift_height)#
Set Shift Height with double value.
Shift height
See also
- Parameters:
shift_height – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugShift the reference of this object.
-
virtual const std::string &schema_str() const override#
-
class ExampleAugments : public visionflow::param::SchemableParameter#
ExampleAugments Parameter class generated by jinja2 automatically.
Public Functions
-
virtual const std::string &schema_str() const override#
Get the json schema of the class.
- Returns:
std::string the json schema string.
-
virtual const void *schema() const override#
Get nlohmann::json object pointer.
As most user not config the nlohmann::json library, we convert it as void pointer to avoid exposing types from third-party libraries to users.
Note
As this interface is a virtual function, we can not hide it with macro.
Warning
Do not edit return value.
- Returns:
void* The nlohmann::json object pointer
-
bool get_enable() const#
Get Enable.
Enable this parameter group.
See also
- Returns:
bool Enable
-
ExampleAugments &set_enable(bool enable)#
Set Enable with bool value.
Enable this parameter group.
See also
- Parameters:
enable – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugments the reference of this object.
-
const ExampleAugmentType &get_example_select() const#
Get Example Select Option.
Example select option
See also
- Returns:
const ExampleAugmentType & Example Select Option
-
ExampleAugments &set_example_select(ExampleAugmentType example_select)#
Set Example Select Option with ExampleAugmentType value.
Example select option
See also
- Parameters:
example_select – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugments the reference of this object.
-
const ExampleAugShift &get_shift() const#
Get Shift.
Shift augments
See also
- Returns:
const ExampleAugShift & Shift
-
ExampleAugments &set_shift(ExampleAugShift shift)#
Set Shift with ExampleAugShift value.
Shift augments
See also
- Parameters:
shift – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugments the reference of this object.
-
ExampleAugShift &get_shift()#
Get mutable reference of Shift.
Shift augments
- Returns:
ExampleAugments& the mutable reference of the group.
-
const ExampleAugRotate &get_ctm_rotate() const#
Get CustomizeRotate.
Rotate augments
See also
- Returns:
const ExampleAugRotate & CustomizeRotate
-
ExampleAugments &set_ctm_rotate(ExampleAugRotate ctm_rotate)#
Set CustomizeRotate with ExampleAugRotate value.
Rotate augments
See also
- Parameters:
ctm_rotate – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugments the reference of this object.
-
ExampleAugRotate &get_ctm_rotate()#
Get mutable reference of CustomizeRotate.
Rotate augments
- Returns:
ExampleAugments& the mutable reference of the group.
-
const ExampleAugRotate &get_rotate() const#
Get Rotate.
Rotate augments
See also
- Returns:
const ExampleAugRotate & Rotate
-
ExampleAugments &set_rotate(ExampleAugRotate rotate)#
Set Rotate with ExampleAugRotate value.
Rotate augments
See also
- Parameters:
rotate – the value to set.
- Throws:
visionflow::excepts::JsonSchemaValidationError – if validate the value with json schema failed.
- Returns:
ExampleAugments the reference of this object.
-
ExampleAugRotate &get_rotate()#
Get mutable reference of Rotate.
Rotate augments
- Returns:
ExampleAugments& the mutable reference of the group.
-
virtual const std::string &schema_str() const override#