Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDeviceCount ¶ added in v1.3.1
func GetDeviceCount() int
func GetDeviceName ¶ added in v1.3.1
Types ¶
type BBOX ¶ added in v1.3.1
type BBOX struct { Rect image.Rectangle // (x,y) - top-left corner, (w, h) - width & height of bounded box Confidence float32 // confidence - probability that the object was found correctly ObjId uint // class of object - from range [0, classes-1] TrackId uint // tracking id for video (0 - untracked, 1 - inf - tracked object) FramesCounter uint // counter of frames on which the object was detected X3d, Y3d, Z3d float32 // center of object (in Meters) if ZED 3D Camera is used }
func DetectImageMat ¶ added in v1.3.1
type BoundingBox ¶
BoundingBox represents a bounding box.
type DarknetImage ¶
DarknetImage represents the image buffer.
func Float32ToDarknetImage ¶
func Float32ToDarknetImage(flatten []float32, width, height int) (*DarknetImage, error)
Float32ToDarknetImage Converts []float32 to darknet image
func Image2Float32 ¶
func Image2Float32(img image.Image) (*DarknetImage, error)
Image2Float32 Returns []float32 representation of image.Image
type Detection ¶
type Detection struct { BoundingBox ClassIDs []int ClassNames []string Probabilities []float32 }
Detection represents a detection.
type DetectionResult ¶
type DetectionResult struct { Detections []*Detection NetworkOnlyTimeTaken time.Duration OverallTimeTaken time.Duration }
DetectionResult represents the inference results from the network.
type YOLONetwork ¶
type YOLONetwork struct { GPUDeviceIndex int NetworkConfigurationFile string WeightsFile string Threshold float32 ClassNames []string Classes int // contains filtered or unexported fields }
YOLONetwork represents a neural network using YOLO.
func (*YOLONetwork) Detect ¶
func (n *YOLONetwork) Detect(img *DarknetImage) (*DetectionResult, error)
Detect specified image
Click to show internal directories.
Click to hide internal directories.