Skip to main content

Full-pipeline imaging CONOPS

For the CLI formats used in this workflow, compare build results, run status, program logs, and file-transfer results. These fictional examples illustrate CLI formatting only, not this scenario's end-to-end validation or physical delivery.

This advanced example runs a complete imaging concept of operations (CONOPS) as one job in your tenant. It requests a capture, processes the image on a GPU, records the capture window, asks a vision model to describe the image, and saves the results in tenant storage.

Everything you need is in docs/examples/conops-imaging/:

FilePurpose
conops_imaging.pyRuns the workflow.
DockerfileBuilds the application on the OmniCloud PyTorch base image.
image-build.yamlDescribes how to build the container image.
workload.yamlDescribes the GPU job. Replace tenant-a before submitting it.
mobile_sam.ptMobileSAM model weights, downloaded separately before the build.

The linked reference pages contain the complete approved sources. Agents can search for this workflow through MCP and follow those links with docs_fetch. The same content is available as Markdown: use the discovery index at /agent-content/index.json to find each page's path under /agent-content/. Markdown and website pages have distinct URLs. Model weights are not part of that publication.

Before running, confirm imaging access, GPU and LLM availability, and storage access for your tenant. Consult the capability matrix for requirements. Orbit prediction access (orbit.passes.read) is optional; without it the catalog-order fallback below applies. Camera-service admission and scheduling remain authoritative: orbit predictions do not guarantee capture.

Run the commands from the omnisat-public repository root so the docs/examples/conops-imaging/... paths below resolve.

The job has seven phases:

PhaseWhat happens
0 planAsk orbit-service when each catalog target next passes, then request a capture of the soonest one that camera-service accepts.
1 commitWait for the capture to be committed to a pass window.
2 captureWait for the exposure and for camera-service to deliver the product.
3 fetchFetch the product and verify its size and checksum.
4 segmentUse MobileSAM on the GPU to segment the image.
5 characteriseWrite the target name, coordinates, capture start and end, and duration.
6 analyseSend the captured image and the target name to the platform LLM service and ask for a description of at most five sentences.

camera-service chooses the pass. It searches up to two hours of mission time ahead and refuses a target it cannot image in that time, so you can submit the job at any time. See How phase 0 chooses a target.

Every wait has a deadline. If a deadline expires, the final log says what the job was waiting for and what camera-service last reported. If the job gives up before the product is delivered, it cancels the capture request.

The weights are not committed. Download the MobileSAM weights pinned to upstream commit f706ad9c4eb7f219c00d9050e46328518ffb65d2, then verify the file before uplinking the build context. MobileSAM is distributed under the Apache-2.0 license; review its upstream license before sharing it.

curl --fail --location \
--output ./docs/examples/conops-imaging/mobile_sam.pt \
https://raw.githubusercontent.com/ChaoningZhang/MobileSAM/f706ad9c4eb7f219c00d9050e46328518ffb65d2/weights/mobile_sam.pt
printf '%s %s\n' \
6dbb90523a35330fedd7f1d3dfc66f995213d81b29a5ca8108dbcdd4e37d6c2f \
./docs/examples/conops-imaging/mobile_sam.pt | sha256sum --check

The image builder receives only the stored conops-imaging/ directory, not the other files in your tenant volume. Uplink the Dockerfile to the volume root and the application files to that directory:

dphi> storage uplink default docs/examples/conops-imaging/Dockerfile Dockerfile.conops-imaging
dphi> storage uplink default docs/examples/conops-imaging/conops_imaging.py conops-imaging/conops_imaging.py
dphi> storage uplink default docs/examples/conops-imaging/mobile_sam.pt conops-imaging/mobile_sam.pt
dphi> storage files default conops-imaging

The target catalog is already included in conops_imaging.py, so these are the only three files you need to uplink.

2. Build the image​

The build installs ultralytics from OmniCloud's approved Python package mirror. Do not add credentials, public package indexes, or other secrets to the build arguments.

The Dockerfile installs the MobileSAM dependencies in /opt/conops-venv and reuses the PyTorch and CUDA packages already provided by the base image. This prevents pip from replacing the platform's GPU-enabled PyTorch with a generic build that might not support the GPU. The Dockerfile also checks the PyTorch and NumPy installation during the build, so an incompatible image fails before you submit a workload.

dphi> build create docs/examples/conops-imaging/image-build.yaml --idempotency-key conops-imaging-v1
dphi> build wait YOUR_BUILD_ID --timeout 3600
dphi> build logs YOUR_BUILD_ID

3. Run it​

Replace tenant-a in workload.yaml and match the image tag to image-build.yaml.

Connections​

Diagram in words: the GPU job calls the OmniCloud gateway for orbit predictions, capture requests and product retrieval, and LLM inference; it writes its results to tenant storage.

dphi> run create docs/examples/conops-imaging/workload.yaml --idempotency-key conops-imaging-run-v1
dphi> run logs YOUR_RUN_ID --component-name conops-driver
dphi> run wait YOUR_RUN_ID --timeout 86400

While phases 1 and 2 run, the OmniCloud Grafana dashboard shows the spacecraft turning toward the target. The 3DSat, Yaw-Pitch-Roll, pointing-error, and target visibility panels show that slew.

Optional settings​

You can add these environment variables to the conops-driver component:

