Start a category mask where the photograph can bear it

Clicking "architecture" made a layer whose mask was gone. Every category layer
began at STRICTNESS_DEFAULT, and that constant was fitted on the synthetic sky
the refine tests build — its own note warns that a real photograph's noise
"moves every crossing down together", which turns out to be a considerable
understatement. Measured over seven ordinary frames, half scale removes 76% to
99.5% of `architecture`, 36% to 93% of `ground` and 18% to 91% of
`vegetation`. Only sky, the category the number was calibrated against,
survives it.

An empty mask is indistinguishable from a broken one: the layer is listed, the
adjustment moves, and no pixel changes. So what this looks like from outside
is that the segmentation does not make masks at all.

No smaller constant fixes it either, because a nat of evidence means different
things over a smooth sky and over a stone facade — the useful position is
above 5 on one frame and below 1 on the next. So the frame is asked instead:
`Refinement::gentle` walks down from half scale and takes the first rung whose
gate removes no more than a sixth of the category's weight, and the model's
own outline when none of them does. One `apply` on a friendly photograph and
four on an unfriendly one, paid when a layer is made rather than for eight
categories nobody masked.

The slider's reset went to 4 as well, so taking the control back to its
"default" emptied the mask. It goes to zero now, which is the one position
documented to mean something: exactly what the model weighted.
This commit is contained in:
2026-09-10 20:27:40 +02:00
parent 404fea47a8
commit 193b35a249
5 changed files with 258 additions and 47 deletions
+10 -2
View File
@@ -412,7 +412,15 @@ component MaskEntry inherits Rectangle {
+ "outline onto the edge the photograph actually has. "
+ "Zero is the model's own outline.";
value: root.data.refine;
default-value: 4;
// Zero, which is the model's own outline — and *not* the
// position a layer starts at, which is chosen per photograph
// because a nat of evidence means different things over a
// smooth sky and over a stone facade (see
// `dr_segment::Refinement::gentle`). A fixed default here used
// to be 4, which is half travel and looks like the natural
// resting place; on an ordinary frame it takes three quarters
// of the category away, so "reset" emptied the mask.
default-value: 0;
minimum: 0;
maximum: 8;
// Tenths, not whole nats. The interval between a flag going
@@ -421,7 +429,7 @@ component MaskEntry inherits Rectangle {
// the range it exists to explore.
precision: 1;
changed(v) => { root.refine-changed(v); }
reset => { root.refine-changed(4); }
reset => { root.refine-changed(0); }
}
// The band (FR-DEV-10). Above the edge controls because for a