Skip to main content

Visualizations

Your runs write files in context.output_dir. List the ones people should look at in qaboard.yaml: the commit page's Visualizations view shows them on each run's card, next to the reference run's, in a viewer picked from the file's extension.

Show an image​

If your code writes out.png:

qaboard.yaml
outputs:
visualizations:
- name: Output
path: out.png

path is relative to the run's output directory. Run a batch with qa batch <batch>, open the link it prints, then the Visualizations view: each run's card shows its out.png next to the reference's, and zooming one zooms the other.

A run card of the facade photo: PSNR, SSIM and runtime with their changes against the reference, preset regions of interest, and the new and reference images side by side, zoomed on a window.A run card of the facade photo: PSNR, SSIM and runtime with their changes against the reference, preset regions of interest, and the new and reference images side by side, zoomed on a window.
Each run's card starts with its main metrics, then shows out.png next to the reference's, zoomed on the same window.
When the web app sees your changes

A commit keeps the qaboard.yaml that qa sent with its first results. To try new visualizations, edit qaboard.yaml and run qa batch <batch> again: the batch keeps your edited qaboard.yaml, and the web app shows its new visualizations for that batch. The commit's other batches, like the CI's, keep the commit's. qa run doesn't change which qaboard.yaml a batch uses.

Which viewer opens a file​

The extension picks the viewer. Set type when it doesn't say, e.g. type: 6dof/txt for a trajectory saved as poses.tsv.

