Skip to main content

MPU fisheye thumbnail

This example demonstrates lightweight CG2 onboard image processing on the MPU node. The exact MPU client and workload were validated onboard. It uses only the Python standard library—no GPU runtime, model weights, or external Python packages are required.

What it does​

The client checks the onboard telemetry service, lists available PNG images, and requests 167.png. If that request fails, it makes one attempt using another listed PNG. It decodes the selected image in memory, writes a maximum 32×32 thumbnail, and never stores the original image on the volume.

The client writes two standalone files:

  • /data/fisheye-results.json: image metadata, checksums, dimensions, and client status.
  • /data/fisheye-thumbnail.png: the reduced preview.

The operation downlinks both files directly to /fisheye-thumbnail-results in the operation namespace.

Example output​

This sample thumbnail is 30×32 pixels, preserving the source image's aspect ratio within the 32×32 maximum. The preview below is enlarged ten times to make the thumbnail easier to see.

Example fisheye thumbnail produced by the MPU client

Download the original thumbnail PNG.

Run it​

Upload fisheye_client.py to the namespace named in the YAML, then create the operation and execution through the dashboard or maintained API client. The operation mounts the fisheye-thumbnail volume at /data, uses python:3.12-alpine, and targets node: MPU with a 15-minute pod limit. The client itself stops after five minutes.

Change namespace and the volume/pod names if needed, keeping the uplink, pod, and downlink volume values aligned. The telemetry service and its image inventory are onboard dependencies: SUCCESS does not imply that a particular image is fresh, ordered by time, or permanently available.

Failure output​

The pod is configured with on_failure: continue so the report downlink can run after a failure. If the telemetry API, image download, or PNG validation fails, fisheye-results.json contains the error and no thumbnail is written; the thumbnail downlink can then report its missing source while the metadata report remains available.