matrice-analytics 0.1.46__py3-none-any.whl → 0.1.47__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 +11 -11
- {matrice_analytics-0.1.46.dist-info → matrice_analytics-0.1.47.dist-info}/METADATA +1 -1
- {matrice_analytics-0.1.46.dist-info → matrice_analytics-0.1.47.dist-info}/RECORD +6 -6
- {matrice_analytics-0.1.46.dist-info → matrice_analytics-0.1.47.dist-info}/WHEEL +0 -0
- {matrice_analytics-0.1.46.dist-info → matrice_analytics-0.1.47.dist-info}/licenses/LICENSE.txt +0 -0
- {matrice_analytics-0.1.46.dist-info → matrice_analytics-0.1.47.dist-info}/top_level.txt +0 -0
|
@@ -883,7 +883,7 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
883
883
|
"""Process face recognition for each detection with embeddings"""
|
|
884
884
|
|
|
885
885
|
# Initialize face client only when needed and if credentials are available
|
|
886
|
-
|
|
886
|
+
st0=time.time()
|
|
887
887
|
if not self.face_client:
|
|
888
888
|
try:
|
|
889
889
|
self.face_client = self._get_facial_recognition_client(config)
|
|
@@ -894,7 +894,7 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
894
894
|
# No client available, return empty list (no results)
|
|
895
895
|
return []
|
|
896
896
|
print("------------------FACE RECOG CLIENT INIT----------------------------")
|
|
897
|
-
print("LATENCY:",(time.time() -
|
|
897
|
+
print("LATENCY:",(time.time() - st0)*1000,"| Throughput fps:",(1.0 / (time.time() - st0)) if (time.time() - st0) > 0 else None)
|
|
898
898
|
print("------------------FACE RECOG CLIENT INIT----------------------------")
|
|
899
899
|
|
|
900
900
|
# Initialize unknown faces storage if not exists
|
|
@@ -938,14 +938,14 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
938
938
|
for detection in detections:
|
|
939
939
|
|
|
940
940
|
# Process each detection sequentially with await to preserve order
|
|
941
|
-
|
|
941
|
+
st1=time.time()
|
|
942
942
|
processed_detection = await self._process_face(
|
|
943
943
|
detection, current_frame, location, current_timestamp, config,
|
|
944
944
|
current_recognized_count, current_unknown_count,
|
|
945
945
|
recognized_persons, current_frame_staff_details
|
|
946
946
|
)
|
|
947
947
|
print("------------------WHOLE FACE RECOG PROCESSING DETECTION----------------------------")
|
|
948
|
-
print("LATENCY:",(time.time() -
|
|
948
|
+
print("LATENCY:",(time.time() - st1)*1000,"| Throughput fps:",(1.0 / (time.time() - st1)) if (time.time() - st1) > 0 else None)
|
|
949
949
|
print("------------------FACE RECOG PROCESSING DETECTION----------------------------")
|
|
950
950
|
|
|
951
951
|
# Include both known and unknown faces in final detections (maintains original order)
|
|
@@ -977,7 +977,7 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
977
977
|
) -> Dict:
|
|
978
978
|
|
|
979
979
|
# Extract and validate embedding using EmbeddingManager
|
|
980
|
-
|
|
980
|
+
st2=time.time()
|
|
981
981
|
detection, embedding = self.embedding_manager.extract_embedding_from_detection(detection)
|
|
982
982
|
if not embedding:
|
|
983
983
|
return None
|
|
@@ -985,7 +985,7 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
985
985
|
# Internal tracker-provided ID (from AdvancedTracker; ignore upstream IDs entirely)
|
|
986
986
|
track_id = detection.get("track_id")
|
|
987
987
|
print("------------------FACE RECOG EMBEDDING EXTRACTION----------------------------")
|
|
988
|
-
print("LATENCY:",(time.time() -
|
|
988
|
+
print("LATENCY:",(time.time() - st2)*1000,"| Throughput fps:",(1.0 / (time.time() - st2)) if (time.time() - st2) > 0 else None)
|
|
989
989
|
print("------------------FACE RECOG EMBEDDING EXTRACTION----------------------------")
|
|
990
990
|
|
|
991
991
|
# Determine if detection is eligible for recognition (similar to compare_similarity gating)
|
|
@@ -1049,7 +1049,7 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
1049
1049
|
except Exception:
|
|
1050
1050
|
pass
|
|
1051
1051
|
else: #if eligible for recognition
|
|
1052
|
-
|
|
1052
|
+
st3=time.time()
|
|
1053
1053
|
staff_id, person_name, similarity_score, employee_id, staff_details, detection_type = await self.temporal_identity_manager.update(
|
|
1054
1054
|
track_id=track_key,
|
|
1055
1055
|
emb=embedding,
|
|
@@ -1058,7 +1058,7 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
1058
1058
|
timestamp=current_timestamp,
|
|
1059
1059
|
)
|
|
1060
1060
|
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE----------------------------")
|
|
1061
|
-
print("LATENCY:",(time.time() -
|
|
1061
|
+
print("LATENCY:",(time.time() - st3)*1000,"| Throughput fps:",(1.0 / (time.time() - st3)) if (time.time() - st3) > 0 else None)
|
|
1062
1062
|
print("------------------FACE RECOG TEMPORAL IDENTITY MANAGER UPDATE----------------------------")
|
|
1063
1063
|
except Exception as e:
|
|
1064
1064
|
self.logger.warning(f"TemporalIdentityManager update failed: {e}")
|
|
@@ -1133,21 +1133,21 @@ class FaceRecognitionEmbeddingUseCase(BaseProcessor):
|
|
|
1133
1133
|
and employee_id
|
|
1134
1134
|
and not str(employee_id).startswith("unknown_")
|
|
1135
1135
|
):
|
|
1136
|
-
|
|
1136
|
+
st4=time.time()
|
|
1137
1137
|
await self.people_activity_logging.enqueue_detection(
|
|
1138
1138
|
detection=detection,
|
|
1139
1139
|
current_frame=current_frame,
|
|
1140
1140
|
location=location,
|
|
1141
1141
|
)
|
|
1142
1142
|
print("------------------FACE RECOG ENQUEUEING DETECTION FOR ACTIVITY LOGGING----------------------------")
|
|
1143
|
-
print("LATENCY:",(time.time() -
|
|
1143
|
+
print("LATENCY:",(time.time() - st4)*1000,"| Throughput fps:",(1.0 / (time.time() - st4)) if (time.time() - st4) > 0 else None)
|
|
1144
1144
|
print("------------------FACE RECOG ENQUEUEING DETECTION FOR ACTIVITY LOGGING----------------------------")
|
|
1145
1145
|
|
|
1146
1146
|
self.logger.debug(f"Enqueued known face detection for activity logging: {detection.get('person_name', 'Unknown')}")
|
|
1147
1147
|
except Exception as e:
|
|
1148
1148
|
self.logger.error(f"Error enqueueing detection for activity logging: {e}")
|
|
1149
1149
|
print("------------------FACE RECOG ENQUEUEING DETECTION FOR ACTIVITY LOGGING----------------------------")
|
|
1150
|
-
print("LATENCY:",(time.time() -
|
|
1150
|
+
print("LATENCY:",(time.time() - st2)*1000,"| Throughput fps:",(1.0 / (time.time() - st2)) if (time.time() - st2) > 0 else None)
|
|
1151
1151
|
print("------------------FACE RECOG ENQUEUEING DETECTION FOR ACTIVITY LOGGING----------------------------")
|
|
1152
1152
|
|
|
1153
1153
|
return detection
|
|
@@ -29,7 +29,7 @@ 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=
|
|
32
|
+
matrice_analytics/post_processing/face_reg/face_recognition.py,sha256=uiM4Ow5b-K_qIK6J6ikGSI5jpKg5aTijEYMeV32ikik,96533
|
|
33
33
|
matrice_analytics/post_processing/face_reg/face_recognition_client.py,sha256=VaMhjk_tk9zzcB4Vp_FCA_MtgtHtfpzhFJA2caNx9YU,27574
|
|
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
|
|
@@ -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.47.dist-info/licenses/LICENSE.txt,sha256=_uQUZpgO0mRYL5-fPoEvLSbNnLPv6OmbeEDCHXhK6Qc,1066
|
|
193
|
+
matrice_analytics-0.1.47.dist-info/METADATA,sha256=WfsE5MTnHV1x17KMooQM0RM3YEoEO_v7FPXTeqxDVK8,14378
|
|
194
|
+
matrice_analytics-0.1.47.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
195
|
+
matrice_analytics-0.1.47.dist-info/top_level.txt,sha256=STAPEU-e-rWTerXaspdi76T_eVRSrEfFpURSP7_Dt8E,18
|
|
196
|
+
matrice_analytics-0.1.47.dist-info/RECORD,,
|
|
File without changes
|
{matrice_analytics-0.1.46.dist-info → matrice_analytics-0.1.47.dist-info}/licenses/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|