denkproto 1.0.69__py3-none-any.whl → 1.0.73__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.
Potentially problematic release.
This version of denkproto might be problematic. Click here for more details.
- denkproto/__about__.py +1 -1
- denkproto/inference_graph_pb2.py +42 -52
- denkproto/inference_graph_pb2.pyi +2 -11
- denkproto/json/classification_markup.py +1 -9
- denkproto/json/inference_graph_models_generated.py +0 -19
- denkproto/json/object_detection_markup.py +5 -11
- denkproto/json/ocr_markup.py +12 -15
- denkproto/json/segmentation_markup.py +20 -19
- {denkproto-1.0.69.dist-info → denkproto-1.0.73.dist-info}/METADATA +1 -1
- {denkproto-1.0.69.dist-info → denkproto-1.0.73.dist-info}/RECORD +11 -11
- {denkproto-1.0.69.dist-info → denkproto-1.0.73.dist-info}/WHEEL +0 -0
denkproto/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.0.
|
|
1
|
+
__version__ = "1.0.73"
|
denkproto/inference_graph_pb2.py
CHANGED
|
@@ -26,7 +26,7 @@ import denkproto.modelfile_v2_pb2 as modelfile__v2__pb2
|
|
|
26
26
|
import denkproto.validate_pb2 as validate__pb2
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15inference_graph.proto\x12\x0finference_graph\x1a\x12modelfile-v2.proto\x1a\x0evalidate.proto\"\xa5\x01\n\x0bModelSource\x12-\n\nfrom_proto\x18\x01 \x01(\x0b\x32\x17.modelfile.v2.ModelFileH\x00\x12#\n\x0f\x66rom_network_id\x18\x02 \x01(\tB\x08\xfa\x42\x05r\x03\xb0\x01\x01H\x00\x12.\n\x1a\x66rom_network_experiment_id\x18\x03 \x01(\tB\x08\xfa\x42\x05r\x03\xb0\x01\x01H\x00\x42\x12\n\x0bsource_type\x12\x03\xf8\x42\x01\"s\n\x0bSessionInfo\x12H\n\x12\x65xecution_provider\x18\x01 \x01(\x0e\x32\".inference_graph.ExecutionProviderB\x08\xfa\x42\x05\x82\x01\x02\x10\x01\x12\x1a\n\tdevice_id\x18\x02 \x01(\x05\x42\x07\xfa\x42\x04\x1a\x02(\x00\"\
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15inference_graph.proto\x12\x0finference_graph\x1a\x12modelfile-v2.proto\x1a\x0evalidate.proto\"\xa5\x01\n\x0bModelSource\x12-\n\nfrom_proto\x18\x01 \x01(\x0b\x32\x17.modelfile.v2.ModelFileH\x00\x12#\n\x0f\x66rom_network_id\x18\x02 \x01(\tB\x08\xfa\x42\x05r\x03\xb0\x01\x01H\x00\x12.\n\x1a\x66rom_network_experiment_id\x18\x03 \x01(\tB\x08\xfa\x42\x05r\x03\xb0\x01\x01H\x00\x42\x12\n\x0bsource_type\x12\x03\xf8\x42\x01\"s\n\x0bSessionInfo\x12H\n\x12\x65xecution_provider\x18\x01 \x01(\x0e\x32\".inference_graph.ExecutionProviderB\x08\xfa\x42\x05\x82\x01\x02\x10\x01\x12\x1a\n\tdevice_id\x18\x02 \x01(\x05\x42\x07\xfa\x42\x04\x1a\x02(\x00\"\xa4\x03\n\x0f\x43onstTensorNode\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12\r\n\x05shape\x18\x02 \x03(\r\x12\x43\n\x0buint64_data\x18\x03 \x01(\x0b\x32,.inference_graph.ConstTensorNode.Uint64ArrayH\x00\x12\x41\n\nint64_data\x18\x04 \x01(\x0b\x32+.inference_graph.ConstTensorNode.Int64ArrayH\x00\x12\x45\n\x0c\x66loat64_data\x18\x05 \x01(\x0b\x32-.inference_graph.ConstTensorNode.Float64ArrayH\x00\x12\x33\n\x10output_port_name\x18\x06 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\x1a\x1b\n\x0bUint64Array\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x04\x1a\x1a\n\nInt64Array\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x12\x1a\x1c\n\x0c\x46loat64Array\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x01\x42\x10\n\tdata_type\x12\x03\xf8\x42\x01\"\xc4\x02\n\x0fImageResizeNode\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12L\n\ninput_size\x18\x02 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12M\n\x0binput_image\x18\x03 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12\x33\n\x10output_port_name\x18\x04 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\x12\x37\n\x0csession_info\x18\x05 \x01(\x0b\x32\x1c.inference_graph.SessionInfoH\x00\x88\x01\x01\x42\x0f\n\r_session_info\"\xa3\x05\n\x10ImagePatchesNode\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12M\n\x0binput_image\x18\x02 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12V\n\x14input_bounding_boxes\x18\x03 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12W\n\x11input_target_size\x18\x04 \x01(\x0b\x32\x32.inference_graph.ImagePatchesNode.TargetSizeSourceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x33\n\x10output_port_name\x18\x05 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\x12\x37\n\x0csession_info\x18\x07 \x01(\x0b\x32\x1c.inference_graph.SessionInfoH\x00\x88\x01\x01\x1a\xf8\x01\n\x10TargetSizeSource\x12I\n\x05topic\x18\x01 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$H\x00\x12L\n\x04size\x18\x02 \x01(\x0b\x32<.inference_graph.ImagePatchesNode.TargetSizeSource.ImageSizeH\x00\x1a<\n\tImageSize\x12\x17\n\x06height\x18\x01 \x01(\x04\x42\x07\xfa\x42\x04\x32\x02(\x00\x12\x16\n\x05width\x18\x02 \x01(\x04\x42\x07\xfa\x42\x04\x32\x02(\x00\x42\r\n\x06source\x12\x03\xf8\x42\x01\x42\x0f\n\r_session_info\"v\n\x11VirtualCameraNode\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12\x15\n\x04path\x18\x02 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12\x33\n\x10output_port_name\x18\x03 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\"\xb3\x02\n\x17ImageClassificationNode\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x0binput_image\x18\x02 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12<\n\x0cmodel_source\x18\x03 \x01(\x0b\x32\x1c.inference_graph.ModelSourceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x33\n\x10output_port_name\x18\x04 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\x12\x37\n\x0csession_info\x18\x05 \x01(\x0b\x32\x1c.inference_graph.SessionInfoH\x00\x88\x01\x01\x42\x0f\n\r_session_info\"\xd2\x02\n\x18ImageObjectDetectionNode\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x0binput_image\x18\x02 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12<\n\x0cmodel_source\x18\x03 \x01(\x0b\x32\x1c.inference_graph.ModelSourceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x1c\n\x14scale_bounding_boxes\x18\x04 \x01(\x08\x12\x33\n\x10output_port_name\x18\x05 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\x12\x37\n\x0csession_info\x18\x06 \x01(\x0b\x32\x1c.inference_graph.SessionInfoH\x00\x88\x01\x01\x42\x0f\n\r_session_info\"\xa8\x02\n\x0cImageOcrNode\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x0binput_image\x18\x02 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12<\n\x0cmodel_source\x18\x03 \x01(\x0b\x32\x1c.inference_graph.ModelSourceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01\x12\x33\n\x10output_port_name\x18\x04 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\x12\x37\n\x0csession_info\x18\x05 \x01(\x0b\x32\x1c.inference_graph.SessionInfoH\x00\x88\x01\x01\x42\x0f\n\r_session_info\"\xfd\x04\n\x15\x42oundingBoxFilterNode\x12\x15\n\x04name\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01\x12V\n\x14input_bounding_boxes\x18\x02 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$\x12\x33\n\x10output_port_name\x18\x03 \x01(\tB\x19\xfa\x42\x16r\x14\x10\x01\x32\x10^[a-zA-Z0-9_-]+$\x12Z\n\x15input_score_threshold\x18\x04 \x01(\x0b\x32\x36.inference_graph.BoundingBoxFilterNode.ThresholdSourceH\x00\x88\x01\x01\x12X\n\x13input_iou_threshold\x18\x05 \x01(\x0b\x32\x36.inference_graph.BoundingBoxFilterNode.ThresholdSourceH\x01\x88\x01\x01\x12\x37\n\x0csession_info\x18\x06 \x01(\x0b\x32\x1c.inference_graph.SessionInfoH\x02\x88\x01\x01\x1a\x8d\x01\n\x0fThresholdSource\x12I\n\x05topic\x18\x01 \x01(\tB8\xfa\x42\x35r3\x10\x01\x32/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$H\x00\x12 \n\x05value\x18\x02 \x01(\x02\x42\x0f\xfa\x42\x0c\n\n\x1d\x00\x00\x80?-\x00\x00\x00\x00H\x00\x42\r\n\x06source\x12\x03\xf8\x42\x01\x42\x18\n\x16_input_score_thresholdB\x16\n\x14_input_iou_thresholdB\x0f\n\r_session_info\"\xc0\x04\n\x04Node\x12=\n\x11\x63onst_tensor_node\x18\x01 \x01(\x0b\x32 .inference_graph.ConstTensorNodeH\x00\x12=\n\x11image_resize_node\x18\x02 \x01(\x0b\x32 .inference_graph.ImageResizeNodeH\x00\x12?\n\x12image_patches_node\x18\x03 \x01(\x0b\x32!.inference_graph.ImagePatchesNodeH\x00\x12\x41\n\x13virtual_camera_node\x18\x04 \x01(\x0b\x32\".inference_graph.VirtualCameraNodeH\x00\x12M\n\x19image_classification_node\x18\x05 \x01(\x0b\x32(.inference_graph.ImageClassificationNodeH\x00\x12P\n\x1bimage_object_detection_node\x18\x06 \x01(\x0b\x32).inference_graph.ImageObjectDetectionNodeH\x00\x12\x37\n\x0eimage_ocr_node\x18\x07 \x01(\x0b\x32\x1d.inference_graph.ImageOcrNodeH\x00\x12J\n\x18\x62ounding_box_filter_node\x18\x08 \x01(\x0b\x32&.inference_graph.BoundingBoxFilterNodeH\x00\x42\x10\n\tnode_type\x12\x03\xf8\x42\x01\"_\n\x05Graph\x12$\n\x05nodes\x18\x01 \x03(\x0b\x32\x15.inference_graph.Node\x12\x12\n\ncreated_at\x18\x02 \x01(\x03\x12\x1c\n\nlicense_id\x18\x03 \x01(\tB\x08\xfa\x42\x05r\x03\xb0\x01\x01*B\n\x11\x45xecutionProvider\x12\x07\n\x03\x43PU\x10\x00\x12\x08\n\x04\x43UDA\x10\x01\x12\x0c\n\x08\x44IRECTML\x10\x02\x12\x0c\n\x08TENSORRT\x10\x03\x42NZ0github.com/DENKweit/denkproto-go/inference_graph\xaa\x02\x19\x44\x45NK.Proto.InferenceGraphb\x06proto3')
|
|
30
30
|
|
|
31
31
|
_globals = globals()
|
|
32
32
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -49,7 +49,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
49
49
|
_globals['_CONSTTENSORNODE'].fields_by_name['name']._loaded_options = None
|
|
50
50
|
_globals['_CONSTTENSORNODE'].fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
51
51
|
_globals['_CONSTTENSORNODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
52
|
-
_globals['_CONSTTENSORNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
52
|
+
_globals['_CONSTTENSORNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
53
53
|
_globals['_IMAGERESIZENODE'].fields_by_name['name']._loaded_options = None
|
|
54
54
|
_globals['_IMAGERESIZENODE'].fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
55
55
|
_globals['_IMAGERESIZENODE'].fields_by_name['input_size']._loaded_options = None
|
|
@@ -57,7 +57,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
57
57
|
_globals['_IMAGERESIZENODE'].fields_by_name['input_image']._loaded_options = None
|
|
58
58
|
_globals['_IMAGERESIZENODE'].fields_by_name['input_image']._serialized_options = b'\372B5r3\020\0012/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$'
|
|
59
59
|
_globals['_IMAGERESIZENODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
60
|
-
_globals['_IMAGERESIZENODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
60
|
+
_globals['_IMAGERESIZENODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
61
61
|
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE_IMAGESIZE'].fields_by_name['height']._loaded_options = None
|
|
62
62
|
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE_IMAGESIZE'].fields_by_name['height']._serialized_options = b'\372B\0042\002(\000'
|
|
63
63
|
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE_IMAGESIZE'].fields_by_name['width']._loaded_options = None
|
|
@@ -66,12 +66,6 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
66
66
|
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE'].oneofs_by_name['source']._serialized_options = b'\370B\001'
|
|
67
67
|
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE'].fields_by_name['topic']._loaded_options = None
|
|
68
68
|
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE'].fields_by_name['topic']._serialized_options = b'\372B5r3\020\0012/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$'
|
|
69
|
-
_globals['_IMAGEPATCHESNODE_MAXITERATIONSCOUNTSOURCE'].oneofs_by_name['source']._loaded_options = None
|
|
70
|
-
_globals['_IMAGEPATCHESNODE_MAXITERATIONSCOUNTSOURCE'].oneofs_by_name['source']._serialized_options = b'\370B\001'
|
|
71
|
-
_globals['_IMAGEPATCHESNODE_MAXITERATIONSCOUNTSOURCE'].fields_by_name['topic']._loaded_options = None
|
|
72
|
-
_globals['_IMAGEPATCHESNODE_MAXITERATIONSCOUNTSOURCE'].fields_by_name['topic']._serialized_options = b'\372B5r3\020\0012/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$'
|
|
73
|
-
_globals['_IMAGEPATCHESNODE_MAXITERATIONSCOUNTSOURCE'].fields_by_name['value']._loaded_options = None
|
|
74
|
-
_globals['_IMAGEPATCHESNODE_MAXITERATIONSCOUNTSOURCE'].fields_by_name['value']._serialized_options = b'\372B\0042\002(\000'
|
|
75
69
|
_globals['_IMAGEPATCHESNODE'].fields_by_name['name']._loaded_options = None
|
|
76
70
|
_globals['_IMAGEPATCHESNODE'].fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
77
71
|
_globals['_IMAGEPATCHESNODE'].fields_by_name['input_image']._loaded_options = None
|
|
@@ -81,33 +75,31 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
81
75
|
_globals['_IMAGEPATCHESNODE'].fields_by_name['input_target_size']._loaded_options = None
|
|
82
76
|
_globals['_IMAGEPATCHESNODE'].fields_by_name['input_target_size']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
83
77
|
_globals['_IMAGEPATCHESNODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
84
|
-
_globals['_IMAGEPATCHESNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
85
|
-
_globals['_IMAGEPATCHESNODE'].fields_by_name['input_maximum_iterations']._loaded_options = None
|
|
86
|
-
_globals['_IMAGEPATCHESNODE'].fields_by_name['input_maximum_iterations']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
78
|
+
_globals['_IMAGEPATCHESNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
87
79
|
_globals['_VIRTUALCAMERANODE'].fields_by_name['name']._loaded_options = None
|
|
88
80
|
_globals['_VIRTUALCAMERANODE'].fields_by_name['name']._serialized_options = b'\372B\004r\002\020\001'
|
|
89
81
|
_globals['_VIRTUALCAMERANODE'].fields_by_name['path']._loaded_options = None
|
|
90
82
|
_globals['_VIRTUALCAMERANODE'].fields_by_name['path']._serialized_options = b'\372B\004r\002\020\001'
|
|
91
83
|
_globals['_VIRTUALCAMERANODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
92
|
-
_globals['_VIRTUALCAMERANODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
84
|
+
_globals['_VIRTUALCAMERANODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
93
85
|
_globals['_IMAGECLASSIFICATIONNODE'].fields_by_name['input_image']._loaded_options = None
|
|
94
86
|
_globals['_IMAGECLASSIFICATIONNODE'].fields_by_name['input_image']._serialized_options = b'\372B5r3\020\0012/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$'
|
|
95
87
|
_globals['_IMAGECLASSIFICATIONNODE'].fields_by_name['model_source']._loaded_options = None
|
|
96
88
|
_globals['_IMAGECLASSIFICATIONNODE'].fields_by_name['model_source']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
97
89
|
_globals['_IMAGECLASSIFICATIONNODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
98
|
-
_globals['_IMAGECLASSIFICATIONNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
90
|
+
_globals['_IMAGECLASSIFICATIONNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
99
91
|
_globals['_IMAGEOBJECTDETECTIONNODE'].fields_by_name['input_image']._loaded_options = None
|
|
100
92
|
_globals['_IMAGEOBJECTDETECTIONNODE'].fields_by_name['input_image']._serialized_options = b'\372B5r3\020\0012/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$'
|
|
101
93
|
_globals['_IMAGEOBJECTDETECTIONNODE'].fields_by_name['model_source']._loaded_options = None
|
|
102
94
|
_globals['_IMAGEOBJECTDETECTIONNODE'].fields_by_name['model_source']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
103
95
|
_globals['_IMAGEOBJECTDETECTIONNODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
104
|
-
_globals['_IMAGEOBJECTDETECTIONNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
96
|
+
_globals['_IMAGEOBJECTDETECTIONNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
105
97
|
_globals['_IMAGEOCRNODE'].fields_by_name['input_image']._loaded_options = None
|
|
106
98
|
_globals['_IMAGEOCRNODE'].fields_by_name['input_image']._serialized_options = b'\372B5r3\020\0012/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$'
|
|
107
99
|
_globals['_IMAGEOCRNODE'].fields_by_name['model_source']._loaded_options = None
|
|
108
100
|
_globals['_IMAGEOCRNODE'].fields_by_name['model_source']._serialized_options = b'\372B\005\212\001\002\020\001'
|
|
109
101
|
_globals['_IMAGEOCRNODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
110
|
-
_globals['_IMAGEOCRNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
102
|
+
_globals['_IMAGEOCRNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
111
103
|
_globals['_BOUNDINGBOXFILTERNODE_THRESHOLDSOURCE'].oneofs_by_name['source']._loaded_options = None
|
|
112
104
|
_globals['_BOUNDINGBOXFILTERNODE_THRESHOLDSOURCE'].oneofs_by_name['source']._serialized_options = b'\370B\001'
|
|
113
105
|
_globals['_BOUNDINGBOXFILTERNODE_THRESHOLDSOURCE'].fields_by_name['topic']._loaded_options = None
|
|
@@ -119,49 +111,47 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
119
111
|
_globals['_BOUNDINGBOXFILTERNODE'].fields_by_name['input_bounding_boxes']._loaded_options = None
|
|
120
112
|
_globals['_BOUNDINGBOXFILTERNODE'].fields_by_name['input_bounding_boxes']._serialized_options = b'\372B5r3\020\0012/^[a-zA-Z0-9_]+\\/[a-zA-Z0-9_]+([?]timeout=\\d+)?$'
|
|
121
113
|
_globals['_BOUNDINGBOXFILTERNODE'].fields_by_name['output_port_name']._loaded_options = None
|
|
122
|
-
_globals['_BOUNDINGBOXFILTERNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B
|
|
114
|
+
_globals['_BOUNDINGBOXFILTERNODE'].fields_by_name['output_port_name']._serialized_options = b'\372B\026r\024\020\0012\020^[a-zA-Z0-9_-]+$'
|
|
123
115
|
_globals['_NODE'].oneofs_by_name['node_type']._loaded_options = None
|
|
124
116
|
_globals['_NODE'].oneofs_by_name['node_type']._serialized_options = b'\370B\001'
|
|
125
117
|
_globals['_GRAPH'].fields_by_name['license_id']._loaded_options = None
|
|
126
118
|
_globals['_GRAPH'].fields_by_name['license_id']._serialized_options = b'\372B\005r\003\260\001\001'
|
|
127
|
-
_globals['_EXECUTIONPROVIDER']._serialized_start=
|
|
128
|
-
_globals['_EXECUTIONPROVIDER']._serialized_end=
|
|
119
|
+
_globals['_EXECUTIONPROVIDER']._serialized_start=4177
|
|
120
|
+
_globals['_EXECUTIONPROVIDER']._serialized_end=4243
|
|
129
121
|
_globals['_MODELSOURCE']._serialized_start=79
|
|
130
122
|
_globals['_MODELSOURCE']._serialized_end=244
|
|
131
123
|
_globals['_SESSIONINFO']._serialized_start=246
|
|
132
124
|
_globals['_SESSIONINFO']._serialized_end=361
|
|
133
125
|
_globals['_CONSTTENSORNODE']._serialized_start=364
|
|
134
|
-
_globals['_CONSTTENSORNODE']._serialized_end=
|
|
135
|
-
_globals['_CONSTTENSORNODE_UINT64ARRAY']._serialized_start=
|
|
136
|
-
_globals['_CONSTTENSORNODE_UINT64ARRAY']._serialized_end=
|
|
137
|
-
_globals['_CONSTTENSORNODE_INT64ARRAY']._serialized_start=
|
|
138
|
-
_globals['_CONSTTENSORNODE_INT64ARRAY']._serialized_end=
|
|
139
|
-
_globals['_CONSTTENSORNODE_FLOAT64ARRAY']._serialized_start=
|
|
140
|
-
_globals['_CONSTTENSORNODE_FLOAT64ARRAY']._serialized_end=
|
|
141
|
-
_globals['_IMAGERESIZENODE']._serialized_start=
|
|
142
|
-
_globals['_IMAGERESIZENODE']._serialized_end=
|
|
143
|
-
_globals['_IMAGEPATCHESNODE']._serialized_start=
|
|
144
|
-
_globals['_IMAGEPATCHESNODE']._serialized_end=
|
|
145
|
-
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE']._serialized_start=
|
|
146
|
-
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE']._serialized_end=
|
|
147
|
-
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE_IMAGESIZE']._serialized_start=
|
|
148
|
-
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE_IMAGESIZE']._serialized_end=
|
|
149
|
-
_globals['
|
|
150
|
-
_globals['
|
|
151
|
-
_globals['
|
|
152
|
-
_globals['
|
|
153
|
-
_globals['
|
|
154
|
-
_globals['
|
|
155
|
-
_globals['
|
|
156
|
-
_globals['
|
|
157
|
-
_globals['
|
|
158
|
-
_globals['
|
|
159
|
-
_globals['
|
|
160
|
-
_globals['
|
|
161
|
-
_globals['
|
|
162
|
-
_globals['
|
|
163
|
-
_globals['
|
|
164
|
-
_globals['
|
|
165
|
-
_globals['_GRAPH']._serialized_start=4484
|
|
166
|
-
_globals['_GRAPH']._serialized_end=4579
|
|
126
|
+
_globals['_CONSTTENSORNODE']._serialized_end=784
|
|
127
|
+
_globals['_CONSTTENSORNODE_UINT64ARRAY']._serialized_start=681
|
|
128
|
+
_globals['_CONSTTENSORNODE_UINT64ARRAY']._serialized_end=708
|
|
129
|
+
_globals['_CONSTTENSORNODE_INT64ARRAY']._serialized_start=710
|
|
130
|
+
_globals['_CONSTTENSORNODE_INT64ARRAY']._serialized_end=736
|
|
131
|
+
_globals['_CONSTTENSORNODE_FLOAT64ARRAY']._serialized_start=738
|
|
132
|
+
_globals['_CONSTTENSORNODE_FLOAT64ARRAY']._serialized_end=766
|
|
133
|
+
_globals['_IMAGERESIZENODE']._serialized_start=787
|
|
134
|
+
_globals['_IMAGERESIZENODE']._serialized_end=1111
|
|
135
|
+
_globals['_IMAGEPATCHESNODE']._serialized_start=1114
|
|
136
|
+
_globals['_IMAGEPATCHESNODE']._serialized_end=1789
|
|
137
|
+
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE']._serialized_start=1524
|
|
138
|
+
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE']._serialized_end=1772
|
|
139
|
+
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE_IMAGESIZE']._serialized_start=1697
|
|
140
|
+
_globals['_IMAGEPATCHESNODE_TARGETSIZESOURCE_IMAGESIZE']._serialized_end=1757
|
|
141
|
+
_globals['_VIRTUALCAMERANODE']._serialized_start=1791
|
|
142
|
+
_globals['_VIRTUALCAMERANODE']._serialized_end=1909
|
|
143
|
+
_globals['_IMAGECLASSIFICATIONNODE']._serialized_start=1912
|
|
144
|
+
_globals['_IMAGECLASSIFICATIONNODE']._serialized_end=2219
|
|
145
|
+
_globals['_IMAGEOBJECTDETECTIONNODE']._serialized_start=2222
|
|
146
|
+
_globals['_IMAGEOBJECTDETECTIONNODE']._serialized_end=2560
|
|
147
|
+
_globals['_IMAGEOCRNODE']._serialized_start=2563
|
|
148
|
+
_globals['_IMAGEOCRNODE']._serialized_end=2859
|
|
149
|
+
_globals['_BOUNDINGBOXFILTERNODE']._serialized_start=2862
|
|
150
|
+
_globals['_BOUNDINGBOXFILTERNODE']._serialized_end=3499
|
|
151
|
+
_globals['_BOUNDINGBOXFILTERNODE_THRESHOLDSOURCE']._serialized_start=3291
|
|
152
|
+
_globals['_BOUNDINGBOXFILTERNODE_THRESHOLDSOURCE']._serialized_end=3432
|
|
153
|
+
_globals['_NODE']._serialized_start=3502
|
|
154
|
+
_globals['_NODE']._serialized_end=4078
|
|
155
|
+
_globals['_GRAPH']._serialized_start=4080
|
|
156
|
+
_globals['_GRAPH']._serialized_end=4175
|
|
167
157
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -83,7 +83,7 @@ class ImageResizeNode(_message.Message):
|
|
|
83
83
|
def __init__(self, name: _Optional[str] = ..., input_size: _Optional[str] = ..., input_image: _Optional[str] = ..., output_port_name: _Optional[str] = ..., session_info: _Optional[_Union[SessionInfo, _Mapping]] = ...) -> None: ...
|
|
84
84
|
|
|
85
85
|
class ImagePatchesNode(_message.Message):
|
|
86
|
-
__slots__ = ("name", "input_image", "input_bounding_boxes", "input_target_size", "output_port_name", "
|
|
86
|
+
__slots__ = ("name", "input_image", "input_bounding_boxes", "input_target_size", "output_port_name", "session_info")
|
|
87
87
|
class TargetSizeSource(_message.Message):
|
|
88
88
|
__slots__ = ("topic", "size")
|
|
89
89
|
class ImageSize(_message.Message):
|
|
@@ -98,28 +98,19 @@ class ImagePatchesNode(_message.Message):
|
|
|
98
98
|
topic: str
|
|
99
99
|
size: ImagePatchesNode.TargetSizeSource.ImageSize
|
|
100
100
|
def __init__(self, topic: _Optional[str] = ..., size: _Optional[_Union[ImagePatchesNode.TargetSizeSource.ImageSize, _Mapping]] = ...) -> None: ...
|
|
101
|
-
class MaxIterationsCountSource(_message.Message):
|
|
102
|
-
__slots__ = ("topic", "value")
|
|
103
|
-
TOPIC_FIELD_NUMBER: _ClassVar[int]
|
|
104
|
-
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
-
topic: str
|
|
106
|
-
value: int
|
|
107
|
-
def __init__(self, topic: _Optional[str] = ..., value: _Optional[int] = ...) -> None: ...
|
|
108
101
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
109
102
|
INPUT_IMAGE_FIELD_NUMBER: _ClassVar[int]
|
|
110
103
|
INPUT_BOUNDING_BOXES_FIELD_NUMBER: _ClassVar[int]
|
|
111
104
|
INPUT_TARGET_SIZE_FIELD_NUMBER: _ClassVar[int]
|
|
112
105
|
OUTPUT_PORT_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
-
INPUT_MAXIMUM_ITERATIONS_FIELD_NUMBER: _ClassVar[int]
|
|
114
106
|
SESSION_INFO_FIELD_NUMBER: _ClassVar[int]
|
|
115
107
|
name: str
|
|
116
108
|
input_image: str
|
|
117
109
|
input_bounding_boxes: str
|
|
118
110
|
input_target_size: ImagePatchesNode.TargetSizeSource
|
|
119
111
|
output_port_name: str
|
|
120
|
-
input_maximum_iterations: ImagePatchesNode.MaxIterationsCountSource
|
|
121
112
|
session_info: SessionInfo
|
|
122
|
-
def __init__(self, name: _Optional[str] = ..., input_image: _Optional[str] = ..., input_bounding_boxes: _Optional[str] = ..., input_target_size: _Optional[_Union[ImagePatchesNode.TargetSizeSource, _Mapping]] = ..., output_port_name: _Optional[str] = ...,
|
|
113
|
+
def __init__(self, name: _Optional[str] = ..., input_image: _Optional[str] = ..., input_bounding_boxes: _Optional[str] = ..., input_target_size: _Optional[_Union[ImagePatchesNode.TargetSizeSource, _Mapping]] = ..., output_port_name: _Optional[str] = ..., session_info: _Optional[_Union[SessionInfo, _Mapping]] = ...) -> None: ...
|
|
123
114
|
|
|
124
115
|
class VirtualCameraNode(_message.Message):
|
|
125
116
|
__slots__ = ("name", "path", "output_port_name")
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
# To use this code, make sure you
|
|
2
|
-
#
|
|
3
|
-
# import json
|
|
4
|
-
#
|
|
5
|
-
# and then, to convert JSON from a string, do
|
|
6
|
-
#
|
|
7
|
-
# result = classification_markup_from_dict(json.loads(json_string))
|
|
8
|
-
|
|
9
1
|
from uuid import UUID
|
|
10
2
|
from typing import Any, List, TypeVar, Callable, Type, cast
|
|
11
3
|
|
|
@@ -19,7 +11,7 @@ def from_float(x: Any) -> float:
|
|
|
19
11
|
|
|
20
12
|
|
|
21
13
|
def to_float(x: Any) -> float:
|
|
22
|
-
assert isinstance(x, float)
|
|
14
|
+
assert isinstance(x, (int, float))
|
|
23
15
|
return x
|
|
24
16
|
|
|
25
17
|
|
|
@@ -71,7 +71,6 @@ class ImagePatchesNode(BaseModel):
|
|
|
71
71
|
input_image: str
|
|
72
72
|
input_bounding_boxes: str
|
|
73
73
|
input_target_size: TargetSizeSource
|
|
74
|
-
input_maximum_iterations: Optional[MaxIterationsCountSource] = None
|
|
75
74
|
output_port_name: str
|
|
76
75
|
|
|
77
76
|
class ImageResizeNode(BaseModel):
|
|
@@ -100,16 +99,6 @@ class VirtualCameraNode(BaseModel):
|
|
|
100
99
|
output_port_name: str
|
|
101
100
|
|
|
102
101
|
# --- Inline Option Classes ---
|
|
103
|
-
class MaxIterationsCountSourceTopicOption(BaseModel):
|
|
104
|
-
"""Auto-generated class for inline option 'topic' of MaxIterationsCountSource"""
|
|
105
|
-
source_type: Literal["topic"]
|
|
106
|
-
topic: str
|
|
107
|
-
|
|
108
|
-
class MaxIterationsCountSourceValueOption(BaseModel):
|
|
109
|
-
"""Auto-generated class for inline option 'value' of MaxIterationsCountSource"""
|
|
110
|
-
source_type: Literal["value"]
|
|
111
|
-
value: int
|
|
112
|
-
|
|
113
102
|
class TargetSizeSourceImageSizeOption(BaseModel):
|
|
114
103
|
"""Auto-generated class for inline option 'image_size' of TargetSizeSource"""
|
|
115
104
|
source_type: Literal["image_size"]
|
|
@@ -146,14 +135,6 @@ ConstTensorDataBase = Annotated[
|
|
|
146
135
|
Field(discriminator='data_type')
|
|
147
136
|
]
|
|
148
137
|
|
|
149
|
-
MaxIterationsCountSource = Annotated[
|
|
150
|
-
Union[
|
|
151
|
-
MaxIterationsCountSourceTopicOption,
|
|
152
|
-
MaxIterationsCountSourceValueOption
|
|
153
|
-
],
|
|
154
|
-
Field(discriminator='source_type')
|
|
155
|
-
]
|
|
156
|
-
|
|
157
138
|
ModelSourceBase = Annotated[
|
|
158
139
|
Union[
|
|
159
140
|
ModelSourceFromNetworkExperimentId,
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
# To use this code, make sure you
|
|
2
|
-
#
|
|
3
|
-
# import json
|
|
4
|
-
#
|
|
5
|
-
# and then, to convert JSON from a string, do
|
|
6
|
-
#
|
|
7
|
-
# result = object_detection_markup_from_dict(json.loads(json_string))
|
|
8
|
-
|
|
9
1
|
from enum import Enum
|
|
10
2
|
from typing import Optional, Any, List, TypeVar, Type, Callable, cast
|
|
11
3
|
from uuid import UUID
|
|
@@ -40,7 +32,7 @@ def from_bool(x: Any) -> bool:
|
|
|
40
32
|
|
|
41
33
|
|
|
42
34
|
def to_float(x: Any) -> float:
|
|
43
|
-
assert isinstance(x, float)
|
|
35
|
+
assert isinstance(x, (int, float))
|
|
44
36
|
return x
|
|
45
37
|
|
|
46
38
|
|
|
@@ -112,12 +104,14 @@ class Annotation:
|
|
|
112
104
|
|
|
113
105
|
def to_dict(self) -> dict:
|
|
114
106
|
result: dict = {}
|
|
115
|
-
|
|
107
|
+
if self.angle is not None:
|
|
108
|
+
result["angle"] = from_union([to_float, from_none], self.angle)
|
|
116
109
|
result["annotation_type"] = to_enum(AnnotationType, self.annotation_type)
|
|
117
110
|
result["average_width"] = to_float(self.average_width)
|
|
118
111
|
result["bottom_right_x"] = to_float(self.bottom_right_x)
|
|
119
112
|
result["bottom_right_y"] = to_float(self.bottom_right_y)
|
|
120
|
-
|
|
113
|
+
if self.full_orientation is not None:
|
|
114
|
+
result["full_orientation"] = from_union([from_bool, from_none], self.full_orientation)
|
|
121
115
|
result["id"] = str(self.id)
|
|
122
116
|
result["label_id"] = str(self.label_id)
|
|
123
117
|
result["top_left_x"] = to_float(self.top_left_x)
|
denkproto/json/ocr_markup.py
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
# To use this code, make sure you
|
|
2
|
-
#
|
|
3
|
-
# import json
|
|
4
|
-
#
|
|
5
|
-
# and then, to convert JSON from a string, do
|
|
6
|
-
#
|
|
7
|
-
# result = ocr_markup_from_dict(json.loads(json_string))
|
|
8
|
-
|
|
9
1
|
from typing import Any, List, Optional, TypeVar, Callable, Type, cast
|
|
10
2
|
from uuid import UUID
|
|
11
3
|
|
|
@@ -19,7 +11,7 @@ def from_float(x: Any) -> float:
|
|
|
19
11
|
|
|
20
12
|
|
|
21
13
|
def to_float(x: Any) -> float:
|
|
22
|
-
assert isinstance(x, float)
|
|
14
|
+
assert isinstance(x, (int, float))
|
|
23
15
|
return x
|
|
24
16
|
|
|
25
17
|
|
|
@@ -111,12 +103,13 @@ class Point:
|
|
|
111
103
|
|
|
112
104
|
class OcrMarkupSchema:
|
|
113
105
|
"""A single closed loop (ring) of a polygon, defining either an outer boundary or a hole."""
|
|
106
|
+
|
|
107
|
+
hierarchy: int
|
|
114
108
|
"""Nesting level: 0=outer, 1=hole in level 0, 2=poly in level 1 hole, etc. Even levels are
|
|
115
109
|
filled areas, odd levels are holes.
|
|
116
110
|
"""
|
|
117
|
-
hierarchy: int
|
|
118
|
-
"""Vertices of the ring."""
|
|
119
111
|
points: List[Point]
|
|
112
|
+
"""Vertices of the ring."""
|
|
120
113
|
|
|
121
114
|
def __init__(self, hierarchy: int, points: List[Point]) -> None:
|
|
122
115
|
self.hierarchy = hierarchy
|
|
@@ -138,10 +131,11 @@ class OcrMarkupSchema:
|
|
|
138
131
|
|
|
139
132
|
class Polygon:
|
|
140
133
|
"""A polygon defined by one or more rings, allowing for holes and nested structures."""
|
|
134
|
+
|
|
135
|
+
rings: List[OcrMarkupSchema]
|
|
141
136
|
"""Array of polygon rings. The hierarchy field within each ring determines nesting and
|
|
142
137
|
fill/hole status.
|
|
143
138
|
"""
|
|
144
|
-
rings: List[OcrMarkupSchema]
|
|
145
139
|
|
|
146
140
|
def __init__(self, rings: List[OcrMarkupSchema]) -> None:
|
|
147
141
|
self.rings = rings
|
|
@@ -162,8 +156,9 @@ class Annotation:
|
|
|
162
156
|
bounding_box: Optional[BoundingBox]
|
|
163
157
|
id: UUID
|
|
164
158
|
label_id: UUID
|
|
165
|
-
"""A polygon defined by one or more rings, allowing for holes and nested structures."""
|
|
166
159
|
polygon: Optional[Polygon]
|
|
160
|
+
"""A polygon defined by one or more rings, allowing for holes and nested structures."""
|
|
161
|
+
|
|
167
162
|
text: str
|
|
168
163
|
|
|
169
164
|
def __init__(self, bounding_box: Optional[BoundingBox], id: UUID, label_id: UUID, polygon: Optional[Polygon], text: str) -> None:
|
|
@@ -185,10 +180,12 @@ class Annotation:
|
|
|
185
180
|
|
|
186
181
|
def to_dict(self) -> dict:
|
|
187
182
|
result: dict = {}
|
|
188
|
-
|
|
183
|
+
if self.bounding_box is not None:
|
|
184
|
+
result["bounding_box"] = from_union([lambda x: to_class(BoundingBox, x), from_none], self.bounding_box)
|
|
189
185
|
result["id"] = str(self.id)
|
|
190
186
|
result["label_id"] = str(self.label_id)
|
|
191
|
-
|
|
187
|
+
if self.polygon is not None:
|
|
188
|
+
result["polygon"] = from_union([lambda x: to_class(Polygon, x), from_none], self.polygon)
|
|
192
189
|
result["text"] = from_str(self.text)
|
|
193
190
|
return result
|
|
194
191
|
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
# To use this code, make sure you
|
|
2
|
-
#
|
|
3
|
-
# import json
|
|
4
|
-
#
|
|
5
|
-
# and then, to convert JSON from a string, do
|
|
6
|
-
#
|
|
7
|
-
# result = segmentation_markup_from_dict(json.loads(json_string))
|
|
8
|
-
|
|
9
1
|
from enum import Enum
|
|
10
2
|
from typing import Any, List, Optional, TypeVar, Callable, Type, cast
|
|
11
3
|
from uuid import UUID
|
|
@@ -21,7 +13,7 @@ def from_float(x: Any) -> float:
|
|
|
21
13
|
|
|
22
14
|
|
|
23
15
|
def to_float(x: Any) -> float:
|
|
24
|
-
assert isinstance(x, float)
|
|
16
|
+
assert isinstance(x, (int, float))
|
|
25
17
|
return x
|
|
26
18
|
|
|
27
19
|
|
|
@@ -291,12 +283,13 @@ class RingPoint:
|
|
|
291
283
|
|
|
292
284
|
class SegmentationMarkupSchema:
|
|
293
285
|
"""A single closed loop (ring) of a polygon, defining either an outer boundary or a hole."""
|
|
286
|
+
|
|
287
|
+
hierarchy: int
|
|
294
288
|
"""Nesting level: 0=outer, 1=hole in level 0, 2=poly in level 1 hole, etc. Even levels are
|
|
295
289
|
filled areas, odd levels are holes.
|
|
296
290
|
"""
|
|
297
|
-
hierarchy: int
|
|
298
|
-
"""Vertices of the ring."""
|
|
299
291
|
points: List[RingPoint]
|
|
292
|
+
"""Vertices of the ring."""
|
|
300
293
|
|
|
301
294
|
def __init__(self, hierarchy: int, points: List[RingPoint]) -> None:
|
|
302
295
|
self.hierarchy = hierarchy
|
|
@@ -318,10 +311,11 @@ class SegmentationMarkupSchema:
|
|
|
318
311
|
|
|
319
312
|
class PolygonAnnotation:
|
|
320
313
|
"""A polygon defined by one or more rings, allowing for holes and nested structures."""
|
|
314
|
+
|
|
315
|
+
rings: List[SegmentationMarkupSchema]
|
|
321
316
|
"""Array of polygon rings. The hierarchy field within each ring determines nesting and
|
|
322
317
|
fill/hole status.
|
|
323
318
|
"""
|
|
324
|
-
rings: List[SegmentationMarkupSchema]
|
|
325
319
|
|
|
326
320
|
def __init__(self, rings: List[SegmentationMarkupSchema]) -> None:
|
|
327
321
|
self.rings = rings
|
|
@@ -478,15 +472,22 @@ class Annotation:
|
|
|
478
472
|
result: dict = {}
|
|
479
473
|
result["annotation_type"] = to_enum(AnnotationType, self.annotation_type)
|
|
480
474
|
result["average_width"] = to_float(self.average_width)
|
|
481
|
-
|
|
475
|
+
if self.circle_annotation is not None:
|
|
476
|
+
result["circle_annotation"] = from_union([lambda x: to_class(CircleAnnotation, x), from_none], self.circle_annotation)
|
|
482
477
|
result["id"] = str(self.id)
|
|
483
478
|
result["label_id"] = str(self.label_id)
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
479
|
+
if self.magicwand_annotation is not None:
|
|
480
|
+
result["magicwand_annotation"] = from_union([lambda x: to_class(MagicwandAnnotation, x), from_none], self.magicwand_annotation)
|
|
481
|
+
if self.pen_annotation is not None:
|
|
482
|
+
result["pen_annotation"] = from_union([lambda x: to_class(PenAnnotation, x), from_none], self.pen_annotation)
|
|
483
|
+
if self.pixel_annotation is not None:
|
|
484
|
+
result["pixel_annotation"] = from_union([lambda x: to_class(PixelAnnotation, x), from_none], self.pixel_annotation)
|
|
485
|
+
if self.polygon_annotation is not None:
|
|
486
|
+
result["polygon_annotation"] = from_union([lambda x: to_class(PolygonAnnotation, x), from_none], self.polygon_annotation)
|
|
487
|
+
if self.rectangle_annotation is not None:
|
|
488
|
+
result["rectangle_annotation"] = from_union([lambda x: to_class(RectangleAnnotation, x), from_none], self.rectangle_annotation)
|
|
489
|
+
if self.sausage_annotation is not None:
|
|
490
|
+
result["sausage_annotation"] = from_union([lambda x: to_class(SausageAnnotation, x), from_none], self.sausage_annotation)
|
|
490
491
|
return result
|
|
491
492
|
|
|
492
493
|
|
|
@@ -4,13 +4,13 @@ denkproto/DENKbuffer_pb2_grpc.py,sha256=-CPJPM4FOqwvwV8-f1iJlD18UD9juVIIHfdWUecu
|
|
|
4
4
|
denkproto/ImageAnalysis_ProtobufMessages_pb2.py,sha256=iEY0j9ySGUThnqTdYD4uAVr9P3GiC5R02iK53zEOXUQ,21015
|
|
5
5
|
denkproto/ImageAnalysis_ProtobufMessages_pb2.pyi,sha256=5LFtxrmYpJHizDDNGFTkL7-NQ_TkwqCSdq7vcv3lg-c,36243
|
|
6
6
|
denkproto/ImageAnalysis_ProtobufMessages_pb2_grpc.py,sha256=l3agtDjgu4jay6P9TRnHhyhJ-7UdoII27ywhw3k84oo,911
|
|
7
|
-
denkproto/__about__.py,sha256=
|
|
7
|
+
denkproto/__about__.py,sha256=r6-ps7MQsQNU0pMITOBqwX9KlREmbLUrhkOkxnpZw20,23
|
|
8
8
|
denkproto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
denkproto/denkcache_pb2.py,sha256=G3EEZY-IBVJpThkkXEmhoG7Y3aSLvraKckqTwsXCbUI,6414
|
|
10
10
|
denkproto/denkcache_pb2.pyi,sha256=qOzFOkddUapSJZz5d_mqcfHvWDAmM-70m_7FeM7n5fI,5595
|
|
11
11
|
denkproto/denkcache_pb2_grpc.py,sha256=N1y4ZQ58UPaUlOZIpznzAbJJcs9G_n-FmzFoPPeu8UA,15610
|
|
12
|
-
denkproto/inference_graph_pb2.py,sha256=
|
|
13
|
-
denkproto/inference_graph_pb2.pyi,sha256=
|
|
12
|
+
denkproto/inference_graph_pb2.py,sha256=UxgLewNmtRvlTxr14bssErNvkAhw7TW_fL7KUWL1ebc,19765
|
|
13
|
+
denkproto/inference_graph_pb2.pyi,sha256=By1A5iEmCVG4rMRAAPLGN5d7KIFqcpl4jZvKL8OYNlc,12351
|
|
14
14
|
denkproto/inference_graph_pb2_grpc.py,sha256=aXPf0w7pIfspkKUKGCr--OtJMOaTfE8IbeuBm10g1Xg,896
|
|
15
15
|
denkproto/modelfile_v1_pb2.py,sha256=ulF24nSIspn46DnQKlvR5Po3w-vFCnawuuverAVi3cY,6573
|
|
16
16
|
denkproto/modelfile_v1_pb2.pyi,sha256=gjTbWvg48wqGhyJb5CT0pw3yUZGhO_lSZgL7Ia2aPbY,10685
|
|
@@ -26,11 +26,11 @@ denkproto/validate_pb2.py,sha256=CuGAaHir9X9jniW3QsRKAESjYzoS2U6dLk_J55XmNqU,136
|
|
|
26
26
|
denkproto/validate_pb2.pyi,sha256=fWsdVOR3NJDioCKkCKfxfl4qaEb5xqXXU_WlEbdQx6E,23077
|
|
27
27
|
denkproto/validate_pb2_grpc.py,sha256=XvjuWEgJFJtH1E7HWm7SKpV10PMpOSbonKa2VPHpYy8,889
|
|
28
28
|
denkproto/json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
denkproto/json/classification_markup.py,sha256=
|
|
30
|
-
denkproto/json/inference_graph_models_generated.py,sha256=
|
|
31
|
-
denkproto/json/object_detection_markup.py,sha256=
|
|
32
|
-
denkproto/json/ocr_markup.py,sha256=
|
|
33
|
-
denkproto/json/segmentation_markup.py,sha256=
|
|
34
|
-
denkproto-1.0.
|
|
35
|
-
denkproto-1.0.
|
|
36
|
-
denkproto-1.0.
|
|
29
|
+
denkproto/json/classification_markup.py,sha256=vTu0H7Cb3gU6UUUSg1vDTRlFUorZrjMbcp_yx6UssZA,2461
|
|
30
|
+
denkproto/json/inference_graph_models_generated.py,sha256=AMY46G3izSmhf6fkBVaPutOJxCdP0mnAdr_UxPa8Ss4,5323
|
|
31
|
+
denkproto/json/object_detection_markup.py,sha256=T0hcFPq8F_galjDjRC9dbcRVwCSOYtu2jt9wpEeHlQs,4904
|
|
32
|
+
denkproto/json/ocr_markup.py,sha256=KyOpth9evOekyhTJdZSnYyB9EIyoWbY33sqncb_jBgw,7069
|
|
33
|
+
denkproto/json/segmentation_markup.py,sha256=EvniRksF2KaQolm6zZ6UKSiGwnqc8wR2sHB1iv05RTE,19911
|
|
34
|
+
denkproto-1.0.73.dist-info/METADATA,sha256=_aJyVPpYho6p_BSu-rL-nGUYZbGUzs-X8EGZGMixZ14,110
|
|
35
|
+
denkproto-1.0.73.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
36
|
+
denkproto-1.0.73.dist-info/RECORD,,
|
|
File without changes
|