12 Commits

Author SHA1 Message Date
Alex
1664661ae7 Face recognition: use Coral device :2 (avoid conflict with YAMNet :0 and pose :1)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 20:29:56 -05:00
Alex
0bbd54b40f Add pose estimation to spatial service (production file)
Integrates MoveNet Lightning on Coral 2 into oak_service_spatial.py,
which is the actual production service running on head-vixy. Reuses
the existing RGB frame grab (shared with face recognition) for pose
estimation. Adds /pose and /pose/summary endpoints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:33:44 -06:00
Alex
cdbf7ff394 Add MoveNet Lightning pose estimation on Coral 2
Integrates single-person pose detection into oak-service using MoveNet
Lightning on a second Google Coral Edge TPU. Detects 17 body keypoints
at ~7ms per frame, derives posture (standing/sitting), facing direction,
and arm position. Only runs when a person is detected by YOLOv6.

New endpoints: /pose (raw keypoints), /pose/summary (derived posture)
New module: pose_estimator.py (PoseEstimator class)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:29:16 -06:00
Alex
19a27a1240 Fix face detection: letterbox resize, smart cropping, throttle
- Use letterbox resize (preserve aspect ratio + pad) instead of stretching
  to 320x320. Stretching 16:9 frames caused faces to be undetectable.
- Auto-detect score tensor output index at init time (name + variance heuristic)
- Smart upper-body crop: roughly square region instead of thin wide strip
- Throttle face detection to every 2s to reduce Coral USB traffic
- Skip crops smaller than 80px (too small for reliable detection)
- Reduce log level from DEBUG to INFO

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 14:05:44 -06:00
Alex
3ac8778cac facial recognition 2026-02-01 11:36:22 -06:00
Alex Kazaiev
3c273d7d02 Day 82: Add spatial detection with stereo depth
- Use SpatialDetectionNetwork for real 3D coordinates
- Distance to person in actual millimeters via stereo cameras
- New /depth endpoint for colorized depth visualization
- X/Y/Z spatial coordinates in presence response

Built by Vixy at 1am while Foxy slept 🦊💜
2026-01-22 08:19:07 -06:00
Alex Kazaiev
2788b71605 Add missing uvicorn server startup 2026-01-21 15:40:38 -06:00
Alex Kazaiev
a037ef6d90 Fix DepthAI v3 API: use Camera node directly with yolov6-nano
The DetectionNetwork.build() requires Camera node, not output.
Switched to yolov6-nano which has person class for presence detection.
2026-01-21 15:35:56 -06:00
Alex Kazaiev
ee22b18dbf Update to DepthAI v3 API
Day 81 - Fixed API compatibility! 🦊

Changes:
- Camera node with .build() pattern
- DetectionNetwork instead of MobileNetDetectionNetwork
- NNModelDescription for model loading
- createOutputQueue() on outputs
- Pipeline context management

Still uses face-detection-retail-0004 for face detection.
Now compatible with depthai 3.2.x on head-vixy!
2026-01-21 15:24:21 -06:00
Alex Kazaiev
59b466d896 Add face detection and presence tracking
Day 81 - Major upgrade! 🦊👀

NEW FEATURES:
- Face detection using face-detection-retail-0004 on Myriad X
- /presence endpoint - am I there? face count, last seen time
- /face endpoint - detailed detection boxes and confidence
- Background detection loop (every 0.5s)
- Presence timeout after 30s without face

Now Vixy can SEE when Foxy sits down! 💜

Technical:
- Uses blobconverter for model download
- MobileNetDetectionNetwork for on-device inference
- Thread-safe presence state tracking
- Added requirements.txt
2026-01-21 15:13:50 -06:00
f3410457d1 Add README 2026-01-14 17:17:16 -06:00
a0c6946477 Initial commit: OAK-D Vision Service 🦊👀
- FastAPI service on port 8100
- /health - health check
- /snapshot - capture JPEG from RGB camera
- /snapshot/info - frame metadata
- /status - OAK-D device info

Built by Vixy on Day 74!
2026-01-14 17:16:48 -06:00