feat(control-station): review native raw fisheye risk cases
This commit is contained in:
@@ -4,7 +4,11 @@ import {
|
||||
LaboratorySummary,
|
||||
LaboratoryWorkTemplate,
|
||||
} from "../../components/laboratory/LaboratoryPresentation";
|
||||
import type { M48TRiskQualityResult } from "../../core/laboratory/m48tRiskQuality";
|
||||
import type {
|
||||
M48QNativeRiskQualityResult,
|
||||
M48TLegacyRiskQualityResult,
|
||||
M48TRiskQualityResult,
|
||||
} from "../../core/laboratory/m48tRiskQuality";
|
||||
import { M48TRiskQualityVisual } from "./M48TRiskQualityVisual";
|
||||
|
||||
function percent(value: number, digits = 1): string {
|
||||
@@ -21,6 +25,19 @@ export function M48TRiskQualityResultView({
|
||||
}: {
|
||||
rigLabel: string;
|
||||
result: M48TRiskQualityResult;
|
||||
}) {
|
||||
if (result.variant === "native-risk-review") {
|
||||
return <M48QNativeRiskQualityResultView rigLabel={rigLabel} result={result} />;
|
||||
}
|
||||
return <M48TLegacyRiskQualityResultView rigLabel={rigLabel} result={result} />;
|
||||
}
|
||||
|
||||
function M48TLegacyRiskQualityResultView({
|
||||
rigLabel,
|
||||
result,
|
||||
}: {
|
||||
rigLabel: string;
|
||||
result: M48TLegacyRiskQualityResult;
|
||||
}) {
|
||||
return (
|
||||
<LaboratoryWorkTemplate
|
||||
@@ -77,3 +94,69 @@ export function M48TRiskQualityResultView({
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function M48QNativeRiskQualityResultView({
|
||||
rigLabel,
|
||||
result,
|
||||
}: {
|
||||
rigLabel: string;
|
||||
result: M48QNativeRiskQualityResult;
|
||||
}) {
|
||||
const classes = Object.entries(result.selection.classCounts)
|
||||
.map(([name, count]) => `${name} ${count}`)
|
||||
.join(" · ");
|
||||
return (
|
||||
<LaboratoryWorkTemplate
|
||||
summary={(
|
||||
<LaboratorySummary
|
||||
title="M4.8Q · native raw-fisheye risk review"
|
||||
description="Нативный RF-DETR прогнан внутри полного reference graph прямо на исходном KB4 raster 800×600: без rectification, warp, resize и обратного преобразования. Из immutable frame ledger детерминированно отобраны реальные risk-кейсы для операторской проверки в существующем M4.8 image-case instrument."
|
||||
status="Runtime принят · 24 native cases готовы · quality ещё не adjudicated"
|
||||
statusTone="success"
|
||||
facts={[
|
||||
{ label: "Source", value: `${rigLabel} · ${result.source.frameCount.toLocaleString("ru-RU")} raw frames · 800×600` },
|
||||
{ label: "Candidate", value: `${result.candidate.modelId} · score ≥ ${decimal(result.candidate.minimumScore, 2)}` },
|
||||
{ label: "Image path", value: "RAW KB4 → fused GPU graph · geometric resampling NO" },
|
||||
{ label: "Authority", value: "SHADOW ONLY · independent quality NO · production NO" },
|
||||
]}
|
||||
brief={{
|
||||
question: "Работает ли нативная risk-классификация на нашей исходной fisheye-картинке в realtime envelope, и какие реальные кадры надо проверить человеком?",
|
||||
approach: `Полный ${result.source.frameCount.toLocaleString("ru-RU")}-кадровый native graph оставлен неизменным. Повторной инференс-сессии для лабы нет: 24 кадра выбраны из его hash-bound ledger по person, animal, light-road-user, vehicle, low-confidence, fisheye-edge и расхождениям с диагностической legacy 704 веткой.`,
|
||||
principalResult: `${decimal(result.execution.effectiveWorldStateFps, 3)} FPS при detector p95 ${decimal(result.execution.detectorTotalP95Ms, 2)} ms и world-state p95 ${decimal(result.execution.worldStateCompletionP95Ms, 2)} ms. В review pack реально попали ${classes}.`,
|
||||
limitation: "Это диагностическая выборка маршрута без независимой разметки. Наличие бокса и класса можно осмотреть, но precision/recall и корректность каждого класса этой фазой ещё не доказаны.",
|
||||
}}
|
||||
method={result.method}
|
||||
/>
|
||||
)}
|
||||
evidence={(
|
||||
<LaboratoryEvidence
|
||||
eyebrow="M4.8Q VISUAL EVIDENCE · NATIVE RAW KB4"
|
||||
title="24 исходных fisheye-кадра с отключаемым client-side overlay"
|
||||
kind="diagnostic-model"
|
||||
resizable
|
||||
>
|
||||
<M48TRiskQualityVisual result={result} />
|
||||
</LaboratoryEvidence>
|
||||
)}
|
||||
result={(
|
||||
<LaboratoryResultSummary
|
||||
title="Native runtime закрыт; следующий честный шаг — adjudication этих кейсов"
|
||||
status="Review-ready · quality-not-adjudicated"
|
||||
statusTone="success"
|
||||
metrics={[
|
||||
{ label: "Full graph", value: `${decimal(result.execution.effectiveWorldStateFps, 3)} FPS`, hint: `delivery ${percent(result.runtime.deliveryRatio, 2)} · 4 489/4 489` },
|
||||
{ label: "Detector / world-state p95", value: `${decimal(result.execution.detectorTotalP95Ms, 2)} / ${decimal(result.execution.worldStateCompletionP95Ms, 2)} ms`, hint: "один native pass · additional inference 0" },
|
||||
{ label: "GPU / VRAM peak", value: `${decimal(result.execution.gpuUtilizationP95Percent, 1)}% / ${decimal(result.execution.gpuMemoryMaximumMib / 1024, 2)} GiB`, hint: "Worker 006 · RTX 4090 envelope" },
|
||||
{ label: "Native parity", value: `${percent(result.parity.precision, 2)} / ${percent(result.parity.recall, 2)}`, hint: `precision / recall · mean IoU ${percent(result.parity.meanIou, 2)}` },
|
||||
{ label: "Review pack", value: `${result.selection.caseCount}/24 cases`, hint: "8 diagnostic buckets · raw 800×600" },
|
||||
]}
|
||||
conclusion={{
|
||||
proved: `Полный reference graph доставил все ${result.source.frameCount.toLocaleString("ru-RU")} world states на ${decimal(result.execution.effectiveWorldStateFps, 3)} FPS. Детектор использовал ровно один native 800×600 KB4 pass без геометрического resampling. Hash-bound review содержит person, dog, bicycle, skateboard, car и truck; боксы рисуются поверх чистого кадра и отключаются кнопкой.`,
|
||||
notProved: "Не доказаны route-domain precision/recall, истинность 24 классов и боксов, child/adult, поведение объектов, физическая track identity и безопасность навигации. Legacy 704 count delta остаётся только диагностикой, потому что старая ветка растягивала 4:3 raster.",
|
||||
decision: "Не добавлять второй detector и не менять realtime graph. Использовать эти 24 кейса как вход существующего M4.8 review/correction workflow; только после независимой adjudication считать route-domain semantic quality.",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
import { useState } from "react";
|
||||
import { useMemo, useState } from "react";
|
||||
import { Icon, IconButton } from "@nodedc/ui-react";
|
||||
|
||||
import { LaboratoryEvidenceViewer } from "../../components/laboratory/LaboratoryEvidenceViewer";
|
||||
import type { M48TRiskQualityResult } from "../../core/laboratory/m48tRiskQuality";
|
||||
import { RecordedEvidenceImageScene } from "../../components/laboratory/RecordedEvidenceImageScene";
|
||||
import type {
|
||||
RecordedEvidenceBox,
|
||||
RecordedEvidenceBoxTone,
|
||||
} from "../../components/laboratory/RecordedEvidenceBoxOverlay";
|
||||
import type {
|
||||
M48QNativeRiskQualityResult,
|
||||
M48QRiskFamily,
|
||||
M48TLegacyRiskQualityResult,
|
||||
M48TRiskQualityResult,
|
||||
} from "../../core/laboratory/m48tRiskQuality";
|
||||
|
||||
export function M48TRiskQualityVisual({ result }: { result: M48TRiskQualityResult }) {
|
||||
function navigateIndex(current: number, offset: -1 | 1, length: number): number {
|
||||
return (current + offset + length) % length;
|
||||
}
|
||||
|
||||
function familyTone(family: M48QRiskFamily): RecordedEvidenceBoxTone {
|
||||
if (family === "person" || family === "animal") return "danger";
|
||||
if (family === "light-road-user") return "warning";
|
||||
return "accent";
|
||||
}
|
||||
|
||||
function LegacyVisual({ result }: { result: M48TLegacyRiskQualityResult }) {
|
||||
const [index, setIndex] = useState(0);
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const item = result.review.cases[index] ?? null;
|
||||
const navigate = (offset: -1 | 1) => {
|
||||
setIndex((current) => (
|
||||
current + offset + result.review.cases.length
|
||||
) % result.review.cases.length);
|
||||
};
|
||||
const navigate = (offset: -1 | 1) =>
|
||||
setIndex((current) => navigateIndex(current, offset, result.review.cases.length));
|
||||
|
||||
return (
|
||||
<div className="l3-visual-audit">
|
||||
@@ -61,3 +78,85 @@ export function M48TRiskQualityVisual({ result }: { result: M48TRiskQualityResul
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function NativeVisual({ result }: { result: M48QNativeRiskQualityResult }) {
|
||||
const [index, setIndex] = useState(0);
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
const [boxesVisible, setBoxesVisible] = useState(true);
|
||||
const item = result.review.cases[index] ?? null;
|
||||
const boxes = useMemo<readonly RecordedEvidenceBox[]>(() => {
|
||||
if (!item || !boxesVisible) return [];
|
||||
return item.proposals.map((proposal) => ({
|
||||
boxXyxy: proposal.boxXyxy,
|
||||
label: `${proposal.className} · ${proposal.score.toFixed(2)}`,
|
||||
tone: familyTone(proposal.riskFamily),
|
||||
}));
|
||||
}, [boxesVisible, item]);
|
||||
const navigate = (offset: -1 | 1) =>
|
||||
setIndex((current) => navigateIndex(current, offset, result.review.cases.length));
|
||||
|
||||
return (
|
||||
<div className="l3-visual-audit">
|
||||
<LaboratoryEvidenceViewer
|
||||
label="M4.8Q native raw-fisheye risk review"
|
||||
mode="native"
|
||||
modes={[{ value: "native", label: "NATIVE RF-DETR" }]}
|
||||
expanded={expanded}
|
||||
onModeChange={() => undefined}
|
||||
onExpandedChange={setExpanded}
|
||||
actions={(
|
||||
<div className="l3-visual-audit__pagination">
|
||||
<IconButton label="Предыдущий M4.8Q review case" onClick={() => navigate(-1)}>
|
||||
<Icon name="chevron-left" size={16} />
|
||||
</IconButton>
|
||||
<IconButton label="Следующий M4.8Q review case" onClick={() => navigate(1)}>
|
||||
<Icon name="chevron-right" size={16} />
|
||||
</IconButton>
|
||||
</div>
|
||||
)}
|
||||
trailingActions={(
|
||||
<IconButton
|
||||
label={boxesVisible ? "Скрыть native RF-DETR боксы" : "Показать native RF-DETR боксы"}
|
||||
onClick={() => setBoxesVisible((visible) => !visible)}
|
||||
>
|
||||
<Icon name={boxesVisible ? "eye-off" : "eye"} size={16} />
|
||||
</IconButton>
|
||||
)}
|
||||
overlay={item ? (
|
||||
<div className="l3-visual-audit__overlay">
|
||||
<div>
|
||||
<span>RAVNOVES00 · raw KB4 800×600 · resampling NO</span>
|
||||
<strong>
|
||||
case {index + 1}/{result.review.cases.length} · frame {item.sequence} · {item.proposals.length} native boxes
|
||||
</strong>
|
||||
<small>
|
||||
{item.selectionBuckets.join(" · ")} · native/legacy {item.nativeDetectionCount}/{item.legacyDetectionCount} (diagnostic only)
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
>
|
||||
{item ? (
|
||||
<RecordedEvidenceImageScene
|
||||
src={item.imageUrl}
|
||||
imageWidth={item.width}
|
||||
imageHeight={item.height}
|
||||
boxes={boxes}
|
||||
ariaLabel={`M4.8Q frame ${item.sequence}: ${boxes.length} visible native risk boxes`}
|
||||
/>
|
||||
) : (
|
||||
<div className="l3-visual-audit__state" role="alert">
|
||||
<Icon name="alert" size={18} />
|
||||
M4.8Q native visual evidence недоступно.
|
||||
</div>
|
||||
)}
|
||||
</LaboratoryEvidenceViewer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function M48TRiskQualityVisual({ result }: { result: M48TRiskQualityResult }) {
|
||||
return result.variant === "native-risk-review"
|
||||
? <NativeVisual result={result} />
|
||||
: <LegacyVisual result={result} />;
|
||||
}
|
||||
|
||||
@@ -86,10 +86,10 @@ const KNOWN_WORKS: Readonly<Record<Exclude<LaboratoryWorkId, `session:${string}`
|
||||
},
|
||||
"m48t-risk-quality-temporal": {
|
||||
profileId: "rig-ravnoves-perception-gate-v1",
|
||||
profileName: (rigLabel) => `${rig(rigLabel)} RIGHT · COCO quality + bounded temporal identity`,
|
||||
profileName: (rigLabel) => `${rig(rigLabel)} RIGHT · Native raw-fisheye perception gate`,
|
||||
experimentId: "m48t-risk-quality-temporal",
|
||||
experimentName: "RF-DETR independent semantic quality and temporal identity",
|
||||
variantName: "M4.8T · COCO val2017 truth + RAVNOVES00 temporal shadow",
|
||||
experimentName: "RF-DETR native risk review and temporal identity",
|
||||
variantName: "M4.8Q · native raw KB4 review · quality not adjudicated",
|
||||
},
|
||||
"m47-reference-graph-shadow": {
|
||||
profileId: "rig-dual-evidence-virtual-corridor-v1",
|
||||
|
||||
Reference in New Issue
Block a user