nedo-vision-worker 1.1.0__py3-none-any.whl → 1.1.1__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.
@@ -6,5 +6,5 @@ A library for running worker agents in the Nedo Vision platform.
6
6
 
7
7
  from .worker_service import WorkerService
8
8
 
9
- __version__ = "1.1.0"
9
+ __version__ = "1.1.1"
10
10
  __all__ = ["WorkerService"]
nedo_vision_worker/cli.py CHANGED
@@ -115,7 +115,7 @@ Examples:
115
115
  parser.add_argument(
116
116
  "--version",
117
117
  action="version",
118
- version="nedo-vision-worker 1.1.0"
118
+ version="nedo-vision-worker 1.1.1"
119
119
  )
120
120
 
121
121
  parser.add_argument(
@@ -94,6 +94,8 @@ class PPEDetectionRepository:
94
94
 
95
95
  # Delete the image file associated with the detection if it exists
96
96
  image_path = detection.image_path
97
+ if not os.path.isabs(image_path):
98
+ image_path = str(get_storage_path("files") / Path(image_path).relative_to("data/files"))
97
99
  if os.path.exists(image_path):
98
100
  os.remove(image_path)
99
101
  logging.info(f"Deleted image file: {image_path}")
@@ -72,6 +72,8 @@ class RestrictedAreaRepository:
72
72
 
73
73
  for violation in violations_to_delete:
74
74
  image_path = violation.image_path
75
+ if not os.path.isabs(image_path):
76
+ image_path = str(get_storage_path("restricted_violations") / Path(image_path).relative_to("data/restricted_violations"))
75
77
  if os.path.exists(image_path):
76
78
  os.remove(image_path)
77
79
  logging.info(f"Deleted image file: {image_path}")
@@ -38,6 +38,11 @@ class PPEDetectionClient(GrpcClientBase):
38
38
  Returns:
39
39
  bytes: Binary content of the image.
40
40
  """
41
+ from ..database.DatabaseManager import get_storage_path
42
+ from pathlib import Path
43
+ import os
44
+ if not os.path.isabs(image_path):
45
+ image_path = str(get_storage_path("files") / Path(image_path).relative_to("data/files"))
41
46
  with open(image_path, 'rb') as image_file:
42
47
  return image_file.read()
43
48
 
@@ -39,6 +39,11 @@ class RestrictedAreaClient(GrpcClientBase):
39
39
  Returns:
40
40
  bytes: Binary content of the image.
41
41
  """
42
+ from ..database.DatabaseManager import get_storage_path
43
+ from pathlib import Path
44
+ import os
45
+ if not os.path.isabs(image_path):
46
+ image_path = str(get_storage_path("restricted_violations") / Path(image_path).relative_to("data/restricted_violations"))
42
47
  with open(image_path, 'rb') as image_file:
43
48
  return image_file.read()
44
49
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nedo-vision-worker
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Nedo Vision Worker Service Library for AI Vision Processing
5
5
  Author-email: Willy Achmat Fauzi <willy.achmat@gmail.com>
6
6
  Maintainer-email: Willy Achmat Fauzi <willy.achmat@gmail.com>
@@ -1,5 +1,5 @@
1
- nedo_vision_worker/__init__.py,sha256=vNz9DUyK7nrpItKgWomp9-IkZXjqbztGNhAa1m97sHQ,203
2
- nedo_vision_worker/cli.py,sha256=ZzkRXUvewieC81OBT_rFnUYCXkDiBZKoI3yV3jaQsvE,6227
1
+ nedo_vision_worker/__init__.py,sha256=mgPDe2FHxWQLXYxpyKnft8nCtd1Jkbwb2x1oSn8wV9o,203
2
+ nedo_vision_worker/cli.py,sha256=9NgdpolGqMMkDtg79OxzRgd25jn5iW-nuGL2TI14GB0,6227
3
3
  nedo_vision_worker/doctor.py,sha256=dO3eOOauAFrCwj1UX1A-1jj_zsE2Y0UycGqPXaEOKjg,16152
4
4
  nedo_vision_worker/worker_service.py,sha256=XLzaN-n8f4ysPcOmJpO51I9_MWuVTnFMJF08sVHT7IA,9882
5
5
  nedo_vision_worker/config/ConfigurationManager.py,sha256=QrQaQ9Cdjpkcr2JE_miyrWJIZmMgZwJYBz-wE45Zzes,8011
@@ -40,8 +40,8 @@ nedo_vision_worker/protos/WorkerSourceService_pb2_grpc.py,sha256=fTxFjgr9gZjx2rI
40
40
  nedo_vision_worker/protos/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
41
41
  nedo_vision_worker/repositories/AIModelRepository.py,sha256=35cQ2EnJvMdArewumPrVIaiwueGy6cXU_g5J1Qcj6_Y,1415
42
42
  nedo_vision_worker/repositories/DatasetSourceRepository.py,sha256=MOUbXY1-7WUPhY15aMpdXl6rl0afSvu3Cq8jNtp9nzM,8595
43
- nedo_vision_worker/repositories/PPEDetectionRepository.py,sha256=l3VTveoAXdHLJwruIKYlDXbU3A3MPrCWPFbGZOdYkBY,4607
44
- nedo_vision_worker/repositories/RestrictedAreaRepository.py,sha256=RWXRmnDMGgV6jPCqrwETfYP7PXszJNHERmCoAAlf1xU,3533
43
+ nedo_vision_worker/repositories/PPEDetectionRepository.py,sha256=oyQjIRyfa0pA-ErVtrKkCLMY521QIbz9ZqSXotC8nqY,4766
44
+ nedo_vision_worker/repositories/RestrictedAreaRepository.py,sha256=y3n2ZfQbth1I_IjVYaT38qpRINQQC_dKeTf0yHPFNjw,3724
45
45
  nedo_vision_worker/repositories/WorkerSourcePipelineDebugRepository.py,sha256=kOlVEnPOoDRZdZIm8uWXlc89GMvBPI-36QyKecX7ucE,3350
46
46
  nedo_vision_worker/repositories/WorkerSourcePipelineDetectionRepository.py,sha256=cbgg_7p0eNUIgCHoPDZBaRZ1b2Y68p_dfSxpvuGMtRE,1773
47
47
  nedo_vision_worker/repositories/WorkerSourcePipelineRepository.py,sha256=xfmEvgnyt-DdfSApGyFfy0H0dXjFFkjeo4LMr0fVFXU,10053
@@ -54,9 +54,9 @@ nedo_vision_worker/services/FileToRTMPServer.py,sha256=yUJxrouoTLSq9XZ88dhDYhP-p
54
54
  nedo_vision_worker/services/GrpcClientBase.py,sha256=zEqDglS48HmcLw77LWc7l6nLYeVy_w_6y2O5pB9C88A,6344
55
55
  nedo_vision_worker/services/GrpcClientManager.py,sha256=DLXekmxlQogLo8V9-TNDXtyHT_UG-BaggqwsIups55k,5568
56
56
  nedo_vision_worker/services/ImageUploadClient.py,sha256=T353YsRfm74G7Mh-eWr5nvdQHXTfpKwHJFmNW8HyjT8,3019
57
- nedo_vision_worker/services/PPEDetectionClient.py,sha256=KqC391gm6dFQk7rMsswD2SlO9mKeKjfMRKFzHoc_tLY,4367
57
+ nedo_vision_worker/services/PPEDetectionClient.py,sha256=gX2EC4NBkKX5EvqQ8r7pAsaFTiKrl9x6hXA5OVrumt4,4625
58
58
  nedo_vision_worker/services/RTSPtoRTMPStreamer.py,sha256=hkPRX6iGxUtivsOA36JWBopHEd1RlmgIP8SLqN4d2TU,3863
59
- nedo_vision_worker/services/RestrictedAreaClient.py,sha256=AE9SOcVQca4zn5V96boho56EgN5BCIpV-8grvFBBnGo,3853
59
+ nedo_vision_worker/services/RestrictedAreaClient.py,sha256=-E1Ao_Pxi1DKFWDTotvyXPDgyvxbGox3wwWxKcVaXA8,4143
60
60
  nedo_vision_worker/services/SystemUsageClient.py,sha256=PbRuwDWKnMarcnkGtOKfYB5nA-3DeKv7V5_hZr8EDEo,3200
61
61
  nedo_vision_worker/services/VideoStreamClient.py,sha256=0PImMGwbPsX0Wfb4wsA42-Qbo8it0aWI-FpQSEV3f_A,6322
62
62
  nedo_vision_worker/services/WorkerSourceClient.py,sha256=pSbcPLNlnUERtHE9HyKoYtiptulcQ_DPkygKq-9Qm0M,9186
@@ -85,8 +85,8 @@ nedo_vision_worker/worker/SystemUsageManager.py,sha256=StutV4UyLUfduYfK20de4SbPd
85
85
  nedo_vision_worker/worker/VideoStreamWorker.py,sha256=TxoMYoaU6IcwJDLILC71WUkYahqVAnNX05_5qPbeS_8,6514
86
86
  nedo_vision_worker/worker/WorkerManager.py,sha256=7G8ORHpcVAb73UbTUi2WhcQJ-A1XFSq9d_9dLxABHac,6357
87
87
  nedo_vision_worker/worker/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
88
- nedo_vision_worker-1.1.0.dist-info/METADATA,sha256=kSwsqgaekOKQtuFLEk52zpSvSAqXygiwENX0d_X7YSI,14642
89
- nedo_vision_worker-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
- nedo_vision_worker-1.1.0.dist-info/entry_points.txt,sha256=LrglS-8nCi8C_PL_pa6uxdgCe879hBETHDVXAckvs-8,60
91
- nedo_vision_worker-1.1.0.dist-info/top_level.txt,sha256=vgilhlkyD34YsEKkaBabmhIpcKSvF3XpzD2By68L-XI,19
92
- nedo_vision_worker-1.1.0.dist-info/RECORD,,
88
+ nedo_vision_worker-1.1.1.dist-info/METADATA,sha256=NsS4IUwJP_PRvuEMzT8o2EQRny_tGAEoYxOXn0iiz2k,14642
89
+ nedo_vision_worker-1.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
+ nedo_vision_worker-1.1.1.dist-info/entry_points.txt,sha256=LrglS-8nCi8C_PL_pa6uxdgCe879hBETHDVXAckvs-8,60
91
+ nedo_vision_worker-1.1.1.dist-info/top_level.txt,sha256=vgilhlkyD34YsEKkaBabmhIpcKSvF3XpzD2By68L-XI,19
92
+ nedo_vision_worker-1.1.1.dist-info/RECORD,,