mlvision

package
v0.55.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package mlvision uses an underlying model from the ML model service as a vision model, and wraps the ML model with the vision service methods.

Index

Constants

View Source
const (
	// UInt8 is one of the possible input/output types for tensors.
	UInt8 = "uint8"
	// Float32 is one of the possible input/output types for tensors.
	Float32 = "float32"
	// DefaultOutTensorName is the prefix key given to output tensors in the map
	// if there is no metadata. (output0, output1, etc.)
	DefaultOutTensorName = "output"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MLModelConfig

type MLModelConfig struct {
	ModelName        string            `json:"mlmodel_name"`
	RemapInputNames  map[string]string `json:"remap_input_names"`
	RemapOutputNames map[string]string `json:"remap_output_names"`
	BoxOrder         []int             `json:"xmin_ymin_xmax_ymax_order"`
	// optional parameter used to normalize the input image if the ML Model expects it
	MeanValue []float32 `json:"input_image_mean_value"`
	// optional parameter used to normalize the input image if the ML Model expects it
	StdDev []float32 `json:"input_image_std_dev"`
	// optional parameter used to change the input image to BGR format if the ML Model expects it
	IsBGR              bool               `json:"input_image_bgr"`
	DefaultConfidence  float64            `json:"default_minimum_confidence"`
	LabelConfidenceMap map[string]float64 `json:"label_confidences"`
	LabelPath          string             `json:"label_path"`
}

MLModelConfig specifies the parameters needed to turn an ML model into a vision Model.

func (*MLModelConfig) Validate added in v0.8.0

func (conf *MLModelConfig) Validate(path string) ([]string, error)

Validate will add the ModelName as an implicit dependency to the robot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL