VQA Generation Pipeline
1. Run Generation
skip
--recording: Memory2 Go2 recording path or named recording.--start-index,--stop-index,--stride: sampled recording frames.--question-mode:constrainedoragentic; default isconstrained.--min-mask-area-px: minimum accepted segmentation-mask area; default128.--min-foreground-points: minimum point-cloud support inside a mask; default3.--output: dataset root; frames with a completedframe.jsonmarker are skipped, while partial frame directories are safely rewritten on rerun.
--start-index to that frame and --stop-index to the next index. For
example, use --start-index 40 --stop-index 41 for frame 40.
Generation Specification
dimos vqa generate --spec <generation.json> is an alternative to the explicit generation flags.
Do not combine --spec with --recording, frame bounds, question mode, grounding thresholds, or
output flags. A specification is a reproducible generation request:
audit/run.json. This is an output record, not the input specification.
2. Preprocess Each Frame
Generation creates oneGo2FramePreprocessor for the complete recording run. Setup performed once:
- Open the Memory2 recording.
- Discover and order image, LiDAR, camera-info, and TF streams.
- Initialize reusable nearest-time alignment and TF access.
- Cache OpenCV rectification maps for each distinct camera calibration.
- Loads the image and nearest LiDAR/camera-info observations within tolerance.
- Rectifies the image and emits matching zero-distortion pinhole intrinsics.
- Resolves camera-from-point-cloud using recorded TF or captured-pose fallback.
- Returns one read-only
CalibratedFrame.
3. Create Questions
Constrained
The image author inspects the scene and returns structured intents in one JSON array. Malformed JSON is retried once. Strict per-item parsing rejects unsupported kinds, unexpected fields, and invalid family parameters into the private author audit. The author selects only families likely to be useful for the visible arrangement, rather than expanding every object into every family. Private grounding still rejects unsupported or ambiguous candidates. A non-empty response with no valid intents fails the frame instead of publishing a resumable zero-question completion marker.Agentic
The image-only author returns a frozen question with one contract:- Boolean:
{"kind":"boolean"}; public choices areyes,no. - Choice:
{"kind":"choice","choices":[...]}; at least two choices.
4. Pre-Answer Evidence Checks
Presence, visible count, and image direction use valid MoonDream detections directly. They do not segment objects or project LiDAR. Range and pairwise geometry families need an EdgeTAM mask with enough visible 3D point support. Questions are authored from RGB only; private LiDAR evidence establishes geometric labels.- Presence and count: accepted visual detections.
0is an exhaustive distractor; empty detector output is unverified absence and rejects rather than producing a zero label. - Range: accepted grounded instances only. If boxes are absent or box segmentation fails, MoonDream can return positive image points that EdgeTAM expands into masks.
- Left/right comparison: one grounded instance per named object with clear separation.
5. Create Answers
Constrained
Each deterministic family runs its own fixed sequence.ground(A) below is one cached
ground_objects(A) call through the shared frame perception facade. The deterministic answerer only
dispatches the intent to the matching family; the family owns evidence requirements, quality gates,
selection, and answer policy:
project_visible_points() transforms source points into the camera frame, drops points behind or
outside the camera, maps the remainder into rectified image pixels, and keeps the nearest point per
pixel. Each ground_object(mask) then filters that cached sparse projection by the mask. Calibration
and projection are not rerun for every object.
Agentic
The private oracle calls only read-only perception and geometry primitives shared with constrained recipes. It interprets their measurements and selects an answer itself:
Opaque IDs chain tool results; raw masks and point-cloud arrays are not exposed to the oracle. The
oracle returns a candidate answer and cited evidence IDs.
6. Post-Answer Validation
The candidate is rejected unless:- Its normalized answer matches one of the fixed public choices.
- It cites one or more known evidence IDs.
7. Write Dataset Artifacts
The generated root is directly evaluable while retaining private audit state:cases.jsonl is one public evaluation case. Formatted for readability, one record is:
id: unique case identifier.image: dataset-relative path to the public image.question: question shown to the evaluated vision model.choices: at least two allowed answer strings.
labels.jsonl is the corresponding private correct answer. Formatted for readability,
one record is:
id: case identifier matching exactly onecases.jsonlrow.answer: one of that case’schoices.
frame.json records the question-author and parser versions. Resume accepts a completed frame
only when those versions, model IDs, generation mode, recording, frame index, and grounding settings
match the current run.
Run the generated dataset through the standard evaluation framework:
cases.jsonl, public images, and private labels.jsonl. It does
not read generation evidence or point-cloud data.