Compare Images
Stack and compare output images from multiple executions. Use blend modes, side-by-side sliders, and color overlays to spot differences in computer vision experiments, quality control testing, and visual analysis.
When to Use Image Comparison
Computer vision experiments:
Compare predictions from different models
Evaluate segmentation or detection results
Track improvement across training iterations
Quality control:
Compare defect detection across different thresholds
Evaluate image processing pipeline changes
Validate improvements in image quality
Medical imaging:
Compare diagnostic outputs
Evaluate segmentation accuracy
Track changes in processing algorithms
Before/after analysis:
Preprocessing effects
Model architecture changes
Hyperparameter impact on visual outputs
Quick Start (Manual Comparison)
1. Save Images as Outputs
Save images to /valohai/outputs/ in your code:
2. Select Executions
From your project's Executions tab:
Select multiple executions using checkboxes
Click Compare
3. Switch to Images Tab
In the comparison view:
Look for the tabs at the top: Metadata and Images
Click the Images tab
All output images from selected executions appear
4. Build Comparison Stacks
Manually add images to stacks:
Find the image you want to compare
Click the + button next to the image name
Select "Add to new stack" or choose an existing stack
Repeat for other images you want to compare
Images in the same stack overlay on top of each other, letting you toggle visibility, adjust transparency, and use blend modes.
Advanced: Automatic Grouping with Metadata
For complex comparisons with many images, use special metadata properties to automatically organize images into comparison groups.
Basic Setup
Add comparison metadata when saving images:
Comparison Properties
vhic_group (required for auto-grouping)
Groups related images together. Use / for hierarchical grouping.
vhic_base (required for auto-grouping)
Filename of the base/reference image for comparison.
vhic_truth (required for auto-grouping)
Filename of the ground truth image (often same as base).
vhic_name (optional)
Display name in the UI instead of filename.
vhic_blend (optional)
Initial blend mode for the layer. You can scroll through the different blend modes in the UI: the property just sets the initial value used when the stack is built.
vhic_color (optional)
Initial color overlay for comparison. You can override this by setting the vhic_color property to a color name, or none to use the image as is.
Complete Example
Hierarchical Grouping
Organize images into a hierarchy using / separators:
In the UI, you'll see a dropdown with:
segmentation
building-detection
top-view
side-view
road-detection
Using the Comparison Interface
Layer Controls
Each image in a stack has controls:
Transparency slider: Adjust opacity to blend with layers below Blend mode buttons: Cycle through blend modes (normal, multiply, screen, difference, subtract) Visibility toggle: Show/hide the layer Remove: Take the layer out of the stack
Blend Modes
Normal (default): Standard image display. Use transparency to see layers below.
Multiply: Darkens the image. Useful for highlighting differences where prediction is darker than ground truth.
Screen: Lightens the image. Opposite of multiply.
Difference: Shows absolute difference between layers. Bright areas indicate differences, dark areas indicate similarity.
Subtract: Subtracts pixel values. Useful for seeing where prediction exceeds or falls short of ground truth.
Color Overlays
Apply color tints for easier visual comparison:
Red: Tint the layer red Yellow: Tint the layer yellow Green: Tint the layer green None: Use original image colors
Use case: Compare two predictions by tinting one red and one green. Where they overlap and agree, you'll see yellow.
Side-by-Side Slider
For direct pixel-level comparison:
Select two images in a stack
Use the slider widget
Drag left/right to reveal one image or the other
Perfect for spotting subtle differences
Pre-Built Comparison Views
When using metadata properties, Valohai provides four automatic views:
Browse: All Images
One stack per image in the group. Base image first, then target, then comparison images.
Use when: You want to see every image individually stacked with its base.
Overview: Base + Individual Comparisons
One base stack (base + truth images), then one stack per comparison image (base + that comparison).
Use when: Comparing multiple predictions against the same ground truth.
Focus: Base + Switchable Comparison
Same as View 2, but only one comparison stack visible at a time. Quick switch widget to change which comparison you're viewing.
Use when: Many comparison images and you want a cleaner view.
Compare: Side-by-Side
Base stack (base + truth) and one combined stack with all comparison images. Side-by-side slider to compare two images. Quick switch to change which images appear in the slider.
Use when: Pixel-perfect comparison is important.
Common Use Cases
Compare Model Predictions
Track Training Progress
Quality Control Comparison
Best Practices
Use Consistent Image Sizes
All images in a stack should have the same dimensions:
Mismatched sizes make visual comparison difficult.
Save at the Same Scale
Keep pixel value ranges consistent:
Use Descriptive Filenames
Choose clear, descriptive names:
Or use the vhic_name property for custom display names.
Group Related Images
Use the vhic_group property to organize:
Choose Appropriate Blend Modes
Different blend modes highlight different features:
Normal: General comparison, use transparency Multiply: Darken overlaps, good for detecting false positives Difference: Highlight all differences, both bright and dark Subtract: Directional differences (over-prediction vs under-prediction)
Experiment to find what works best for your use case.
Troubleshooting
Images Tab Not Appearing
Symptom: Only Metadata tab visible, no Images tab
Cause: No image outputs in selected executions
Solution: Ensure your code saves images to /valohai/outputs/:
Images Not Grouping Automatically
Symptom: Images appear ungrouped even with metadata
Causes & Fixes:
Missing required properties:
Filename mismatch:
Inconsistent base across group:
Images Look Wrong When Stacked
Symptom: Colors or brightness look incorrect
Cause: Images have different value ranges or color spaces
Solution: Normalize before saving:
Can't See Differences
Symptom: Images look identical when stacked
Try:
Use Difference blend mode to highlight even small differences
Adjust transparency to see subtle variations
Use color overlays (red/green) to spot misalignments
Use side-by-side slider for pixel-perfect comparison
Next Steps
Visualize metrics alongside image comparisons
Compare executions to see which model produces better images
Save comparison stacks for documentation and reporting
Back to Experiment Tracking overview
Last updated
Was this helpful?
