feat(lab): seal full RAVNOVES004TREE semantic review
This commit is contained in:
@@ -7,6 +7,7 @@ import { createServer } from "vite";
|
||||
let server;
|
||||
let fetchVegetationBenchmarkResult;
|
||||
let fetchVegetationShadowResult;
|
||||
let vegetationFullRouteMaskUrl;
|
||||
|
||||
before(async () => {
|
||||
server = await createServer({
|
||||
@@ -14,7 +15,11 @@ before(async () => {
|
||||
logLevel: "silent",
|
||||
server: { middlewareMode: true },
|
||||
});
|
||||
({ fetchVegetationBenchmarkResult, fetchVegetationShadowResult } = await server.ssrLoadModule(
|
||||
({
|
||||
fetchVegetationBenchmarkResult,
|
||||
fetchVegetationShadowResult,
|
||||
vegetationFullRouteMaskUrl,
|
||||
} = await server.ssrLoadModule(
|
||||
"/src/core/laboratory/vegetationShadow.ts",
|
||||
));
|
||||
});
|
||||
@@ -148,6 +153,63 @@ function coarseRouteVideo() {
|
||||
};
|
||||
}
|
||||
|
||||
function fullRouteReview() {
|
||||
const layer = (kind) => ({
|
||||
name: kind === "city" ? "EoMT Cityscapes" : "ddrnet_39",
|
||||
result_id: kind === "city"
|
||||
? `result-${"2".repeat(64)}`
|
||||
: `lab-v1-ravnoves-video-ddrnet-${"3".repeat(64)}`,
|
||||
frame_count: 6830,
|
||||
taxonomy: {
|
||||
schema_version: kind === "city"
|
||||
? "missioncore.recorded-eomt-taxonomy/v1"
|
||||
: "missioncore.lab-v1-vegetation-taxonomy/v1",
|
||||
classes: Array.from({ length: kind === "city" ? 16 : 64 }, (_, classId) => ({
|
||||
class_id: classId,
|
||||
label: classId === 0 ? "undefined" : `${kind}-${classId}`,
|
||||
color_rgb: [classId, classId, classId],
|
||||
disposition: classId === 0 ? "undefined" : "prediction",
|
||||
})),
|
||||
},
|
||||
mask_archive: {
|
||||
path: kind === "city"
|
||||
? "video/eomt-semantic-masks.zip"
|
||||
: "video/ddrnet-semantic-masks.zip",
|
||||
sha256: "4".repeat(64),
|
||||
byte_length: 4096,
|
||||
},
|
||||
inference_fps: 9.5,
|
||||
latency_p95_ms: 101.2,
|
||||
peak_reserved_vram_bytes: 3_000_000_000,
|
||||
});
|
||||
return {
|
||||
source_id: "RAVNOVES004TREE",
|
||||
session_id: "20260828T130511Z_viewer_live",
|
||||
source_job_id: "recorded-camera-eb2783c5480d56bda07c8af0",
|
||||
source_job_input_sha256: "eb2783c5480d56bda07c8af008dff5344d19dc550ef70fe2075d6f098f7cc715",
|
||||
source_stream_sha256: "e5eb017e2cc0f546736eda5235ca157b501913093cb64af5e548e335417e1bac",
|
||||
recorded_media_source_id: "recorded.camera.6a3945242828a038",
|
||||
recorded_media_generation_sha256: "b073ea1e7babf1c77a664e1a5b95e3702d0e05b0e34c1e85a7c67a6f8b392ded",
|
||||
frame_count: 6830,
|
||||
width: 800,
|
||||
height: 600,
|
||||
timeline_start_seconds: 39.215263458,
|
||||
timeline_end_seconds: 757.260263458,
|
||||
frame_source_times_ns: Array.from({ length: 6830 }, (_, index) => 39_215_263_458 + index * 100_000_000),
|
||||
ground_truth: false,
|
||||
decode_repair: {
|
||||
repaired_frame_count: 1,
|
||||
sequence: 6092,
|
||||
method: "duplicate-previous-decoded-frame",
|
||||
proofs: {
|
||||
eomt: { path: "proofs/decode_repair.json", sha256: "7".repeat(64) },
|
||||
ddrnet: { path: "proofs/ddrnet_decode_repair.json", sha256: "8".repeat(64) },
|
||||
},
|
||||
},
|
||||
layers: { city: layer("city"), vegetation: layer("vegetation") },
|
||||
};
|
||||
}
|
||||
|
||||
function labPayload(route = routeVideo()) {
|
||||
return {
|
||||
schema_version: "missioncore.lab-v1-vegetation-shadow/v1",
|
||||
@@ -233,6 +295,29 @@ test("vegetation LAB parses coarse material policy and sealed TGS binding", asyn
|
||||
assert.equal(result.routeVideo.fusionMode, "synchronised-multilayer-review");
|
||||
});
|
||||
|
||||
test("vegetation LAB parses the full 004 pass inside the existing result contract", async () => {
|
||||
const payload = {
|
||||
...labPayload(null),
|
||||
catalogs: { goose: [], ravnoves: [] },
|
||||
route_full_review: fullRouteReview(),
|
||||
};
|
||||
const result = await fetchVegetationShadowResult(resultId, {
|
||||
fetcher: async () => new Response(JSON.stringify(payload), {
|
||||
status: 200,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
}),
|
||||
});
|
||||
assert.equal(result.routeVideo, null);
|
||||
assert.equal(result.routeFullReview.frameCount, 6830);
|
||||
assert.equal(result.routeFullReview.city.taxonomy.length, 16);
|
||||
assert.equal(result.routeFullReview.vegetation.taxonomy.length, 64);
|
||||
assert.equal(result.routeFullReview.decodeRepair.sequence, 6092);
|
||||
assert.equal(
|
||||
vegetationFullRouteMaskUrl(resultId, "vegetation", 6829),
|
||||
`/api/v1/laboratory/vegetation-shadow/${resultId}/route-masks/vegetation/6829`,
|
||||
);
|
||||
});
|
||||
|
||||
test("vegetation GOOSE benchmark opens through its separate archival endpoint", async () => {
|
||||
let requestedUrl = "";
|
||||
const result = await fetchVegetationBenchmarkResult(benchmarkResultId, {
|
||||
@@ -271,8 +356,10 @@ test("vegetation realtime LAB and archival benchmark use separate admitted instr
|
||||
assert.match(resultSource, /M49TgsFullShadowEvidence/);
|
||||
assert.match(resultSource, /semanticOverride/);
|
||||
assert.match(resultSource, /EoMT CITY \/ DDRNet VEGETATION/);
|
||||
assert.equal(resultSource.match(/<LaboratoryEvidence\b/g)?.length, 3);
|
||||
assert.equal(resultSource.match(/<LaboratoryEvidence\b/g)?.length, 4);
|
||||
assert.match(resultSource, /RAVNOVES004TREE mixed route review/);
|
||||
assert.match(resultSource, /RAVNOVES004TREE full recorded review/);
|
||||
assert.match(resultSource, /LaboratoryRecordedClipPlayer/);
|
||||
assert.match(resultSource, /linkedTgsResultId/);
|
||||
assert.match(benchmarkSource, /M48MaskComparisonVisual/);
|
||||
assert.doesNotMatch(benchmarkSource, /M49TgsFullShadowEvidence/);
|
||||
|
||||
Reference in New Issue
Block a user