Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bokehforge/docs/review.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For scenes with one supported RGB ground-truth image, each ready output shows th

**Score details** in the sidebar shows the inferred area, resolution cap, overlap quality, and match confidence. In the lightbox, select **Explain score** to see the same details. **How alignment was inferred** shows search evidence and the score contribution of each retained placement. An unmatched delivery still has an explanation with the reason.

Use **Heatmaps** in the output sidebar or the floating controls in the lightbox when an output is selected. **Attention** shows which reference regions the scorer emphasizes, on a 0–1 scale. It is available for attention-weighted scores with an aligned output. **Damage** starts with **All damage**, which combines the six damage types using the benchmark’s weights. Select the active Damage button again to choose a type or turn the heatmap off. Use the grid button to switch between 8- and 32-pixel tiles and the slider to adjust opacity. Expand a damage family in the score details to see its pooling values and weights.
Use **Heatmaps** in the output sidebar or the floating controls in the lightbox when an output is selected. **Attention** shows which reference regions the scorer emphasizes, on a 0–1 scale. It is available for attention-weighted scores with an aligned output. **Damage** starts with **All damage**, which combines the six damage types using the benchmark’s weights. Select the active Damage button again to choose a type or turn the heatmap off. Use the grid button to switch between 8- and 32-pixel tiles. The opacity slider shows the original output at 0% and the heatmap at 100%, with the viewer matte filling areas without measurements. Expand a damage family in the score details to see its pooling values and weights.

The overlay, damage type, tile size, and opacity carry over when you switch outputs or move between the main viewer and the lightbox. Heatmaps use the leading placement and load on demand. The lightbox keeps the heatmap aligned during zoom and pan and confines it to the output side of a reference swipe. The full reference stays clear for comparison.

Expand Down
7 changes: 3 additions & 4 deletions bokehforge/src/bokehforge/review/static/score-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ function drawGrid(canvas, payload) {
const { x_edges: xs, y_edges: ys, values, covered_pixels: coverage } = payload.grid;
const colors = Array.from({ length: 256 }, (_, index) => {
const t = index / 255;
return "rgba(" + Math.round(90 + 165 * t) + "," + Math.round(80 + 121 * t) + "," +
Math.round(225 - 177 * t) + "," + (0.26 + 0.57 * t) + ")";
return `rgb(${Math.round(90 + 165 * t)}, ${Math.round(80 + 121 * t)}, ${Math.round(225 - 177 * t)})`;
});
let index = 0;
for (let row = 0; row < ys.length - 1; row += 1) {
for (let col = 0; col < xs.length - 1; col += 1, index += 1) {
const value = values[index];
if (!value || coverage?.[index] === 0) continue;
if (value == null || coverage?.[index] === 0) continue;
ctx.fillStyle = colors[Math.round(255 * Math.min(value / maximum, 1))];
ctx.fillRect(xs[col], ys[row], xs[col + 1] - xs[col], ys[row + 1] - ys[row]);
}
Expand All @@ -66,7 +65,7 @@ function drawAttention(canvas, payload) {
image.data[offset] = 29 + 79 * value;
image.data[offset + 1] = 132 + 90 * value;
image.data[offset + 2] = 165 + 80 * value;
image.data[offset + 3] = 210 * value;
image.data[offset + 3] = 255;
}
sourceContext.putImageData(image, 0, 0);
overlayContext(canvas, payload).drawImage(source, 0, 0, ...payload.reference_size_wh);
Expand Down
6 changes: 5 additions & 1 deletion bokehforge/src/bokehforge/review/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,11 @@ body:has(#scene-browser:popover-open) #show-scenes { border-color: var(--field-s
top: 3.85rem;
max-height: calc(100% - 4.4rem);
}
.damage-canvas { position: absolute; pointer-events: none; }
.damage-canvas {
position: absolute;
background: var(--matte);
pointer-events: none;
}
.damage-legend {
position: absolute;
left: .55rem;
Expand Down
Loading