FilestypeViewerIn the user guide
.png, .jpg, .jpeg, .bmp, .tif, .tiff, .pdfimage/*Image: side by side, wipe, difference, pixel valuesThe image viewer
.raw, .dng, .heximage/*Image, if the image server reads these raw formats (not included)The image viewer
.mp4, .webm, .mov, .mkv..., animated .webp and .gifvideo/*Video: in sync, frame by frameThe video viewer
.plotly.json, .plotly.htmlplotly/json, plotly/htmlPlot, side by side or on the same axesPlots
.folded, .collapsed, .stacks.txt, .speedscope.json, .cpuprofile, .flame.json (from your profiler)any flame/...Flame graph, differential, with the top functionsFlame graphs
benchmarks.json, *.benchmarks.json, *-bench.json... (from your harness)benchmarksBenchmarks, each against the reference's, beyond noise or within itBenchmarks
series.json, series.jsonl, *.series.json (logged from your code)seriesLogged series: one plot per series, the reference's on the same axesLogged series
junit.xml, *.junit.xml, TEST-*.xmljunit/xmlTest report: new failures, fixed, flaky testsTest reports
.htmltext/htmlHTML, in a frame, without scriptsHTML reports
.pcdpointcloud/pcdPoint cloud in 3D, with the reference's and a ground truthPoint clouds
any, e.g. .tsv6dof/txt6DoF trajectory, with the reference's and the ground truthTrajectories
anypointcloud/txtA time-of-flight camera's frames: point clouds and depth maps (legacy layout)
anything else: .txt, .json, .log...text/plainText, diffed with the reference'sText

What each viewer reads (video codecs, point cloud formats, the trajectories' columns...) and its options are in Viewers and file formats.

Show several files, hide the debug ones​

Cards show the visualizations in the order of the list. Those with default_hidden: true start hidden: people turn them on in the View options. Hide the debug plots and the large files.

qaboard.yaml
outputs:
visualizations:
- name: Output
path: out.png
- name: Edge profile
path: edge.plotly.json
- name: Color errors
path: color.plotly.json
default_hidden: true
The View options docked on the right of the run cards: a switch per visualization, including the hidden Color errors and Noise vs signal, how image viewers compare images, and how the runs are sorted.The View options docked on the right of the run cards: a switch per visualization, including the hidden Color errors and Noise vs signal, how image viewers compare images, and how the runs are sorted.
The View options list every visualization: Color errors and Noise vs signal are hidden until someone turns them on.

Give each visualization a name: the View options list it by its name (or by its label, if you give one), and the web app shows and hides visualizations by name. Visualizations without a name are shown and hidden together.

Show each test what matters for it​

A batch often mixes tests that each have their own thing to look at: a histogram for one, a debug image for another, the profile across an edge for a third. A run can say what its card opens on, with a view mapping. It goes in the batch's configurations, or in the input's metadata:

qa/batches.yaml
histograms:
inputs:
- charts/gray-ramp.png
configs:
- base
- view:
show: [Histogram] # the visualizations shown by default, by their name in qaboard.yaml

edges:
configs:
- base
- view:
show: [Output]
images: # how the run's images open
analysis: profiles # with their row and column profiles
inputs:
- charts/slanted-edge.png
- photos/facade.png: {view: {show: [Debug mask]}} # an input can add its own
An input's metadata: for every run on the input, in any batch
view:
show: [Output, Edge profile]

qaboard.yaml still lists the visualizations: a run picks among them. Runs that say nothing show the project's defaults, like before.

Key of viewWhat it does
showThe names of the visualizations the run's card shows by default, instead of the project's (those without default_hidden). Names that aren't in qaboard.yaml are ignored.
images.modeHow the run's images are compared until people pick a mode: side-by-side, wipe, single or difference.
images.analysisOpens the analysis panel under the run's images, on histogram, profiles (rows and columns) or stats.
images.roiRegions of interest. A roi key next to view does the same.
  • Image options are for all the run's images, not for one visualization: they also apply to an image opened from the Output Files.
  • When several apply, the input's metadata comes first, then the configurations in order: the last one wins, key by key, and lists of regions add up.
  • People keep the last word. What they turn on or off in the View options applies to all runs, and Each test's own view, there, turns off what runs ask for: every run then shows the project's defaults.
  • In a configuration, view is part of the run's configuration, like any mapping: your code gets it as context.params['view'], and a batch with another view makes new runs. The web app doesn't show it in the runs' configuration tags, and ignores it when it matches runs with the reference's. A view that isn't a mapping, like view: left, stays your own parameter.

Every file your run writes​

A visualization only chooses what shows on the cards: QA-Board keeps every file your run writes in context.output_dir.

  • The Output Files view lists all of a run's files, and which differ from the reference's: see the commit page. qa writes their sizes and hashes in manifest.outputs.json at the end of each run, next to the run's log (log.txt) and metrics (metrics.json).
  • The file browser opens any run's folder.
  • qa run empties the output directory before it runs your code. To keep what's there, e.g. your own cache, use qa run --keep-previous.
  • Where the files are saved and when they are deleted: Where is the data saved? and Deleting old data.

Show a file per frame, stage or step​

When runs write one file per frame, pipeline stage or iteration, one visualization can offer them all. Name the part of the path that changes with :, here :stage:

qaboard.yaml
outputs:
visualizations:
- name: ISP stage (1 raw, 2 demosaic, 3 denoise, 4 sharpen, 5 tone map)
path: "stages/:stage.jpg"

The View options get a Files to show section, with a slider when the values are consecutive integers, else a select. The value applies to all the runs' cards, unless people choose it Per run (see the commit page).

One visualization for the 5 ISP stages: the slider steps from the raw mosaic to the tone-mapped image, on every run's card.
  • Name the parts of your paths for your users: each option is labeled after its part, :stage as Stage, :noise_level as Noise level. Visualizations that use the same name share the option.
  • Runs don't need the same values. The View options offer the values of all runs, and sort numbers as numbers (2 before 10). Until people pick a value, each run shows its own default: its last value when the values are numbers (e.g. its last frame), else its first. When a run doesn't have the selected value, its card shows the closest number (or the default) and says so.
  • Show all the matching files at once, one after the other, with display: all.
The View options' Files to show: the stage option, synced, its slider on 3. Next to it, the night street's card shows stages/3.jpg, the denoised image, new and reference.The View options' Files to show: the stage option, synced, its slider on 3. Next to it, the night street's card shows stages/3.jpg, the denoised image, new and reference.
Files to show picks the stage: synced, the slider on 3 shows stages/3.jpg on every card. Changing it keeps the zoom.
Patterns: several parts, parts of names, regular expressions

Paths are patterns in the syntax of path-to-regexp:

qaboard.yaml
outputs:
visualizations:
- name: Frames
path: ":frame/output.jpg" # a folder per frame
- name: Frames, by number
path: ":frame/frame_:number.jpg" # part of a file name
- name: Debug images
path: "(debug_.*\\.jpg)" # a regular expression, in parentheses
- name: Logs per frame
path: ":frame/(.*\\.txt)" # both
- name: Numbered frames
path: "frames/:frame(\\d+).jpg" # a named part that only matches digits

With regular expressions:

  • write them in parentheses: they are "capture groups";
  • (.*)/output.jpg also matches folders inside folders: you often want ([^/]*)/output.jpg;
  • their options are named after the visualization, and not shared with other visualizations: prefer named parts. Two visualizations of (.*)/debug_output.jpg and (.*)/output.jpg get two selects for the frame.

Preset regions of interest​

The image and video viewers show thumbnails of regions of interest above the images, to jump to the details that matter: your presets, and the regions where the images differ most. The viewer opens on the first preset.

The regions of interest menu open over the facade run: Full image, the input's Presets, and the regions where the images differ most, found by the server; above the images, thumbnails of the regions it found, labelled with how much the images differ there.The regions of interest menu open over the facade run: Full image, the input's Presets, and the regions where the images differ most, found by the server; above the images, thumbnails of the regions it found, labelled with how much the images differ there.
The input's preset regions, and below them the regions where the server finds that the images differ most.

Presets are a list of regions under the key roi (or view.images.roi, with the rest of the run's own view). Each run gets its own, from two places:

WhereUse it forThe same for
The input's metadataWhat matters in this input: a face, a window frame, a chart's patches.Every run on the input.
A configurationWhat a test looks at, whatever the input: the corners, the center.Every run of the batch.

A run with both shows both, the input's first. Runs on other inputs, or of other batches, show their own on the same page: you don't need a qaboard.yaml per batch.

Regions of an input, in its metadata​

Your entrypoint's metadata(context) returns what you know about an input, as a dict: put the regions under roi. The camera ISP example reads them from a YAML file next to each photo, when there is one:

qa/main.py
def metadata(context):
"""Input metadata: ROI presets for the image viewer, and the regions charts are measured in."""
path = context.input_path.with_suffix('.metadata.yaml')
return yaml.safe_load(path.read_text()) if path.exists() else {}
inputs/photos/facade.metadata.yaml
# Regions of interest for the image viewer (pixels of the 1224x816 photo)
roi:
- x: 100
y: 40
w: 160
h: 200
label: Window frame (halos)
- x: 520
y: 20
w: 220
h: 220
label: Leaves over a window
- x: 380
y: 300
w: 120
h: 120
label: Flat wall (noise)

The regions can come from anywhere metadata() can read: a file next to the input, a spreadsheet, your database of test charts. More on metadata: Input metadata.

Regions of a batch, in a configuration​

Add a mapping with a roi key to the batch's configurations. This batch checks the corners of every photo:

qa/batches.yaml
corners:
inputs:
- photos/*.png
configs:
- base
- roi:
- {x: 0, y: 0, w: 200, h: 200, label: Top left}
- {x: 1024, y: 616, w: 200, h: 200, label: Bottom right}

With qa run, give the mapping as JSON: qa --config base --config '{"roi": [{"x": 0, "y": 0, "w": 200, "h": 200}]}' run ....

  • The web app doesn't show roi in the runs' configuration tags, and ignores it when it matches runs with the reference's.
  • Like any mapping in the configurations, your code gets it too, as context.params['roi'].
  • The regions are part of the runs' configuration: with other regions, qa batch makes new runs. For regions that change often, prefer the input's metadata.

What a region is​

KeyWhat it is
x, yThe region's top-left corner, in pixels from the image's top-left corner.
w, hIts width and height, in pixels.
labelOptional: its name, on its thumbnail and its outline.
colorOptional: the color of its outline, as in CSS (orange, #f5498b).
image_width, image_heightOptional: the size of the image the region was drawn on, when it's not the image shown.

Regions are in the pixels of the image shown. When that image is smaller than the one the regions were drawn on, e.g. a downscaled output, the viewer scales them if it knows the original size: give image_width and image_height on a region, or width and height in the input's metadata, for all the input's regions.

An input's metadata, for outputs smaller than the input
width: 4896 # the regions below are in the pixels of the 4896x3264 raw photo
height: 3264
roi:
- {x: 400, y: 160, w: 640, h: 800, label: Window frame (halos), color: orange}

Write presets from the web app​

Zoom on what you want to keep, then pick Copy the view as a region in the regions menu. You get the size of the image and the region's line:

width: 1224
height: 816
- {x: 100, y: 40, w: 160, h: 200, label: ""}

Paste the line under roi, and give it a label. Regions are saved with the runs: they show on the runs made after you add them. How people use regions: the image viewer.

Make room on the cards​

Cards take the page's whole width, one under the other, with their visualizations one under the other. Images, videos and HTML reports fill the card, but not more than the window's height: an HTML report taller than that scrolls. Plots, point clouds, test reports and benchmarks keep their own size.

To see several cards side by side, set their width in outputs.style: they're at most that wide, and as many as fit share a row. Set a visualization's size in its style: width, and for HTML reports maxHeight (or none).

qaboard.yaml
outputs:
style:
width: 1180px # cards side by side on wide screens, new and reference images about 600 px wide each
visualizations:
- name: Report
path: report.html
style:
width: 840px
maxHeight: 2000px # taller than the window, before it scrolls

The view commit pages open on​

Commit pages open on Visualizations when qaboard.yaml declares some, else on the metrics' Summary when the runs have metrics, else on the runs' Output Files. When every run failed, they open on the Logs. To always open another view, set outputs.default_tab_details:

qaboard.yaml
outputs:
default_tab_details: summary # or table-kpi (Metrics Table), table-compare (Metrics Diff), output-list, bit-accuracy, logs

Links that name a view (selected_views in the URL) still open it.

Viewer options​

Other keys of a visualization go to its viewer: side_by_side: false draws a plot over the reference's, fps sets a video's frame rate, point_size a point cloud's. Each viewer's options are in Viewers and file formats.

Every key of a visualization
KeyWhat it does
nameHow the View options list it, and the key that shows or hides it.
labelShown instead of the name.
pathThe file, relative to the run's output directory, or a pattern.
typeThe viewer, when the extension doesn't say it: see the table.
default_hiddentrue to start hidden.
displayWith a pattern: single (default) shows the file picked in the View options, all every matching file, viewer gives the pattern to the viewer.
styleCSS for the viewer, e.g. width.
Other keysOptions of the viewer: see Viewers and file formats.

outputs.controls adds switches to the Viewers section of the View options. Each viewer gets the switch's value as an option of the same name, which overrides the visualizations' own. The 6DoF viewer, for instance, reads show_debug, which adds plots of DebugExtensions.txt:

qaboard.yaml
outputs:
controls:
- type: toggle
label: Debug
name: show_debug
default: false

When nothing shows​

  • Invalid visualization path on the cards: the web app can't read a path pattern. Hover the tag for the error.
  • A line like 2 more without files in these runs, under the visualizations of the View options: hover it to see which visualizations found no file in the runs shown. Compare their path with the run's files in Output Files.
  • A run without the file shows nothing for that visualization. A file only the new run has shows alone, without the reference's.
  • You changed qaboard.yaml but the cards didn't: see when the web app sees your changes.

Examples​

The demo projects show complete configurations, with what they look like in the web app:

  • Image quality: images, a slider over the ISP's stages, plots, a video.
  • Detection: detections drawn on the images, precision-recall curves over the reference's, an HTML report.
  • Serving latency: latency plots, a flame graph, text diffs.
  • Robotics: a trajectory, a video, a point cloud.
  • Agent evals: transcripts and HTML reports.