Documentation
¶
Index ¶
- func Accelerator() *nnaccel.Accelerator
- func DownloadModel(logs logs.Log, device *nnaccel.Device, modelDir, modelName string, ...) error
- func HaveAccelerator() bool
- func HaveHailo() bool
- func LoadAccelerators(logs logs.Log, enableHailo bool)
- func LoadModel(logs logs.Log, device *nnaccel.Device, modelDir, modelName string, ...) (nn.ObjectDetector, error)
- func ModelFiles(device *nnaccel.Device, modelName string) (subdir string, ext []string)
- func ModelStub(modelName string, width, height int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accelerator ¶
func Accelerator() *nnaccel.Accelerator
Return the NN accelerator that we choose to use (or nil if we must use NCNN)
func DownloadModel ¶
func DownloadModel(logs logs.Log, device *nnaccel.Device, modelDir, modelName string, width, height int) error
If the model files are not yet downloaded, then download them now. Returns immediately if the files are already downloaded.
func HaveAccelerator ¶
func HaveAccelerator() bool
Return true if we are using a hardware NN accelerator
func LoadAccelerators ¶
func LoadModel ¶
func LoadModel(logs logs.Log, device *nnaccel.Device, modelDir, modelName string, width, height int, threadingMode nn.ThreadingMode, modelSetup *nn.ModelSetup) (nn.ObjectDetector, error)
LoadModel loads a neural network from disk. If the model consists of several files, then modelName is the base filename, without the extensions. modelName example is "yolov8m"
func ModelFiles ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.