ms-types 0.6.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ms-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"vitepress": "^1.6.4",
|
|
20
|
-
"vitepress-theme-teek": "^1.5.
|
|
21
|
-
"wrangler": "^4.
|
|
20
|
+
"vitepress-theme-teek": "^1.5.7",
|
|
21
|
+
"wrangler": "^4.85.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/types/yolo.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ declare namespace yolo {
|
|
|
53
53
|
* @param binPath ncnn模型的bin文件绝对路径
|
|
54
54
|
* @param nc 模型的标签数量,可在标签集data.yaml中看到
|
|
55
55
|
* @param version 模型版本,默认11, 支持 8 11 26
|
|
56
|
+
* @param useGpu 是否使用 GPU 加载
|
|
56
57
|
* @returns 加载成功返回模型ID字符串,失败返回null
|
|
57
58
|
* @example
|
|
58
59
|
* const modelId = yolo.load("yolov8n.param", "yolov8n.bin", 80)
|
|
@@ -61,13 +62,15 @@ declare namespace yolo {
|
|
|
61
62
|
paramPath: string,
|
|
62
63
|
binPath: string,
|
|
63
64
|
nc: number,
|
|
64
|
-
version?: number
|
|
65
|
+
version?: number,
|
|
66
|
+
useGpu?: boolean,
|
|
65
67
|
): string | null;
|
|
66
68
|
/**
|
|
67
69
|
* 加载YOLOv11模型 (兼容 yolov8 模型)
|
|
68
70
|
* @param paramPath ncnn模型的param文件的绝对路径
|
|
69
71
|
* @param binPath ncnn模型的bin文件绝对路径
|
|
70
72
|
* @param nc 模型的标签数量,可在标签集data.yaml中看到
|
|
73
|
+
* @param useGpu 是否使用 GPU 加载
|
|
71
74
|
* @returns 加载成功返回模型ID字符串,失败返回null
|
|
72
75
|
* @example
|
|
73
76
|
* const modelId = yolo.loadV11("yolov11n.param", "yolov11n.bin", 80)
|
|
@@ -75,7 +78,8 @@ declare namespace yolo {
|
|
|
75
78
|
function loadV11(
|
|
76
79
|
paramPath: string,
|
|
77
80
|
binPath: string,
|
|
78
|
-
nc: number
|
|
81
|
+
nc: number,
|
|
82
|
+
useGpu?: boolean,
|
|
79
83
|
): string | null;
|
|
80
84
|
|
|
81
85
|
/**
|
|
@@ -94,7 +98,7 @@ declare namespace yolo {
|
|
|
94
98
|
img: string,
|
|
95
99
|
targetSize?: number,
|
|
96
100
|
threshold?: number,
|
|
97
|
-
nmsThreshold?: number
|
|
101
|
+
nmsThreshold?: number,
|
|
98
102
|
): YoloResult[];
|
|
99
103
|
|
|
100
104
|
/**
|
|
@@ -56,6 +56,7 @@ declare namespace $YOLO {
|
|
|
56
56
|
* @param ncnn模型的bin文件路径 ncnn模型的bin文件绝对路径
|
|
57
57
|
* @param 标签数量 模型的标签数量,可在标签集data.yaml中看到
|
|
58
58
|
* @param 模型版本 模型版本,默认11, 支持 8 11 26
|
|
59
|
+
* @param useGpu 是否使用 GPU 加载
|
|
59
60
|
* @returns 加载成功返回模型ID字符串,失败返回null
|
|
60
61
|
* @example
|
|
61
62
|
* const 模型ID = $YOLO.加载模型("yolov8n.param", "yolov8n.bin", 80)
|
|
@@ -64,7 +65,8 @@ declare namespace $YOLO {
|
|
|
64
65
|
ncnn模型的param文件路径: 字符串,
|
|
65
66
|
ncnn模型的bin文件路径: 字符串,
|
|
66
67
|
标签数量: 数字,
|
|
67
|
-
模型版本?:
|
|
68
|
+
模型版本?: 数字,
|
|
69
|
+
useGpu?: 布尔值,
|
|
68
70
|
): 字符串 | null;
|
|
69
71
|
|
|
70
72
|
/**
|
|
@@ -72,6 +74,7 @@ declare namespace $YOLO {
|
|
|
72
74
|
* @param ncnn模型的param文件路径
|
|
73
75
|
* @param ncnn模型的bin文件路径
|
|
74
76
|
* @param 标签数量 模型的标签数量,可在标签集data.yaml中看到
|
|
77
|
+
* @param useGpu 是否使用 GPU 加载
|
|
75
78
|
* @returns 加载成功返回模型ID字符串,失败返回null
|
|
76
79
|
* @example
|
|
77
80
|
* const 模型ID = $YOLO.加载YOLOv11模型("yolov11n.param", "yolov11n.bin", 80)
|
|
@@ -79,7 +82,8 @@ declare namespace $YOLO {
|
|
|
79
82
|
function 加载YOLOv11模型(
|
|
80
83
|
ncnn模型的param文件路径: 字符串,
|
|
81
84
|
ncnn模型的bin文件路径: 字符串,
|
|
82
|
-
标签数量:
|
|
85
|
+
标签数量: 数字,
|
|
86
|
+
useGpu?: 布尔值,
|
|
83
87
|
): 字符串 | null;
|
|
84
88
|
|
|
85
89
|
/**
|
|
@@ -98,7 +102,7 @@ declare namespace $YOLO {
|
|
|
98
102
|
图片ID: 字符串,
|
|
99
103
|
目标检测输入大小?: 数字,
|
|
100
104
|
置信度?: 数字,
|
|
101
|
-
重叠阈值?:
|
|
105
|
+
重叠阈值?: 数字,
|
|
102
106
|
): 数组<Yolo检测结果>;
|
|
103
107
|
|
|
104
108
|
/**
|