nedo-vision-worker 1.1.0__py3-none-any.whl → 1.1.2__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.
- nedo_vision_worker/__init__.py +1 -1
- nedo_vision_worker/cli.py +1 -1
- nedo_vision_worker/repositories/PPEDetectionRepository.py +2 -0
- nedo_vision_worker/repositories/RestrictedAreaRepository.py +2 -0
- nedo_vision_worker/services/PPEDetectionClient.py +5 -0
- nedo_vision_worker/services/RestrictedAreaClient.py +5 -0
- {nedo_vision_worker-1.1.0.dist-info → nedo_vision_worker-1.1.2.dist-info}/METADATA +1 -1
- {nedo_vision_worker-1.1.0.dist-info → nedo_vision_worker-1.1.2.dist-info}/RECORD +11 -11
- {nedo_vision_worker-1.1.0.dist-info → nedo_vision_worker-1.1.2.dist-info}/WHEEL +0 -0
- {nedo_vision_worker-1.1.0.dist-info → nedo_vision_worker-1.1.2.dist-info}/entry_points.txt +0 -0
- {nedo_vision_worker-1.1.0.dist-info → nedo_vision_worker-1.1.2.dist-info}/top_level.txt +0 -0
nedo_vision_worker/__init__.py
CHANGED
nedo_vision_worker/cli.py
CHANGED
|
@@ -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.
|
|
3
|
+
Version: 1.1.2
|
|
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=
|
|
2
|
-
nedo_vision_worker/cli.py,sha256=
|
|
1
|
+
nedo_vision_worker/__init__.py,sha256=7d3_d7ZEPuZ0WRVyXVh1I_ozr_M83YKYsPo5m59ZIAo,203
|
|
2
|
+
nedo_vision_worker/cli.py,sha256=PmT5bSyWdJBCVqB4AkSKIUYnnBt2ceS4FphMMoX-QGY,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=
|
|
44
|
-
nedo_vision_worker/repositories/RestrictedAreaRepository.py,sha256=
|
|
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=
|
|
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
|
|
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.
|
|
89
|
-
nedo_vision_worker-1.1.
|
|
90
|
-
nedo_vision_worker-1.1.
|
|
91
|
-
nedo_vision_worker-1.1.
|
|
92
|
-
nedo_vision_worker-1.1.
|
|
88
|
+
nedo_vision_worker-1.1.2.dist-info/METADATA,sha256=vlFddz6PSNmq_RE6ydhPK7-n7qsnHOcbPtssPu9AqAg,14642
|
|
89
|
+
nedo_vision_worker-1.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
90
|
+
nedo_vision_worker-1.1.2.dist-info/entry_points.txt,sha256=LrglS-8nCi8C_PL_pa6uxdgCe879hBETHDVXAckvs-8,60
|
|
91
|
+
nedo_vision_worker-1.1.2.dist-info/top_level.txt,sha256=vgilhlkyD34YsEKkaBabmhIpcKSvF3XpzD2By68L-XI,19
|
|
92
|
+
nedo_vision_worker-1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|