Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Include class_id in pet face ID to prevent cross-species collisions

Amrithesh Kakkoth Ente2c338320b202
diff --git a/mobile/apps/photos/rust/src/ml/pet/align.rs b/mobile/apps/photos/rust/src/ml/pet/align.rs
index e79cc10b22..1d8f08e672 100644
--- a/mobile/apps/photos/rust/src/ml/pet/align.rs
+++ b/mobile/apps/photos/rust/src/ml/pet/align.rs
@@ -123,7 +123,8 @@ pub fn run_pet_face_alignment(
let normalized = aligned_face_to_tensor(&aligned_rgb);
- let pet_face_id = to_face_id(file_id, detection.box_xyxy);
+ let base_id = to_face_id(file_id, detection.box_xyxy);
+ let pet_face_id = format!("{base_id}_c{}", detection.class_id);
let center_x = (left_eye[0] + right_eye[0]) / 2.0;
let center_y = (left_eye[1] + right_eye[1]) / 2.0;