BOP and cluster-boundary API#
Inspect depth studies have a separate depth API, independent of BOP19 result and visibility requirements.
These APIs operate after or beside acquisition. BOP annotation and evaluation remain run-scoped. Cluster routes proxy a separate loopback controller and do not import estimator code, credentials, or scheduler arguments into PoseTestBot.
Controller requests use direct loopback HTTP and ignore environment proxy settings. Redirects are rejected, so the controller token stays on the local controller connection.
Optional BOP annotations#
| Method and path | Contract |
|---|---|
GET /bop/annotations/setup?run_root=… |
Inspect exported dataset and readiness blockers per annotation mode |
POST /bop/annotations |
Queue the run-configured pose or pose_and_masks product after mode-specific readiness validation |
GET /bop/annotations/ground-truth/download?run_root=… |
Download one JSON collection of all exported sensor-scene poses after manifest, scene, and SHA-256 validation |
The request is:
The job writes only below processed/bop_annotations/ and the BOP scene
directories governed by the annotation/export writer. It declares CPU,
render, and disk resources.
The ground-truth download is read-only and available for completed pose and
pose_and_masks exports. scene_gt_all_sensors.json is a PoseTestBot collection,
not a standard single-scene BOP scene_gt.json. It contains split,
sensor_by_scene_id, scene_gt_sha256_by_scene_id, and
scene_gt[scene_id][im_id] for every exported sensor scene. Each image maps to
instance rows with obj_id, cam_R_m2c (row-major model-to-camera rotation),
and cam_t_m2c (model-to-camera translation in millimetres). Match scene_id
and im_id with the standard result CSV. The endpoint rejects a missing or
symlinked scene artifact, a duplicate scene ID, or any file that differs from
its exported GT hash; it does not modify the original BOP scene files.
Inspect-only BOP and robot-consistency evaluation#
| Method and path | Contract |
|---|---|
GET /bop/evaluation/setup?run_root=… |
Inspect annotation-bearing dataset, pinned toolkit status, registered results, and evaluations |
GET /bop/evaluation/results?run_root=…&limit=… |
List bounded browser-safe retained-result summaries |
POST /bop/evaluation/results |
Multipart import of an already standard BOP19 CSV; locally validates and stores immutable provenance |
GET /bop/evaluation/results/<result_id>/download?run_root=… |
Download the retained immutable CSV |
GET /bop/evaluation/results/<result_id>/provenance?run_root=… |
Download sanitized controller provenance when the result was collected externally |
GET /bop/evaluation/results/<result_id>/package?run_root=… |
Build a deterministic ZIP with CSV, optional provenance, and a path-free hash/size/schema manifest |
POST /bop/evaluations |
Queue official toolkit evaluation of a registered result or deterministic test-only GT perturbation |
GET /bop/evaluations/<evaluation_id>/report?run_root=… |
Download the completed derived report |
Result upload requires form fields run_root, file field file,
and optional display_name. The filename must be a basename with
.csv; the bounded upload is validated again after staging.
Registered-result evaluation request:
{
"run_root": "working_data/example",
"source": {
"kind": "registered_result",
"result_id": "result-…"
}
}
The only alternative source is gt_simulation, intended for deterministic
test validation and explicitly labelled as such. This API is not a pose
estimator, result converter, or acquisition stage. All result and
evaluation evidence stays below processed/bop_evaluation/.
Evaluation history reconciles an interrupted worker with its terminal local
job record. Robot consistency considers the highest-scoring hypotheses up to
the frozen BOP19 target's inst_count before matching instances.
Every CSV, provenance, and package download rechecks the retained file against its recorded hash. A package is produced on demand with fixed ZIP metadata; it does not mutate the result directory. A manual import contains CSV plus manifest and reports no provenance member. The console's evaluation history and report are scoped to the selected result, preventing metrics from another result from remaining visible.
An imported FoundationPose v2 result may carry a verified sensor scope. In
that case PoseTestBot recomputes the selected target inventory from the local
export before import. Evaluation writes
selected_test_targets_bop19.json inside the evaluation directory, passes its
absolute path to the pinned toolkit, restricts the adapter scene IDs, and
labels a proper sensor subset as not directly comparable to a full-dataset
result.
Every new evaluation also attempts
IPD robot consistency from recorded
robot/calibration evidence. The request freezes those inputs and SHA-256;
the queued worker adds robot_consistency_mvd and robot_consistency_add
to metrics when available. These values have unit: "mm", source: "ipd",
and direction: "lower". Official BOP score output remains separate.
robot_consistency in the report and setup/history summary includes
status (available, partial, or unavailable), reasons, coverage,
matched/eligible instance views, unmatched predictions, and bounded
sensor/instance scores. Missing robot evidence does not block the official
scores; corrupt or changed evidence fails closed. The existing submission
contract, CPU/disk resources, and run-scoped artifact boundary are unchanged.
Pose-result inspection and visualization exports#
| Method and path | Contract |
|---|---|
GET /bop/inspection/result-location?result_id=… |
Resolve one retained result ID to a directly indexed, approved run folder for legacy direct links; reject missing or ambiguous IDs |
GET /bop/inspection/setup?run_root=…&result_id=… |
Return compatible retained results, validated objects/scenes, sensor labels, capabilities, limits, visualization contract, and exports.mp4.available/reason |
GET /bop/inspection/frames?run_root=…&result_id=…&scene_id=…&filter=…&object_id=…&page=…&page_size=… |
Return a bounded paginated frame inventory and provenance-backed operation filters |
GET /bop/inspection/frame?run_root=…&result_id=…&scene_id=…&im_id=…&max_hypotheses=… |
Return camera intrinsics, GT, ranked estimates, score/timing, visibility, optional operation evidence, and safe media URLs |
GET /bop/inspection/media/<result_id>/<scene_id>/<im_id>/<kind>?run_root=… |
Serve ID-resolved RGB, or a bounded colorized depth PNG |
GET /bop/inspection/masks/<result_id>/<scene_id>/<im_id>/<gt_id>/<kind>?run_root=… |
Serve an ID-resolved full or visible GT mask when present |
GET /bop/inspection/models/<result_id>/<obj_id>?run_root=… |
Serve the hash-checked evaluation-model PLY |
POST /bop/inspection/exports |
Save settings/frame selection and queue a CPU/disk visualization job; HTTP 202 with export_id and job_id |
GET /bop/inspection/exports/<export_id>?run_root=… |
Return saved settings/source identity, frame count, job state, rendering progress/error, and completed download availability/URL |
GET /bop/inspection/exports/<export_id>/download?run_root=… |
Serve a completed ZIP/MP4 attachment after retained integrity checks; HTTP 409 until successfully completed |
Supported frame filters are all, estimated, target,
missing_estimate, registration, tracking, and reinitialization.
Operation labels are unknown unless sanitized retained provenance proves the
FoundationPose execution contract. Browsing is read-only. These APIs accept no
filesystem media/model path from the caller. Result IDs, scene/frame/object/GT
IDs, containment, regular-file status, symlinks, hashes, PNG dimensions, row
counts, hypotheses, page size, and media size are validated before response.
Export requests use a closed JSON object limited to 16 KiB. Oversized bodies,
including streamed requests without a declared length, return HTTP 413 before
JSON parsing or input snapshot creation. They require run_root, result_id,
integer scene_id, and format (zip or mp4). Optional fields are filter
(the same values as browsing, default all), object_id (positive integer or
null), background (rgb/depth, default rgb), max_hypotheses (1–50,
default 20), fps (integer 1–120, default 30), geometry, and masks.
Pagination/frame IDs are not accepted: all matching frames in the scene are
exported, in numeric order. The object filter affects frame selection, as in
the viewer. It does not hide other objects within those frames.
geometry accepts boolean estimateSurface, estimateWireframe,
estimateAxes, estimateBox, gtSurface, gtWireframe, gtAxes, gtBox,
and numeric estimateOpacity/gtOpacity (0–1). Defaults enable estimated
surface and GT wireframe, with opacity 0.38/0.32. masks accepts boolean
full/visible (default false) and numeric fullOpacity/visibleOpacity
(0–1, defaults 0.28/0.42). Wireframe opacity is at least 0.75; boxes use 0.95
and RGB axes are opaque, matching the viewer. All geometry is an x-ray overlay.
Empty selections, invalid settings, unavailable requested masks/encoder, and
unsafe paths fail closed (HTTP 400; unknown IDs return 404); busy job resources
return 409. Rendering, hashing frame content, and encoding run through
LocalJobRunner with cpu and disk_io, including its existing cancellation.
Artifacts stay under processed/bop_evaluation/visualizations/<export_id>/.
Requests retain source identities at submission; changes before/during
rendering fail the job. Completed files are atomically published and bound to
request/manifest/output SHA-256. Failed or canceled jobs never expose partials.
Downloads remain recoverable after source drift. After a run move, pass the
new approved run_root when opening an export_id. The original job binding
and publication hashes continue to validate the output. Jobs links include
result and scene IDs.
If the operator leaves the submitted view before its response arrives, the
response does not redirect them. The export remains accessible from Jobs.
External cluster controller proxy#
| Method and path | Contract |
|---|---|
GET /cluster/status |
Return curated controller connectivity, storage, archive, and advertised-estimator status |
GET /cluster/controller-service |
Inspect the one fixed configured user-service |
POST /cluster/controller-service/<action> |
Queue allow-listed start/stop/restart action; browser cannot name a unit or command |
GET /cluster/archives |
List immutable-while-retained controller-side run archives |
POST /cluster/archives |
Submit archive creation for a locally validated run |
POST /cluster/archives/<archive_id>/restore |
Submit restore with local identity/active-job checks |
DELETE /cluster/archives/<archive_id> |
Queue permanent deletion of one opaque-ID archive after explicit confirmation and operator attribution |
GET /cluster/pose-estimation/setup?run_root=…&estimator_id=… |
Return strict setup v3 with browser-safe dataset identity, sensor sequences, and controller-advertised estimators/settings |
POST /cluster/pose-estimation/jobs |
Submit a typed controller job using an advertised estimator ID, profile, and closed estimator settings |
GET /cluster/jobs?run_root=…&estimator_id=…&limit=… |
List curated external jobs, optionally filtering on validated internal run identity and estimator before path-safe redaction; with a run, include durable retained-result collection state |
GET /cluster/jobs/<job_id> |
Inspect one curated external job |
POST /cluster/jobs/<job_id>/cancel |
Request controller cancellation |
POST /cluster/jobs/<job_id>/import-result |
Explicitly collect, revalidate, and idempotently retain a completed standard BOP19 result in the active run |
The proxy is enabled only by server configuration. Returned values are
allow-listed and scrubbed; controller URLs/tokens, SSH data, remote paths,
container commands, and arbitrary scheduler inputs are never accepted from or
returned to the browser. Imported results bind the controller provenance,
staged dataset hash, and local dataset hash. FoundationPose v2 import also
requires the payload, public result, downloaded provenance, and independently
recomputed selected-target hash to agree.
The inspection_url and evaluation_url returned after collection carry the
approved run_root alongside result_id, so direct links retain their dataset
scope even when another operator run is active.
The UI labels the import endpoint Collect result and never invokes it as a mount/reload side effect. Collection state is recovered by matching the controller job's opaque ID against retained result records. Pose Estimation uses the run- and estimator-filtered response as a bounded job selector. Jobs keeps its global path-redacted history and separately requests the active run's filtered history, exposing collect/inspect/evaluate actions only where that second response proves ownership. Repeated same-run submissions and their collected immutable result IDs remain distinct. FoundationPose v2 retention includes bounded track segments, fixed registration/tracking iterations, per-image timings, and failure identities. Retention is capped at 200 recorded segments, 200 failure identities, and 10,000 image timings, with omission counts retained when source evidence is larger. Free-form failure messages, remote paths, controller secrets, commands, and scheduler arguments are discarded rather than exposed.
Filtered controller history sets truncated: true when the controller's scan
bound was reached. Older jobs for the run may then be missing from the result.
include_log, when supplied, must be a valid boolean.
FoundationPose v2 submission example:
{
"run_root": "working_data/example",
"estimator_id": "foundationpose",
"profile_id": "full",
"operator": "Lab Operator",
"estimator_settings": {
"schema_version": "posetestbot_cluster_job_settings.v1",
"execution_mode": "continuous_tracking",
"selected_scene_ids": [1, 3]
}
}
Setup sensor descriptors contain only BOP scene_id, a safe sensor identity,
the run-owned alias/display label, mounting mode, counts, and tracking
eligibility/blocker. Source paths and physical scheduler controls are never
included. Omitting estimator_settings remains the controller's legacy
compatibility request and means independent registration over all exported
target scenes.
Archive/storage readiness is independent from estimator runtime readiness. A
run can be archived, restored, or its retained archive can be deleted even when
no qualified estimator is advertised. Archive deletion removes only the
controller-owned cluster copy; it neither deletes nor accepts a path to the
local acquisition folder. The request body is closed to confirm: true and a
non-empty operator, while the proxy supplies its own idempotency key.
The companion must implement DELETE /v1/archives/{archive_id}. A controller
that returns the router's bare Not Found is reported as an unsupported
operation (409), with an instruction to update and restart the companion;
an unknown archive retains its resource-specific 404.
Deletion queues an archive-delete job without remote I/O in the handler.
The worker revalidates the retained receipt and remote hashes before committing
removal. Restore and deletion for the same archive are mutually exclusive.
Jobs identifies storage jobs by operation and disables deletion cancellation
with a visible reason after removal begins.
Cancellation is allowed before that commit; once removal begins, the archive
is deleting, restore and cancellation are unavailable, and restart resumes
cleanup. A failed cleanup keeps the receipt and offers Retry deletion with
a fresh confirmation. Successful deletion retains a controller tombstone and
job history while removing the archive from inventory. No local run is removed.
Controllers without the current domains-and-estimators status shape fail closed;
PoseTestBot never fabricates a default estimator or resource profile.