Skip to content

feat(ai): Multi-Face Detection & Selection UI (#2085) - #2086

Open
Dev1822 wants to merge 1 commit into
souma9830:masterfrom
Dev1822:feat/multi-face-detection-selection
Open

feat(ai): Multi-Face Detection & Selection UI (#2085)#2086
Dev1822 wants to merge 1 commit into
souma9830:masterfrom
Dev1822:feat/multi-face-detection-selection

Conversation

@Dev1822

@Dev1822 Dev1822 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Closes #2085

Implements multi-face detection and selection UI for group photos.

Python AI Service

  • face_detection.py: detect_all_faces() returning all face bounding boxes sorted by area with index metadata
  • main.py: POST /detect-faces endpoint (multipart + JSON), returns faces, image_width, image_height
  • test_face_detection.py: Unit tests for detect_all_faces

Node.js Backend

  • faceDetection.controller.js: Proxy controller with full validation and path traversal protection
  • faceDetection.routes.js: New route at /api/face-detection
  • index.js: Registered the new route

Frontend

  • FaceSelectionOverlay.jsx: Interactive canvas overlay with numbered bounding boxes and click-to-select
  • FaceSelectionOverlay.css: Responsive styles with dark mode support
  • UploadPage.jsx: Auto-runs face detection after upload; shows overlay for multi-face; passes selectedFaceIndex to editor
  • api.js: Added detectFaces() API helper

How It Works

  1. User uploads photo, face detection runs automatically (non-blocking)
  2. If faces detected: shows FaceSelectionOverlay with numbered bounding boxes
  3. User clicks a face, highlights green, proceeds to editor
  4. If 0/1 face or error: normal preview flow (backward compatible)

- Add detect_all_faces() to face_detection.py returning all face bounding boxes
- Add /detect-faces API endpoint to Python AI service (multipart + JSON)
- Add Node.js proxy route at /api/face-detection with full input validation
- Add FaceSelectionOverlay component with canvas-drawn bounding boxes
- Integrate face detection into UploadPage upload flow (non-blocking)
- Pass selectedFaceIndex and faces data through navigation state to editor
- Add unit tests for detect_all_faces
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

@Dev1822 is attempting to deploy a commit to the souma9830's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ai): Multi-Face Detection & Selection UI

1 participant