matrice-analytics 0.1.47__py3-none-any.whl → 0.1.49__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 matrice-analytics might be problematic. Click here for more details.
- matrice_analytics/post_processing/face_reg/face_recognition.py +21 -3
- matrice_analytics/post_processing/face_reg/face_recognition_client.py +1 -1
- {matrice_analytics-0.1.47.dist-info → matrice_analytics-0.1.49.dist-info}/METADATA +1 -1
- {matrice_analytics-0.1.47.dist-info → matrice_analytics-0.1.49.dist-info}/RECORD +7 -7
- {matrice_analytics-0.1.47.dist-info → matrice_analytics-0.1.49.dist-info}/WHEEL +0 -0
- {matrice_analytics-0.1.47.dist-info → matrice_analytics-0.1.49.dist-info}/licenses/LICENSE.txt +0 -0
- {matrice_analytics-0.1.47.dist-info → matrice_analytics-0.1.49.dist-info}/top_level.txt +0 -0
|
@@ -126,6 +126,7 @@ class TemporalIdentityManager:
|
|
|
126
126
|
if not emb or not isinstance(emb, list):
|
|
127
127
|
return None, "Unknown", 0.0, None, {}, "unknown"
|
|
128
128
|
try:
|
|
129
|
+
st10=time.time()
|
|
129
130
|
resp = await self.face_client.search_similar_faces(
|
|
130
131
|
face_embedding=emb,
|
|
131
132
|
threshold=0.01, # low threshold to always get top-1
|
|
@@ -134,6 +135,10 @@ class TemporalIdentityManager:
|
|
|
134
135
|
location=location,
|
|
135
136
|
timestamp=timestamp,
|
|
136
137
|
)
|
|
138
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - COMPUTE BEST IDENTITY_0G----------------------------")
|
|
139
|
+
print("LATENCY:",(time.time() - st10)*1000,"| Throughput fps:",(1.0 / (time.time() - st10)) if (time.time() - st10) > 0 else None)
|
|
140
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - COMPUTE BEST IDENTITY_0G----------------------------")
|
|
141
|
+
|
|
137
142
|
except Exception as e:
|
|
138
143
|
self.logger.error(f"API ERROR: Failed to search similar faces in _compute_best_identity: {e}", exc_info=True)
|
|
139
144
|
return None, "Unknown", 0.0, None, {}, "unknown"
|
|
@@ -226,11 +231,19 @@ class TemporalIdentityManager:
|
|
|
226
231
|
stable_employee_id = s.get("stable_employee_id")
|
|
227
232
|
stable_score = float(s.get("stable_score", 0.0))
|
|
228
233
|
stable_staff_details = s.get("stable_staff_details", {}) if isinstance(s.get("stable_staff_details"), dict) else {}
|
|
234
|
+
st7=time.time()
|
|
235
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - STABLE VALUES----------------------------")
|
|
236
|
+
print("LATENCY:",(time.time() - st7)*1000,"| Throughput fps:",(1.0 / (time.time() - st7)) if (time.time() - st7) > 0 else None)
|
|
237
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - STABLE VALUES----------------------------")
|
|
229
238
|
|
|
230
239
|
if eligible_for_recognition and emb:
|
|
240
|
+
st8=time.time()
|
|
231
241
|
staff_id, person_name, inst_score, employee_id, staff_details, det_type = await self._compute_best_identity(
|
|
232
242
|
emb, location=location, timestamp=timestamp
|
|
233
243
|
)
|
|
244
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - COMPUTE BEST IDENTITY_I----------------------------")
|
|
245
|
+
print("LATENCY:",(time.time() - st8)*1000,"| Throughput fps:",(1.0 / (time.time() - st8)) if (time.time() - st8) > 0 else None)
|
|
246
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - COMPUTE BEST IDENTITY_I----------------------------")
|
|
234
247
|
|
|
235
248
|
is_inst_known = staff_id is not None and inst_score >= self.threshold
|
|
236
249
|
if is_inst_known:
|
|
@@ -290,7 +303,12 @@ class TemporalIdentityManager:
|
|
|
290
303
|
return stable_staff_id, stable_person_name or "Unknown", float(inst_score), stable_employee_id, stable_staff_details, "known"
|
|
291
304
|
|
|
292
305
|
# Fallback: use prototype from history
|
|
306
|
+
st9=time.time()
|
|
293
307
|
fb_staff_id, fb_name, fb_score, fb_employee_id, fb_details, fb_type = await self._compute_best_identity_from_history(s, location=location, timestamp=timestamp)
|
|
308
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - COMPUTE BEST IDENTITY FROM HISTORY----------------------------")
|
|
309
|
+
print("LATENCY:",(time.time() - st9)*1000,"| Throughput fps:",(1.0 / (time.time() - st9)) if (time.time() - st9) > 0 else None)
|
|
310
|
+
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE - COMPUTE BEST IDENTITY FROM HISTORY----------------------------")
|
|
311
|
+
|
|
294
312
|
if fb_staff_id is not None and fb_score >= max(0.0, self.threshold - self.fallback_margin):
|
|
295
313
|
s["label_votes"][fb_staff_id] += 1 # type: ignore
|
|
296
314
|
s["stable_staff_id"] = fb_staff_id
|
|
@@ -946,7 +964,7 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
946
964
|
)
|
|
947
965
|
print("------------------WHOLE FACE RECOG PROCESSING DETECTION----------------------------")
|
|
948
966
|
print("LATENCY:",(time.time() - st1)*1000,"| Throughput fps:",(1.0 / (time.time() - st1)) if (time.time() - st1) > 0 else None)
|
|
949
|
-
print("------------------FACE RECOG PROCESSING DETECTION----------------------------")
|
|
967
|
+
print("------------------WHOLE FACE RECOG PROCESSING DETECTION----------------------------")
|
|
950
968
|
|
|
951
969
|
# Include both known and unknown faces in final detections (maintains original order)
|
|
952
970
|
if processed_detection:
|
|
@@ -1146,9 +1164,9 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
1146
1164
|
self.logger.debug(f"Enqueued known face detection for activity logging: {detection.get('person_name', 'Unknown')}")
|
|
1147
1165
|
except Exception as e:
|
|
1148
1166
|
self.logger.error(f"Error enqueueing detection for activity logging: {e}")
|
|
1149
|
-
print("------------------FACE
|
|
1167
|
+
print("------------------PROCESS FACE LATENCY TOTAL----------------------------")
|
|
1150
1168
|
print("LATENCY:",(time.time() - st2)*1000,"| Throughput fps:",(1.0 / (time.time() - st2)) if (time.time() - st2) > 0 else None)
|
|
1151
|
-
print("------------------FACE
|
|
1169
|
+
print("------------------PROCESS FACE LATENCY TOTAL----------------------------")
|
|
1152
1170
|
|
|
1153
1171
|
return detection
|
|
1154
1172
|
|
|
@@ -447,7 +447,7 @@ class FacialRecognitionClient:
|
|
|
447
447
|
)
|
|
448
448
|
|
|
449
449
|
embeddings_count = 0
|
|
450
|
-
if response
|
|
450
|
+
if response: #.get('success', False):
|
|
451
451
|
data = response.get('data', [])
|
|
452
452
|
embeddings_count = len(data) if isinstance(data, list) else 0
|
|
453
453
|
self.logger.info(f"API RESPONSE: Retrieved {embeddings_count} staff embeddings")
|
|
@@ -29,8 +29,8 @@ matrice_analytics/post_processing/core/config_utils.py,sha256=QuAS-_JKSoNOtfUWgr
|
|
|
29
29
|
matrice_analytics/post_processing/face_reg/__init__.py,sha256=yntaiGlW9vdjBpPZQXNuovALihJPzRlFyUE88l3MhBA,1364
|
|
30
30
|
matrice_analytics/post_processing/face_reg/compare_similarity.py,sha256=NlFc8b2a74k0PqSFAbuM_fUbA1BT3pr3VUgvSqRpJzQ,23396
|
|
31
31
|
matrice_analytics/post_processing/face_reg/embedding_manager.py,sha256=qbh0df3-YbE0qvFDQvjpCg-JrsCZRJ5capjQ2LPOj1k,35619
|
|
32
|
-
matrice_analytics/post_processing/face_reg/face_recognition.py,sha256=
|
|
33
|
-
matrice_analytics/post_processing/face_reg/face_recognition_client.py,sha256=
|
|
32
|
+
matrice_analytics/post_processing/face_reg/face_recognition.py,sha256=2_9e9W3hUo9LOsjrChIgEMQO_9dIJ_PKYtkj6XAa1uI,98249
|
|
33
|
+
matrice_analytics/post_processing/face_reg/face_recognition_client.py,sha256=VxNUcFB0cDnCPZeebYjYKhQfve40V3hdcPVg4FcJmpM,27577
|
|
34
34
|
matrice_analytics/post_processing/face_reg/people_activity_logging.py,sha256=vZbIvkK1h3h58ROeF0_ygF3lqr19O2h5222bN8XyIis,13675
|
|
35
35
|
matrice_analytics/post_processing/ocr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
matrice_analytics/post_processing/ocr/easyocr_extractor.py,sha256=RMrRoGb2gMcJEGouQn8U9cCgCLXPT7qRa8liI4LNxFM,11555
|
|
@@ -189,8 +189,8 @@ matrice_analytics/post_processing/utils/format_utils.py,sha256=UTF7A5h9j0_S12xH9
|
|
|
189
189
|
matrice_analytics/post_processing/utils/geometry_utils.py,sha256=BWfdM6RsdJTTLR1GqkWfdwpjMEjTCJyuBxA4zVGKdfk,9623
|
|
190
190
|
matrice_analytics/post_processing/utils/smoothing_utils.py,sha256=78U-yucAcjUiZ0NIAc9NOUSIT0PWP1cqyIPA_Fdrjp0,14699
|
|
191
191
|
matrice_analytics/post_processing/utils/tracking_utils.py,sha256=rWxuotnJ3VLMHIBOud2KLcu4yZfDp7hVPWUtNAq_2xw,8288
|
|
192
|
-
matrice_analytics-0.1.
|
|
193
|
-
matrice_analytics-0.1.
|
|
194
|
-
matrice_analytics-0.1.
|
|
195
|
-
matrice_analytics-0.1.
|
|
196
|
-
matrice_analytics-0.1.
|
|
192
|
+
matrice_analytics-0.1.49.dist-info/licenses/LICENSE.txt,sha256=_uQUZpgO0mRYL5-fPoEvLSbNnLPv6OmbeEDCHXhK6Qc,1066
|
|
193
|
+
matrice_analytics-0.1.49.dist-info/METADATA,sha256=rAaDXN9p20demOvo45wJCi8cjk2x4GmRENFP1J_D0WA,14378
|
|
194
|
+
matrice_analytics-0.1.49.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
195
|
+
matrice_analytics-0.1.49.dist-info/top_level.txt,sha256=STAPEU-e-rWTerXaspdi76T_eVRSrEfFpURSP7_Dt8E,18
|
|
196
|
+
matrice_analytics-0.1.49.dist-info/RECORD,,
|
|
File without changes
|
{matrice_analytics-0.1.47.dist-info → matrice_analytics-0.1.49.dist-info}/licenses/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|