Versions in this module Expand all Collapse all v0 v0.1.0 Jan 26, 2022 Changes in this version + const COCO_PERSON + const ClassesOffset + const NClasses + const NPreds + const PredSize + var ColorModel = color.ModelFunc(rgbModel) + func FlattenDim(shape []int64) int + func GetAndResetLastErr() *C.char + func Iou(b1, b2 Bbox) (retVal float64) + func TorchErr() error + type Bbox struct + type ByConfBbox []Bbox + func (bb ByConfBbox) Len() int + func (bb ByConfBbox) Less(i, j int) bool + func (bb ByConfBbox) Swap(i, j int) + type Cmodule = C.module + type Ctensor = C.tensor + type DeviceType = int32 + const DeviceCPU + const DeviceGPU + func DeviceCudaIfAvailable() DeviceType + type Prediction struct + ClassConfidence float64 + ClassIndex uint + Confidence float64 + Rect image.Rectangle + type RGB struct + B uint8 + G uint8 + R uint8 + func (c RGB) RGBA() (r, g, b, a uint32) + type Tensor struct + Pix []uint8 + Rect image.Rectangle + Stride int + func NewTensor(r image.Rectangle) *Tensor + func NewTensorFromImage(i image.Image) *Tensor + func (img *Tensor) DrawRect(rect image.Rectangle, col color.Color) + func (img *Tensor) HLine(x1, y, x2 int, col color.Color) + func (img *Tensor) Resize(targetSize int) (*Tensor, float64, error) + func (img *Tensor) VLine(x, y1, y2 int, col color.Color) + func (p *Tensor) At(x, y int) color.Color + func (p *Tensor) Bounds() image.Rectangle + func (p *Tensor) ColorModel() color.Model + func (p *Tensor) PixOffset(x, y int) int + func (p *Tensor) RGBAAt(x, y int) color.RGBA + func (p *Tensor) Set(x, y int, c color.Color) + func (p *Tensor) ToSquareShape() (*Tensor, int, int, error) + func (ts *Tensor) Drop() error + func (ts *Tensor) Numel() uint + func (ts *Tensor) Size() ([]int64, error) + type YoloV5 struct + func NewYoloV5(path string, device DeviceType, size int, half bool) (*YoloV5, error) + func (yolov5 *YoloV5) Infer(inputTensorRaw *Tensor, confidenceThreshold float32, nmsThreshold float64, ...) ([][]Prediction, error)