Commit 1d9ef9a8 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: CUAS Layer-1 — synth bg-avg fast path + Time-ROI window + MF-S head

- IntersceneMatchParameters: add curt_synth_bg_avg (synth quick-run: average N=2^LEV real
  frames per output frame and force a single level — restores the fast synthetic+background path).
- CuasDetectRT: that fast synth path (decimate-average to a short sequence + single level),
  honoring "Time ROI to" for the averaged-sequence length.
- CuasDnnInfer: MF-S head reads channel 0 as the raw matched-filter path-sum (clamp>=0, no sigmoid).

Validated: weighted model tracks the real UAS sub-pixel at LEV2/3; linear conditioning
(LReLU off) is dropout-free and matches the no-LReLU training. Checkpoint before Layer 2.
Co-authored-by: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent c0fa0743
......@@ -157,8 +157,11 @@ public class CuasDnnInfer implements AutoCloseable {
}
/** Continuous-velocity (reg) inference over an ROI. For each pixel returns
* {S, Vx, Vy, sigma, dx, dy} from the 6-ch reg head (det, Vx, Vy, logvar, dx, dy):
* S=sigmoid(det), Vx/Vy already bounded by the model, sigma=exp(logvar/2). By Claude on 06/17/2026 */
* {S, Vx, Vy, sigma, dx, dy} from the 6-ch reg head (det/S, Vx, Vy, logvar, dx, dy):
* Vx/Vy already bounded by the model, sigma=exp(logvar/2).
* MF-S models (option a, Andrey 2026-06-18): channel 0 is the RAW matched-filter path-sum S
* (clamp>=0), NOT a det logit -> read raw, no sigmoid (sigmoid would re-saturate the unbounded
* response). S is then the informative vote weight directly (CuasDetectRT.voteScatter). By Claude on 06/18/2026 */
public double[][] inferROIReg(float[][] frames, int width, int height, Rectangle roi) throws Exception {
final int N = frames.length;
final int P = patch, half = P / 2;
......@@ -190,7 +193,7 @@ public class CuasDnnInfer implements AutoCloseable {
for (int q = 0; q < bs; q++) {
float[][][] op = out[q];
double[] o = out6[base + q];
o[0] = sigmoid(op[0][0][0]); // S
o[0] = Math.max(0.0, op[0][0][0]); // S = raw MF path-sum (clamp>=0); MF-S model, no sigmoid. By Claude on 06/18/2026
o[1] = op[1][0][0]; o[2] = op[2][0][0]; // Vx, Vy (model-bounded)
o[3] = Math.exp(0.5 * op[3][0][0]); // sigma = exp(logvar/2)
o[4] = op[4][0][0]; o[5] = op[5][0][0]; // dx, dy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment