nedo-vision-worker 1.0.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 (92) hide show
  1. nedo_vision_worker/__init__.py +10 -0
  2. nedo_vision_worker/cli.py +195 -0
  3. nedo_vision_worker/config/ConfigurationManager.py +196 -0
  4. nedo_vision_worker/config/__init__.py +1 -0
  5. nedo_vision_worker/database/DatabaseManager.py +219 -0
  6. nedo_vision_worker/database/__init__.py +1 -0
  7. nedo_vision_worker/doctor.py +453 -0
  8. nedo_vision_worker/initializer/AppInitializer.py +78 -0
  9. nedo_vision_worker/initializer/__init__.py +1 -0
  10. nedo_vision_worker/models/__init__.py +15 -0
  11. nedo_vision_worker/models/ai_model.py +29 -0
  12. nedo_vision_worker/models/auth.py +14 -0
  13. nedo_vision_worker/models/config.py +9 -0
  14. nedo_vision_worker/models/dataset_source.py +30 -0
  15. nedo_vision_worker/models/logs.py +9 -0
  16. nedo_vision_worker/models/ppe_detection.py +39 -0
  17. nedo_vision_worker/models/ppe_detection_label.py +20 -0
  18. nedo_vision_worker/models/restricted_area_violation.py +20 -0
  19. nedo_vision_worker/models/user.py +10 -0
  20. nedo_vision_worker/models/worker_source.py +19 -0
  21. nedo_vision_worker/models/worker_source_pipeline.py +21 -0
  22. nedo_vision_worker/models/worker_source_pipeline_config.py +24 -0
  23. nedo_vision_worker/models/worker_source_pipeline_debug.py +15 -0
  24. nedo_vision_worker/models/worker_source_pipeline_detection.py +14 -0
  25. nedo_vision_worker/protos/AIModelService_pb2.py +46 -0
  26. nedo_vision_worker/protos/AIModelService_pb2_grpc.py +140 -0
  27. nedo_vision_worker/protos/DatasetSourceService_pb2.py +46 -0
  28. nedo_vision_worker/protos/DatasetSourceService_pb2_grpc.py +140 -0
  29. nedo_vision_worker/protos/HumanDetectionService_pb2.py +44 -0
  30. nedo_vision_worker/protos/HumanDetectionService_pb2_grpc.py +140 -0
  31. nedo_vision_worker/protos/PPEDetectionService_pb2.py +46 -0
  32. nedo_vision_worker/protos/PPEDetectionService_pb2_grpc.py +140 -0
  33. nedo_vision_worker/protos/VisionWorkerService_pb2.py +72 -0
  34. nedo_vision_worker/protos/VisionWorkerService_pb2_grpc.py +471 -0
  35. nedo_vision_worker/protos/WorkerSourcePipelineService_pb2.py +64 -0
  36. nedo_vision_worker/protos/WorkerSourcePipelineService_pb2_grpc.py +312 -0
  37. nedo_vision_worker/protos/WorkerSourceService_pb2.py +50 -0
  38. nedo_vision_worker/protos/WorkerSourceService_pb2_grpc.py +183 -0
  39. nedo_vision_worker/protos/__init__.py +1 -0
  40. nedo_vision_worker/repositories/AIModelRepository.py +44 -0
  41. nedo_vision_worker/repositories/DatasetSourceRepository.py +150 -0
  42. nedo_vision_worker/repositories/PPEDetectionRepository.py +112 -0
  43. nedo_vision_worker/repositories/RestrictedAreaRepository.py +88 -0
  44. nedo_vision_worker/repositories/WorkerSourcePipelineDebugRepository.py +90 -0
  45. nedo_vision_worker/repositories/WorkerSourcePipelineDetectionRepository.py +48 -0
  46. nedo_vision_worker/repositories/WorkerSourcePipelineRepository.py +174 -0
  47. nedo_vision_worker/repositories/WorkerSourceRepository.py +46 -0
  48. nedo_vision_worker/repositories/__init__.py +1 -0
  49. nedo_vision_worker/services/AIModelClient.py +362 -0
  50. nedo_vision_worker/services/ConnectionInfoClient.py +57 -0
  51. nedo_vision_worker/services/DatasetSourceClient.py +88 -0
  52. nedo_vision_worker/services/FileToRTMPServer.py +78 -0
  53. nedo_vision_worker/services/GrpcClientBase.py +155 -0
  54. nedo_vision_worker/services/GrpcClientManager.py +141 -0
  55. nedo_vision_worker/services/ImageUploadClient.py +82 -0
  56. nedo_vision_worker/services/PPEDetectionClient.py +108 -0
  57. nedo_vision_worker/services/RTSPtoRTMPStreamer.py +98 -0
  58. nedo_vision_worker/services/RestrictedAreaClient.py +100 -0
  59. nedo_vision_worker/services/SystemUsageClient.py +77 -0
  60. nedo_vision_worker/services/VideoStreamClient.py +161 -0
  61. nedo_vision_worker/services/WorkerSourceClient.py +215 -0
  62. nedo_vision_worker/services/WorkerSourcePipelineClient.py +393 -0
  63. nedo_vision_worker/services/WorkerSourceUpdater.py +134 -0
  64. nedo_vision_worker/services/WorkerStatusClient.py +65 -0
  65. nedo_vision_worker/services/__init__.py +1 -0
  66. nedo_vision_worker/util/HardwareID.py +104 -0
  67. nedo_vision_worker/util/ImageUploader.py +92 -0
  68. nedo_vision_worker/util/Networking.py +94 -0
  69. nedo_vision_worker/util/PlatformDetector.py +50 -0
  70. nedo_vision_worker/util/SystemMonitor.py +299 -0
  71. nedo_vision_worker/util/VideoProbeUtil.py +120 -0
  72. nedo_vision_worker/util/__init__.py +1 -0
  73. nedo_vision_worker/worker/CoreActionWorker.py +125 -0
  74. nedo_vision_worker/worker/DataSenderWorker.py +168 -0
  75. nedo_vision_worker/worker/DataSyncWorker.py +143 -0
  76. nedo_vision_worker/worker/DatasetFrameSender.py +208 -0
  77. nedo_vision_worker/worker/DatasetFrameWorker.py +412 -0
  78. nedo_vision_worker/worker/PPEDetectionManager.py +86 -0
  79. nedo_vision_worker/worker/PipelineActionWorker.py +129 -0
  80. nedo_vision_worker/worker/PipelineImageWorker.py +116 -0
  81. nedo_vision_worker/worker/RabbitMQListener.py +170 -0
  82. nedo_vision_worker/worker/RestrictedAreaManager.py +85 -0
  83. nedo_vision_worker/worker/SystemUsageManager.py +111 -0
  84. nedo_vision_worker/worker/VideoStreamWorker.py +139 -0
  85. nedo_vision_worker/worker/WorkerManager.py +155 -0
  86. nedo_vision_worker/worker/__init__.py +1 -0
  87. nedo_vision_worker/worker_service.py +264 -0
  88. nedo_vision_worker-1.0.0.dist-info/METADATA +563 -0
  89. nedo_vision_worker-1.0.0.dist-info/RECORD +92 -0
  90. nedo_vision_worker-1.0.0.dist-info/WHEEL +5 -0
  91. nedo_vision_worker-1.0.0.dist-info/entry_points.txt +2 -0
  92. nedo_vision_worker-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,20 @@
