(
motion_metrics: Dict[int, Dict[str, float]],
vlm_results: Dict[int, Dict[str, Any]],
jitter_threshold: float,
)
| 244 | |
| 245 | |
| 246 | def decide_quality( |
| 247 | motion_metrics: Dict[int, Dict[str, float]], |
| 248 | vlm_results: Dict[int, Dict[str, Any]], |
| 249 | jitter_threshold: float, |
| 250 | ) -> Dict[int, bool]: |
| 251 | final = {} |
| 252 | for motion_id, metrics in motion_metrics.items(): |
| 253 | jitter = metrics.get("Jitter_Degree", float("inf")) |
| 254 | vlm = vlm_results.get(motion_id, {"matches": False}) |
| 255 | is_good = jitter < jitter_threshold and vlm.get("matches", False) |
| 256 | final[motion_id] = is_good |
| 257 | return final |
| 258 | |
| 259 | |
| 260 | def apply_quality_gate( |
no outgoing calls
no test coverage detected