opencv-python 5.1.0.95__cp37-abi3-win_arm64.whl
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.
- cv2/Error/__init__.pyi +118 -0
- cv2/LICENSE-3RD-PARTY.txt +3645 -0
- cv2/LICENSE.txt +21 -0
- cv2/__init__.py +189 -0
- cv2/__init__.pyi +7168 -0
- cv2/aruco/__init__.pyi +331 -0
- cv2/barcode/__init__.pyi +40 -0
- cv2/ccm/__init__.pyi +165 -0
- cv2/config-3.py +24 -0
- cv2/config.py +5 -0
- cv2/cuda/__init__.pyi +513 -0
- cv2/cv2.pyd +4 -0
- cv2/data/__init__.py +3 -0
- cv2/detail/__init__.pyi +543 -0
- cv2/dnn/__init__.pyi +690 -0
- cv2/fisheye/__init__.pyi +88 -0
- cv2/flann/__init__.pyi +65 -0
- cv2/instr/__init__.pyi +24 -0
- cv2/ipp/__init__.pyi +14 -0
- cv2/load_config_py2.py +6 -0
- cv2/load_config_py3.py +9 -0
- cv2/mat_wrapper/__init__.py +40 -0
- cv2/mcc/__init__.pyi +118 -0
- cv2/misc/__init__.py +1 -0
- cv2/misc/version.py +5 -0
- cv2/ocl/__init__.pyi +252 -0
- cv2/ogl/__init__.pyi +119 -0
- cv2/parallel/__init__.pyi +6 -0
- cv2/py.typed +0 -0
- cv2/samples/__init__.pyi +12 -0
- cv2/segmentation/__init__.pyi +39 -0
- cv2/slam/__init__.pyi +80 -0
- cv2/typing/__init__.py +159 -0
- cv2/utils/__init__.py +14 -0
- cv2/utils/__init__.pyi +110 -0
- cv2/utils/fs/__init__.pyi +6 -0
- cv2/utils/logging/__init__.pyi +22 -0
- cv2/utils/nested/__init__.pyi +31 -0
- cv2/version.py +5 -0
- cv2/videoio_registry/__init__.pyi +34 -0
- cv2/viz3d/__init__.pyi +63 -0
- opencv_python-5.1.0.95.dist-info/LICENSE-3RD-PARTY.txt +3645 -0
- opencv_python-5.1.0.95.dist-info/LICENSE.txt +21 -0
- opencv_python-5.1.0.95.dist-info/METADATA +333 -0
- opencv_python-5.1.0.95.dist-info/RECORD +47 -0
- opencv_python-5.1.0.95.dist-info/WHEEL +5 -0
- opencv_python-5.1.0.95.dist-info/top_level.txt +1 -0
cv2/dnn/__init__.pyi
ADDED
|
@@ -0,0 +1,690 @@
|
|
|
1
|
+
__all__: list[str] = []
|
|
2
|
+
|
|
3
|
+
import cv2
|
|
4
|
+
import cv2.typing
|
|
5
|
+
import numpy
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
import typing as _typing
|
|
9
|
+
if sys.version_info >= (3, 8):
|
|
10
|
+
from typing import Protocol
|
|
11
|
+
else:
|
|
12
|
+
from typing_extensions import Protocol
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# Enumerations
|
|
16
|
+
AUTO_PAD_NONE: int
|
|
17
|
+
AUTO_PAD_SAME_UPPER: int
|
|
18
|
+
AUTO_PAD_SAME_LOWER: int
|
|
19
|
+
AUTO_PAD_VALID: int
|
|
20
|
+
AutoPadding = int
|
|
21
|
+
"""One of [AUTO_PAD_NONE, AUTO_PAD_SAME_UPPER, AUTO_PAD_SAME_LOWER, AUTO_PAD_VALID]"""
|
|
22
|
+
|
|
23
|
+
ACTIV_NONE: int
|
|
24
|
+
ACTIV_MISH: int
|
|
25
|
+
ACTIV_SWISH: int
|
|
26
|
+
ACTIV_SIGMOID: int
|
|
27
|
+
ACTIV_TANH: int
|
|
28
|
+
ACTIV_ELU: int
|
|
29
|
+
ACTIV_HARDSWISH: int
|
|
30
|
+
ACTIV_HARDSIGMOID: int
|
|
31
|
+
ACTIV_GELU: int
|
|
32
|
+
ACTIV_GELU_APPROX: int
|
|
33
|
+
ACTIV_RELU: int
|
|
34
|
+
ACTIV_CLIP: int
|
|
35
|
+
ACTIV_LOG: int
|
|
36
|
+
ACTIV_ERF: int
|
|
37
|
+
ACTIV_EXP: int
|
|
38
|
+
ACTIV_SIN: int
|
|
39
|
+
ACTIV_COS: int
|
|
40
|
+
ACTIV_SINH: int
|
|
41
|
+
ACTIV_COSH: int
|
|
42
|
+
ACTIV_TAN: int
|
|
43
|
+
ACTIV_SOFTPLUS: int
|
|
44
|
+
ACTIV_BNLL: int
|
|
45
|
+
ACTIV_ASINH: int
|
|
46
|
+
ACTIV_ACOSH: int
|
|
47
|
+
ACTIV_ATANH: int
|
|
48
|
+
ActivationType = int
|
|
49
|
+
"""One of [ACTIV_NONE, ACTIV_MISH, ACTIV_SWISH, ACTIV_SIGMOID, ACTIV_TANH, ACTIV_ELU, ACTIV_HARDSWISH, ACTIV_HARDSIGMOID, ACTIV_GELU, ACTIV_GELU_APPROX, ACTIV_RELU, ACTIV_CLIP, ACTIV_LOG, ACTIV_ERF, ACTIV_EXP, ACTIV_SIN, ACTIV_COS, ACTIV_SINH, ACTIV_COSH, ACTIV_TAN, ACTIV_SOFTPLUS, ACTIV_BNLL, ACTIV_ASINH, ACTIV_ACOSH, ACTIV_ATANH]"""
|
|
50
|
+
|
|
51
|
+
LOSS_REDUCTION_NONE: int
|
|
52
|
+
LOSS_REDUCTION_MEAN: int
|
|
53
|
+
LOSS_REDUCTION_SUM: int
|
|
54
|
+
LossReduction = int
|
|
55
|
+
"""One of [LOSS_REDUCTION_NONE, LOSS_REDUCTION_MEAN, LOSS_REDUCTION_SUM]"""
|
|
56
|
+
|
|
57
|
+
DNN_BACKEND_DEFAULT: int
|
|
58
|
+
DNN_BACKEND_INFERENCE_ENGINE: int
|
|
59
|
+
DNN_BACKEND_OPENCV: int
|
|
60
|
+
DNN_BACKEND_VKCOM: int
|
|
61
|
+
DNN_BACKEND_CUDA: int
|
|
62
|
+
DNN_BACKEND_WEBNN: int
|
|
63
|
+
DNN_BACKEND_TIMVX: int
|
|
64
|
+
DNN_BACKEND_CANN: int
|
|
65
|
+
Backend = int
|
|
66
|
+
"""One of [DNN_BACKEND_DEFAULT, DNN_BACKEND_INFERENCE_ENGINE, DNN_BACKEND_OPENCV, DNN_BACKEND_VKCOM, DNN_BACKEND_CUDA, DNN_BACKEND_WEBNN, DNN_BACKEND_TIMVX, DNN_BACKEND_CANN]"""
|
|
67
|
+
|
|
68
|
+
DNN_TARGET_CPU: int
|
|
69
|
+
DNN_TARGET_OPENCL: int
|
|
70
|
+
DNN_TARGET_OPENCL_FP16: int
|
|
71
|
+
DNN_TARGET_MYRIAD: int
|
|
72
|
+
DNN_TARGET_VULKAN: int
|
|
73
|
+
DNN_TARGET_FPGA: int
|
|
74
|
+
DNN_TARGET_CUDA: int
|
|
75
|
+
DNN_TARGET_CUDA_FP16: int
|
|
76
|
+
DNN_TARGET_HDDL: int
|
|
77
|
+
DNN_TARGET_NPU: int
|
|
78
|
+
DNN_TARGET_CPU_FP16: int
|
|
79
|
+
Target = int
|
|
80
|
+
"""One of [DNN_TARGET_CPU, DNN_TARGET_OPENCL, DNN_TARGET_OPENCL_FP16, DNN_TARGET_MYRIAD, DNN_TARGET_VULKAN, DNN_TARGET_FPGA, DNN_TARGET_CUDA, DNN_TARGET_CUDA_FP16, DNN_TARGET_HDDL, DNN_TARGET_NPU, DNN_TARGET_CPU_FP16]"""
|
|
81
|
+
|
|
82
|
+
DNN_TRACE_NONE: int
|
|
83
|
+
DNN_TRACE_ALL: int
|
|
84
|
+
DNN_TRACE_OP: int
|
|
85
|
+
TracingMode = int
|
|
86
|
+
"""One of [DNN_TRACE_NONE, DNN_TRACE_ALL, DNN_TRACE_OP]"""
|
|
87
|
+
|
|
88
|
+
DNN_PROFILE_NONE: int
|
|
89
|
+
DNN_PROFILE_SUMMARY: int
|
|
90
|
+
DNN_PROFILE_DETAILED: int
|
|
91
|
+
ProfilingMode = int
|
|
92
|
+
"""One of [DNN_PROFILE_NONE, DNN_PROFILE_SUMMARY, DNN_PROFILE_DETAILED]"""
|
|
93
|
+
|
|
94
|
+
DNN_MODEL_GENERIC: int
|
|
95
|
+
DNN_MODEL_ONNX: int
|
|
96
|
+
DNN_MODEL_TFLITE: int
|
|
97
|
+
ModelFormat = int
|
|
98
|
+
"""One of [DNN_MODEL_GENERIC, DNN_MODEL_ONNX, DNN_MODEL_TFLITE]"""
|
|
99
|
+
|
|
100
|
+
DNN_ARG_EMPTY: int
|
|
101
|
+
DNN_ARG_CONST: int
|
|
102
|
+
DNN_ARG_INPUT: int
|
|
103
|
+
DNN_ARG_OUTPUT: int
|
|
104
|
+
DNN_ARG_TEMP: int
|
|
105
|
+
DNN_ARG_PATTERN: int
|
|
106
|
+
ArgKind = int
|
|
107
|
+
"""One of [DNN_ARG_EMPTY, DNN_ARG_CONST, DNN_ARG_INPUT, DNN_ARG_OUTPUT, DNN_ARG_TEMP, DNN_ARG_PATTERN]"""
|
|
108
|
+
|
|
109
|
+
ENGINE_AUTO: int
|
|
110
|
+
ENGINE_OPENCV: int
|
|
111
|
+
ENGINE_ORT: int
|
|
112
|
+
EngineType = int
|
|
113
|
+
"""One of [ENGINE_AUTO, ENGINE_OPENCV, ENGINE_ORT]"""
|
|
114
|
+
|
|
115
|
+
DNN_PMODE_NULL: int
|
|
116
|
+
DNN_PMODE_CROP_CENTER: int
|
|
117
|
+
DNN_PMODE_LETTERBOX: int
|
|
118
|
+
ImagePaddingMode = int
|
|
119
|
+
"""One of [DNN_PMODE_NULL, DNN_PMODE_CROP_CENTER, DNN_PMODE_LETTERBOX]"""
|
|
120
|
+
|
|
121
|
+
SoftNMSMethod_SOFTNMS_LINEAR: int
|
|
122
|
+
SOFT_NMSMETHOD_SOFTNMS_LINEAR: int
|
|
123
|
+
SoftNMSMethod_SOFTNMS_GAUSSIAN: int
|
|
124
|
+
SOFT_NMSMETHOD_SOFTNMS_GAUSSIAN: int
|
|
125
|
+
SoftNMSMethod = int
|
|
126
|
+
"""One of [SoftNMSMethod_SOFTNMS_LINEAR, SOFT_NMSMETHOD_SOFTNMS_LINEAR, SoftNMSMethod_SOFTNMS_GAUSSIAN, SOFT_NMSMETHOD_SOFTNMS_GAUSSIAN]"""
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
Reduce2Layer_ReduceType_MAX: int
|
|
130
|
+
REDUCE2LAYER_REDUCE_TYPE_MAX: int
|
|
131
|
+
Reduce2Layer_ReduceType_MIN: int
|
|
132
|
+
REDUCE2LAYER_REDUCE_TYPE_MIN: int
|
|
133
|
+
Reduce2Layer_ReduceType_MEAN: int
|
|
134
|
+
REDUCE2LAYER_REDUCE_TYPE_MEAN: int
|
|
135
|
+
Reduce2Layer_ReduceType_SUM: int
|
|
136
|
+
REDUCE2LAYER_REDUCE_TYPE_SUM: int
|
|
137
|
+
Reduce2Layer_ReduceType_L1: int
|
|
138
|
+
REDUCE2LAYER_REDUCE_TYPE_L1: int
|
|
139
|
+
Reduce2Layer_ReduceType_L2: int
|
|
140
|
+
REDUCE2LAYER_REDUCE_TYPE_L2: int
|
|
141
|
+
Reduce2Layer_ReduceType_PROD: int
|
|
142
|
+
REDUCE2LAYER_REDUCE_TYPE_PROD: int
|
|
143
|
+
Reduce2Layer_ReduceType_SUM_SQUARE: int
|
|
144
|
+
REDUCE2LAYER_REDUCE_TYPE_SUM_SQUARE: int
|
|
145
|
+
Reduce2Layer_ReduceType_LOG_SUM: int
|
|
146
|
+
REDUCE2LAYER_REDUCE_TYPE_LOG_SUM: int
|
|
147
|
+
Reduce2Layer_ReduceType_LOG_SUM_EXP: int
|
|
148
|
+
REDUCE2LAYER_REDUCE_TYPE_LOG_SUM_EXP: int
|
|
149
|
+
Reduce2Layer_ReduceType = int
|
|
150
|
+
"""One of [Reduce2Layer_ReduceType_MAX, REDUCE2LAYER_REDUCE_TYPE_MAX, Reduce2Layer_ReduceType_MIN, REDUCE2LAYER_REDUCE_TYPE_MIN, Reduce2Layer_ReduceType_MEAN, REDUCE2LAYER_REDUCE_TYPE_MEAN, Reduce2Layer_ReduceType_SUM, REDUCE2LAYER_REDUCE_TYPE_SUM, Reduce2Layer_ReduceType_L1, REDUCE2LAYER_REDUCE_TYPE_L1, Reduce2Layer_ReduceType_L2, REDUCE2LAYER_REDUCE_TYPE_L2, Reduce2Layer_ReduceType_PROD, REDUCE2LAYER_REDUCE_TYPE_PROD, Reduce2Layer_ReduceType_SUM_SQUARE, REDUCE2LAYER_REDUCE_TYPE_SUM_SQUARE, Reduce2Layer_ReduceType_LOG_SUM, REDUCE2LAYER_REDUCE_TYPE_LOG_SUM, Reduce2Layer_ReduceType_LOG_SUM_EXP, REDUCE2LAYER_REDUCE_TYPE_LOG_SUM_EXP]"""
|
|
151
|
+
|
|
152
|
+
NaryEltwiseLayer_OPERATION_AND: int
|
|
153
|
+
NARY_ELTWISE_LAYER_OPERATION_AND: int
|
|
154
|
+
NaryEltwiseLayer_OPERATION_EQUAL: int
|
|
155
|
+
NARY_ELTWISE_LAYER_OPERATION_EQUAL: int
|
|
156
|
+
NaryEltwiseLayer_OPERATION_GREATER: int
|
|
157
|
+
NARY_ELTWISE_LAYER_OPERATION_GREATER: int
|
|
158
|
+
NaryEltwiseLayer_OPERATION_GREATER_EQUAL: int
|
|
159
|
+
NARY_ELTWISE_LAYER_OPERATION_GREATER_EQUAL: int
|
|
160
|
+
NaryEltwiseLayer_OPERATION_LESS: int
|
|
161
|
+
NARY_ELTWISE_LAYER_OPERATION_LESS: int
|
|
162
|
+
NaryEltwiseLayer_OPERATION_LESS_EQUAL: int
|
|
163
|
+
NARY_ELTWISE_LAYER_OPERATION_LESS_EQUAL: int
|
|
164
|
+
NaryEltwiseLayer_OPERATION_OR: int
|
|
165
|
+
NARY_ELTWISE_LAYER_OPERATION_OR: int
|
|
166
|
+
NaryEltwiseLayer_OPERATION_POW: int
|
|
167
|
+
NARY_ELTWISE_LAYER_OPERATION_POW: int
|
|
168
|
+
NaryEltwiseLayer_OPERATION_XOR: int
|
|
169
|
+
NARY_ELTWISE_LAYER_OPERATION_XOR: int
|
|
170
|
+
NaryEltwiseLayer_OPERATION_BITSHIFT: int
|
|
171
|
+
NARY_ELTWISE_LAYER_OPERATION_BITSHIFT: int
|
|
172
|
+
NaryEltwiseLayer_OPERATION_MAX: int
|
|
173
|
+
NARY_ELTWISE_LAYER_OPERATION_MAX: int
|
|
174
|
+
NaryEltwiseLayer_OPERATION_MEAN: int
|
|
175
|
+
NARY_ELTWISE_LAYER_OPERATION_MEAN: int
|
|
176
|
+
NaryEltwiseLayer_OPERATION_MIN: int
|
|
177
|
+
NARY_ELTWISE_LAYER_OPERATION_MIN: int
|
|
178
|
+
NaryEltwiseLayer_OPERATION_MOD: int
|
|
179
|
+
NARY_ELTWISE_LAYER_OPERATION_MOD: int
|
|
180
|
+
NaryEltwiseLayer_OPERATION_FMOD: int
|
|
181
|
+
NARY_ELTWISE_LAYER_OPERATION_FMOD: int
|
|
182
|
+
NaryEltwiseLayer_OPERATION_PROD: int
|
|
183
|
+
NARY_ELTWISE_LAYER_OPERATION_PROD: int
|
|
184
|
+
NaryEltwiseLayer_OPERATION_SUB: int
|
|
185
|
+
NARY_ELTWISE_LAYER_OPERATION_SUB: int
|
|
186
|
+
NaryEltwiseLayer_OPERATION_SUM: int
|
|
187
|
+
NARY_ELTWISE_LAYER_OPERATION_SUM: int
|
|
188
|
+
NaryEltwiseLayer_OPERATION_ADD: int
|
|
189
|
+
NARY_ELTWISE_LAYER_OPERATION_ADD: int
|
|
190
|
+
NaryEltwiseLayer_OPERATION_DIV: int
|
|
191
|
+
NARY_ELTWISE_LAYER_OPERATION_DIV: int
|
|
192
|
+
NaryEltwiseLayer_OPERATION_WHERE: int
|
|
193
|
+
NARY_ELTWISE_LAYER_OPERATION_WHERE: int
|
|
194
|
+
NaryEltwiseLayer_OPERATION_BITWISE_AND: int
|
|
195
|
+
NARY_ELTWISE_LAYER_OPERATION_BITWISE_AND: int
|
|
196
|
+
NaryEltwiseLayer_OPERATION_BITWISE_OR: int
|
|
197
|
+
NARY_ELTWISE_LAYER_OPERATION_BITWISE_OR: int
|
|
198
|
+
NaryEltwiseLayer_OPERATION_BITWISE_XOR: int
|
|
199
|
+
NARY_ELTWISE_LAYER_OPERATION_BITWISE_XOR: int
|
|
200
|
+
NaryEltwiseLayer_OPERATION_NOT_EQUAL: int
|
|
201
|
+
NARY_ELTWISE_LAYER_OPERATION_NOT_EQUAL: int
|
|
202
|
+
NaryEltwiseLayer_OPERATION_PRELU: int
|
|
203
|
+
NARY_ELTWISE_LAYER_OPERATION_PRELU: int
|
|
204
|
+
NaryEltwiseLayer_OPERATION = int
|
|
205
|
+
"""One of [NaryEltwiseLayer_OPERATION_AND, NARY_ELTWISE_LAYER_OPERATION_AND, NaryEltwiseLayer_OPERATION_EQUAL, NARY_ELTWISE_LAYER_OPERATION_EQUAL, NaryEltwiseLayer_OPERATION_GREATER, NARY_ELTWISE_LAYER_OPERATION_GREATER, NaryEltwiseLayer_OPERATION_GREATER_EQUAL, NARY_ELTWISE_LAYER_OPERATION_GREATER_EQUAL, NaryEltwiseLayer_OPERATION_LESS, NARY_ELTWISE_LAYER_OPERATION_LESS, NaryEltwiseLayer_OPERATION_LESS_EQUAL, NARY_ELTWISE_LAYER_OPERATION_LESS_EQUAL, NaryEltwiseLayer_OPERATION_OR, NARY_ELTWISE_LAYER_OPERATION_OR, NaryEltwiseLayer_OPERATION_POW, NARY_ELTWISE_LAYER_OPERATION_POW, NaryEltwiseLayer_OPERATION_XOR, NARY_ELTWISE_LAYER_OPERATION_XOR, NaryEltwiseLayer_OPERATION_BITSHIFT, NARY_ELTWISE_LAYER_OPERATION_BITSHIFT, NaryEltwiseLayer_OPERATION_MAX, NARY_ELTWISE_LAYER_OPERATION_MAX, NaryEltwiseLayer_OPERATION_MEAN, NARY_ELTWISE_LAYER_OPERATION_MEAN, NaryEltwiseLayer_OPERATION_MIN, NARY_ELTWISE_LAYER_OPERATION_MIN, NaryEltwiseLayer_OPERATION_MOD, NARY_ELTWISE_LAYER_OPERATION_MOD, NaryEltwiseLayer_OPERATION_FMOD, NARY_ELTWISE_LAYER_OPERATION_FMOD, NaryEltwiseLayer_OPERATION_PROD, NARY_ELTWISE_LAYER_OPERATION_PROD, NaryEltwiseLayer_OPERATION_SUB, NARY_ELTWISE_LAYER_OPERATION_SUB, NaryEltwiseLayer_OPERATION_SUM, NARY_ELTWISE_LAYER_OPERATION_SUM, NaryEltwiseLayer_OPERATION_ADD, NARY_ELTWISE_LAYER_OPERATION_ADD, NaryEltwiseLayer_OPERATION_DIV, NARY_ELTWISE_LAYER_OPERATION_DIV, NaryEltwiseLayer_OPERATION_WHERE, NARY_ELTWISE_LAYER_OPERATION_WHERE, NaryEltwiseLayer_OPERATION_BITWISE_AND, NARY_ELTWISE_LAYER_OPERATION_BITWISE_AND, NaryEltwiseLayer_OPERATION_BITWISE_OR, NARY_ELTWISE_LAYER_OPERATION_BITWISE_OR, NaryEltwiseLayer_OPERATION_BITWISE_XOR, NARY_ELTWISE_LAYER_OPERATION_BITWISE_XOR, NaryEltwiseLayer_OPERATION_NOT_EQUAL, NARY_ELTWISE_LAYER_OPERATION_NOT_EQUAL, NaryEltwiseLayer_OPERATION_PRELU, NARY_ELTWISE_LAYER_OPERATION_PRELU]"""
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
# Classes
|
|
209
|
+
class DictValue:
|
|
210
|
+
# Functions
|
|
211
|
+
@_typing.overload
|
|
212
|
+
def __init__(self, i: int) -> None: ...
|
|
213
|
+
@_typing.overload
|
|
214
|
+
def __init__(self, p: float) -> None: ...
|
|
215
|
+
@_typing.overload
|
|
216
|
+
def __init__(self, s: str) -> None: ...
|
|
217
|
+
|
|
218
|
+
def isInt(self) -> bool: ...
|
|
219
|
+
|
|
220
|
+
def isString(self) -> bool: ...
|
|
221
|
+
|
|
222
|
+
def isReal(self) -> bool: ...
|
|
223
|
+
|
|
224
|
+
def getIntValue(self, idx: int = ...) -> int: ...
|
|
225
|
+
|
|
226
|
+
def getRealValue(self, idx: int = ...) -> float: ...
|
|
227
|
+
|
|
228
|
+
def getStringValue(self, idx: int = ...) -> str: ...
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class LayerInfo:
|
|
232
|
+
blobs: _typing.Sequence[cv2.typing.MatLike]
|
|
233
|
+
@property
|
|
234
|
+
def name(self) -> str: ...
|
|
235
|
+
@property
|
|
236
|
+
def type(self) -> str: ...
|
|
237
|
+
|
|
238
|
+
# Functions
|
|
239
|
+
def outputNameToIndex(self, outputName: str) -> int: ...
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class Layer(LayerInfo):
|
|
243
|
+
@property
|
|
244
|
+
def preferableTarget(self) -> int: ...
|
|
245
|
+
|
|
246
|
+
# Functions
|
|
247
|
+
@_typing.overload
|
|
248
|
+
def finalize(self, inputs: _typing.Sequence[cv2.typing.MatLike], outputs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
|
249
|
+
@_typing.overload
|
|
250
|
+
def finalize(self, inputs: _typing.Sequence[cv2.UMat], outputs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
|
251
|
+
|
|
252
|
+
def run(self, inputs: _typing.Sequence[cv2.typing.MatLike], internals: _typing.Sequence[cv2.typing.MatLike], outputs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> tuple[_typing.Sequence[cv2.typing.MatLike], _typing.Sequence[cv2.typing.MatLike]]: ...
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class Net:
|
|
256
|
+
# Functions
|
|
257
|
+
def __init__(self) -> None: ...
|
|
258
|
+
|
|
259
|
+
@classmethod
|
|
260
|
+
@_typing.overload
|
|
261
|
+
def readFromModelOptimizer(cls, xml: str | os.PathLike[str], bin: str | os.PathLike[str]) -> Net: ...
|
|
262
|
+
@classmethod
|
|
263
|
+
@_typing.overload
|
|
264
|
+
def readFromModelOptimizer(cls, bufferModelConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferWeights: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ...
|
|
265
|
+
|
|
266
|
+
def empty(self) -> bool: ...
|
|
267
|
+
|
|
268
|
+
def dump(self) -> str: ...
|
|
269
|
+
|
|
270
|
+
def dumpToFile(self, path: str | os.PathLike[str]) -> None: ...
|
|
271
|
+
|
|
272
|
+
def dumpToPbtxt(self, path: str | os.PathLike[str]) -> None: ...
|
|
273
|
+
|
|
274
|
+
def addLayer(self, name: str, type: str, dtype: int, params: cv2.typing.LayerParams) -> int: ...
|
|
275
|
+
|
|
276
|
+
def addLayerToPrev(self, name: str, type: str, dtype: int, params: cv2.typing.LayerParams) -> int: ...
|
|
277
|
+
|
|
278
|
+
def getLayerId(self, layer: str) -> int: ...
|
|
279
|
+
|
|
280
|
+
def getLayerNames(self) -> _typing.Sequence[str]: ...
|
|
281
|
+
|
|
282
|
+
@_typing.overload
|
|
283
|
+
def getLayer(self, layerId: int) -> Layer: ...
|
|
284
|
+
@_typing.overload
|
|
285
|
+
def getLayer(self, layerName: str) -> Layer: ...
|
|
286
|
+
@_typing.overload
|
|
287
|
+
def getLayer(self, layerId: cv2.typing.LayerId) -> Layer: ...
|
|
288
|
+
|
|
289
|
+
def connect(self, outPin: str, inpPin: str) -> None: ...
|
|
290
|
+
|
|
291
|
+
def registerOutput(self, outputName: str, layerId: int, outputPort: int) -> int: ...
|
|
292
|
+
|
|
293
|
+
def setInputsNames(self, inputBlobNames: _typing.Sequence[str]) -> None: ...
|
|
294
|
+
|
|
295
|
+
def setInputShape(self, inputName: str, shape: cv2.typing.MatShape) -> None: ...
|
|
296
|
+
|
|
297
|
+
@_typing.overload
|
|
298
|
+
def forward(self, outputName: str = ...) -> cv2.typing.MatLike: ...
|
|
299
|
+
@_typing.overload
|
|
300
|
+
def forward(self, outputBlobs: _typing.Sequence[cv2.typing.MatLike] | None = ..., outputName: str = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
|
301
|
+
@_typing.overload
|
|
302
|
+
def forward(self, outputBlobs: _typing.Sequence[cv2.UMat] | None = ..., outputName: str = ...) -> _typing.Sequence[cv2.UMat]: ...
|
|
303
|
+
@_typing.overload
|
|
304
|
+
def forward(self, outBlobNames: _typing.Sequence[str], outputBlobs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
|
305
|
+
@_typing.overload
|
|
306
|
+
def forward(self, outBlobNames: _typing.Sequence[str], outputBlobs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
|
307
|
+
|
|
308
|
+
def forwardAsync(self, outputName: str = ...) -> cv2.AsyncArray: ...
|
|
309
|
+
|
|
310
|
+
def forwardAndRetrieve(self, outBlobNames: _typing.Sequence[str]) -> _typing.Sequence[_typing.Sequence[cv2.typing.MatLike]]: ...
|
|
311
|
+
|
|
312
|
+
def setPreferableBackend(self, backendId: int) -> None: ...
|
|
313
|
+
|
|
314
|
+
def setPreferableTarget(self, targetId: int) -> None: ...
|
|
315
|
+
|
|
316
|
+
def finalizeNet(self) -> None: ...
|
|
317
|
+
|
|
318
|
+
def setTracingMode(self, tracingMode: TracingMode) -> None: ...
|
|
319
|
+
|
|
320
|
+
def getTracingMode(self) -> TracingMode: ...
|
|
321
|
+
|
|
322
|
+
def setProfilingMode(self, profilingMode: ProfilingMode) -> None: ...
|
|
323
|
+
|
|
324
|
+
def getProfilingMode(self) -> ProfilingMode: ...
|
|
325
|
+
|
|
326
|
+
def getModelFormat(self) -> ModelFormat: ...
|
|
327
|
+
|
|
328
|
+
@_typing.overload
|
|
329
|
+
def setInput(self, blob: cv2.typing.MatLike, name: str = ..., scalefactor: float = ..., mean: cv2.typing.Scalar = ...) -> None: ...
|
|
330
|
+
@_typing.overload
|
|
331
|
+
def setInput(self, blob: cv2.UMat, name: str = ..., scalefactor: float = ..., mean: cv2.typing.Scalar = ...) -> None: ...
|
|
332
|
+
|
|
333
|
+
@_typing.overload
|
|
334
|
+
def setParam(self, layer: int, numParam: int, blob: cv2.typing.MatLike) -> None: ...
|
|
335
|
+
@_typing.overload
|
|
336
|
+
def setParam(self, layerName: str, numParam: int, blob: cv2.typing.MatLike) -> None: ...
|
|
337
|
+
|
|
338
|
+
@_typing.overload
|
|
339
|
+
def getParam(self, layer: int, numParam: int = ...) -> cv2.typing.MatLike: ...
|
|
340
|
+
@_typing.overload
|
|
341
|
+
def getParam(self, layerName: str, numParam: int = ...) -> cv2.typing.MatLike: ...
|
|
342
|
+
|
|
343
|
+
def getUnconnectedOutLayers(self) -> _typing.Sequence[int]: ...
|
|
344
|
+
|
|
345
|
+
def getUnconnectedOutLayersNames(self) -> _typing.Sequence[str]: ...
|
|
346
|
+
|
|
347
|
+
def getLayerShapes(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape], netInputTypes: _typing.Sequence[int], layerId: int) -> tuple[_typing.Sequence[cv2.typing.MatShape], _typing.Sequence[cv2.typing.MatShape]]: ...
|
|
348
|
+
|
|
349
|
+
def getFLOPS(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape], netInputTypes: _typing.Sequence[int]) -> int: ...
|
|
350
|
+
|
|
351
|
+
def getLayerTypes(self) -> _typing.Sequence[str]: ...
|
|
352
|
+
|
|
353
|
+
def getLayersCount(self, layerType: str) -> int: ...
|
|
354
|
+
|
|
355
|
+
def getMemoryConsumption(self, netInputShapes: _typing.Sequence[cv2.typing.MatShape], netInputTypes: _typing.Sequence[int]) -> tuple[int, int]: ...
|
|
356
|
+
|
|
357
|
+
def enableFusion(self, fusion: bool) -> None: ...
|
|
358
|
+
|
|
359
|
+
def enableWinograd(self, useWinograd: bool) -> None: ...
|
|
360
|
+
|
|
361
|
+
def enableTF32(self, useTF32: bool) -> None: ...
|
|
362
|
+
|
|
363
|
+
@_typing.overload
|
|
364
|
+
def getPerfProfile(self) -> tuple[int, _typing.Sequence[float]]: ...
|
|
365
|
+
@_typing.overload
|
|
366
|
+
def getPerfProfile(self) -> tuple[_typing.Sequence[str], _typing.Sequence[str], _typing.Sequence[str]]: ...
|
|
367
|
+
|
|
368
|
+
def enableKVCache(self) -> None: ...
|
|
369
|
+
|
|
370
|
+
def disableKVCache(self) -> None: ...
|
|
371
|
+
|
|
372
|
+
def resetKVCache(self) -> None: ...
|
|
373
|
+
|
|
374
|
+
def reserveKVCache(self, maxSequenceLength: int) -> None: ...
|
|
375
|
+
|
|
376
|
+
def printPerfProfile(self) -> None: ...
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
class Image2BlobParams:
|
|
380
|
+
scalefactor: cv2.typing.Scalar
|
|
381
|
+
size: cv2.typing.Size
|
|
382
|
+
mean: cv2.typing.Scalar
|
|
383
|
+
swapRB: bool
|
|
384
|
+
ddepth: int
|
|
385
|
+
datalayout: cv2.DataLayout
|
|
386
|
+
paddingmode: ImagePaddingMode
|
|
387
|
+
borderValue: cv2.typing.Scalar
|
|
388
|
+
interpolation: int
|
|
389
|
+
|
|
390
|
+
# Functions
|
|
391
|
+
@_typing.overload
|
|
392
|
+
def __init__(self) -> None: ...
|
|
393
|
+
@_typing.overload
|
|
394
|
+
def __init__(self, scalefactor: cv2.typing.Scalar, size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., ddepth: int = ..., datalayout: cv2.DataLayout = ..., mode: ImagePaddingMode = ..., borderValue: cv2.typing.Scalar = ..., interpolation: int = ...) -> None: ...
|
|
395
|
+
|
|
396
|
+
def blobRectToImageRect(self, rBlob: cv2.typing.Rect, size: cv2.typing.Size) -> cv2.typing.Rect: ...
|
|
397
|
+
|
|
398
|
+
def blobRectsToImageRects(self, rBlob: _typing.Sequence[cv2.typing.Rect], size: cv2.typing.Size) -> _typing.Sequence[cv2.typing.Rect]: ...
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
class Model:
|
|
402
|
+
# Functions
|
|
403
|
+
@_typing.overload
|
|
404
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
405
|
+
@_typing.overload
|
|
406
|
+
def __init__(self, network: Net) -> None: ...
|
|
407
|
+
|
|
408
|
+
@_typing.overload
|
|
409
|
+
def setInputSize(self, size: cv2.typing.Size) -> Model: ...
|
|
410
|
+
@_typing.overload
|
|
411
|
+
def setInputSize(self, width: int, height: int) -> Model: ...
|
|
412
|
+
|
|
413
|
+
def setInputMean(self, mean: cv2.typing.Scalar) -> Model: ...
|
|
414
|
+
|
|
415
|
+
def setInputScale(self, scale: cv2.typing.Scalar) -> Model: ...
|
|
416
|
+
|
|
417
|
+
def setInputCrop(self, crop: bool) -> Model: ...
|
|
418
|
+
|
|
419
|
+
def setInputSwapRB(self, swapRB: bool) -> Model: ...
|
|
420
|
+
|
|
421
|
+
def setOutputNames(self, outNames: _typing.Sequence[str]) -> Model: ...
|
|
422
|
+
|
|
423
|
+
def setInputParams(self, scale: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ...) -> None: ...
|
|
424
|
+
|
|
425
|
+
@_typing.overload
|
|
426
|
+
def predict(self, frame: cv2.typing.MatLike, outs: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
|
427
|
+
@_typing.overload
|
|
428
|
+
def predict(self, frame: cv2.UMat, outs: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
|
429
|
+
|
|
430
|
+
def setPreferableBackend(self, backendId: Backend) -> Model: ...
|
|
431
|
+
|
|
432
|
+
def setPreferableTarget(self, targetId: Target) -> Model: ...
|
|
433
|
+
|
|
434
|
+
def enableWinograd(self, useWinograd: bool) -> Model: ...
|
|
435
|
+
|
|
436
|
+
def enableTF32(self, useTF32: bool) -> Model: ...
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
class ClassificationModel(Model):
|
|
440
|
+
# Functions
|
|
441
|
+
@_typing.overload
|
|
442
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
443
|
+
@_typing.overload
|
|
444
|
+
def __init__(self, network: Net) -> None: ...
|
|
445
|
+
|
|
446
|
+
def setEnableSoftmaxPostProcessing(self, enable: bool) -> ClassificationModel: ...
|
|
447
|
+
|
|
448
|
+
def getEnableSoftmaxPostProcessing(self) -> bool: ...
|
|
449
|
+
|
|
450
|
+
@_typing.overload
|
|
451
|
+
def classify(self, frame: cv2.typing.MatLike) -> tuple[int, float]: ...
|
|
452
|
+
@_typing.overload
|
|
453
|
+
def classify(self, frame: cv2.UMat) -> tuple[int, float]: ...
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
class KeypointsModel(Model):
|
|
457
|
+
# Functions
|
|
458
|
+
@_typing.overload
|
|
459
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
460
|
+
@_typing.overload
|
|
461
|
+
def __init__(self, network: Net) -> None: ...
|
|
462
|
+
|
|
463
|
+
@_typing.overload
|
|
464
|
+
def estimate(self, frame: cv2.typing.MatLike, thresh: float = ...) -> _typing.Sequence[cv2.typing.Point2f]: ...
|
|
465
|
+
@_typing.overload
|
|
466
|
+
def estimate(self, frame: cv2.UMat, thresh: float = ...) -> _typing.Sequence[cv2.typing.Point2f]: ...
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
class SegmentationModel(Model):
|
|
470
|
+
# Functions
|
|
471
|
+
@_typing.overload
|
|
472
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
473
|
+
@_typing.overload
|
|
474
|
+
def __init__(self, network: Net) -> None: ...
|
|
475
|
+
|
|
476
|
+
@_typing.overload
|
|
477
|
+
def segment(self, frame: cv2.typing.MatLike, mask: cv2.typing.MatLike | None = ...) -> cv2.typing.MatLike: ...
|
|
478
|
+
@_typing.overload
|
|
479
|
+
def segment(self, frame: cv2.UMat, mask: cv2.UMat | None = ...) -> cv2.UMat: ...
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
class DetectionModel(Model):
|
|
483
|
+
# Functions
|
|
484
|
+
@_typing.overload
|
|
485
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
486
|
+
@_typing.overload
|
|
487
|
+
def __init__(self, network: Net) -> None: ...
|
|
488
|
+
|
|
489
|
+
def setNmsAcrossClasses(self, value: bool) -> DetectionModel: ...
|
|
490
|
+
|
|
491
|
+
def getNmsAcrossClasses(self) -> bool: ...
|
|
492
|
+
|
|
493
|
+
@_typing.overload
|
|
494
|
+
def detect(self, frame: cv2.typing.MatLike, confThreshold: float = ..., nmsThreshold: float = ...) -> tuple[_typing.Sequence[int], _typing.Sequence[float], _typing.Sequence[cv2.typing.Rect]]: ...
|
|
495
|
+
@_typing.overload
|
|
496
|
+
def detect(self, frame: cv2.UMat, confThreshold: float = ..., nmsThreshold: float = ...) -> tuple[_typing.Sequence[int], _typing.Sequence[float], _typing.Sequence[cv2.typing.Rect]]: ...
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
class TextRecognitionModel(Model):
|
|
500
|
+
# Functions
|
|
501
|
+
@_typing.overload
|
|
502
|
+
def __init__(self, network: Net) -> None: ...
|
|
503
|
+
@_typing.overload
|
|
504
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
505
|
+
|
|
506
|
+
def setDecodeType(self, decodeType: str) -> TextRecognitionModel: ...
|
|
507
|
+
|
|
508
|
+
def getDecodeType(self) -> str: ...
|
|
509
|
+
|
|
510
|
+
def setDecodeOptsCTCPrefixBeamSearch(self, beamSize: int, vocPruneSize: int = ...) -> TextRecognitionModel: ...
|
|
511
|
+
|
|
512
|
+
def setVocabulary(self, vocabulary: _typing.Sequence[str]) -> TextRecognitionModel: ...
|
|
513
|
+
|
|
514
|
+
def getVocabulary(self) -> _typing.Sequence[str]: ...
|
|
515
|
+
|
|
516
|
+
@_typing.overload
|
|
517
|
+
def recognize(self, frame: cv2.typing.MatLike) -> str: ...
|
|
518
|
+
@_typing.overload
|
|
519
|
+
def recognize(self, frame: cv2.UMat) -> str: ...
|
|
520
|
+
@_typing.overload
|
|
521
|
+
def recognize(self, frame: cv2.typing.MatLike, roiRects: _typing.Sequence[cv2.typing.MatLike]) -> _typing.Sequence[str]: ...
|
|
522
|
+
@_typing.overload
|
|
523
|
+
def recognize(self, frame: cv2.UMat, roiRects: _typing.Sequence[cv2.UMat]) -> _typing.Sequence[str]: ...
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
class TextDetectionModel(Model):
|
|
527
|
+
# Functions
|
|
528
|
+
@_typing.overload
|
|
529
|
+
def detect(self, frame: cv2.typing.MatLike) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[float]]: ...
|
|
530
|
+
@_typing.overload
|
|
531
|
+
def detect(self, frame: cv2.UMat) -> tuple[_typing.Sequence[_typing.Sequence[cv2.typing.Point]], _typing.Sequence[float]]: ...
|
|
532
|
+
@_typing.overload
|
|
533
|
+
def detect(self, frame: cv2.typing.MatLike) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point]]: ...
|
|
534
|
+
@_typing.overload
|
|
535
|
+
def detect(self, frame: cv2.UMat) -> _typing.Sequence[_typing.Sequence[cv2.typing.Point]]: ...
|
|
536
|
+
|
|
537
|
+
@_typing.overload
|
|
538
|
+
def detectTextRectangles(self, frame: cv2.typing.MatLike) -> tuple[_typing.Sequence[cv2.typing.RotatedRect], _typing.Sequence[float]]: ...
|
|
539
|
+
@_typing.overload
|
|
540
|
+
def detectTextRectangles(self, frame: cv2.UMat) -> tuple[_typing.Sequence[cv2.typing.RotatedRect], _typing.Sequence[float]]: ...
|
|
541
|
+
@_typing.overload
|
|
542
|
+
def detectTextRectangles(self, frame: cv2.typing.MatLike) -> _typing.Sequence[cv2.typing.RotatedRect]: ...
|
|
543
|
+
@_typing.overload
|
|
544
|
+
def detectTextRectangles(self, frame: cv2.UMat) -> _typing.Sequence[cv2.typing.RotatedRect]: ...
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
class TextDetectionModel_EAST(TextDetectionModel):
|
|
548
|
+
# Functions
|
|
549
|
+
@_typing.overload
|
|
550
|
+
def __init__(self, network: Net) -> None: ...
|
|
551
|
+
@_typing.overload
|
|
552
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
553
|
+
|
|
554
|
+
def setConfidenceThreshold(self, confThreshold: float) -> TextDetectionModel_EAST: ...
|
|
555
|
+
|
|
556
|
+
def getConfidenceThreshold(self) -> float: ...
|
|
557
|
+
|
|
558
|
+
def setNMSThreshold(self, nmsThreshold: float) -> TextDetectionModel_EAST: ...
|
|
559
|
+
|
|
560
|
+
def getNMSThreshold(self) -> float: ...
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
class TextDetectionModel_DB(TextDetectionModel):
|
|
564
|
+
# Functions
|
|
565
|
+
@_typing.overload
|
|
566
|
+
def __init__(self, network: Net) -> None: ...
|
|
567
|
+
@_typing.overload
|
|
568
|
+
def __init__(self, model: str | os.PathLike[str], config: str | os.PathLike[str] = ...) -> None: ...
|
|
569
|
+
|
|
570
|
+
def setBinaryThreshold(self, binaryThreshold: float) -> TextDetectionModel_DB: ...
|
|
571
|
+
|
|
572
|
+
def getBinaryThreshold(self) -> float: ...
|
|
573
|
+
|
|
574
|
+
def setPolygonThreshold(self, polygonThreshold: float) -> TextDetectionModel_DB: ...
|
|
575
|
+
|
|
576
|
+
def getPolygonThreshold(self) -> float: ...
|
|
577
|
+
|
|
578
|
+
def setUnclipRatio(self, unclipRatio: float) -> TextDetectionModel_DB: ...
|
|
579
|
+
|
|
580
|
+
def getUnclipRatio(self) -> float: ...
|
|
581
|
+
|
|
582
|
+
def setMaxCandidates(self, maxCandidates: int) -> TextDetectionModel_DB: ...
|
|
583
|
+
|
|
584
|
+
def getMaxCandidates(self) -> int: ...
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
class Tokenizer:
|
|
588
|
+
# Functions
|
|
589
|
+
@classmethod
|
|
590
|
+
def load(cls, model_config: str | os.PathLike[str]) -> Tokenizer: ...
|
|
591
|
+
|
|
592
|
+
@_typing.overload
|
|
593
|
+
def encode(self, text: str) -> _typing.Sequence[int]: ...
|
|
594
|
+
@_typing.overload
|
|
595
|
+
def encode(self, textChunks: _typing.Sequence[str]) -> _typing.Sequence[int]: ...
|
|
596
|
+
|
|
597
|
+
def decode(self, tokens: _typing.Sequence[int]) -> str: ...
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
class LayerProtocol(Protocol):
|
|
601
|
+
# Functions
|
|
602
|
+
def __init__(self, params: dict[str, DictValue], blobs: _typing.Sequence[cv2.typing.MatLike]) -> None: ...
|
|
603
|
+
|
|
604
|
+
def getMemoryShapes(self, inputs: _typing.Sequence[_typing.Sequence[int]]) -> _typing.Sequence[_typing.Sequence[int]]: ...
|
|
605
|
+
|
|
606
|
+
def forward(self, inputs: _typing.Sequence[cv2.typing.MatLike]) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
# Functions
|
|
611
|
+
def NMSBoxes(bboxes: _typing.Sequence[cv2.typing.Rect2d], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ...
|
|
612
|
+
|
|
613
|
+
def NMSBoxesBatched(bboxes: _typing.Sequence[cv2.typing.Rect2d], scores: _typing.Sequence[float], class_ids: _typing.Sequence[int], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ...
|
|
614
|
+
|
|
615
|
+
def NMSBoxesRotated(bboxes: _typing.Sequence[cv2.typing.RotatedRect], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, eta: float = ..., top_k: int = ...) -> _typing.Sequence[int]: ...
|
|
616
|
+
|
|
617
|
+
@_typing.overload
|
|
618
|
+
def blobFromImage(image: cv2.typing.MatLike, scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ..., interpolation: int = ...) -> cv2.typing.MatLike: ...
|
|
619
|
+
@_typing.overload
|
|
620
|
+
def blobFromImage(image: cv2.UMat, scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ..., interpolation: int = ...) -> cv2.typing.MatLike: ...
|
|
621
|
+
|
|
622
|
+
@_typing.overload
|
|
623
|
+
def blobFromImageWithParams(image: cv2.typing.MatLike, param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
|
624
|
+
@_typing.overload
|
|
625
|
+
def blobFromImageWithParams(image: cv2.UMat, param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
|
626
|
+
@_typing.overload
|
|
627
|
+
def blobFromImageWithParams(image: cv2.typing.MatLike, blob: cv2.typing.MatLike | None = ..., param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
|
628
|
+
@_typing.overload
|
|
629
|
+
def blobFromImageWithParams(image: cv2.UMat, blob: cv2.UMat | None = ..., param: Image2BlobParams = ...) -> cv2.UMat: ...
|
|
630
|
+
|
|
631
|
+
@_typing.overload
|
|
632
|
+
def blobFromImages(images: _typing.Sequence[cv2.typing.MatLike], scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ..., interpolation: int = ...) -> cv2.typing.MatLike: ...
|
|
633
|
+
@_typing.overload
|
|
634
|
+
def blobFromImages(images: _typing.Sequence[cv2.UMat], scalefactor: float = ..., size: cv2.typing.Size = ..., mean: cv2.typing.Scalar = ..., swapRB: bool = ..., crop: bool = ..., ddepth: int = ..., interpolation: int = ...) -> cv2.typing.MatLike: ...
|
|
635
|
+
|
|
636
|
+
@_typing.overload
|
|
637
|
+
def blobFromImagesWithParams(images: _typing.Sequence[cv2.typing.MatLike], param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
|
638
|
+
@_typing.overload
|
|
639
|
+
def blobFromImagesWithParams(images: _typing.Sequence[cv2.UMat], param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
|
640
|
+
@_typing.overload
|
|
641
|
+
def blobFromImagesWithParams(images: _typing.Sequence[cv2.typing.MatLike], blob: cv2.typing.MatLike | None = ..., param: Image2BlobParams = ...) -> cv2.typing.MatLike: ...
|
|
642
|
+
@_typing.overload
|
|
643
|
+
def blobFromImagesWithParams(images: _typing.Sequence[cv2.UMat], blob: cv2.UMat | None = ..., param: Image2BlobParams = ...) -> cv2.UMat: ...
|
|
644
|
+
|
|
645
|
+
def getAvailableTargets(be: Backend) -> _typing.Sequence[Target]: ...
|
|
646
|
+
|
|
647
|
+
def getInferenceEngineBackendType() -> str: ...
|
|
648
|
+
|
|
649
|
+
def getInferenceEngineCPUType() -> str: ...
|
|
650
|
+
|
|
651
|
+
def getInferenceEngineVPUType() -> str: ...
|
|
652
|
+
|
|
653
|
+
@_typing.overload
|
|
654
|
+
def imagesFromBlob(blob_: cv2.typing.MatLike, images_: _typing.Sequence[cv2.typing.MatLike] | None = ...) -> _typing.Sequence[cv2.typing.MatLike]: ...
|
|
655
|
+
@_typing.overload
|
|
656
|
+
def imagesFromBlob(blob_: cv2.typing.MatLike, images_: _typing.Sequence[cv2.UMat] | None = ...) -> _typing.Sequence[cv2.UMat]: ...
|
|
657
|
+
|
|
658
|
+
@_typing.overload
|
|
659
|
+
def readNet(model: str | os.PathLike[str], config: str | os.PathLike[str] = ..., framework: str = ..., engine: int = ...) -> Net: ...
|
|
660
|
+
@_typing.overload
|
|
661
|
+
def readNet(framework: str, bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]] = ..., engine: int = ...) -> Net: ...
|
|
662
|
+
|
|
663
|
+
@_typing.overload
|
|
664
|
+
def readNetFromModelOptimizer(xml: str | os.PathLike[str], bin: str | os.PathLike[str] = ...) -> Net: ...
|
|
665
|
+
@_typing.overload
|
|
666
|
+
def readNetFromModelOptimizer(bufferModelConfig: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], bufferWeights: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]]) -> Net: ...
|
|
667
|
+
|
|
668
|
+
@_typing.overload
|
|
669
|
+
def readNetFromONNX(onnxFile: str | os.PathLike[str], engine: int = ...) -> Net: ...
|
|
670
|
+
@_typing.overload
|
|
671
|
+
def readNetFromONNX(onnxFile: str | os.PathLike[str], engine: int, mapExternalData: bool) -> Net: ...
|
|
672
|
+
@_typing.overload
|
|
673
|
+
def readNetFromONNX(buffer: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], engine: int = ...) -> Net: ...
|
|
674
|
+
|
|
675
|
+
@_typing.overload
|
|
676
|
+
def readNetFromTFLite(model: str | os.PathLike[str], engine: int = ...) -> Net: ...
|
|
677
|
+
@_typing.overload
|
|
678
|
+
def readNetFromTFLite(bufferModel: numpy.ndarray[_typing.Any, numpy.dtype[numpy.uint8]], engine: int = ...) -> Net: ...
|
|
679
|
+
|
|
680
|
+
def readTensorFromONNX(path: str | os.PathLike[str]) -> cv2.typing.MatLike: ...
|
|
681
|
+
|
|
682
|
+
def releaseHDDLPlugin() -> None: ...
|
|
683
|
+
|
|
684
|
+
def resetMyriadDevice() -> None: ...
|
|
685
|
+
|
|
686
|
+
def setInferenceEngineBackendType(newBackendType: str) -> str: ...
|
|
687
|
+
|
|
688
|
+
def softNMSBoxes(bboxes: _typing.Sequence[cv2.typing.Rect], scores: _typing.Sequence[float], score_threshold: float, nms_threshold: float, top_k: int = ..., sigma: float = ..., method: SoftNMSMethod = ...) -> tuple[_typing.Sequence[float], _typing.Sequence[int]]: ...
|
|
689
|
+
|
|
690
|
+
|