1
+ import uuid
2
+ from sqlalchemy import Column, String, ForeignKey, DateTime, Float, Integer
3
+ from sqlalchemy.orm import relationship
4
+ from ..database.DatabaseManager import Base
5
+
6
+ class PPEDetectionLabelEntity(Base):
7
+ __tablename__ = "ppe_detection_labels"
8
+ __bind_key__ = "default"
9
+
10
+ id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
11
+ detection_id = Column(String, ForeignKey("ppe_detections.id"), nullable=False)
12
+ code = Column(String, nullable=False) # helmet, vest, etc.
13
+ confidence_score = Column(Float, nullable=False)
14
+ detection_count = Column(Integer, nullable=False, default=0)
15
+ b_box_x1 = Column(Float, nullable=False)
16
+ b_box_y1 = Column(Float, nullable=False)
17
+ b_box_x2 = Column(Float, nullable=False)
18
+ b_box_y2 = Column(Float, nullable=False)
19
+
20
+ detection = relationship("PPEDetectionEntity", back_populates="ppe_labels")
@@ -0,0 +1,20 @@
1
+ import uuid
2
+ import datetime
3
+ from sqlalchemy import Column, Float, String, DateTime
4
+ from ..database.DatabaseManager import Base
5
+
6
+ class RestrictedAreaViolationEntity(Base):
7
+ __tablename__ = "restricted_area_violation"
8
+ __bind_key__ = "default"
9
+
10
+ id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
11
+ worker_source_id = Column(String, nullable=False)
12
+ person_id = Column(String, nullable=False)
13
+ image_path = Column(String, nullable=False)
14
+ image_tile_path = Column(String, nullable=False)
15
+ confidence_score = Column(Float, nullable=False)
16
+ created_at = Column(DateTime, default=datetime.datetime.utcnow)
17
+ b_box_x1 = Column(Float, nullable=False)
18
+ b_box_y1 = Column(Float, nullable=False)
19
+ b_box_x2 = Column(Float, nullable=False)
20
+ b_box_y2 = Column(Float, nullable=False)
@@ -0,0 +1,10 @@
1
+ from sqlalchemy import Column, String
2
+ from ..database.DatabaseManager import Base
3
+
4
+ class UserEntity(Base):
5
+ __tablename__ = "user"
6
+ __bind_key__ = "auth"
7
+
8
+ id = Column(String, primary_key=True)
9
+ username = Column(String, nullable=False)
10
+ password = Column(String, nullable=False)
@@ -0,0 +1,19 @@
1
+ from sqlalchemy import Column, String, Float
2
+ from ..database.DatabaseManager import Base
3
+
4
+ class WorkerSourceEntity(Base):
5
+ __tablename__ = "worker_source"
6
+ __bind_key__ = "config"
7
+
8
+ id = Column(String, primary_key=True)
9
+ name = Column(String, nullable=False)
10
+ worker_id = Column(String, nullable=False)
11
+ type_code = Column(String, nullable=False)
12
+ file_path = Column(String, nullable=True)
13
+ url = Column(String, nullable=False)
14
+ resolution = Column(String, nullable=True)
15
+ status_code = Column(String, nullable=True)
16
+ frame_rate = Column(Float, nullable=True)
17
+ source_location_code = Column(String, nullable=True) # Optional field
18
+ latitude = Column(Float, nullable=True) # Optional field
19
+ longitude = Column(Float, nullable=True) # Optional field
@@ -0,0 +1,21 @@
1
+ from sqlalchemy import Column, String
2
+ from sqlalchemy.orm import relationship
3
+ from ..database.DatabaseManager import Base
4
+
5
+ class WorkerSourcePipelineEntity(Base):
6
+ __tablename__ = "worker_source_pipeline"
7
+ __bind_key__ = "config"
8
+
9
+ id = Column(String, primary_key=True)
10
+ name = Column(String, nullable=False)
11
+ worker_source_id = Column(String, nullable=False)
12
+ worker_id = Column(String, nullable=False)
13
+ ai_model_id = Column(String, nullable=True)
14
+ pipeline_status_code = Column(String, nullable=False)
15
+ location_name = Column(String, nullable=True)
16
+
17
+ worker_source_pipeline_configs = relationship(
18
+ "WorkerSourcePipelineConfigEntity",
19
+ back_populates="pipeline",
20
+ cascade="all, delete-orphan"
21
+ )
@@ -0,0 +1,24 @@
1
+ from sqlalchemy import Column, String, ForeignKey, Boolean
2
+ from sqlalchemy.orm import relationship
3
+ from ..database.DatabaseManager import Base
4
+
5
+
6
+ class WorkerSourcePipelineConfigEntity(Base):
7
+ __tablename__ = "worker_source_pipeline_config"
8
+ __bind_key__ = "config"
9
+
10
+ id = Column(String, primary_key=True)
11
+ worker_source_pipeline_id = Column(
12
+ String, ForeignKey("worker_source_pipeline.id", ondelete="CASCADE"), nullable=False
13
+ )
14
+ pipeline_config_id = Column(String, nullable=False)
15
+ is_enabled = Column(Boolean, nullable=False)
16
+ value = Column(String, nullable=True)
17
+ pipeline_config_name = Column(String, nullable=False)
18
+ pipeline_config_code = Column(String, nullable=False)
19
+
20
+ pipeline = relationship(
21
+ "WorkerSourcePipelineEntity",
22
+ back_populates="worker_source_pipeline_configs",
23
+ passive_deletes=True
24
+ )
@@ -0,0 +1,15 @@
1
+ from datetime import datetime
2
+ import uuid
3
+ from sqlalchemy import Column, DateTime, String
4
+ from ..database.DatabaseManager import Base
5
+
6
+ class WorkerSourcePipelineDebugEntity(Base):
7
+ __tablename__ = "worker_source_pipeline_debug"
8
+ __bind_key__ = "default"
9
+
10
+ id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
11
+ uuid = Column(String, nullable=False)
12
+ worker_source_pipeline_id = Column(String, nullable=False)
13
+ image_path = Column(String, nullable=True)
14
+ data = Column(String, nullable=True)
15
+ created_at = Column(DateTime, default=datetime.utcnow)
@@ -0,0 +1,14 @@
1
+ from datetime import datetime
2
+ import uuid
3
+ from sqlalchemy import Column, DateTime, String
4
+ from ..database.DatabaseManager import Base
5
+
6
+ class WorkerSourcePipelineDetectionEntity(Base):
7
+ __tablename__ = "worker_source_pipeline_detection"
8
+ __bind_key__ = "default"
9
+
10
+ id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
11
+ worker_source_pipeline_id = Column(String, nullable=False)
12
+ image_path = Column(String, nullable=True)
13
+ data = Column(String, nullable=True)
14
+ created_at = Column(DateTime, default=datetime.utcnow)
@@ -0,0 +1,46 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: nedo_vision_worker/protos/AIModelService.proto
5
+ # Protobuf Python Version: 6.31.0
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
+ 6,
15
+ 31,
16
+ 0,
17
+ '',
18
+ 'nedo_vision_worker/protos/AIModelService.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.nedo_vision_worker/protos/AIModelService.proto\x12\x1eSindika.AspNet.App005.Services\"9\n\x15GetAIModelListRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"y\n\x16GetAIModelListResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12=\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32/.Sindika.AspNet.App005.Services.AIModelResponse\"\x9e\x01\n\x0f\x41IModelResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1e\n\x16\x61i_model_category_code\x18\x03 \x01(\t\x12\x1a\n\x12\x61i_model_type_code\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x12\x11\n\tfile_path\x18\x06 \x01(\t\x12\x11\n\tworker_id\x18\x07 \x01(\t\"<\n\x16\x44ownloadAIModelRequest\x12\x13\n\x0b\x61i_model_id\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\"-\n\x17\x44ownloadAIModelResponse\x12\x12\n\nfile_chunk\x18\x01 \x01(\x0c\x32\x9c\x02\n\x12\x41IModelGRPCService\x12\x7f\n\x0eGetAIModelList\x12\x35.Sindika.AspNet.App005.Services.GetAIModelListRequest\x1a\x36.Sindika.AspNet.App005.Services.GetAIModelListResponse\x12\x84\x01\n\x0f\x44ownloadAIModel\x12\x36.Sindika.AspNet.App005.Services.DownloadAIModelRequest\x1a\x37.Sindika.AspNet.App005.Services.DownloadAIModelResponse0\x01\x62\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nedo_vision_worker.protos.AIModelService_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_GETAIMODELLISTREQUEST']._serialized_start=82
35
+ _globals['_GETAIMODELLISTREQUEST']._serialized_end=139
36
+ _globals['_GETAIMODELLISTRESPONSE']._serialized_start=141
37
+ _globals['_GETAIMODELLISTRESPONSE']._serialized_end=262
38
+ _globals['_AIMODELRESPONSE']._serialized_start=265
39
+ _globals['_AIMODELRESPONSE']._serialized_end=423
40
+ _globals['_DOWNLOADAIMODELREQUEST']._serialized_start=425
41
+ _globals['_DOWNLOADAIMODELREQUEST']._serialized_end=485
42
+ _globals['_DOWNLOADAIMODELRESPONSE']._serialized_start=487
43
+ _globals['_DOWNLOADAIMODELRESPONSE']._serialized_end=532
44
+ _globals['_AIMODELGRPCSERVICE']._serialized_start=535
45
+ _globals['_AIMODELGRPCSERVICE']._serialized_end=819
46
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,140 @@
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
+ from nedo_vision_worker.protos import AIModelService_pb2 as nedo__vision__worker_dot_protos_dot_AIModelService__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.73.1'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + f' but the generated code in nedo_vision_worker/protos/AIModelService_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class AIModelGRPCServiceStub(object):
29
+ """Missing associated documentation comment in .proto file."""
30
+
31
+ def __init__(self, channel):
32
+ """Constructor.
33
+
34
+ Args:
35
+ channel: A grpc.Channel.
36
+ """
37
+ self.GetAIModelList = channel.unary_unary(
38
+ '/Sindika.AspNet.App005.Services.AIModelGRPCService/GetAIModelList',
39
+ request_serializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.GetAIModelListRequest.SerializeToString,
40
+ response_deserializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.GetAIModelListResponse.FromString,
41
+ _registered_method=True)
42
+ self.DownloadAIModel = channel.unary_stream(
43
+ '/Sindika.AspNet.App005.Services.AIModelGRPCService/DownloadAIModel',
44
+ request_serializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.DownloadAIModelRequest.SerializeToString,
45
+ response_deserializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.DownloadAIModelResponse.FromString,
46
+ _registered_method=True)
47
+
48
+
49
+ class AIModelGRPCServiceServicer(object):
50
+ """Missing associated documentation comment in .proto file."""
51
+
52
+ def GetAIModelList(self, request, context):
53
+ """Missing associated documentation comment in .proto file."""
54
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55
+ context.set_details('Method not implemented!')
56
+ raise NotImplementedError('Method not implemented!')
57
+
58
+ def DownloadAIModel(self, request, context):
59
+ """Missing associated documentation comment in .proto file."""
60
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
61
+ context.set_details('Method not implemented!')
62
+ raise NotImplementedError('Method not implemented!')
63
+
64
+
65
+ def add_AIModelGRPCServiceServicer_to_server(servicer, server):
66
+ rpc_method_handlers = {
67
+ 'GetAIModelList': grpc.unary_unary_rpc_method_handler(
68
+ servicer.GetAIModelList,
69
+ request_deserializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.GetAIModelListRequest.FromString,
70
+ response_serializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.GetAIModelListResponse.SerializeToString,
71
+ ),
72
+ 'DownloadAIModel': grpc.unary_stream_rpc_method_handler(
73
+ servicer.DownloadAIModel,
74
+ request_deserializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.DownloadAIModelRequest.FromString,
75
+ response_serializer=nedo__vision__worker_dot_protos_dot_AIModelService__pb2.DownloadAIModelResponse.SerializeToString,
76
+ ),
77
+ }
78
+ generic_handler = grpc.method_handlers_generic_handler(
79
+ 'Sindika.AspNet.App005.Services.AIModelGRPCService', rpc_method_handlers)
80
+ server.add_generic_rpc_handlers((generic_handler,))
81
+ server.add_registered_method_handlers('Sindika.AspNet.App005.Services.AIModelGRPCService', rpc_method_handlers)
82
+
83
+
84
+ # This class is part of an EXPERIMENTAL API.
85
+ class AIModelGRPCService(object):
86
+ """Missing associated documentation comment in .proto file."""
87
+
88
+ @staticmethod
89
+ def GetAIModelList(request,
90
+ target,
91
+ options=(),
92
+ channel_credentials=None,
93
+ call_credentials=None,
94
+ insecure=False,
95
+ compression=None,
96
+ wait_for_ready=None,
97
+ timeout=None,
98
+ metadata=None):
99
+ return grpc.experimental.unary_unary(
100
+ request,
101
+ target,
102
+ '/Sindika.AspNet.App005.Services.AIModelGRPCService/GetAIModelList',
103
+ nedo__vision__worker_dot_protos_dot_AIModelService__pb2.GetAIModelListRequest.SerializeToString,
104
+ nedo__vision__worker_dot_protos_dot_AIModelService__pb2.GetAIModelListResponse.FromString,
105
+ options,
106
+ channel_credentials,
107
+ insecure,
108
+ call_credentials,
109
+ compression,
110
+ wait_for_ready,
111
+ timeout,
112
+ metadata,
113
+ _registered_method=True)
114
+
115
+ @staticmethod
116
+ def DownloadAIModel(request,
117
+ target,
118
+ options=(),
119
+ channel_credentials=None,
120
+ call_credentials=None,
121
+ insecure=False,
122
+ compression=None,
123
+ wait_for_ready=None,
124
+ timeout=None,
125
+ metadata=None):
126
+ return grpc.experimental.unary_stream(
127
+ request,
128
+ target,
129
+ '/Sindika.AspNet.App005.Services.AIModelGRPCService/DownloadAIModel',
130
+ nedo__vision__worker_dot_protos_dot_AIModelService__pb2.DownloadAIModelRequest.SerializeToString,
131
+ nedo__vision__worker_dot_protos_dot_AIModelService__pb2.DownloadAIModelResponse.FromString,
132
+ options,
133
+ channel_credentials,
134
+ insecure,
135
+ call_credentials,
136
+ compression,
137
+ wait_for_ready,
138
+ timeout,
139
+ metadata,
140
+ _registered_method=True)
@@ -0,0 +1,46 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: nedo_vision_worker/protos/DatasetSourceService.proto
5
+ # Protobuf Python Version: 6.31.0
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
+ 6,
15
+ 31,
16
+ 0,
17
+ '',
18
+ 'nedo_vision_worker/protos/DatasetSourceService.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4nedo_vision_worker/protos/DatasetSourceService.proto\x12\x1eSindika.AspNet.App005.Services\",\n\x1bGetDatasetSourceListRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x82\x01\n\x19\x44\x61tasetSourceListResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x43\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x35.Sindika.AspNet.App005.Services.DatasetSourceResponse\"\xb9\x01\n\x15\x44\x61tasetSourceResponse\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\ndataset_id\x18\x02 \x01(\t\x12\x18\n\x10worker_source_id\x18\x03 \x01(\t\x12\x19\n\x11sampling_interval\x18\x04 \x01(\x05\x12\x14\n\x0c\x64\x61taset_name\x18\x05 \x01(\t\x12\x1a\n\x12worker_source_name\x18\x06 \x01(\t\x12\x19\n\x11worker_source_url\x18\x07 \x01(\t\"s\n\x17SendDatasetFrameRequest\x12\x19\n\x11\x64\x61taset_source_id\x18\x01 \x01(\t\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\r\n\x05image\x18\x03 \x01(\x0c\x12\x11\n\ttimestamp\x18\x04 \x01(\x03\x12\r\n\x05token\x18\x05 \x01(\t\"<\n\x18SendDatasetFrameResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t2\xaf\x02\n\x14\x44\x61tasetSourceService\x12\x8e\x01\n\x14GetDatasetSourceList\x12;.Sindika.AspNet.App005.Services.GetDatasetSourceListRequest\x1a\x39.Sindika.AspNet.App005.Services.DatasetSourceListResponse\x12\x85\x01\n\x10SendDatasetFrame\x12\x37.Sindika.AspNet.App005.Services.SendDatasetFrameRequest\x1a\x38.Sindika.AspNet.App005.Services.SendDatasetFrameResponseb\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nedo_vision_worker.protos.DatasetSourceService_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_GETDATASETSOURCELISTREQUEST']._serialized_start=88
35
+ _globals['_GETDATASETSOURCELISTREQUEST']._serialized_end=132
36
+ _globals['_DATASETSOURCELISTRESPONSE']._serialized_start=135
37
+ _globals['_DATASETSOURCELISTRESPONSE']._serialized_end=265
38
+ _globals['_DATASETSOURCERESPONSE']._serialized_start=268
39
+ _globals['_DATASETSOURCERESPONSE']._serialized_end=453
40
+ _globals['_SENDDATASETFRAMEREQUEST']._serialized_start=455
41
+ _globals['_SENDDATASETFRAMEREQUEST']._serialized_end=570
42
+ _globals['_SENDDATASETFRAMERESPONSE']._serialized_start=572
43
+ _globals['_SENDDATASETFRAMERESPONSE']._serialized_end=632
44
+ _globals['_DATASETSOURCESERVICE']._serialized_start=635
45
+ _globals['_DATASETSOURCESERVICE']._serialized_end=938
46
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,140 @@
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
+ from nedo_vision_worker.protos import DatasetSourceService_pb2 as nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.73.1'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + f' but the generated code in nedo_vision_worker/protos/DatasetSourceService_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class DatasetSourceServiceStub(object):
29
+ """Missing associated documentation comment in .proto file."""
30
+
31
+ def __init__(self, channel):
32
+ """Constructor.
33
+
34
+ Args:
35
+ channel: A grpc.Channel.
36
+ """
37
+ self.GetDatasetSourceList = channel.unary_unary(
38
+ '/Sindika.AspNet.App005.Services.DatasetSourceService/GetDatasetSourceList',
39
+ request_serializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.GetDatasetSourceListRequest.SerializeToString,
40
+ response_deserializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.DatasetSourceListResponse.FromString,
41
+ _registered_method=True)
42
+ self.SendDatasetFrame = channel.unary_unary(
43
+ '/Sindika.AspNet.App005.Services.DatasetSourceService/SendDatasetFrame',
44
+ request_serializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.SendDatasetFrameRequest.SerializeToString,
45
+ response_deserializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.SendDatasetFrameResponse.FromString,
46
+ _registered_method=True)
47
+
48
+
49
+ class DatasetSourceServiceServicer(object):
50
+ """Missing associated documentation comment in .proto file."""
51
+
52
+ def GetDatasetSourceList(self, request, context):
53
+ """Missing associated documentation comment in .proto file."""
54
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
55
+ context.set_details('Method not implemented!')
56
+ raise NotImplementedError('Method not implemented!')
57
+
58
+ def SendDatasetFrame(self, request, context):
59
+ """Missing associated documentation comment in .proto file."""
60
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
61
+ context.set_details('Method not implemented!')
62
+ raise NotImplementedError('Method not implemented!')
63
+
64
+
65
+ def add_DatasetSourceServiceServicer_to_server(servicer, server):
66
+ rpc_method_handlers = {
67
+ 'GetDatasetSourceList': grpc.unary_unary_rpc_method_handler(
68
+ servicer.GetDatasetSourceList,
69
+ request_deserializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.GetDatasetSourceListRequest.FromString,
70
+ response_serializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.DatasetSourceListResponse.SerializeToString,
71
+ ),
72
+ 'SendDatasetFrame': grpc.unary_unary_rpc_method_handler(
73
+ servicer.SendDatasetFrame,
74
+ request_deserializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.SendDatasetFrameRequest.FromString,
75
+ response_serializer=nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.SendDatasetFrameResponse.SerializeToString,
76
+ ),
77
+ }
78
+ generic_handler = grpc.method_handlers_generic_handler(
79
+ 'Sindika.AspNet.App005.Services.DatasetSourceService', rpc_method_handlers)
80
+ server.add_generic_rpc_handlers((generic_handler,))
81
+ server.add_registered_method_handlers('Sindika.AspNet.App005.Services.DatasetSourceService', rpc_method_handlers)
82
+
83
+
84
+ # This class is part of an EXPERIMENTAL API.
85
+ class DatasetSourceService(object):
86
+ """Missing associated documentation comment in .proto file."""
87
+
88
+ @staticmethod
89
+ def GetDatasetSourceList(request,
90
+ target,
91
+ options=(),
92
+ channel_credentials=None,
93
+ call_credentials=None,
94
+ insecure=False,
95
+ compression=None,
96
+ wait_for_ready=None,
97
+ timeout=None,
98
+ metadata=None):
99
+ return grpc.experimental.unary_unary(
100
+ request,
101
+ target,
102
+ '/Sindika.AspNet.App005.Services.DatasetSourceService/GetDatasetSourceList',
103
+ nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.GetDatasetSourceListRequest.SerializeToString,
104
+ nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.DatasetSourceListResponse.FromString,
105
+ options,
106
+ channel_credentials,
107
+ insecure,
108
+ call_credentials,
109
+ compression,
110
+ wait_for_ready,
111
+ timeout,
112
+ metadata,
113
+ _registered_method=True)
114
+
115
+ @staticmethod
116
+ def SendDatasetFrame(request,
117
+ target,
118
+ options=(),
119
+ channel_credentials=None,
120
+ call_credentials=None,
121
+ insecure=False,
122
+ compression=None,
123
+ wait_for_ready=None,
124
+ timeout=None,
125
+ metadata=None):
126
+ return grpc.experimental.unary_unary(
127
+ request,
128
+ target,
129
+ '/Sindika.AspNet.App005.Services.DatasetSourceService/SendDatasetFrame',
130
+ nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.SendDatasetFrameRequest.SerializeToString,
131
+ nedo__vision__worker_dot_protos_dot_DatasetSourceService__pb2.SendDatasetFrameResponse.FromString,
132
+ options,
133
+ channel_credentials,
134
+ insecure,
135
+ call_credentials,
136
+ compression,
137
+ wait_for_ready,
138
+ timeout,
139
+ metadata,
140
+ _registered_method=True)
@@ -0,0 +1,44 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: nedo_vision_worker/protos/HumanDetectionService.proto
5
+ # Protobuf Python Version: 6.31.0
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
+ 6,
15
+ 31,
16
+ 0,
17
+ '',
18
+ 'nedo_vision_worker/protos/HumanDetectionService.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n5nedo_vision_worker/protos/HumanDetectionService.proto\x12\x1eSindika.AspNet.App005.Services\"@\n\x1cUpsertHumanDetectionResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"E\n!UpsertHumanDetectionBatchResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"\x8b\x02\n\x1bUpsertHumanDetectionRequest\x12\x11\n\tperson_id\x18\x01 \x01(\t\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12\x18\n\x10worker_source_id\x18\x03 \x01(\t\x12\r\n\x05image\x18\x04 \x01(\x0c\x12\x12\n\nimage_tile\x18\x05 \x01(\x0c\x12\x18\n\x10worker_timestamp\x18\x06 \x01(\t\x12\x18\n\x10\x63onfidence_score\x18\x07 \x01(\x01\x12\x10\n\x08\x62_box_x1\x18\x08 \x01(\x01\x12\x10\n\x08\x62_box_y1\x18\t \x01(\x01\x12\x10\n\x08\x62_box_x2\x18\n \x01(\x01\x12\x10\n\x08\x62_box_y2\x18\x0b \x01(\x01\x12\r\n\x05token\x18\x0c \x01(\t\"\x90\x01\n UpsertHumanDetectionBatchRequest\x12]\n\x18human_detection_requests\x18\x01 \x03(\x0b\x32;.Sindika.AspNet.App005.Services.UpsertHumanDetectionRequest\x12\r\n\x05token\x18\x02 \x01(\t2\xb6\x02\n\x19HumanDetectionGRPCService\x12\x83\x01\n\x06Upsert\x12;.Sindika.AspNet.App005.Services.UpsertHumanDetectionRequest\x1a<.Sindika.AspNet.App005.Services.UpsertHumanDetectionResponse\x12\x92\x01\n\x0bUpsertBatch\x12@.Sindika.AspNet.App005.Services.UpsertHumanDetectionBatchRequest\x1a\x41.Sindika.AspNet.App005.Services.UpsertHumanDetectionBatchResponseb\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nedo_vision_worker.protos.HumanDetectionService_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_UPSERTHUMANDETECTIONRESPONSE']._serialized_start=89
35
+ _globals['_UPSERTHUMANDETECTIONRESPONSE']._serialized_end=153
36
+ _globals['_UPSERTHUMANDETECTIONBATCHRESPONSE']._serialized_start=155
37
+ _globals['_UPSERTHUMANDETECTIONBATCHRESPONSE']._serialized_end=224
38
+ _globals['_UPSERTHUMANDETECTIONREQUEST']._serialized_start=227
39
+ _globals['_UPSERTHUMANDETECTIONREQUEST']._serialized_end=494
40
+ _globals['_UPSERTHUMANDETECTIONBATCHREQUEST']._serialized_start=497
41
+ _globals['_UPSERTHUMANDETECTIONBATCHREQUEST']._serialized_end=641
42
+ _globals['_HUMANDETECTIONGRPCSERVICE']._serialized_start=644
43
+ _globals['_HUMANDETECTIONGRPCSERVICE']._serialized_end=954
44
+ # @@protoc_insertion_point(module_scope)