Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CError ¶
Consume a C heap allocated char* and return it as a Go error. Before returning, free the C char*. If the input is NULL, then return nil.
func PageAlignedAlloc ¶
Allocate 'size' bytes of memory, aligned to a page boundary.
func RoundUpToPageSize ¶
Round size up to the nearest page size
Types ¶
type Accelerator ¶
type Accelerator struct {
// contains filtered or unexported fields
}
func Load ¶
func Load(accelName string) (*Accelerator, error)
Load an NN accelerator. At present, the only accelerator we have is "hailo"
func (*Accelerator) OpenDevice ¶
func (m *Accelerator) OpenDevice() (*Device, error)
Open a new device (eg a handle to a GPU or a Hailo accelerator) A device must be closed after using.
func (*Accelerator) StatusToErr ¶
func (m *Accelerator) StatusToErr(status C.int) error
type AsyncJob ¶
type AsyncJob struct {
// contains filtered or unexported fields
}
func (*AsyncJob) GetObjectDetections ¶
func (j *AsyncJob) GetObjectDetections(batchEl int) ([]nn.ObjectDetection, error)
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func (*Device) ModelFiles ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (*Model) Config ¶
func (m *Model) Config() *nn.ModelConfig
func (*Model) DetectObjects ¶
func (m *Model) DetectObjects(batch nn.ImageBatch, params *nn.DetectionParams) ([][]nn.ObjectDetection, error)
Detection thresholds are ignored here. They need to be setup when the model is initially loaded.
Click to show internal directories.
Click to hide internal directories.