Commit ·
78b7237
1
Parent(s): e006bba
docs: update changelog and PROJECT_PLAN with power optimization details
Browse files- PROJECT_PLAN.md +11 -7
- changelog.json +3 -1
PROJECT_PLAN.md
CHANGED
|
@@ -541,10 +541,12 @@ automation:
|
|
| 541 |
| Model download retry | 3 retries, 5 second interval | `head_tracker.py` | ✅ Implemented |
|
| 542 |
| Conversation mode integration | Auto-switch tracking frequency on voice assistant state change | `satellite.py` | ✅ Implemented |
|
| 543 |
|
| 544 |
-
**Resource Optimization (v0.5.1)**:
|
| 545 |
- During conversation (listening/thinking/speaking): High-frequency tracking 15fps
|
| 546 |
- Idle with face detected: High-frequency tracking 15fps
|
| 547 |
-
- Idle without face for
|
|
|
|
|
|
|
| 548 |
- Immediately restore high-frequency tracking when face detected
|
| 549 |
|
| 550 |
**Code Locations**:
|
|
@@ -561,18 +563,20 @@ automation:
|
|
| 561 |
class MJPEGCameraServer:
|
| 562 |
def __init__(self):
|
| 563 |
self._fps_high = 15 # During conversation/face detected
|
| 564 |
-
self._fps_low =
|
| 565 |
-
self.
|
|
|
|
|
|
|
| 566 |
|
| 567 |
-
def
|
| 568 |
# Conversation mode: Always high-frequency tracking
|
| 569 |
if self._in_conversation:
|
| 570 |
return True
|
| 571 |
# High-frequency mode: Track every frame
|
| 572 |
if self._current_fps == self._fps_high:
|
| 573 |
return True
|
| 574 |
-
# Low
|
| 575 |
-
return time.since_last_check >= 1/self.
|
| 576 |
|
| 577 |
# satellite.py - Voice assistant state integration
|
| 578 |
def _reachy_on_listening(self):
|
|
|
|
| 541 |
| Model download retry | 3 retries, 5 second interval | `head_tracker.py` | ✅ Implemented |
|
| 542 |
| Conversation mode integration | Auto-switch tracking frequency on voice assistant state change | `satellite.py` | ✅ Implemented |
|
| 543 |
|
| 544 |
+
**Resource Optimization (v0.5.1, updated v0.6.2)**:
|
| 545 |
- During conversation (listening/thinking/speaking): High-frequency tracking 15fps
|
| 546 |
- Idle with face detected: High-frequency tracking 15fps
|
| 547 |
+
- Idle without face for 5s: Low-power mode 2fps
|
| 548 |
+
- Idle without face for 30s: Ultra-low power mode 0.5fps (every 2 seconds)
|
| 549 |
+
- Gesture detection only runs when face detected recently (within 5s)
|
| 550 |
- Immediately restore high-frequency tracking when face detected
|
| 551 |
|
| 552 |
**Code Locations**:
|
|
|
|
| 563 |
class MJPEGCameraServer:
|
| 564 |
def __init__(self):
|
| 565 |
self._fps_high = 15 # During conversation/face detected
|
| 566 |
+
self._fps_low = 2 # Idle without face (5-30s)
|
| 567 |
+
self._fps_idle = 0.5 # Ultra-low power (>30s without face)
|
| 568 |
+
self._low_power_threshold = 5.0 # 5s without face switches to low power
|
| 569 |
+
self._idle_threshold = 30.0 # 30s without face switches to idle mode
|
| 570 |
|
| 571 |
+
def _should_run_ai_inference(self, current_time):
|
| 572 |
# Conversation mode: Always high-frequency tracking
|
| 573 |
if self._in_conversation:
|
| 574 |
return True
|
| 575 |
# High-frequency mode: Track every frame
|
| 576 |
if self._current_fps == self._fps_high:
|
| 577 |
return True
|
| 578 |
+
# Low/idle power mode: Periodic detection
|
| 579 |
+
return time.since_last_check >= 1/self._current_fps
|
| 580 |
|
| 581 |
# satellite.py - Voice assistant state integration
|
| 582 |
def _reachy_on_listening(self):
|
changelog.json
CHANGED
|
@@ -5,7 +5,9 @@
|
|
| 5 |
"changes": [
|
| 6 |
"New: Gesture detection using HaGRID ONNX models (18 gesture classes)",
|
| 7 |
"New: gesture_detected and gesture_confidence entities in Home Assistant",
|
| 8 |
-
"Fix: Gesture state now properly pushed to Home Assistant in real-time"
|
|
|
|
|
|
|
| 9 |
]
|
| 10 |
},
|
| 11 |
{
|
|
|
|
| 5 |
"changes": [
|
| 6 |
"New: Gesture detection using HaGRID ONNX models (18 gesture classes)",
|
| 7 |
"New: gesture_detected and gesture_confidence entities in Home Assistant",
|
| 8 |
+
"Fix: Gesture state now properly pushed to Home Assistant in real-time",
|
| 9 |
+
"Optimize: Aggressive power saving - 0.5fps idle mode after 30s without face",
|
| 10 |
+
"Optimize: Gesture detection only runs when face detected (saves CPU)"
|
| 11 |
]
|
| 12 |
},
|
| 13 |
{
|