feat(perception): add DDRNet full-video vegetation replay
This commit is contained in:
@@ -75,6 +75,35 @@ function visualCase(sourceKind, index) {
|
||||
};
|
||||
}
|
||||
|
||||
function routeVideo() {
|
||||
return {
|
||||
worker_result_id: `lab-v1-ravnoves-video-ddrnet-${"e".repeat(64)}`,
|
||||
m47_reference_graph_result_id: `m47-reference-graph-lab-${"f".repeat(64)}`,
|
||||
base_m4_result_id: `m4-threat-replay-${"1".repeat(64)}`,
|
||||
frame_count: 4489,
|
||||
width: 800,
|
||||
height: 600,
|
||||
center_crop_xyxy: [100, 0, 700, 600],
|
||||
outside_crop_state: "undefined",
|
||||
sequence_binding: "sequence-0-to-masks/frame-000001.png",
|
||||
taxonomy: {
|
||||
schema_version: "missioncore.lab-v1-vegetation-taxonomy/v1",
|
||||
classes: Array.from({ length: 64 }, (_, classId) => ({
|
||||
class_id: classId,
|
||||
label: classId === 0 ? "undefined" : `class-${classId}`,
|
||||
color_rgb: [classId, classId, classId],
|
||||
disposition: classId === 0 ? "undefined" : "prediction",
|
||||
})),
|
||||
},
|
||||
aggregate_prediction_pixels: Array(64).fill(0),
|
||||
mask_archive: {
|
||||
path: "video/ddrnet-semantic-masks.zip",
|
||||
sha256: "9".repeat(64),
|
||||
byte_length: 1024,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
test("vegetation LAB keeps autonomous assets and fail-closed authority", async () => {
|
||||
let requestedUrl = "";
|
||||
const result = await fetchVegetationShadowResult(resultId, {
|
||||
@@ -111,6 +140,7 @@ test("vegetation LAB keeps autonomous assets and fail-closed authority", async (
|
||||
goose: Array.from({ length: 12 }, (_, index) => visualCase("goose", index)),
|
||||
ravnoves: [],
|
||||
},
|
||||
route_video: routeVideo(),
|
||||
access: "read-only",
|
||||
}), { status: 200, headers: { "Content-Type": "application/json" } });
|
||||
},
|
||||
@@ -123,6 +153,8 @@ test("vegetation LAB keeps autonomous assets and fail-closed authority", async (
|
||||
assert.equal(result.candidates[0].vegetationMeanIouPercent, 64);
|
||||
assert.equal(result.routeCases.length, 0);
|
||||
assert.equal(result.validationCases.length, 12);
|
||||
assert.equal(result.routeVideo.frameCount, 4489);
|
||||
assert.equal(result.routeVideo.taxonomy[0].disposition, "undefined");
|
||||
assert.equal(result.validationCases[0].focus.className, "high_grass");
|
||||
assert.match(result.validationCases[0].assets.ddrnet_error, /\/assets\/visual\/goose\//);
|
||||
assert.deepEqual(result.authority, {
|
||||
@@ -133,13 +165,15 @@ test("vegetation LAB keeps autonomous assets and fail-closed authority", async (
|
||||
});
|
||||
});
|
||||
|
||||
test("vegetation LAB reuses the admitted M4.8 instrument", async () => {
|
||||
test("vegetation LAB reuses the admitted M4.8 and M4.7 instruments", async () => {
|
||||
const resultSource = await readFile(
|
||||
new URL("../src/workspaces/laboratory/VegetationShadowResult.tsx", import.meta.url),
|
||||
"utf8",
|
||||
);
|
||||
assert.match(resultSource, /M48MaskComparisonVisual/);
|
||||
assert.equal(resultSource.match(/<LaboratoryEvidence\b/g)?.length, 1);
|
||||
assert.match(resultSource, /M4ReplayThreatVisual/);
|
||||
assert.equal(resultSource.match(/<LaboratoryEvidence\b/g)?.length, 2);
|
||||
assert.match(resultSource, /showReferenceMediaLayers=\{false\}/);
|
||||
assert.doesNotMatch(resultSource, /VegetationRouteVisual|urban\/rural\/off-road presets/);
|
||||
await assert.rejects(
|
||||
access(new URL("../src/workspaces/laboratory/VegetationShadowVisual.tsx", import.meta.url)),
|
||||
|
||||
Reference in New Issue
Block a user