nnload

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 HaveHailo

func HaveHailo() bool

Return true if we have a Hailo accelerator

func LoadAccelerators

func LoadAccelerators(logs logs.Log, enableHailo bool)

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

func ModelFiles(device *nnaccel.Device, modelName string) (subdir string, ext []string)

func ModelStub

func ModelStub(modelName string, width, height int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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