teknofest2026-task3 / src /server /json_builder.py
Emreuludasdemir's picture
Upload Task 3 HF package
699f3cd verified
Raw
History Blame Contribute Delete
932 Bytes
from __future__ import annotations
from src.core.frame_state import CanonicalTranslation, FrameEnvelope, FrameResult
def build_empty_result(frame: FrameEnvelope) -> FrameResult:
return FrameResult(frame_url=frame.frame_url)
def build_protocol_placeholder_result(frame: FrameEnvelope, _: bytes | None = None) -> FrameResult:
"""Gercek inference baglanana kadar protokol smoke testi icin kullanilir."""
result = build_empty_result(frame)
if str(frame.health_status) == "1":
result.detected_translations.append(frame.ground_truth_translation(source="echo_ground_truth"))
else:
result.detected_translations.append(
CanonicalTranslation(
translation_x=0.0,
translation_y=0.0,
translation_z=0.0,
source="placeholder_fallback",
)
)
result.diagnostics["processor"] = "placeholder"
return result