denkproto 1.3.0__py3-none-any.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.
Files changed (56) hide show
  1. denkproto/ImageAnalysis_ProtobufMessages_pb2.py +139 -0
  2. denkproto/ImageAnalysis_ProtobufMessages_pb2.pyi +598 -0
  3. denkproto/ImageAnalysis_ProtobufMessages_pb2_grpc.py +24 -0
  4. denkproto/__about__.py +1 -0
  5. denkproto/__init__.py +0 -0
  6. denkproto/annotation_comparer_request_pb2.py +40 -0
  7. denkproto/annotation_comparer_request_pb2.pyi +38 -0
  8. denkproto/annotation_comparer_request_pb2_grpc.py +24 -0
  9. denkproto/denkcache_pb2.py +77 -0
  10. denkproto/denkcache_pb2.pyi +155 -0
  11. denkproto/denkcache_pb2_grpc.py +398 -0
  12. denkproto/geometry_pb2.py +45 -0
  13. denkproto/geometry_pb2.pyi +54 -0
  14. denkproto/geometry_pb2_grpc.py +24 -0
  15. denkproto/inference_graph_pb2.py +185 -0
  16. denkproto/inference_graph_pb2.pyi +272 -0
  17. denkproto/inference_graph_pb2_grpc.py +24 -0
  18. denkproto/json/__init__.py +3 -0
  19. denkproto/json/classification_markup_schema_.py +28 -0
  20. denkproto/json/geometry_schema.py +71 -0
  21. denkproto/json/inference_graph_recipe_schema.py +336 -0
  22. denkproto/json/instance_segmentation_markup_schema.py +35 -0
  23. denkproto/json/object_detection_markup_schema.py +43 -0
  24. denkproto/json/ocr_markup_schema.py +48 -0
  25. denkproto/json/segmentation_markup_schema.py +242 -0
  26. denkproto/markup_pb2.py +56 -0
  27. denkproto/markup_pb2.pyi +155 -0
  28. denkproto/markup_pb2_grpc.py +24 -0
  29. denkproto/materialized_markup_pb2.py +46 -0
  30. denkproto/materialized_markup_pb2.pyi +71 -0
  31. denkproto/materialized_markup_pb2_grpc.py +24 -0
  32. denkproto/modelfile_v1_pb2.py +57 -0
  33. denkproto/modelfile_v1_pb2.pyi +216 -0
  34. denkproto/modelfile_v1_pb2_grpc.py +24 -0
  35. denkproto/modelfile_v2_pb2.py +154 -0
  36. denkproto/modelfile_v2_pb2.pyi +307 -0
  37. denkproto/modelfile_v2_pb2_grpc.py +24 -0
  38. denkproto/prediction_pb2.py +48 -0
  39. denkproto/prediction_pb2.pyi +89 -0
  40. denkproto/prediction_pb2_grpc.py +24 -0
  41. denkproto/prediction_request_pb2.py +43 -0
  42. denkproto/prediction_request_pb2.pyi +56 -0
  43. denkproto/prediction_request_pb2_grpc.py +24 -0
  44. denkproto/py.typed +0 -0
  45. denkproto/request_pb2.py +51 -0
  46. denkproto/request_pb2.pyi +92 -0
  47. denkproto/request_pb2_grpc.py +24 -0
  48. denkproto/results_pb2.py +91 -0
  49. denkproto/results_pb2.pyi +528 -0
  50. denkproto/results_pb2_grpc.py +24 -0
  51. denkproto/validate_pb2.py +86 -0
  52. denkproto/validate_pb2.pyi +494 -0
  53. denkproto/validate_pb2_grpc.py +24 -0
  54. denkproto-1.3.0.dist-info/METADATA +5 -0
  55. denkproto-1.3.0.dist-info/RECORD +56 -0
  56. denkproto-1.3.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,307 @@
