ms-types 0.4.13 → 0.4.15

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.
Files changed (49) hide show
  1. package/package.json +22 -22
  2. package/types/action.d.ts +296 -296
  3. package/types/appleocr.d.ts +102 -102
  4. package/types/config.d.ts +97 -97
  5. package/types/cryptoUtils.d.ts +59 -59
  6. package/types/device.d.ts +117 -117
  7. package/types/global.d.ts +230 -230
  8. package/types/hid.d.ts +329 -329
  9. package/types/hotUpdate.d.ts +104 -104
  10. package/types/http.d.ts +300 -300
  11. package/types/image.d.ts +19 -0
  12. package/types/ime.d.ts +99 -99
  13. package/types/index.d.ts +27 -27
  14. package/types/media.d.ts +101 -101
  15. package/types/mysql.d.ts +174 -174
  16. package/types/netCard.d.ts +77 -77
  17. package/types/node.d.ts +292 -292
  18. package/types/paddleocr.d.ts +73 -73
  19. package/types/pip.d.ts +51 -51
  20. package/types/system.d.ts +225 -225
  21. package/types/thread.d.ts +42 -42
  22. package/types/tomatoocr.d.ts +209 -209
  23. package/types/tts.d.ts +91 -91
  24. package/types/ui.d.ts +185 -185
  25. package/types/utils.d.ts +77 -77
  26. package/types/yolo.d.ts +114 -114
  27. package/types/zh/HID/346/250/241/345/235/227.d.ts +333 -333
  28. package/types/zh/HTTP/346/250/241/345/235/227.d.ts +301 -301
  29. package/types/zh/MySql/346/250/241/345/235/227.d.ts +175 -175
  30. package/types/zh/PaddleOCR/346/250/241/345/235/227.d.ts +74 -74
  31. package/types/zh/YOLO/346/250/241/345/235/227.d.ts +118 -118
  32. package/types/zh/index.d.ts +24 -24
  33. package/types/zh//345/205/250/345/261/200/346/250/241/345/235/227.d.ts +220 -220
  34. package/types/zh//345/212/250/344/275/234/346/250/241/345/235/227.d.ts +298 -298
  35. package/types/zh//345/215/241/345/257/206/346/250/241/345/235/227.d.ts +90 -90
  36. package/types/zh//345/233/276/347/211/207/346/250/241/345/235/227.d.ts +19 -0
  37. package/types/zh//345/252/222/344/275/223/346/250/241/345/235/227.d.ts +102 -102
  38. package/types/zh//345/267/245/345/205/267/346/250/241/345/235/227.d.ts +77 -77
  39. package/types/zh//346/202/254/346/265/256/347/252/227/346/250/241/345/235/227.d.ts +55 -55
  40. package/types/zh//346/226/207/345/255/227/350/275/254/350/257/255/351/237/263/346/250/241/345/235/227.d.ts +92 -92
  41. package/types/zh//347/203/255/346/233/264/346/226/260/346/250/241/345/235/227.d.ts +105 -105
  42. package/types/zh//347/263/273/347/273/237/346/250/241/345/235/227.d.ts +225 -225
  43. package/types/zh//347/272/277/347/250/213/346/250/241/345/235/227.d.ts +43 -43
  44. package/types/zh//350/212/202/347/202/271/346/250/241/345/235/227.d.ts +290 -290
  45. package/types/zh//350/213/271/346/236/234OCR.d.ts +104 -104
  46. package/types/zh//350/247/206/345/233/276/346/250/241/345/235/227.d.ts +90 -90
  47. package/types/zh//350/256/276/345/244/207/346/250/241/345/235/227.d.ts +118 -118
  48. package/types/zh//350/276/223/345/205/245/346/263/225/346/250/241/345/235/227.d.ts +100 -100
  49. package/types/zh//351/205/215/347/275/256/346/250/241/345/235/227.d.ts +99 -99
