first commit
This commit is contained in:
commit
3553790475
27 files changed
+3839
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package vision
|
||||
|
||||
import (
|
||||
"context"
|
||||
"image"
|
||||
)
|
||||
|
||||
// Detection 是一条本地检测结果。
|
||||
type Detection struct {
|
||||
Label string
|
||||
Score float32
|
||||
Box image.Rectangle
|
||||
}
|
||||
|
||||
// Detector 是本地视觉检测器(例如 YOLO)的抽象。
|
||||
//
|
||||
// 第一版不启用:屏幕理解的准确率由视觉大模型直接读取截图来保证,
|
||||
// 帧差指纹负责"要不要问"。二期若需要隐私打码或题目区域定位,
|
||||
// 实现该接口挂到 agent 上即可,主链路不用改。
|
||||
type Detector interface {
|
||||
// Name 返回检测器名称,用于日志。
|
||||
Name() string
|
||||
// Detect 对整帧图像做检测。
|
||||
Detect(ctx context.Context, img image.Image) ([]Detection, error)
|
||||
}
|
||||
Reference in new issue
Block a user