VariablePurpose
TARGET_NAME, TARGET_LAT, TARGET_LONUse one target instead of choosing from the catalog. Set both coordinates together.
ACCESS_HORIZON_SECONDSSet how far ahead, in mission time, the capture may be scheduled. camera-service never searches more than two hours ahead.
MIN_WINDOW_SECONDSSet duration_s (image-line time). The reserved pointing window is longer by about two seconds of margin. High-resolution caps at 5 s.
POLL_SECONDSSet how often the job checks capture status.
WAIT_SLACK, WAIT_MARGIN_SECONDSIncrease the delivery deadline when mission time is running slowly.
VLLM_URL, VLLM_MODELSelect the LLM endpoint and image-capable model used to describe the image.

4. Retrieve the result​

After the run reaches Succeeded, use the image name printed in the run logs to retrieve the results from tenant storage:

dphi> storage files default conops-imaging-run
dphi> storage downlink default conops-imaging-run/YOUR_IMAGE_NAME.tif ./capture.tif
dphi> storage downlink default conops-imaging-run/YOUR_IMAGE_NAME.png ./capture.png
dphi> storage downlink default conops-imaging-run/YOUR_IMAGE_NAME-segmented.png ./segmented.png
dphi> storage downlink default conops-imaging-run/YOUR_IMAGE_NAME-report.txt ./report.txt
dphi> storage downlink default conops-imaging-run/YOUR_IMAGE_NAME-pass.json ./pass.json

When camera-service delivers a TIFF, the workload also retains the raw product. Use the exact TIFF filename returned by storage files to downlink it.

The job always writes <image-name>-pass.json to tenant storage alongside the other results. The file contains the target name, coordinates, the capture start and end from camera-service, and duration_s.

Before you rerun it​

After every source change, upload the changed sources and wait for a new Image Build to succeed before submitting a new Run. You can reuse image.tag; keep the image reference in workload.yaml consistent with the build result. New workload containers resolve the tag on every start, including restarts, so the registry must be available. Moving the tag does not restart running containers. Use a digest reference for a fixed image identity, and a new idempotency key for every run:

dphi> run create docs/examples/conops-imaging/workload.yaml --idempotency-key conops-imaging-run-v2

How phase 0 chooses a target​

The job asks orbit-service for the first pass over every catalog target, with one request:

POST /orbit/api/v1/passes/search
{"targets": [{"id": "Rome", "latitude_deg": 41.9028, "longitude_deg": 12.4964}, ...],
"min_elevation_deg": 57, "limit_per_target": 1}

orbit-service searches the next 24 hours from the current mission time. An elevation of 57 degrees is the MultiScape200's 30-degree off-nadir limit seen from the target at the spacecraft's altitude. A request carries at most 100 targets, so a larger catalog is searched in several requests.

The job then requests a capture of each target, soonest pass first, until camera-service accepts one. A target with no pass in the next 24 hours is requested last. camera-service answers 422 no_qualifying_pass or 422 unsatisfiable_geometry for a target it cannot image within the horizon, and the job moves on to the next. Any other refusal, such as admission_closed or observation_stale, stops the job because it would refuse every target.

orbit-service only decides the order of the requests. camera-service computes the pass itself, so a wrong or missing prediction costs a few refused requests, never a wrong capture. If orbit-service is unavailable, or the tenant lacks orbit.passes.read, the job requests the catalog in its listed order and camera-service applies its default two-hour deadline.

When the capture is committed, the job logs the committed window next to the predicted pass start, so you can compare the two.

How the pass record and the description are written​

Phase 5 reads the delivered GET /camera/api/v1/capture/status response and writes <image-name>-pass.json with only:

  • target, the catalog name
  • coordinates, as latitude_deg and longitude_deg
  • start and end, the committed capture window
  • duration_s, the imaging duration requested for that capture

Phase 6 sends the captured image to the image-capable LLM, together with the target name, and asks for a description of at most five sentences. The request does not include telemetry or a recommendation. If the model cannot be reached, the job writes a placeholder report and continues: a failed description does not discard an image that was already captured. The vision request uses an aspect-preserving copy with a maximum edge of 1,024 pixels to fit the model context. The stored images keep their full resolution.

The capture needs scene content​

Phases 4–6 need scene content. The workload converts the simulated MultiScape200 TIFF to an 8-bit PNG. The manifest uses a one-second exposure, verified on Stable Thor in DEV. If the simulated camera returns a blank frame, MobileSAM can find no masks and stop the job in phase 4. When MobileSAM returns masks but the size filter excludes all of them, the job can still finish. Check mask_count in the run logs to verify that segmentation found usable regions. Ask the platform operator to confirm the camera produces scene content before running this example.

A blank simulated frame can still be a valid delivered product with a correct size and checksum. This example's segmentation stage needs scene content; its failure to find masks does not establish that product delivery failed. A valid simulated product does not establish physical image acquisition.

Pixel content is simulated from Sentinel-2 L2A. High-resolution PAN is super-resolved demo imagery (about 1.5 m GSD), not scientifically valid data; low-resolution bands are on a 10 m grid with coarser Sentinel bands upsampled. Products are not UTM-orthorectified, and footprints that cross Sentinel tiles may stitch acquisitions that are not temporally consistent. Full disclaimer: Simulated image data.

For the Capture Request API, product clocks, and download path, see Use the imaging capability.