package/types/yolo.d.ts CHANGED
@@ -1,114 +1,114 @@
1
- /**
2
- * YOLO目标检测模块 包含加载模型、目标检测等功能
3
- */
4
- declare namespace yolo {
5
- /**
6
- * YOLO检测结果
7
- */
8
- interface YoloResult {
9
- /**
10
- * 检测框的左上角x坐标
11
- */
12
- x: number;
13
- /**
14
- * 检测框的左上角y坐标
15
- */
16
- y: number;
17
- /**
18
- * 检测框的右下角x坐标
19
- */
20
- ex: number;
21
- /**
22
- * 检测框的右下角y坐标
23
- */
24
- ey: number;
25
- /**
26
- * 检测框的中心点x坐标
27
- */
28
- centerX: number;
29
- /**
30
- * 检测框的中心点y坐标
31
- */
32
- centerY: number;
33
- /**
34
- * 检测框的宽度
35
- */
36
- width: number;
37
- /**
38
- * 检测框的高度
39
- */
40
- height: number;
41
- /**
42
- * 检测框的置信度
43
- */
44
- confidence: number;
45
- /**
46
- * 检测框的类别ID
47
- */
48
- classId: number;
49
- }
50
- /**
51
- * 加载YOLO模型
52
- * @param paramPath ncnn模型的param文件的绝对路径
53
- * @param binPath ncnn模型的bin文件绝对路径
54
- * @param nc 模型的标签数量,可在标签集data.yaml中看到
55
- * @param version 模型版本,默认11, 支持 8 11 26
56
- * @returns 加载成功返回模型ID字符串,失败返回null
57
- * @example
58
- * const modelId = yolo.load("yolov8n.param", "yolov8n.bin", 80)
59
- */
60
- function load(
61
- paramPath: string,
62
- binPath: string,
63
- nc: number,
64
- version?: number
65
- ): string | null;
66
- /**
67
- * 加载YOLOv11模型 (兼容 yolov8 模型)
68
- * @param paramPath ncnn模型的param文件的绝对路径
69
- * @param binPath ncnn模型的bin文件绝对路径
70
- * @param nc 模型的标签数量,可在标签集data.yaml中看到
71
- * @returns 加载成功返回模型ID字符串,失败返回null
72
- * @example
73
- * const modelId = yolo.loadV11("yolov11n.param", "yolov11n.bin", 80)
74
- */
75
- function loadV11(
76
- paramPath: string,
77
- binPath: string,
78
- nc: number
79
- ): string | null;
80
-
81
- /**
82
- * 目标检测
83
- * @param modelId 模型ID
84
- * @param img 图像ID,"screen"用当前屏幕检测,可以填入图像ID或者http图片地址或文件地址
85
- * @param targetSize 图像进入后缩放的检测大小,模型训练一般都用640,因此这里的640一般不要改
86
- * @param threshold 置信度,默认0.4,小于这个值的会被过滤掉
87
- * @param nmsThreshold 重叠阈值,一般是0.5不需要更改
88
- * @returns 检测结果数组
89
- * @example
90
- * const results = yolo.detect(modelId, "screen", 640, 0.4, 0.5)
91
- */
92
- function detect(
93
- modelId: string,
94
- img: string,
95
- targetSize?: number,
96
- threshold?: number,
97
- nmsThreshold?: number
98
- ): YoloResult[];
99
-
100
- /**
101
- * 释放指定模型资源
102
- * @param modelId 模型ID
103
- * @example
104
- * yolo.free(modelId)
105
- */
106
- function free(modelId: string): void;
107
-
108
- /**
109
- * 释放所有模型资源
110
- * @example
111
- * yolo.freeAll()
112
- */
113
- function freeAll(): void;
114
- }
1
+ /**
2
+ * YOLO目标检测模块 包含加载模型、目标检测等功能
3
+ */
4
+ declare namespace yolo {
5
+ /**
6
+ * YOLO检测结果
7
+ */
8
+ interface YoloResult {
9
+ /**
10
+ * 检测框的左上角x坐标
11
+ */
12
+ x: number;
13
+ /**
14
+ * 检测框的左上角y坐标
15
+ */
16
+ y: number;
17
+ /**
18
+ * 检测框的右下角x坐标
19
+ */
20
+ ex: number;
21
+ /**
22
+ * 检测框的右下角y坐标
23
+ */
24
+ ey: number;
25
+ /**
26
+ * 检测框的中心点x坐标
27
+ */
28
+ centerX: number;
29
+ /**
30
+ * 检测框的中心点y坐标
31
+ */
32
+ centerY: number;
33
+ /**
34
+ * 检测框的宽度
35
+ */
36
+ width: number;
37
+ /**
38
+ * 检测框的高度
39
+ */
40
+ height: number;
41
+ /**
42
+ * 检测框的置信度
43
+ */
44
+ confidence: number;
45
+ /**
46
+ * 检测框的类别ID
47
+ */
48
+ classId: number;
49
+ }
50
+ /**
51
+ * 加载YOLO模型
52
+ * @param paramPath ncnn模型的param文件的绝对路径
53
+ * @param binPath ncnn模型的bin文件绝对路径
54
+ * @param nc 模型的标签数量,可在标签集data.yaml中看到
55
+ * @param version 模型版本,默认11, 支持 8 11 26
56
+ * @returns 加载成功返回模型ID字符串,失败返回null
57
+ * @example
58
+ * const modelId = yolo.load("yolov8n.param", "yolov8n.bin", 80)
59
+ */
60
+ function load(
61
+ paramPath: string,
62
+ binPath: string,
63
+ nc: number,
64
+ version?: number
65
+ ): string | null;
66
+ /**
67
+ * 加载YOLOv11模型 (兼容 yolov8 模型)
68
+ * @param paramPath ncnn模型的param文件的绝对路径
69
+ * @param binPath ncnn模型的bin文件绝对路径
70
+ * @param nc 模型的标签数量,可在标签集data.yaml中看到
71
+ * @returns 加载成功返回模型ID字符串,失败返回null
72
+ * @example
73
+ * const modelId = yolo.loadV11("yolov11n.param", "yolov11n.bin", 80)
74
+ */
75
+ function loadV11(
76
+ paramPath: string,
77
+ binPath: string,
78
+ nc: number
79
+ ): string | null;
80
+
81
+ /**
82
+ * 目标检测
83
+ * @param modelId 模型ID
84
+ * @param img 图像ID,"screen"用当前屏幕检测,可以填入图像ID或者http图片地址或文件地址
85
+ * @param targetSize 图像进入后缩放的检测大小,模型训练一般都用640,因此这里的640一般不要改
86
+ * @param threshold 置信度,默认0.4,小于这个值的会被过滤掉
87
+ * @param nmsThreshold 重叠阈值,一般是0.5不需要更改
88
+ * @returns 检测结果数组
89
+ * @example
90
+ * const results = yolo.detect(modelId, "screen", 640, 0.4, 0.5)
91
+ */
92
+ function detect(
93
+ modelId: string,
94
+ img: string,
95
+ targetSize?: number,
96
+ threshold?: number,
97
+ nmsThreshold?: number
98
+ ): YoloResult[];
99
+
100
+ /**
101
+ * 释放指定模型资源
102
+ * @param modelId 模型ID
103
+ * @example
104
+ * yolo.free(modelId)
105
+ */
106
+ function free(modelId: string): void;
107
+
108
+ /**
109
+ * 释放所有模型资源
110
+ * @example
111
+ * yolo.freeAll()
112
+ */
113
+ function freeAll(): void;
114
+ }