1
+ import validate_pb2 as _validate_pb2
2
+ from google.protobuf.internal import containers as _containers
3
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
4
+ from google.protobuf import descriptor as _descriptor
5
+ from google.protobuf import message as _message
6
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
7
+
8
+ DESCRIPTOR: _descriptor.FileDescriptor
9
+
10
+ class ModelFile(_message.Message):
11
+ __slots__ = ("protocol_version", "created_at", "file_info", "file_content", "class_labels", "inputs", "outputs")
12
+ class Version(_message.Message):
13
+ __slots__ = ("major", "minor", "patch")
14
+ MAJOR_FIELD_NUMBER: _ClassVar[int]
15
+ MINOR_FIELD_NUMBER: _ClassVar[int]
16
+ PATCH_FIELD_NUMBER: _ClassVar[int]
17
+ major: int
18
+ minor: int
19
+ patch: int
20
+ def __init__(self, major: _Optional[int] = ..., minor: _Optional[int] = ..., patch: _Optional[int] = ...) -> None: ...
21
+ class Content(_message.Message):
22
+ __slots__ = ("byte_content", "hash_sha256", "compression_method", "encryption_method", "key_slots")
23
+ class CompressionMethod(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
24
+ __slots__ = ()
25
+ CM_NONE: _ClassVar[ModelFile.Content.CompressionMethod]
26
+ CM_NONE: ModelFile.Content.CompressionMethod
27
+ class EncryptionMethod(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
28
+ __slots__ = ()
29
+ EM_NONE: _ClassVar[ModelFile.Content.EncryptionMethod]
30
+ EM_AES_GCM: _ClassVar[ModelFile.Content.EncryptionMethod]
31
+ EM_NONE: ModelFile.Content.EncryptionMethod
32
+ EM_AES_GCM: ModelFile.Content.EncryptionMethod
33
+ class KeySlot(_message.Message):
34
+ __slots__ = ("wrapped_key", "wrapping_method")
35
+ WRAPPED_KEY_FIELD_NUMBER: _ClassVar[int]
36
+ WRAPPING_METHOD_FIELD_NUMBER: _ClassVar[int]
37
+ wrapped_key: bytes
38
+ wrapping_method: ModelFile.Content.EncryptionMethod
39
+ def __init__(self, wrapped_key: _Optional[bytes] = ..., wrapping_method: _Optional[_Union[ModelFile.Content.EncryptionMethod, str]] = ...) -> None: ...
40
+ class KeySlotsEntry(_message.Message):
41
+ __slots__ = ("key", "value")
42
+ KEY_FIELD_NUMBER: _ClassVar[int]
43
+ VALUE_FIELD_NUMBER: _ClassVar[int]
44
+ key: str
45
+ value: ModelFile.Content.KeySlot
46
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[ModelFile.Content.KeySlot, _Mapping]] = ...) -> None: ...
47
+ BYTE_CONTENT_FIELD_NUMBER: _ClassVar[int]
48
+ HASH_SHA256_FIELD_NUMBER: _ClassVar[int]
49
+ COMPRESSION_METHOD_FIELD_NUMBER: _ClassVar[int]
50
+ ENCRYPTION_METHOD_FIELD_NUMBER: _ClassVar[int]
51
+ KEY_SLOTS_FIELD_NUMBER: _ClassVar[int]
52
+ byte_content: bytes
53
+ hash_sha256: bytes
54
+ compression_method: ModelFile.Content.CompressionMethod
55
+ encryption_method: ModelFile.Content.EncryptionMethod
56
+ key_slots: _containers.MessageMap[str, ModelFile.Content.KeySlot]
57
+ def __init__(self, byte_content: _Optional[bytes] = ..., hash_sha256: _Optional[bytes] = ..., compression_method: _Optional[_Union[ModelFile.Content.CompressionMethod, str]] = ..., encryption_method: _Optional[_Union[ModelFile.Content.EncryptionMethod, str]] = ..., key_slots: _Optional[_Mapping[str, ModelFile.Content.KeySlot]] = ...) -> None: ...
58
+ class ClassLabel(_message.Message):
59
+ __slots__ = ("class_label_id", "name", "short_name", "color")
60
+ CLASS_LABEL_ID_FIELD_NUMBER: _ClassVar[int]
61
+ NAME_FIELD_NUMBER: _ClassVar[int]
62
+ SHORT_NAME_FIELD_NUMBER: _ClassVar[int]
63
+ COLOR_FIELD_NUMBER: _ClassVar[int]
64
+ class_label_id: str
65
+ name: str
66
+ short_name: str
67
+ color: str
68
+ def __init__(self, class_label_id: _Optional[str] = ..., name: _Optional[str] = ..., short_name: _Optional[str] = ..., color: _Optional[str] = ...) -> None: ...
69
+ class ImageSize(_message.Message):
70
+ __slots__ = ("width", "height", "channels")
71
+ WIDTH_FIELD_NUMBER: _ClassVar[int]
72
+ HEIGHT_FIELD_NUMBER: _ClassVar[int]
73
+ CHANNELS_FIELD_NUMBER: _ClassVar[int]
74
+ width: int
75
+ height: int
76
+ channels: int
77
+ def __init__(self, width: _Optional[int] = ..., height: _Optional[int] = ..., channels: _Optional[int] = ...) -> None: ...
78
+ class RegionFromEdge(_message.Message):
79
+ __slots__ = ("left", "right", "top", "bottom")
80
+ LEFT_FIELD_NUMBER: _ClassVar[int]
81
+ RIGHT_FIELD_NUMBER: _ClassVar[int]
82
+ TOP_FIELD_NUMBER: _ClassVar[int]
83
+ BOTTOM_FIELD_NUMBER: _ClassVar[int]
84
+ left: float
85
+ right: float
86
+ top: float
87
+ bottom: float
88
+ def __init__(self, left: _Optional[float] = ..., right: _Optional[float] = ..., top: _Optional[float] = ..., bottom: _Optional[float] = ...) -> None: ...
89
+ class Input(_message.Message):
90
+ __slots__ = ("input_name", "image_format")
91
+ class ImageInputFormat(_message.Message):
92
+ __slots__ = ("exact_image_size", "divisible_image_size", "region_of_interest")
93
+ class ExactImageSizeRequirement(_message.Message):
94
+ __slots__ = ("image_size",)
95
+ IMAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
96
+ image_size: ModelFile.ImageSize
97
+ def __init__(self, image_size: _Optional[_Union[ModelFile.ImageSize, _Mapping]] = ...) -> None: ...
98
+ class DivisibleImageSizeRequirement(_message.Message):
99
+ __slots__ = ("image_size_divisors", "minimum_image_size", "suggested_image_size")
100
+ IMAGE_SIZE_DIVISORS_FIELD_NUMBER: _ClassVar[int]
101
+ MINIMUM_IMAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
102
+ SUGGESTED_IMAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
103
+ image_size_divisors: ModelFile.ImageSize
104
+ minimum_image_size: ModelFile.ImageSize
105
+ suggested_image_size: ModelFile.ImageSize
106
+ def __init__(self, image_size_divisors: _Optional[_Union[ModelFile.ImageSize, _Mapping]] = ..., minimum_image_size: _Optional[_Union[ModelFile.ImageSize, _Mapping]] = ..., suggested_image_size: _Optional[_Union[ModelFile.ImageSize, _Mapping]] = ...) -> None: ...
107
+ EXACT_IMAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
108
+ DIVISIBLE_IMAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
109
+ REGION_OF_INTEREST_FIELD_NUMBER: _ClassVar[int]
110
+ exact_image_size: ModelFile.Input.ImageInputFormat.ExactImageSizeRequirement
111
+ divisible_image_size: ModelFile.Input.ImageInputFormat.DivisibleImageSizeRequirement
112
+ region_of_interest: ModelFile.RegionFromEdge
113
+ def __init__(self, exact_image_size: _Optional[_Union[ModelFile.Input.ImageInputFormat.ExactImageSizeRequirement, _Mapping]] = ..., divisible_image_size: _Optional[_Union[ModelFile.Input.ImageInputFormat.DivisibleImageSizeRequirement, _Mapping]] = ..., region_of_interest: _Optional[_Union[ModelFile.RegionFromEdge, _Mapping]] = ...) -> None: ...
114
+ INPUT_NAME_FIELD_NUMBER: _ClassVar[int]
115
+ IMAGE_FORMAT_FIELD_NUMBER: _ClassVar[int]
116
+ input_name: str
117
+ image_format: ModelFile.Input.ImageInputFormat
118
+ def __init__(self, input_name: _Optional[str] = ..., image_format: _Optional[_Union[ModelFile.Input.ImageInputFormat, _Mapping]] = ...) -> None: ...
119
+ class Output(_message.Message):
120
+ __slots__ = ("output_name", "scalar_format", "segmentation_maps_format", "bounding_boxes_format", "bounding_box_segmentations_format", "ocr_format")
121
+ class ScalarOutputFormat(_message.Message):
122
+ __slots__ = ()
123
+ def __init__(self) -> None: ...
124
+ class SegmentationMapsOutputFormat(_message.Message):
125
+ __slots__ = ()
126
+ def __init__(self) -> None: ...
127
+ class BoundingBoxesOutputFormat(_message.Message):
128
+ __slots__ = ("x1_offset", "y1_offset", "x2_offset", "y2_offset", "confidence_offset", "class_label_index_offset", "angle_offset")
129
+ X1_OFFSET_FIELD_NUMBER: _ClassVar[int]
130
+ Y1_OFFSET_FIELD_NUMBER: _ClassVar[int]
131
+ X2_OFFSET_FIELD_NUMBER: _ClassVar[int]
132
+ Y2_OFFSET_FIELD_NUMBER: _ClassVar[int]
133
+ CONFIDENCE_OFFSET_FIELD_NUMBER: _ClassVar[int]
134
+ CLASS_LABEL_INDEX_OFFSET_FIELD_NUMBER: _ClassVar[int]
135
+ ANGLE_OFFSET_FIELD_NUMBER: _ClassVar[int]
136
+ x1_offset: int
137
+ y1_offset: int
138
+ x2_offset: int
139
+ y2_offset: int
140
+ confidence_offset: int
141
+ class_label_index_offset: int
142
+ angle_offset: int
143
+ def __init__(self, x1_offset: _Optional[int] = ..., y1_offset: _Optional[int] = ..., x2_offset: _Optional[int] = ..., y2_offset: _Optional[int] = ..., confidence_offset: _Optional[int] = ..., class_label_index_offset: _Optional[int] = ..., angle_offset: _Optional[int] = ...) -> None: ...
144
+ class BoundingBoxSegmentationsOutputFormat(_message.Message):
145
+ __slots__ = ("relative_to_bounding_box",)
146
+ RELATIVE_TO_BOUNDING_BOX_FIELD_NUMBER: _ClassVar[int]
147
+ relative_to_bounding_box: bool
148
+ def __init__(self, relative_to_bounding_box: bool = ...) -> None: ...
149
+ class OcrOutputFormat(_message.Message):
150
+ __slots__ = ("characters", "character_restrictions")
151
+ class OcrFormatRestrictionBlock(_message.Message):
152
+ __slots__ = ("number_of_characters", "allowed_character_indexes")
153
+ NUMBER_OF_CHARACTERS_FIELD_NUMBER: _ClassVar[int]
154
+ ALLOWED_CHARACTER_INDEXES_FIELD_NUMBER: _ClassVar[int]
155
+ number_of_characters: int
156
+ allowed_character_indexes: _containers.RepeatedScalarFieldContainer[int]
157
+ def __init__(self, number_of_characters: _Optional[int] = ..., allowed_character_indexes: _Optional[_Iterable[int]] = ...) -> None: ...
158
+ class Character(_message.Message):
159
+ __slots__ = ("utf8_representation", "character_type", "ignore")
160
+ class CharacterType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
161
+ __slots__ = ()
162
+ CT_REGULAR: _ClassVar[ModelFile.Output.OcrOutputFormat.Character.CharacterType]
163
+ CT_START_OF_TEXT: _ClassVar[ModelFile.Output.OcrOutputFormat.Character.CharacterType]
164
+ CT_END_OF_TEXT: _ClassVar[ModelFile.Output.OcrOutputFormat.Character.CharacterType]
165
+ CT_PADDING: _ClassVar[ModelFile.Output.OcrOutputFormat.Character.CharacterType]
166
+ CT_REGULAR: ModelFile.Output.OcrOutputFormat.Character.CharacterType
167
+ CT_START_OF_TEXT: ModelFile.Output.OcrOutputFormat.Character.CharacterType
168
+ CT_END_OF_TEXT: ModelFile.Output.OcrOutputFormat.Character.CharacterType
169
+ CT_PADDING: ModelFile.Output.OcrOutputFormat.Character.CharacterType
170
+ UTF8_REPRESENTATION_FIELD_NUMBER: _ClassVar[int]
171
+ CHARACTER_TYPE_FIELD_NUMBER: _ClassVar[int]
172
+ IGNORE_FIELD_NUMBER: _ClassVar[int]
173
+ utf8_representation: bytes
174
+ character_type: ModelFile.Output.OcrOutputFormat.Character.CharacterType
175
+ ignore: bool
176
+ def __init__(self, utf8_representation: _Optional[bytes] = ..., character_type: _Optional[_Union[ModelFile.Output.OcrOutputFormat.Character.CharacterType, str]] = ..., ignore: bool = ...) -> None: ...
177
+ CHARACTERS_FIELD_NUMBER: _ClassVar[int]
178
+ CHARACTER_RESTRICTIONS_FIELD_NUMBER: _ClassVar[int]
179
+ characters: _containers.RepeatedCompositeFieldContainer[ModelFile.Output.OcrOutputFormat.Character]
180
+ character_restrictions: ModelFile.Output.OcrOutputFormat.OcrFormatRestrictionBlock
181
+ def __init__(self, characters: _Optional[_Iterable[_Union[ModelFile.Output.OcrOutputFormat.Character, _Mapping]]] = ..., character_restrictions: _Optional[_Union[ModelFile.Output.OcrOutputFormat.OcrFormatRestrictionBlock, _Mapping]] = ...) -> None: ...
182
+ OUTPUT_NAME_FIELD_NUMBER: _ClassVar[int]
183
+ SCALAR_FORMAT_FIELD_NUMBER: _ClassVar[int]
184
+ SEGMENTATION_MAPS_FORMAT_FIELD_NUMBER: _ClassVar[int]
185
+ BOUNDING_BOXES_FORMAT_FIELD_NUMBER: _ClassVar[int]
186
+ BOUNDING_BOX_SEGMENTATIONS_FORMAT_FIELD_NUMBER: _ClassVar[int]
187
+ OCR_FORMAT_FIELD_NUMBER: _ClassVar[int]
188
+ output_name: str
189
+ scalar_format: ModelFile.Output.ScalarOutputFormat
190
+ segmentation_maps_format: ModelFile.Output.SegmentationMapsOutputFormat
191
+ bounding_boxes_format: ModelFile.Output.BoundingBoxesOutputFormat
192
+ bounding_box_segmentations_format: ModelFile.Output.BoundingBoxSegmentationsOutputFormat
193
+ ocr_format: ModelFile.Output.OcrOutputFormat
194
+ def __init__(self, output_name: _Optional[str] = ..., scalar_format: _Optional[_Union[ModelFile.Output.ScalarOutputFormat, _Mapping]] = ..., segmentation_maps_format: _Optional[_Union[ModelFile.Output.SegmentationMapsOutputFormat, _Mapping]] = ..., bounding_boxes_format: _Optional[_Union[ModelFile.Output.BoundingBoxesOutputFormat, _Mapping]] = ..., bounding_box_segmentations_format: _Optional[_Union[ModelFile.Output.BoundingBoxSegmentationsOutputFormat, _Mapping]] = ..., ocr_format: _Optional[_Union[ModelFile.Output.OcrOutputFormat, _Mapping]] = ...) -> None: ...
195
+ class FileInfo(_message.Message):
196
+ __slots__ = ("network_name", "network_id", "network_experiment_id", "network_snapshot_id", "network_type", "network_flavor", "network_version", "runtime_version", "precision", "minimum_libdenkflow_version")
197
+ class NetworkType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
198
+ __slots__ = ()
199
+ NT_UNKNOWN: _ClassVar[ModelFile.FileInfo.NetworkType]
200
+ NT_CLASSIFICATION: _ClassVar[ModelFile.FileInfo.NetworkType]
201
+ NT_SEGMENTATION: _ClassVar[ModelFile.FileInfo.NetworkType]
202
+ NT_INSTANCE_SEGMENTATION: _ClassVar[ModelFile.FileInfo.NetworkType]
203
+ NT_OBJECT_DETECTION: _ClassVar[ModelFile.FileInfo.NetworkType]
204
+ NT_ANOMALY_DETECTION: _ClassVar[ModelFile.FileInfo.NetworkType]
205
+ NT_OPTICAL_CHARACTER_RECOGNITION: _ClassVar[ModelFile.FileInfo.NetworkType]
206
+ NT_UNKNOWN: ModelFile.FileInfo.NetworkType
207
+ NT_CLASSIFICATION: ModelFile.FileInfo.NetworkType
208
+ NT_SEGMENTATION: ModelFile.FileInfo.NetworkType
209
+ NT_INSTANCE_SEGMENTATION: ModelFile.FileInfo.NetworkType
210
+ NT_OBJECT_DETECTION: ModelFile.FileInfo.NetworkType
211
+ NT_ANOMALY_DETECTION: ModelFile.FileInfo.NetworkType
212
+ NT_OPTICAL_CHARACTER_RECOGNITION: ModelFile.FileInfo.NetworkType
213
+ class Precision(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
214
+ __slots__ = ()
215
+ P_UNDEFINED: _ClassVar[ModelFile.FileInfo.Precision]
216
+ P_MIXED_PRECISION: _ClassVar[ModelFile.FileInfo.Precision]
217
+ P_FP8: _ClassVar[ModelFile.FileInfo.Precision]
218
+ P_FP16: _ClassVar[ModelFile.FileInfo.Precision]
219
+ P_FP32: _ClassVar[ModelFile.FileInfo.Precision]
220
+ P_FP64: _ClassVar[ModelFile.FileInfo.Precision]
221
+ P_BF8: _ClassVar[ModelFile.FileInfo.Precision]
222
+ P_BF16: _ClassVar[ModelFile.FileInfo.Precision]
223
+ P_BF32: _ClassVar[ModelFile.FileInfo.Precision]
224
+ P_BF64: _ClassVar[ModelFile.FileInfo.Precision]
225
+ P_INT8: _ClassVar[ModelFile.FileInfo.Precision]
226
+ P_INT16: _ClassVar[ModelFile.FileInfo.Precision]
227
+ P_INT32: _ClassVar[ModelFile.FileInfo.Precision]
228
+ P_INT64: _ClassVar[ModelFile.FileInfo.Precision]
229
+ P_UINT8: _ClassVar[ModelFile.FileInfo.Precision]
230
+ P_UINT16: _ClassVar[ModelFile.FileInfo.Precision]
231
+ P_UINT32: _ClassVar[ModelFile.FileInfo.Precision]
232
+ P_UINT64: _ClassVar[ModelFile.FileInfo.Precision]
233
+ P_UNDEFINED: ModelFile.FileInfo.Precision
234
+ P_MIXED_PRECISION: ModelFile.FileInfo.Precision
235
+ P_FP8: ModelFile.FileInfo.Precision
236
+ P_FP16: ModelFile.FileInfo.Precision
237
+ P_FP32: ModelFile.FileInfo.Precision
238
+ P_FP64: ModelFile.FileInfo.Precision
239
+ P_BF8: ModelFile.FileInfo.Precision
240
+ P_BF16: ModelFile.FileInfo.Precision
241
+ P_BF32: ModelFile.FileInfo.Precision
242
+ P_BF64: ModelFile.FileInfo.Precision
243
+ P_INT8: ModelFile.FileInfo.Precision
244
+ P_INT16: ModelFile.FileInfo.Precision
245
+ P_INT32: ModelFile.FileInfo.Precision
246
+ P_INT64: ModelFile.FileInfo.Precision
247
+ P_UINT8: ModelFile.FileInfo.Precision
248
+ P_UINT16: ModelFile.FileInfo.Precision
249
+ P_UINT32: ModelFile.FileInfo.Precision
250
+ P_UINT64: ModelFile.FileInfo.Precision
251
+ NETWORK_NAME_FIELD_NUMBER: _ClassVar[int]
252
+ NETWORK_ID_FIELD_NUMBER: _ClassVar[int]
253
+ NETWORK_EXPERIMENT_ID_FIELD_NUMBER: _ClassVar[int]
254
+ NETWORK_SNAPSHOT_ID_FIELD_NUMBER: _ClassVar[int]
255
+ NETWORK_TYPE_FIELD_NUMBER: _ClassVar[int]
256
+ NETWORK_FLAVOR_FIELD_NUMBER: _ClassVar[int]
257
+ NETWORK_VERSION_FIELD_NUMBER: _ClassVar[int]
258
+ RUNTIME_VERSION_FIELD_NUMBER: _ClassVar[int]
259
+ PRECISION_FIELD_NUMBER: _ClassVar[int]
260
+ MINIMUM_LIBDENKFLOW_VERSION_FIELD_NUMBER: _ClassVar[int]
261
+ network_name: str
262
+ network_id: str
263
+ network_experiment_id: str
264
+ network_snapshot_id: str
265
+ network_type: ModelFile.FileInfo.NetworkType
266
+ network_flavor: str
267
+ network_version: ModelFile.Version
268
+ runtime_version: ModelFile.Version
269
+ precision: ModelFile.FileInfo.Precision
270
+ minimum_libdenkflow_version: ModelFile.Version
271
+ def __init__(self, network_name: _Optional[str] = ..., network_id: _Optional[str] = ..., network_experiment_id: _Optional[str] = ..., network_snapshot_id: _Optional[str] = ..., network_type: _Optional[_Union[ModelFile.FileInfo.NetworkType, str]] = ..., network_flavor: _Optional[str] = ..., network_version: _Optional[_Union[ModelFile.Version, _Mapping]] = ..., runtime_version: _Optional[_Union[ModelFile.Version, _Mapping]] = ..., precision: _Optional[_Union[ModelFile.FileInfo.Precision, str]] = ..., minimum_libdenkflow_version: _Optional[_Union[ModelFile.Version, _Mapping]] = ...) -> None: ...
272
+ class FileContent(_message.Message):
273
+ __slots__ = ("default_model", "tensorrt_model")
274
+ class DefaultModel(_message.Message):
275
+ __slots__ = ("model_data",)
276
+ MODEL_DATA_FIELD_NUMBER: _ClassVar[int]
277
+ model_data: ModelFile.Content
278
+ def __init__(self, model_data: _Optional[_Union[ModelFile.Content, _Mapping]] = ...) -> None: ...
279
+ class TensorRTModel(_message.Message):
280
+ __slots__ = ("model_data", "calibration_cache", "calibration_flatbuffers")
281
+ MODEL_DATA_FIELD_NUMBER: _ClassVar[int]
282
+ CALIBRATION_CACHE_FIELD_NUMBER: _ClassVar[int]
283
+ CALIBRATION_FLATBUFFERS_FIELD_NUMBER: _ClassVar[int]
284
+ model_data: ModelFile.Content
285
+ calibration_cache: ModelFile.Content
286
+ calibration_flatbuffers: ModelFile.Content
287
+ def __init__(self, model_data: _Optional[_Union[ModelFile.Content, _Mapping]] = ..., calibration_cache: _Optional[_Union[ModelFile.Content, _Mapping]] = ..., calibration_flatbuffers: _Optional[_Union[ModelFile.Content, _Mapping]] = ...) -> None: ...
288
+ DEFAULT_MODEL_FIELD_NUMBER: _ClassVar[int]
289
+ TENSORRT_MODEL_FIELD_NUMBER: _ClassVar[int]
290
+ default_model: ModelFile.FileContent.DefaultModel
291
+ tensorrt_model: ModelFile.FileContent.TensorRTModel
292
+ def __init__(self, default_model: _Optional[_Union[ModelFile.FileContent.DefaultModel, _Mapping]] = ..., tensorrt_model: _Optional[_Union[ModelFile.FileContent.TensorRTModel, _Mapping]] = ...) -> None: ...
293
+ PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int]
294
+ CREATED_AT_FIELD_NUMBER: _ClassVar[int]
295
+ FILE_INFO_FIELD_NUMBER: _ClassVar[int]
296
+ FILE_CONTENT_FIELD_NUMBER: _ClassVar[int]
297
+ CLASS_LABELS_FIELD_NUMBER: _ClassVar[int]
298
+ INPUTS_FIELD_NUMBER: _ClassVar[int]
299
+ OUTPUTS_FIELD_NUMBER: _ClassVar[int]
300
+ protocol_version: ModelFile.Version
301
+ created_at: int
302
+ file_info: ModelFile.FileInfo
303
+ file_content: ModelFile.FileContent
304
+ class_labels: _containers.RepeatedCompositeFieldContainer[ModelFile.ClassLabel]
305
+ inputs: _containers.RepeatedCompositeFieldContainer[ModelFile.Input]
306
+ outputs: _containers.RepeatedCompositeFieldContainer[ModelFile.Output]
307
+ def __init__(self, protocol_version: _Optional[_Union[ModelFile.Version, _Mapping]] = ..., created_at: _Optional[int] = ..., file_info: _Optional[_Union[ModelFile.FileInfo, _Mapping]] = ..., file_content: _Optional[_Union[ModelFile.FileContent, _Mapping]] = ..., class_labels: _Optional[_Iterable[_Union[ModelFile.ClassLabel, _Mapping]]] = ..., inputs: _Optional[_Iterable[_Union[ModelFile.Input, _Mapping]]] = ..., outputs: _Optional[_Iterable[_Union[ModelFile.Output, _Mapping]]] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.68.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in modelfile_v2_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -0,0 +1,48 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: prediction.proto
5
+ # Protobuf Python Version: 5.28.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 1,
17
+ '',
18
+ 'prediction.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ import denkproto.geometry_pb2 as geometry__pb2
26
+
27
+
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10prediction.proto\x12\nprediction\x1a\x0egeometry.proto\"]\n\x18\x43lassificationPrediction\x12\x10\n\x08label_id\x18\x01 \x01(\t\x12\x13\n\x0bprobability\x18\x02 \x01(\x01\x12\x1a\n\x12interpretation_map\x18\x03 \x01(\x0c\"\xb1\x01\n\x19ObjectDetectionPrediction\x12\x10\n\x08label_id\x18\x01 \x01(\t\x12\x11\n\ttop_leftx\x18\x02 \x01(\r\x12\x12\n\ntop_left_y\x18\x03 \x01(\r\x12\r\n\x05width\x18\x04 \x01(\r\x12\x0e\n\x06height\x18\x05 \x01(\r\x12\x13\n\x0bprobability\x18\x06 \x01(\x01\x12\r\n\x05\x61ngle\x18\x07 \x01(\x01\x12\x18\n\x10\x66ull_orientation\x18\x08 \x01(\x08\"}\n\x1eInstanceSegmentationPrediction\x12\x10\n\x08label_id\x18\x01 \x01(\t\x12\x12\n\ntop_left_x\x18\x02 \x01(\r\x12\x12\n\ntop_left_y\x18\x03 \x01(\r\x12\x0c\n\x04mask\x18\x04 \x01(\x0c\x12\x13\n\x0bprobability\x18\x05 \x01(\x01\"=\n\x13\x43haracterPrediction\x12\x11\n\tcharacter\x18\x01 \x01(\t\x12\x13\n\x0bprobability\x18\x02 \x01(\x01\"\xd5\x01\n\rOcrPrediction\x12\x10\n\x08label_id\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\x12>\n\x15\x63haracter_predictions\x18\x03 \x03(\x0b\x32\x1f.prediction.CharacterPrediction\x12-\n\x0c\x62ounding_box\x18\x04 \x01(\x0b\x32\x15.geometry.BoundingBoxH\x00\x12$\n\x07polygon\x18\x05 \x01(\x0b\x32\x11.geometry.PolygonH\x00\x42\x0f\n\rgeometry_data\"\xcd\x02\n\nPrediction\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x05\x12H\n\x1a\x63lassification_predictions\x18\x03 \x03(\x0b\x32$.prediction.ClassificationPrediction\x12K\n\x1cobject_detection_predictions\x18\x04 \x03(\x0b\x32%.prediction.ObjectDetectionPrediction\x12U\n!instance_segmentation_predictions\x18\x05 \x03(\x0b\x32*.prediction.InstanceSegmentationPrediction\x12\x32\n\x0focr_predictions\x18\x06 \x03(\x0b\x32\x19.prediction.OcrPredictionBEZ+github.com/DENKweit/denkproto-go/prediction\xaa\x02\x15\x44\x45NK.Proto.Predictionb\x06proto3')
29
+
30
+ _globals = globals()
31
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'prediction_pb2', _globals)
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ _globals['DESCRIPTOR']._loaded_options = None
35
+ _globals['DESCRIPTOR']._serialized_options = b'Z+github.com/DENKweit/denkproto-go/prediction\252\002\025DENK.Proto.Prediction'
36
+ _globals['_CLASSIFICATIONPREDICTION']._serialized_start=48
37
+ _globals['_CLASSIFICATIONPREDICTION']._serialized_end=141
38
+ _globals['_OBJECTDETECTIONPREDICTION']._serialized_start=144
39
+ _globals['_OBJECTDETECTIONPREDICTION']._serialized_end=321
40
+ _globals['_INSTANCESEGMENTATIONPREDICTION']._serialized_start=323
41
+ _globals['_INSTANCESEGMENTATIONPREDICTION']._serialized_end=448
42
+ _globals['_CHARACTERPREDICTION']._serialized_start=450
43
+ _globals['_CHARACTERPREDICTION']._serialized_end=511
44
+ _globals['_OCRPREDICTION']._serialized_start=514
45
+ _globals['_OCRPREDICTION']._serialized_end=727
46
+ _globals['_PREDICTION']._serialized_start=730
47
+ _globals['_PREDICTION']._serialized_end=1063
48
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,89 @@
1
+ import geometry_pb2 as _geometry_pb2
2
+ from google.protobuf.internal import containers as _containers
3
+ from google.protobuf import descriptor as _descriptor
4
+ from google.protobuf import message as _message
5
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
6
+
7
+ DESCRIPTOR: _descriptor.FileDescriptor
8
+
9
+ class ClassificationPrediction(_message.Message):
10
+ __slots__ = ("label_id", "probability", "interpretation_map")
11
+ LABEL_ID_FIELD_NUMBER: _ClassVar[int]
12
+ PROBABILITY_FIELD_NUMBER: _ClassVar[int]
13
+ INTERPRETATION_MAP_FIELD_NUMBER: _ClassVar[int]
14
+ label_id: str
15
+ probability: float
16
+ interpretation_map: bytes
17
+ def __init__(self, label_id: _Optional[str] = ..., probability: _Optional[float] = ..., interpretation_map: _Optional[bytes] = ...) -> None: ...
18
+
19
+ class ObjectDetectionPrediction(_message.Message):
20
+ __slots__ = ("label_id", "top_leftx", "top_left_y", "width", "height", "probability", "angle", "full_orientation")
21
+ LABEL_ID_FIELD_NUMBER: _ClassVar[int]
22
+ TOP_LEFTX_FIELD_NUMBER: _ClassVar[int]
23
+ TOP_LEFT_Y_FIELD_NUMBER: _ClassVar[int]
24
+ WIDTH_FIELD_NUMBER: _ClassVar[int]
25
+ HEIGHT_FIELD_NUMBER: _ClassVar[int]
26
+ PROBABILITY_FIELD_NUMBER: _ClassVar[int]
27
+ ANGLE_FIELD_NUMBER: _ClassVar[int]
28
+ FULL_ORIENTATION_FIELD_NUMBER: _ClassVar[int]
29
+ label_id: str
30
+ top_leftx: int
31
+ top_left_y: int
32
+ width: int
33
+ height: int
34
+ probability: float
35
+ angle: float
36
+ full_orientation: bool
37
+ def __init__(self, label_id: _Optional[str] = ..., top_leftx: _Optional[int] = ..., top_left_y: _Optional[int] = ..., width: _Optional[int] = ..., height: _Optional[int] = ..., probability: _Optional[float] = ..., angle: _Optional[float] = ..., full_orientation: bool = ...) -> None: ...
38
+
39
+ class InstanceSegmentationPrediction(_message.Message):
40
+ __slots__ = ("label_id", "top_left_x", "top_left_y", "mask", "probability")
41
+ LABEL_ID_FIELD_NUMBER: _ClassVar[int]
42
+ TOP_LEFT_X_FIELD_NUMBER: _ClassVar[int]
43
+ TOP_LEFT_Y_FIELD_NUMBER: _ClassVar[int]
44
+ MASK_FIELD_NUMBER: _ClassVar[int]
45
+ PROBABILITY_FIELD_NUMBER: _ClassVar[int]
46
+ label_id: str
47
+ top_left_x: int
48
+ top_left_y: int
49
+ mask: bytes
50
+ probability: float
51
+ def __init__(self, label_id: _Optional[str] = ..., top_left_x: _Optional[int] = ..., top_left_y: _Optional[int] = ..., mask: _Optional[bytes] = ..., probability: _Optional[float] = ...) -> None: ...
52
+
53
+ class CharacterPrediction(_message.Message):
54
+ __slots__ = ("character", "probability")
55
+ CHARACTER_FIELD_NUMBER: _ClassVar[int]
56
+ PROBABILITY_FIELD_NUMBER: _ClassVar[int]
57
+ character: str
58
+ probability: float
59
+ def __init__(self, character: _Optional[str] = ..., probability: _Optional[float] = ...) -> None: ...
60
+
61
+ class OcrPrediction(_message.Message):
62
+ __slots__ = ("label_id", "text", "character_predictions", "bounding_box", "polygon")
63
+ LABEL_ID_FIELD_NUMBER: _ClassVar[int]
64
+ TEXT_FIELD_NUMBER: _ClassVar[int]
65
+ CHARACTER_PREDICTIONS_FIELD_NUMBER: _ClassVar[int]
66
+ BOUNDING_BOX_FIELD_NUMBER: _ClassVar[int]
67
+ POLYGON_FIELD_NUMBER: _ClassVar[int]
68
+ label_id: str
69
+ text: str
70
+ character_predictions: _containers.RepeatedCompositeFieldContainer[CharacterPrediction]
71
+ bounding_box: _geometry_pb2.BoundingBox
72
+ polygon: _geometry_pb2.Polygon
73
+ def __init__(self, label_id: _Optional[str] = ..., text: _Optional[str] = ..., character_predictions: _Optional[_Iterable[_Union[CharacterPrediction, _Mapping]]] = ..., bounding_box: _Optional[_Union[_geometry_pb2.BoundingBox, _Mapping]] = ..., polygon: _Optional[_Union[_geometry_pb2.Polygon, _Mapping]] = ...) -> None: ...
74
+
75
+ class Prediction(_message.Message):
76
+ __slots__ = ("height", "width", "classification_predictions", "object_detection_predictions", "instance_segmentation_predictions", "ocr_predictions")
77
+ HEIGHT_FIELD_NUMBER: _ClassVar[int]
78
+ WIDTH_FIELD_NUMBER: _ClassVar[int]
79
+ CLASSIFICATION_PREDICTIONS_FIELD_NUMBER: _ClassVar[int]
80
+ OBJECT_DETECTION_PREDICTIONS_FIELD_NUMBER: _ClassVar[int]
81
+ INSTANCE_SEGMENTATION_PREDICTIONS_FIELD_NUMBER: _ClassVar[int]
82
+ OCR_PREDICTIONS_FIELD_NUMBER: _ClassVar[int]
83
+ height: int
84
+ width: int
85
+ classification_predictions: _containers.RepeatedCompositeFieldContainer[ClassificationPrediction]
86
+ object_detection_predictions: _containers.RepeatedCompositeFieldContainer[ObjectDetectionPrediction]
87
+ instance_segmentation_predictions: _containers.RepeatedCompositeFieldContainer[InstanceSegmentationPrediction]
88
+ ocr_predictions: _containers.RepeatedCompositeFieldContainer[OcrPrediction]
89
+ def __init__(self, height: _Optional[int] = ..., width: _Optional[int] = ..., classification_predictions: _Optional[_Iterable[_Union[ClassificationPrediction, _Mapping]]] = ..., object_detection_predictions: _Optional[_Iterable[_Union[ObjectDetectionPrediction, _Mapping]]] = ..., instance_segmentation_predictions: _Optional[_Iterable[_Union[InstanceSegmentationPrediction, _Mapping]]] = ..., ocr_predictions: _Optional[_Iterable[_Union[OcrPrediction, _Mapping]]] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.68.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in prediction_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
@@ -0,0 +1,43 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: prediction_request.proto
5
+ # Protobuf Python Version: 5.28.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 28,
16
+ 1,
17
+ '',
18
+ 'prediction_request.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ import denkproto.geometry_pb2 as geometry__pb2
26
+ import denkproto.request_pb2 as request__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18prediction_request.proto\x12\x12prediction_request\x1a\x0egeometry.proto\x1a\rrequest.proto\"\xa6\x01\n\tOcrObject\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08label_id\x18\x02 \x01(\t\x12\x15\n\raverage_width\x18\x04 \x01(\x01\x12-\n\x0c\x62ounding_box\x18\x05 \x01(\x0b\x32\x15.geometry.BoundingBoxH\x00\x12$\n\x07polygon\x18\x06 \x01(\x0b\x32\x11.geometry.PolygonH\x00\x42\x0f\n\rgeometry_data\"\xf4\x02\n\x11PredictionRequest\x12\x35\n\x0crequest_type\x18\x01 \x01(\x0e\x32\x1f.prediction_request.RequestType\x12\n\n\x02id\x18\x02 \x01(\t\x12\x19\n\x11owned_by_group_id\x18\x03 \x01(\t\x12\x12\n\nhasura_url\x18\x04 \x01(\t\x12\x1a\n\x12\x63reated_by_user_id\x18\x05 \x01(\t\x12\x1b\n\x13prediction_priority\x18\x06 \x01(\x05\x12\x36\n\x12network_experiment\x18\x07 \x01(\x0b\x32\x1a.request.NetworkExperiment\x12\x1d\n\x05image\x18\x08 \x01(\x0b\x32\x0e.request.Image\x12-\n%request_classification_interpretation\x18\t \x01(\x08\x12.\n\x07objects\x18\n \x03(\x0b\x32\x1d.prediction_request.OcrObject*B\n\x0bRequestType\x12\x1c\n\x18REQUEST_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x07\n\x03OCR\x10\x02\x42TZ3github.com/DENKweit/denkproto-go/prediction_request\xaa\x02\x1c\x44\x45NK.Proto.PredictionRequestb\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'prediction_request_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'Z3github.com/DENKweit/denkproto-go/prediction_request\252\002\034DENK.Proto.PredictionRequest'
37
+ _globals['_REQUESTTYPE']._serialized_start=623
38
+ _globals['_REQUESTTYPE']._serialized_end=689
39
+ _globals['_OCROBJECT']._serialized_start=80
40
+ _globals['_OCROBJECT']._serialized_end=246
41
+ _globals['_PREDICTIONREQUEST']._serialized_start=249
42
+ _globals['_PREDICTIONREQUEST']._serialized_end=621
43
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,56 @@
1
+ import geometry_pb2 as _geometry_pb2
2
+ import request_pb2 as _request_pb2
3
+ from google.protobuf.internal import containers as _containers
4
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
8
+
9
+ DESCRIPTOR: _descriptor.FileDescriptor
10
+
11
+ class RequestType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
12
+ __slots__ = ()
13
+ REQUEST_TYPE_UNSPECIFIED: _ClassVar[RequestType]
14
+ STANDARD: _ClassVar[RequestType]
15
+ OCR: _ClassVar[RequestType]
16
+ REQUEST_TYPE_UNSPECIFIED: RequestType
17
+ STANDARD: RequestType
18
+ OCR: RequestType
19
+
20
+ class OcrObject(_message.Message):
21
+ __slots__ = ("id", "label_id", "average_width", "bounding_box", "polygon")
22
+ ID_FIELD_NUMBER: _ClassVar[int]
23
+ LABEL_ID_FIELD_NUMBER: _ClassVar[int]
24
+ AVERAGE_WIDTH_FIELD_NUMBER: _ClassVar[int]
25
+ BOUNDING_BOX_FIELD_NUMBER: _ClassVar[int]
26
+ POLYGON_FIELD_NUMBER: _ClassVar[int]
27
+ id: str
28
+ label_id: str
29
+ average_width: float
30
+ bounding_box: _geometry_pb2.BoundingBox
31
+ polygon: _geometry_pb2.Polygon
32
+ def __init__(self, id: _Optional[str] = ..., label_id: _Optional[str] = ..., average_width: _Optional[float] = ..., bounding_box: _Optional[_Union[_geometry_pb2.BoundingBox, _Mapping]] = ..., polygon: _Optional[_Union[_geometry_pb2.Polygon, _Mapping]] = ...) -> None: ...
33
+
34
+ class PredictionRequest(_message.Message):
35
+ __slots__ = ("request_type", "id", "owned_by_group_id", "hasura_url", "created_by_user_id", "prediction_priority", "network_experiment", "image", "request_classification_interpretation", "objects")
36
+ REQUEST_TYPE_FIELD_NUMBER: _ClassVar[int]
37
+ ID_FIELD_NUMBER: _ClassVar[int]
38
+ OWNED_BY_GROUP_ID_FIELD_NUMBER: _ClassVar[int]
39
+ HASURA_URL_FIELD_NUMBER: _ClassVar[int]
40
+ CREATED_BY_USER_ID_FIELD_NUMBER: _ClassVar[int]
41
+ PREDICTION_PRIORITY_FIELD_NUMBER: _ClassVar[int]
42
+ NETWORK_EXPERIMENT_FIELD_NUMBER: _ClassVar[int]
43
+ IMAGE_FIELD_NUMBER: _ClassVar[int]
44
+ REQUEST_CLASSIFICATION_INTERPRETATION_FIELD_NUMBER: _ClassVar[int]
45
+ OBJECTS_FIELD_NUMBER: _ClassVar[int]
46
+ request_type: RequestType
47
+ id: str
48
+ owned_by_group_id: str
49
+ hasura_url: str
50
+ created_by_user_id: str
51
+ prediction_priority: int
52
+ network_experiment: _request_pb2.NetworkExperiment
53
+ image: _request_pb2.Image
54
+ request_classification_interpretation: bool
55
+ objects: _containers.RepeatedCompositeFieldContainer[OcrObject]
56
+ def __init__(self, request_type: _Optional[_Union[RequestType, str]] = ..., id: _Optional[str] = ..., owned_by_group_id: _Optional[str] = ..., hasura_url: _Optional[str] = ..., created_by_user_id: _Optional[str] = ..., prediction_priority: _Optional[int] = ..., network_experiment: _Optional[_Union[_request_pb2.NetworkExperiment, _Mapping]] = ..., image: _Optional[_Union[_request_pb2.Image, _Mapping]] = ..., request_classification_interpretation: bool = ..., objects: _Optional[_Iterable[_Union[OcrObject, _Mapping]]] = ...) -> None: ...
@@ -0,0 +1,24 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+
7
+ GRPC_GENERATED_VERSION = '1.68.0'
8
+ GRPC_VERSION = grpc.__version__
9
+ _version_not_supported = False
10
+
11
+ try:
12
+ from grpc._utilities import first_version_is_lower
13
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
+ except ImportError:
15
+ _version_not_supported = True
16
+
17
+ if _version_not_supported:
18
+ raise RuntimeError(
19
+ f'The grpc package installed is at version {GRPC_VERSION},'
20
+ + f' but the generated code in prediction_request_pb2_grpc.py depends on'
21
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
+ )
denkproto/py.typed ADDED
File without changes