Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrawPoseResult ¶
func DrawPoseResult(img image.Image, results []PoseResult) image.Image
DrawPoseResult 将骨架绘制到图片上
Params: ¶
img: 原图 results: 姿态结果
Types ¶
type ClassResult ¶
type ClassResult struct {
// 分类ID,例如:
// 436: station wagon
// 656: minivan
// 详细映射参考:
// https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/ImageNet.yaml
ClassID int
Score float32
}
ClassResult 分类结果
type ClsEngine ¶
type ClsEngine struct {
// contains filtered or unexported fields
}
ClsEngine YOLOv11-cls Engine
type Config ¶
type Config struct {
ModelPath string // ONNX 模型路径
OnnxRuntimeLibPath string // ONNX Runtime 动态库路径
// 推理参数
ConfThreshold float32 // 置信度阈值 (默认 0.45)
IOUThreshold float32 // NMS IOU 阈值 (默认 0.5)
MaskThreshold float32 // Mask 二值化阈值 (默认 0.5)
// 模型参数
InputSize int // 默认 640
NumClasses int // 默认 80
NumMaskCoeffs int // 默认 32
NumKeyPoints int // 默认 17
// 可选参数
UseCuda bool // (可选) 是否启用 CUDA
NumThreads int // (可选) ONNX 线程数, 默认由CPU核心数决定
EnableCpuMemArena bool // (可选) 是否开启 ONNX 内存池
}
Config 引擎的初始化参数
type DetEngine ¶
type DetEngine struct {
// contains filtered or unexported fields
}
DetEngine YOLOv11-det Engine
type DetResult ¶
type DetResult struct {
// 分类ID,例如:
// 0: person
// 1: bicycle
// 2: car
// - 详细映射参考:
// https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml
ClassID int
Score float32
Box image.Rectangle // 检测框
}
DetResult 目标检测结果
type OBBEngine ¶
type OBBEngine struct {
// contains filtered or unexported fields
}
OBBEngine YOLOv11-OBB Engine
type OBBResult ¶
type OBBResult struct {
ClassID int
Score float32
// 旋转框的顶点坐标:TopLeft, TopRight, BottomRight, BottomLeft
Corners [4]image.Point
Center image.Point
Angle float32 // 弧度
}
OBBResult 旋转目标检测结果
type PoseEngine ¶
type PoseEngine struct {
// contains filtered or unexported fields
}
PoseEngine YOLOv11-pose Engine
func (*PoseEngine) Predict ¶
func (e *PoseEngine) Predict(img image.Image) ([]PoseResult, error)
Predict 执行姿态估计
type PoseResult ¶
type PoseResult struct {
ClassID int
Score float32
Box image.Rectangle
KeyPoints []KeyPoint // 关键点列表
}
PoseResult 姿态估计结果
Click to show internal directories.
Click to hide internal directories.