Documentation
¶
Index ¶
- Constants
- func ColorFormatBGR(r, g, b float32) (first, second, third float32)
- func ColorFormatRGB(r, g, b float32) (first, second, third float32)
- type Classifier
- type ColorFormatFunc
- type Config
- type CoreMLConfig
- type CudaConfig
- type DirectMLConfig
- type LabelProb
- type OpenVINOConfig
- type Output
- type ProcessFloatImageFunc
- type ProcessImageFunc
- type SessionConfig
- type Shape
- type TensorRTConfig
Constants ¶
View Source
const ( BCHW = iota BHWC )
Variables ¶
This section is empty.
Functions ¶
func ColorFormatBGR ¶
func ColorFormatRGB ¶
Types ¶
type Classifier ¶
type Classifier struct {
// contains filtered or unexported fields
}
func NewClassifier ¶
func NewClassifier(conf *Config, sessionConf *SessionConfig) (*Classifier, error)
func (*Classifier) Close ¶
func (c *Classifier) Close()
type ColorFormatFunc ¶
type Config ¶
type Config struct {
ModelPath string
Width, Height int
OutputLabels map[int][]string
Shape Shape
ColorFormatFunc ColorFormatFunc
ProcessImageFuncs []ProcessImageFunc
ProcessFloatImageFuncs []ProcessFloatImageFunc
}
type CoreMLConfig ¶
type CoreMLConfig struct {
Enabled bool
//https://github.com/microsoft/onnxruntime/blob/291a5352b27ded5714e5748b381f2efb88f28fb9/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h#L12
Flags uint32
}
type CudaConfig ¶
type CudaConfig struct {
Enabled bool
// https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#configuration-options
Options map[string]string
}
type DirectMLConfig ¶
type OpenVINOConfig ¶
type OpenVINOConfig struct {
Enabled bool
//https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html#summary-of-options
Options map[string]string
}
type ProcessFloatImageFunc ¶
func Normalize ¶
func Normalize(mean, std float32) ProcessFloatImageFunc
func Rescale ¶
func Rescale() ProcessFloatImageFunc
type ProcessImageFunc ¶
func ResizeImage ¶
func ResizeImage(size int, interp resize.InterpolationFunction) ProcessImageFunc
func ResizeWithPadding ¶
func ResizeWithPadding(size int, padColor color.Color, interp resize.InterpolationFunction) ProcessImageFunc
type SessionConfig ¶
type SessionConfig struct {
Cuda CudaConfig
TensortRT TensorRTConfig
CoreML CoreMLConfig
DirectML DirectMLConfig
CpuMemArena *bool
MemPattern *bool
InterOpNumThreads int
IntraOpNumThreads int
}
type TensorRTConfig ¶
type TensorRTConfig struct {
Enabled bool
// https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html#execution-provider-options
Options map[string]string
}
Click to show internal directories.
Click to hide internal directories.