Commit 6ec3ea29 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: item-4 R2 - GPU LoG + gated subtract-avg in the RT loop; render ARM pre-loop; enqueue shave

R2 (rulings 3.1/3.3/3.4): CuasPoseRT arms the LoG+subtract-average stage with
the render - taps from the static getLoGKenel (psf_radius/n_sigma, the same
params detection uses); curt.det_avg_file (prior-run raw-domain average)
LoG'd in Java DOUBLE at arm = the post-LoG base; gated EMA refresh
(det_ema_rate 0.02 / det_ema_gate 10.0 placeholder dial, ungated = loud
warning); detection frame (LoG - avg) stays GPU-resident. Post-loop saves
-CUAS-RT-AVG (NaN-aware run average + count = the next run's prior file,
skipped if the stage disabled mid-run) and the -CUAS-RT-LOG debug stack
(det_log_save, ruling 3.4 test-only). New saved params det_log/det_log_save/
det_avg_file/det_avg_save/det_ema_rate/det_ema_gate (all 5 touch-points).

Fold-in 1 (Session-54 close): the whole render ARM (renderSetup allocs +
template + reference camera + R2 arm) hoisted PRE-LOOP next to
renderProcPrepare - the scene-0 101/108 ms alloc-class outlier is gone;
content-neutral (cv static per sequence; pXpYD_center + setReferenceGPU
precede the arm). In-loop lazy arm removed (armed assertion, same fail-safe).

Fold-in 2: GpuQuadJna.renderCameras static-table latch - first scene uploads
radial/rByRDist once, then per-scene calls pass null and the native fast
path sends meta+ERS pinned+async (renderSetup resets the latch per sequence).

GpuQuad/GpuQuadJna/TpJna: renderLogSetup/renderLogGet surface. Stage0
EXPECTED_KERNELS 42 -> 45 (42 was stale - the render_dp bump to 43 was
missed) and Stage0 passes 45/45. mvn package + test PASS; native gates in
tile_processor_gpu 8840db8 (case log_pipe ALL PASS, sanitizer 0).
Co-Authored-By: 's avatarClaude Fable 5 <noreply@anthropic.com>
parent 3b33a397
...@@ -1250,6 +1250,52 @@ public class CuasPoseRT { ...@@ -1250,6 +1250,52 @@ public class CuasPoseRT {
return new double [] {dxm, dym, dxs, dys, gain, gainSub, 1.0}; return new double [] {dxm, dym, dxs, dys, gain, gainSub, 1.0};
} }
/**
* item 4 R2 (ruling 3.1): load a prior run's raw-domain average file
* (-CUAS-RT-AVG, slice 1) and LoG it in Java DOUBLE (the oracle
* CuasRTUtils.convolve2DLReLU LINEAR form) - the post-LoG-domain base the
* GPU subtract-average stage starts from. Throws on any mismatch (missing
* file / wrong dimensions) - the caller's fail-safe disables the stage.
* Provenance is printed (the noise-params single-source rule).
* By Claude on 07/19/2026.
*/
private static float [] loadPriorAverageLog(
final String path,
final int width,
final int height,
final CLTParameters clt_parameters) {
final ImagePlus imp = new ImagePlus(path);
if ((imp.getWidth() != width) || (imp.getHeight() != height)) {
throw new IllegalStateException("det_avg_file '"+path+"': "+
((imp.getWidth() <= 0) ? "cannot open" :
("dimensions "+imp.getWidth()+"x"+imp.getHeight()+" != sensor "+width+"x"+height)));
}
imp.setSlice(1); // slice 1 = average (slice 2 = diagnostic count)
final float [] avg_raw = (float []) imp.getProcessor().convertToFloat().getPixels();
final CuasRTUtils rtu = new CuasRTUtils ( // same construction as CuasDetectRT/saveRenderEvalLog
clt_parameters.curt.psf_radius,
clt_parameters.curt.n_sigma,
clt_parameters.curt.temp_weights.clone(),
clt_parameters.curt.pix_decimate,
clt_parameters.curt.vel_decimate,
clt_parameters.curt.vel_radius,
clt_parameters.curt.vel_suppr_rad,
width,
height);
final double [] davg = new double [avg_raw.length];
for (int i = 0; i < davg.length; i++) davg[i] = avg_raw[i];
final double [] dlog = rtu.convolve2DLReLU(davg, rtu.getKernel2d(), null, 1.0); // LINEAR (standing ruling)
final float [] base = new float [dlog.length];
int nvalid = 0;
for (int i = 0; i < base.length; i++) {
base[i] = (float) dlog[i];
if (!Float.isNaN(base[i])) nvalid++;
}
System.out.println("CuasPoseRT: prior average loaded from '"+path+"' ("+width+"x"+height+
", "+nvalid+"/"+base.length+" valid px) -> post-LoG base (Java double LoG)");
return base;
}
private static PoseMeasureSetup poseMeasureSetup( private static PoseMeasureSetup poseMeasureSetup(
final QuadCLT center_CLT, final QuadCLT center_CLT,
final QuadCLT scene, final QuadCLT scene,
...@@ -2862,6 +2908,13 @@ public class CuasPoseRT { ...@@ -2862,6 +2908,13 @@ public class CuasPoseRT {
final ImageStack det_render_stack = (det_render_ok[0] && clt_parameters.curt.det_render_save) ? final ImageStack det_render_stack = (det_render_ok[0] && clt_parameters.curt.det_render_save) ?
new ImageStack(center_CLT.getGeometryCorrection().getSensorWH()[0], new ImageStack(center_CLT.getGeometryCorrection().getSensorWH()[0],
center_CLT.getGeometryCorrection().getSensorWH()[1]) : null; center_CLT.getGeometryCorrection().getSensorWH()[1]) : null;
// item 4 R2: GPU pixel-LoG + post-LoG subtract-average on the resident
// render frame (armed with the render below). By Claude on 07/19/2026.
final boolean [] det_log_active = {false};
final ImageStack det_log_stack = (det_render_ok[0] && clt_parameters.curt.det_log &&
clt_parameters.curt.det_log_save) ?
new ImageStack(center_CLT.getGeometryCorrection().getSensorWH()[0],
center_CLT.getGeometryCorrection().getSensorWH()[1]) : null;
// item 4 step-4 (MAP v2, Andrey 07/19): move the render stage onto its OWN // item 4 step-4 (MAP v2, Andrey 07/19): move the render stage onto its OWN
// carved green-ctx module BEFORE the timed loop (the NVRTC compile must not // carved green-ctx module BEFORE the timed loop (the NVRTC compile must not
// land in scene 0's slot). KEY LAW: carve the AGGRESSOR - the render's // land in scene 0's slot). KEY LAW: carve the AGGRESSOR - the render's
...@@ -2869,6 +2922,15 @@ public class CuasPoseRT { ...@@ -2869,6 +2922,15 @@ public class CuasPoseRT {
// byte-identity prediction. Empty spec or any failure = render stays on // byte-identity prediction. Empty spec or any failure = render stays on
// the main module (the R1a shape, one console line from GpuQuadJna). // the main module (the R1a shape, one console line from GpuQuadJna).
// By Claude on 07/19/2026. // By Claude on 07/19/2026.
// item 4 R2 fold-in (Session 54 close): the whole render ARM - renderSetup
// allocations, template, reference camera, rot-deriv snapshot - now ALSO
// runs HERE, pre-loop, next to renderProcPrepare. It used to run lazily in
// scene 0's timed slot = the 101/108 ms single-scene outlier AND the last
// alloc-class-in-loop site (the o8/o9d standing rule). Everything it needs
// (pXpYD_center, setReferenceGPU's geometry/cv uploads) is ready by this
// point; the cv snapshot is per-sequence static, so arm content is
// identical to the old scene-0 arm. Any failure disables the stage for
// the run (the same fail-safe the scene-0 arm had). By Claude on 07/19/2026.
if (det_render_ok[0]) { if (det_render_ok[0]) {
try { try {
center_CLT.getGPUQuad().renderProcPrepare(clt_parameters.curt.det_render_green); center_CLT.getGPUQuad().renderProcPrepare(clt_parameters.curt.det_render_green);
...@@ -2876,6 +2938,80 @@ public class CuasPoseRT { ...@@ -2876,6 +2938,80 @@ public class CuasPoseRT {
System.out.println("CuasPoseRT: renderProcPrepare failed ("+e.getMessage()+ System.out.println("CuasPoseRT: renderProcPrepare failed ("+e.getMessage()+
") - detection-input render stays on the main GPU module"); ") - detection-input render stays on the main GPU module");
} }
try {
final GpuQuad det_gq = center_CLT.getGPUQuad();
final int [] det_wh = center_CLT.getGeometryCorrection().getSensorWH();
final double det_disparity_corr = clt_parameters.imp.disparity_corr + center_CLT.getDispInfinityRef();
det_gq.renderSetup((float) det_disparity_corr,
margin, det_wh[0] - 1 - margin, margin, det_wh[1] - 1 - margin,
(float) clt_parameters.curt.oob_soft, (float) clt_parameters.curt.oob_hard);
// full render template: ALL tiles with valid disparity (the
// renderSceneVirtual selection=null convention, NOT the pose selection)
final int det_tilesX = det_wh[0] / GPUTileProcessor.DTT_SIZE;
int det_count = 0;
for (int nTile = 0; nTile < pXpYD_center.length; nTile++) {
if ((pXpYD_center[nTile] != null) && !Double.isNaN(pXpYD_center[nTile][2])) det_count++;
}
if (det_count == 0) throw new IllegalStateException("no tiles with valid disparity");
final int [] det_map = new int [det_count];
final float [] det_centers = new float [3 * det_count];
int di = 0;
for (int nTile = 0; nTile < pXpYD_center.length; nTile++) {
if ((pXpYD_center[nTile] == null) || Double.isNaN(pXpYD_center[nTile][2])) continue;
det_map[di] = (nTile % det_tilesX) | ((nTile / det_tilesX) << 16);
for (int k = 0; k < 3; k++) det_centers[3 * di + k] = (float) pXpYD_center[nTile][k];
di++;
}
det_gq.renderTemplate(det_map, det_centers);
center_CLT.getErsCorrection().setupERS(); // reference line tables (pose-template parity)
det_gq.renderCameras(IntersceneLmaFloat.Camera.capture(center_CLT.getErsCorrection()), null);
// item 4 R2: arm the LoG + subtract-average stage (ruling 3.1: base =
// prior-run average FILE, LoG'd here in Java double = the oracle math;
// gated EMA refresh; raw-average accumulator feeds the NEXT run's file)
if (clt_parameters.curt.det_log) {
final int det_krad = CuasRTUtils.getRadiusLoGKernel(
clt_parameters.curt.psf_radius, clt_parameters.curt.n_sigma);
final double [] det_dtaps = CuasRTUtils.getLoGKenel(clt_parameters.curt.psf_radius, det_krad);
final float [] det_taps = new float [det_dtaps.length];
for (int i = 0; i < det_taps.length; i++) det_taps[i] = (float) det_dtaps[i];
float [] det_avg_base = null;
final String det_avg_path = clt_parameters.curt.det_avg_file.trim();
if (!det_avg_path.isEmpty()) {
det_avg_base = loadPriorAverageLog(det_avg_path, det_wh[0], det_wh[1], clt_parameters);
}
if ((clt_parameters.curt.det_ema_rate > 0) && (clt_parameters.curt.det_ema_gate <= 0)) {
System.out.println("CuasPoseRT: WARNING - det_ema_rate="+clt_parameters.curt.det_ema_rate+
" with det_ema_gate<=0 = UNGATED EMA refresh: slow-apparent-motion targets CAN be"+
" absorbed into the background (ruling 3.1 requires the gate) - experiments only");
}
if ((det_avg_base == null) && (clt_parameters.curt.det_ema_rate <= 0)) {
System.out.println("CuasPoseRT: WARNING - det_log with no prior average (det_avg_file empty)"+
" and det_ema_rate=0: the detection frame stays NaN (accumulator still runs"+
(clt_parameters.curt.det_avg_save ? " and saves -CUAS-RT-AVG for the next run" : "")+")");
}
det_gq.renderLogSetup(det_taps, det_krad, det_avg_base,
clt_parameters.curt.det_ema_rate, clt_parameters.curt.det_ema_gate,
clt_parameters.curt.det_avg_save, false);
det_log_active[0] = true;
if (debugLevel > -4) {
System.out.println("CuasPoseRT: R2 LoG+subtract-avg ACTIVE - psf="+
clt_parameters.curt.psf_radius+" krad="+det_krad+
", base="+(det_avg_base != null ? ("prior file "+det_avg_path) :
((clt_parameters.curt.det_ema_rate > 0) ? "EMA seed (no prior file)" : "NONE (diff=NaN)"))+
", ema="+clt_parameters.curt.det_ema_rate+" gate="+clt_parameters.curt.det_ema_gate+
", accum="+clt_parameters.curt.det_avg_save);
}
}
det_render_armed[0] = true;
if (debugLevel > -4) {
System.out.println("CuasPoseRT: detection-input render ARMED pre-loop - "+det_count+
" tiles, async chain on the low-priority stream, ONE SCENE BEHIND poses (item 4 R1/R2)");
}
} catch (Exception e) {
det_render_ok[0] = false;
System.out.println("CuasPoseRT: detection-input render arm FAILED pre-loop - stage DISABLED: "+
e.getMessage());
}
} }
final boolean [] dp_overlap_ok = {true}; final boolean [] dp_overlap_ok = {true};
// ---- Ascending per-scene loop (the RT iterator) ---- // ---- Ascending per-scene loop (the RT iterator) ----
...@@ -3417,39 +3553,11 @@ public class CuasPoseRT { ...@@ -3417,39 +3553,11 @@ public class CuasPoseRT {
} }
final long det_t1 = System.nanoTime(); final long det_t1 = System.nanoTime();
det_render_wait_ms[0] += (det_t1 - det_t0) * 1e-6; det_render_wait_ms[0] += (det_t1 - det_t0) * 1e-6;
if (!det_render_armed[0]) { // item 4 R2 fold-in: the arm (renderSetup allocations + template +
// per-sequence arm: policy + the full render template (ALL tiles // reference camera + LoG stage) moved PRE-LOOP next to
// with valid disparity - the renderSceneVirtual selection=null // renderProcPrepare - scene 0's slot no longer pays the ~100 ms
// convention, NOT the pose tile selection) + the reference camera // alloc-class outlier. By Claude on 07/19/2026.
final int [] det_wh = quadCLTs[nscene].getGeometryCorrection().getSensorWH(); if (!det_render_armed[0]) throw new IllegalStateException("render stage not armed pre-loop");
final double det_disparity_corr = clt_parameters.imp.disparity_corr + center_CLT.getDispInfinityRef();
det_gq.renderSetup((float) det_disparity_corr,
margin, det_wh[0] - 1 - margin, margin, det_wh[1] - 1 - margin,
(float) clt_parameters.curt.oob_soft, (float) clt_parameters.curt.oob_hard);
final int det_tilesX = det_wh[0] / GPUTileProcessor.DTT_SIZE;
int det_count = 0;
for (int nTile = 0; nTile < pXpYD_center.length; nTile++) {
if ((pXpYD_center[nTile] != null) && !Double.isNaN(pXpYD_center[nTile][2])) det_count++;
}
if (det_count == 0) throw new IllegalStateException("no tiles with valid disparity");
final int [] det_map = new int [det_count];
final float [] det_centers = new float [3 * det_count];
int di = 0;
for (int nTile = 0; nTile < pXpYD_center.length; nTile++) {
if ((pXpYD_center[nTile] == null) || Double.isNaN(pXpYD_center[nTile][2])) continue;
det_map[di] = (nTile % det_tilesX) | ((nTile / det_tilesX) << 16);
for (int k = 0; k < 3; k++) det_centers[3 * di + k] = (float) pXpYD_center[nTile][k];
di++;
}
det_gq.renderTemplate(det_map, det_centers);
center_CLT.getErsCorrection().setupERS(); // reference line tables (pose-template parity)
det_gq.renderCameras(IntersceneLmaFloat.Camera.capture(center_CLT.getErsCorrection()), null);
det_render_armed[0] = true;
if (debugLevel > -4) {
System.out.println("CuasPoseRT: detection-input render ACTIVE - "+det_count+
" tiles, async chain on the low-priority stream, ONE SCENE BEHIND poses (item 4 R1)");
}
}
// per-scene: scene camera snapshot (render-private residents - the pose // per-scene: scene camera snapshot (render-private residents - the pose
// loop's own move on to scene N+1 before this chain runs), the shared // loop's own move on to scene N+1 before this chain runs), the shared
// uniform-MB descriptor, then the one non-blocking enqueue // uniform-MB descriptor, then the one non-blocking enqueue
...@@ -3487,6 +3595,10 @@ public class CuasPoseRT { ...@@ -3487,6 +3595,10 @@ public class CuasPoseRT {
det_render_stack.addSlice(ts_name, det_gq.renderGet()); det_render_stack.addSlice(ts_name, det_gq.renderGet());
det_render_issued[0] = false; det_render_issued[0] = false;
} }
if ((det_log_stack != null) && det_log_active[0]) { // item 4 R2 DEBUG readback (ruling 3.4) // By Claude on 07/19/2026
det_log_stack.addSlice(ts_name, det_gq.renderLogGet(0)); // detection frame = LoG - avg (blocking)
det_render_issued[0] = false; // renderLogGet drained the render stream
}
} catch (Exception e) { } catch (Exception e) {
det_render_ok[0] = false; det_render_ok[0] = false;
System.out.println("CuasPoseRT: detection-input render DISABLED for this run - "+e.getMessage()); System.out.println("CuasPoseRT: detection-input render DISABLED for this run - "+e.getMessage());
...@@ -3609,11 +3721,40 @@ public class CuasPoseRT { ...@@ -3609,11 +3721,40 @@ public class CuasPoseRT {
} }
if ((det_render_scenes[0] > 0) && (debugLevel > -4)) { if ((det_render_scenes[0] > 0) && (debugLevel > -4)) {
System.out.println(String.format( System.out.println(String.format(
"CuasPoseRT: detection-input renders issued=%d (%s), enqueue %.1f ms total (%.3f ms/scene), collect-wait %.1f ms total (%.3f ms/scene)", "CuasPoseRT: detection-input renders issued=%d (%s%s), enqueue %.1f ms total (%.3f ms/scene), collect-wait %.1f ms total (%.3f ms/scene)",
det_render_scenes[0], det_render_ok[0] ? "stage OK" : "stage DISABLED mid-run", det_render_scenes[0], det_render_ok[0] ? "stage OK" : "stage DISABLED mid-run",
det_log_active[0] ? ", R2 LoG+subavg ON" : "",
det_render_enq_ms[0], det_render_enq_ms[0] / det_render_scenes[0], det_render_enq_ms[0], det_render_enq_ms[0] / det_render_scenes[0],
det_render_wait_ms[0], det_render_wait_ms[0] / det_render_scenes[0])); det_render_wait_ms[0], det_render_wait_ms[0] / det_render_scenes[0]));
} }
// item 4 R2: save the run's NaN-aware raw-domain average (-CUAS-RT-AVG) =
// the NEXT run's det_avg_file (ruling 3.1). One D2H after the loop; slice 2
// is the per-pixel valid-sample count (diagnostic). Skipped if the stage
// disabled itself mid-run (a partial average must not masquerade as a full
// rotation's base). By Claude on 07/19/2026.
if (det_log_active[0] && det_render_ok[0] && clt_parameters.curt.det_avg_save &&
(det_render_scenes[0] > 0)) {
try {
final GpuQuad det_gq = center_CLT.getGPUQuad();
final float [] det_asum = det_gq.renderLogGet(3);
final float [] det_acnt = det_gq.renderLogGet(4);
final float [] det_amean = new float [det_asum.length];
for (int i = 0; i < det_amean.length; i++) {
det_amean[i] = (det_acnt[i] > 0) ? (det_asum[i] / det_acnt[i]) : Float.NaN;
}
final int [] det_wh = center_CLT.getGeometryCorrection().getSensorWH();
final ImageStack det_avg_stack = new ImageStack(det_wh[0], det_wh[1]);
det_avg_stack.addSlice("average("+det_render_scenes[0]+" scenes)", det_amean);
det_avg_stack.addSlice("count", det_acnt);
final ImagePlus imp_avg = new ImagePlus(center_CLT.getImageName()+"-CUAS-RT-AVG", det_avg_stack);
imp_avg.getProcessor().resetMinAndMax();
center_CLT.saveImagePlusInModelDirectory(null, imp_avg); // title as filename
System.out.println("CuasPoseRT: saved -CUAS-RT-AVG (raw-domain run average over "+
det_render_scenes[0]+" scenes) - point curt.det_avg_file at it for the next run");
} catch (Exception e) {
System.out.println("CuasPoseRT: -CUAS-RT-AVG save FAILED: "+e.getMessage());
}
}
if (rtProfile != null) rtProfile.printSummary(); if (rtProfile != null) rtProfile.printSummary();
RT_POSE_PROFILE.remove(); RT_POSE_PROFILE.remove();
if (rtPerfHold != null) { // release the 'measure' clock hold (perfd) // By Claude on 07/17/2026 if (rtPerfHold != null) { // release the 'measure' clock hold (perfd) // By Claude on 07/17/2026
...@@ -3683,6 +3824,15 @@ public class CuasPoseRT { ...@@ -3683,6 +3824,15 @@ public class CuasPoseRT {
imp_det.getProcessor().resetMinAndMax(); imp_det.getProcessor().resetMinAndMax();
center_CLT.saveImagePlusInModelDirectory(null, imp_det); // title as filename center_CLT.saveImagePlusInModelDirectory(null, imp_det); // title as filename
} }
// -CUAS-RT-LOG (item 4 R2, TEST-ONLY per ruling 3.4): the per-scene GPU
// detection frames (LoG - avg) read back for the A/B vs the Java
// CuasRTUtils.convolve2DLReLU path (RELATIVE tol - ruling 3.3).
// By Claude on 07/19/2026.
if ((det_log_stack != null) && (det_log_stack.getSize() > 0)) {
final ImagePlus imp_log = new ImagePlus(center_CLT.getImageName()+"-CUAS-RT-LOG", det_log_stack);
imp_log.getProcessor().resetMinAndMax();
center_CLT.saveImagePlusInModelDirectory(null, imp_log); // title as filename
}
// -POSE-RT-CORR2D (DEBUG): per-scene pixel-domain correlations vs the virtual center // By Claude on 07/04/2026 // -POSE-RT-CORR2D (DEBUG): per-scene pixel-domain correlations vs the virtual center // By Claude on 07/04/2026
if ((stack_corr != null) && (stack_corr.getSize() > 0)) { if ((stack_corr != null) && (stack_corr.getSize() > 0)) {
final ImagePlus imp_corr = new ImagePlus(center_CLT.getImageName()+"-POSE-RT-CORR2D", stack_corr); final ImagePlus imp_corr = new ImagePlus(center_CLT.getImageName()+"-POSE-RT-CORR2D", stack_corr);
......
...@@ -3064,6 +3064,16 @@ public class GpuQuad{ // quad camera description ...@@ -3064,6 +3064,16 @@ public class GpuQuad{ // quad camera description
throw new UnsupportedOperationException("renderStatus: JNA backend only"); } throw new UnsupportedOperationException("renderStatus: JNA backend only"); }
public float [] renderGet() { public float [] renderGet() {
throw new UnsupportedOperationException("renderGet: JNA backend only"); } throw new UnsupportedOperationException("renderGet: JNA backend only"); }
/** item-4 R2 (07/19/2026): arm the GPU pixel-LoG + post-LoG subtract-average stage on the
* resident render frame (all alloc-class work at arm time). avg_init = post-LoG base
* (prior-run average LoG'd in Java double) or null (NaN start). By Claude on 07/19/2026. */
public boolean renderLogSetup(float [] taps, int krad, float [] avg_init,
double ema_k, double gate_abs, boolean accum, boolean want_raw) {
throw new UnsupportedOperationException("renderLogSetup: JNA backend only"); }
/** item-4 R2: D2H of an R2 buffer (debug/eval + end-of-run average save; never per-scene
* in production). which: 0=diff, 1=avg, 2=raw LoG, 3=accum sum, 4=accum count. */
public float [] renderLogGet(int which) {
throw new UnsupportedOperationException("renderLogGet: JNA backend only"); }
/** Store the per-scene measure-cycle descriptor (union of the fixed chain's stage args). */ /** Store the per-scene measure-cycle descriptor (union of the fixed chain's stage args). */
public boolean setPoseCycleConfig( public boolean setPoseCycleConfig(
int num_tasks, int task_size, int num_tasks, int task_size,
......
...@@ -863,6 +863,7 @@ public class GpuQuadJna extends GpuQuad { ...@@ -863,6 +863,7 @@ public class GpuQuadJna extends GpuQuad {
if (rc != 0) { if (rc != 0) {
throw new IllegalStateException("GpuQuadJna.renderSetup rc="+rc+": "+lib.tp_last_error()); throw new IllegalStateException("GpuQuadJna.renderSetup rc="+rc+": "+lib.tp_last_error());
} }
render_scene_static_uploaded = false; // per-sequence: next scene camera re-uploads radial/rbr // By Claude on 07/19/2026
return true; return true;
} }
@Override public boolean renderTemplate(final int [] task_map, final float [] task_centers) { @Override public boolean renderTemplate(final int [] task_map, final float [] task_centers) {
...@@ -875,8 +876,16 @@ public class GpuQuadJna extends GpuQuad { ...@@ -875,8 +876,16 @@ public class GpuQuadJna extends GpuQuad {
} }
return true; return true;
} }
// item-4 R2 enqueue shave (07/19/2026): the scene camera's radial/rByRDist
// are per-sequence calibration constants (same physical camera every
// scene) - upload them ONCE (first scene, full blocking path), then pass
// null so the native fast path sends only meta+ERS, packed pinned + async
// on the render stream (no stream-sync, no 20 KB JNA marshal per scene).
// renderSetup() resets the latch (per-sequence re-arm, rerun == fresh).
private boolean render_scene_static_uploaded = false;
@Override public boolean renderCameras(final IntersceneLmaFloat.Camera reference, @Override public boolean renderCameras(final IntersceneLmaFloat.Camera reference,
final IntersceneLmaFloat.Camera scene) { final IntersceneLmaFloat.Camera scene) {
final boolean scene_fast = (scene != null) && (reference == null) && render_scene_static_uploaded;
final int rc = lib.tp_proc_render_cameras( final int rc = lib.tp_proc_render_cameras(
rproc(), rproc(),
(reference != null) ? poseCameraMeta(reference) : null, (reference != null) ? poseCameraMeta(reference) : null,
...@@ -886,14 +895,15 @@ public class GpuQuadJna extends GpuQuad { ...@@ -886,14 +895,15 @@ public class GpuQuadJna extends GpuQuad {
(reference != null) ? reference.ers : null, (reference != null) ? reference.ers : null,
(reference != null) ? reference.ers.length : 0, (reference != null) ? reference.ers.length : 0,
(scene != null) ? poseCameraMeta(scene) : null, (scene != null) ? poseCameraMeta(scene) : null,
(scene != null) ? scene.radial : null, (scene != null) ? (scene_fast ? null : scene.radial) : null,
(scene != null) ? scene.rByRDist : null, (scene != null) ? (scene_fast ? null : scene.rByRDist) : null,
(scene != null) ? scene.rByRDist.length : 0, (scene != null) ? (scene_fast ? 0 : scene.rByRDist.length) : 0,
(scene != null) ? scene.ers : null, (scene != null) ? scene.ers : null,
(scene != null) ? scene.ers.length : 0); (scene != null) ? scene.ers.length : 0);
if (rc != 0) { if (rc != 0) {
throw new IllegalStateException("GpuQuadJna.renderCameras rc="+rc+": "+lib.tp_last_error()); throw new IllegalStateException("GpuQuadJna.renderCameras rc="+rc+": "+lib.tp_last_error());
} }
if ((scene != null) && !scene_fast) render_scene_static_uploaded = true;
return true; return true;
} }
@Override public boolean renderScene(final float [] reference_xyz, final float [] reference_atr, @Override public boolean renderScene(final float [] reference_xyz, final float [] reference_atr,
...@@ -931,6 +941,27 @@ public class GpuQuadJna extends GpuQuad { ...@@ -931,6 +941,27 @@ public class GpuQuadJna extends GpuQuad {
System.arraycopy(packed, tl + gpu_width * nrow, fimg, out_width * nrow, out_width); System.arraycopy(packed, tl + gpu_width * nrow, fimg, out_width * nrow, out_width);
return fimg; return fimg;
} }
// ---- item-4 R2 (07/19/2026): GPU pixel-LoG + post-LoG subtract-average on
// the resident render frame (kernels enqueued by renderScene after the
// render_dp chain; sensor-window packed). By Claude on 07/19/2026. ----
@Override public boolean renderLogSetup(final float [] taps, final int krad, final float [] avg_init,
final double ema_k, final double gate_abs, final boolean accum, final boolean want_raw) {
final int rc = lib.tp_proc_render_log_setup(rproc(), taps, krad,
avg_init, (avg_init != null) ? avg_init.length : 0,
(float) ema_k, (float) gate_abs, accum ? 1 : 0, want_raw ? 1 : 0);
if (rc != 0) {
throw new IllegalStateException("GpuQuadJna.renderLogSetup rc="+rc+": "+lib.tp_last_error());
}
return true;
}
@Override public float [] renderLogGet(final int which) { // blocking D2H (debug/eval + avg save)
final float [] out = new float [getImageWidth() * getImageHeight()];
final int rc = lib.tp_proc_render_log_get(rproc(), which, out);
if (rc != 1) {
throw new IllegalStateException("GpuQuadJna.renderLogGet("+which+") rc="+rc+": "+lib.tp_last_error());
}
return out;
}
// ---- 3-B rung B3: single measure-chain entry (design 2026-07-16) ---- // By Claude on 07/16/2026 // ---- 3-B rung B3: single measure-chain entry (design 2026-07-16) ---- // By Claude on 07/16/2026
@Override public boolean supportsPoseMeasureCycle() { return !rectilinear; } @Override public boolean supportsPoseMeasureCycle() { return !rectilinear; }
......
...@@ -10,7 +10,7 @@ import com.sun.jna.Pointer; ...@@ -10,7 +10,7 @@ import com.sun.jna.Pointer;
* com.elphel.imagej.gpu.jna.Stage0 [kernel_src_dir] [libcudadevrt.a] * com.elphel.imagej.gpu.jna.Stage0 [kernel_src_dir] [libcudadevrt.a]
*/ */
public class Stage0 { public class Stage0 {
private static final int EXPECTED_KERNELS = 42; // 41 (through margin rung M1) + condition_lwir_u16 (T2 16-bit feeder) // By Claude on 07/18/2026 private static final int EXPECTED_KERNELS = 45; // 42 (through T2) + render_dp (item-4 R1a, missed bump) + render_pix_log + render_avg_accum (item-4 R2) // By Claude on 07/19/2026
public static void main(String[] args) { public static void main(String[] args) {
String srcdir = (args.length > 0) ? args[0] : "/home/elphel/git/tile_processor_gpu/src"; String srcdir = (args.length > 0) ? args[0] : "/home/elphel/git/tile_processor_gpu/src";
String devrt = (args.length > 1) ? args[1] : "/usr/local/cuda/targets/x86_64-linux/lib/libcudadevrt.a"; String devrt = (args.length > 1) ? args[1] : "/usr/local/cuda/targets/x86_64-linux/lib/libcudadevrt.a";
......
...@@ -335,6 +335,22 @@ public interface TpJna extends Library { ...@@ -335,6 +335,22 @@ public interface TpJna extends Library {
* BEFORE tp_proc_render_setup on the render proc. 0 on success. * BEFORE tp_proc_render_setup on the render proc. 0 on success.
* By Claude on 07/19/2026. */ * By Claude on 07/19/2026. */
int tp_proc_render_bind_source(Pointer renderProc, Pointer srcProc); int tp_proc_render_bind_source(Pointer renderProc, Pointer srcProc);
// ---- item-4 R2 (07/19/2026): pixel-LoG + post-LoG subtract-average on the
// resident render frame, enqueued after render_dp on the render stream. ----
/** Arm the LoG/subtract-avg stage (ALL allocations happen here - the
* standing no-alloc-in-loop rule). taps = (2*krad+1)^2 LoG taps; avgInit =
* post-LoG-domain base (prior-run average file LoG'd in Java double) of
* imgW*imgH floats or null (NaN start: EMA seeds from the first frame;
* emaK=0 keeps the diff NaN there). Re-call per sequence resets avg +
* accumulators (rerun == fresh). 0 on success. By Claude on 07/19/2026. */
int tp_proc_render_log_setup(Pointer proc, float[] taps, int krad,
float[] avgInit, int avgLen,
float emaK, float gateAbs, int accumEnable, int wantRaw);
/** D2H of an R2 buffer (debug/eval + the end-of-run average save; never
* per-scene in production). which: 0=diff (detection frame), 1=avg
* (post-LoG), 2=raw LoG, 3=accum sum, 4=accum count. Blocking; out =
* imgW*imgH floats (sensor window, packed). 1 on success. */
int tp_proc_render_log_get(Pointer proc, int which, float[] out);
// ---- D5 overlap (design ratified 2026-07-17): device image-set ring (D5a) + // ---- D5 overlap (design ratified 2026-07-17): device image-set ring (D5a) +
// launch/collect split of the scene entry (D5b). By Claude on 07/17/2026. ---- // launch/collect split of the scene entry (D5b). By Claude on 07/17/2026. ----
......
...@@ -29,6 +29,12 @@ public class CuasRtParameters { ...@@ -29,6 +29,12 @@ public class CuasRtParameters {
public boolean det_render = true; // item 4 R1 (Andrey 07/19): detection-input stage - full-frame combined virtual render at the FITTED pose (dual-MB, 16-sensor consolidated, cam0-only imclt) as ONE async chain on a LOW-PRIORITY stream, pipelined ONE SCENE BEHIND the pose service (pose keeps its own 1/60 slot; +1 frame detection latency). Fail-safe: any error disables the stage for the run, poses untouched. // By Claude on 07/19/2026 public boolean det_render = true; // item 4 R1 (Andrey 07/19): detection-input stage - full-frame combined virtual render at the FITTED pose (dual-MB, 16-sensor consolidated, cam0-only imclt) as ONE async chain on a LOW-PRIORITY stream, pipelined ONE SCENE BEHIND the pose service (pose keeps its own 1/60 slot; +1 frame detection latency). Fail-safe: any error disables the stage for the run, poses untouched. // By Claude on 07/19/2026
public boolean det_render_save = false; // item 4 R1 DEBUG (ruling 07/19 3.4: D2H is TEST-ONLY): blocking per-scene readback of the rendered combined image -> -CUAS-RT-DETINPUT hyperstack for the A/B vs CuasRender.renderSceneVirtual. Slows the run - measurement/A-B only. // By Claude on 07/19/2026 public boolean det_render_save = false; // item 4 R1 DEBUG (ruling 07/19 3.4: D2H is TEST-ONLY): blocking per-scene readback of the rendered combined image -> -CUAS-RT-DETINPUT hyperstack for the A/B vs CuasRender.renderSceneVirtual. Slows the run - measurement/A-B only. // By Claude on 07/19/2026
public String det_render_green = "8+8"; // item 4 step-4 (MAP v2 ratified 07/19: pose 8 / render 8 / rest 20): green-context SM carve spec for the render's OWN module ("<count>" | "<skip>+<count>"; "8+8" = 8 SMs disjoint from the pose-8 slot). Empty/"0" = render on the main module (the R1a shape - the wobble A/B). Prepared BEFORE the timed loop (NVRTC compile); any failure falls back to the main module with a console line. // By Claude on 07/19/2026 public String det_render_green = "8+8"; // item 4 step-4 (MAP v2 ratified 07/19: pose 8 / render 8 / rest 20): green-context SM carve spec for the render's OWN module ("<count>" | "<skip>+<count>"; "8+8" = 8 SMs disjoint from the pose-8 slot). Empty/"0" = render on the main module (the R1a shape - the wobble A/B). Prepared BEFORE the timed loop (NVRTC compile); any failure falls back to the main module with a console line. // By Claude on 07/19/2026
public boolean det_log = true; // item 4 R2 (Andrey rulings 3.1/3.4, 07/19): GPU pixel-LoG (LINEAR alpha=1, psf_radius/n_sigma taps) + POST-LoG-domain subtract-average on the resident render frame, enqueued on the render stream after each render_dp chain - the detection frame (LoG - avg) stays GPU-resident for the DNN feed (piece 5). Requires det_render. Fail-safe with the render stage. // By Claude on 07/19/2026
public boolean det_log_save = false; // item 4 R2 DEBUG (ruling 3.4: D2H is TEST-ONLY): blocking per-scene readback of the detection frame (LoG - avg) -> -CUAS-RT-LOG hyperstack for the A/B vs the Java CuasRTUtils.convolve2DLReLU path (RELATIVE tol - ruling 3.3). Slows the run. // By Claude on 07/19/2026
public String det_avg_file = ""; // item 4 R2 (ruling 3.1: base = PRIOR-RUN AVERAGE FILE - the first rotations are unrepresentative and short integration harms high pyramid levels): path to a prior run's -CUAS-RT-AVG (raw render domain, sensor WxH float TIFF); LoG'd in Java double at arm time -> the post-LoG base. Empty = no prior: with EMA on, the average seeds from the first frame (bootstrap); with EMA off the detection frame stays NaN. // By Claude on 07/19/2026
public boolean det_avg_save = true; // item 4 R2: accumulate the NaN-aware raw-domain running average on the GPU during the run and save it after the loop as -CUAS-RT-AVG (the NEXT run's det_avg_file). One D2H after the loop - free during the timed stage. // By Claude on 07/19/2026
public double det_ema_rate = 0.02; // item 4 R2 (ruling 3.1: EMA refresh reasonable to TRY): per-scene EMA rate of the post-LoG average, avg += rate*(LoG - avg) where the gate admits. 0 = OFF (prior-file-only base, no refresh). // By Claude on 07/19/2026
public double det_ema_gate = 10.0; // item 4 R2 (ruling 3.1: the EMA MUST be gated so extremely slow-apparent-motion targets - fast but head-on, ~static px - are never absorbed into the background): update only where |LoG - avg| <= this (post-LoG counts). <=0 = UNGATED (a loud console warning; only for experiments). Default 10 is a placeholder dial - size it from the post-LoG noise floor of real runs. // By Claude on 07/19/2026
public boolean pose_lean = false; // phase B measurement engine: TD-average the 16 sensors (CuasTD, CPU bridge) then ONE conj-multiply vs the virtual-center TD -> FZ-normalize -> PD -> argmax+eigen (getMaxXYCmEig) -> 3-angle LMA. All existing GPU kernels. v1: NO motion-blur compensation - compare vs the NOMB baseline. // By Claude on 07/05/2026 public boolean pose_lean = false; // phase B measurement engine: TD-average the 16 sensors (CuasTD, CPU bridge) then ONE conj-multiply vs the virtual-center TD -> FZ-normalize -> PD -> argmax+eigen (getMaxXYCmEig) -> 3-angle LMA. All existing GPU kernels. v1: NO motion-blur compensation - compare vs the NOMB baseline. // By Claude on 07/05/2026
public boolean pose_full = false; // DEBUG: use ALL strength-selected tiles (~1074) - the -POSE-RT-TILE-CALIB calibration is neither read nor written (temporary bypass of the 150-tile filter for measurement debugging). // By Claude on 07/04/2026 public boolean pose_full = false; // DEBUG: use ALL strength-selected tiles (~1074) - the -POSE-RT-TILE-CALIB calibration is neither read nor written (temporary bypass of the 150-tile filter for measurement debugging). // By Claude on 07/04/2026
public boolean pose_corr_save = false; // DEBUG: save the per-scene 2D correlations vs the virtual center in the pixel domain (-POSE-RT-CORR2D: z=scenes, tile grid of 16x16 cells, last LMA cycle) - lean engine only. // By Claude on 07/04/2026 public boolean pose_corr_save = false; // DEBUG: save the per-scene 2D correlations vs the virtual center in the pixel domain (-POSE-RT-CORR2D: z=scenes, tile grid of 16x16 cells, last LMA cycle) - lean engine only. // By Claude on 07/04/2026
...@@ -154,6 +160,18 @@ public class CuasRtParameters { ...@@ -154,6 +160,18 @@ public class CuasRtParameters {
"TEST-ONLY (ruling 07/19 3.4): blocking per-scene D2H of the rendered combined image, saved as -CUAS-RT-DETINPUT (z=scenes) for the A/B vs the diagnostic CuasRender path. Slows the run."); "TEST-ONLY (ruling 07/19 3.4): blocking per-scene D2H of the rendered combined image, saved as -CUAS-RT-DETINPUT (z=scenes) for the A/B vs the diagnostic CuasRender path. Slows the run.");
gd.addStringField("Render green-ctx carve (SM spec)", this.det_render_green, 8, // By Claude on 07/19/2026 gd.addStringField("Render green-ctx carve (SM spec)", this.det_render_green, 8, // By Claude on 07/19/2026
"Item 4 step-4 (MAP v2): run the detection-input render in its OWN GPU module confined to this SM carve ('8+8' = 8 SMs disjoint from the pose-8 slot). Empty or '0' = render on the main module (the R1a shape). Fail-safe falls back to the main module."); "Item 4 step-4 (MAP v2): run the detection-input render in its OWN GPU module confined to this SM carve ('8+8' = 8 SMs disjoint from the pose-8 slot). Empty or '0' = render on the main module (the R1a shape). Fail-safe falls back to the main module.");
gd.addCheckbox ("GPU LoG + subtract-average (detection)", this.det_log, // By Claude on 07/19/2026 (item 4 R2)
"Item 4 R2: pixel-LoG (LINEAR, psf_radius/n_sigma taps) + POST-LoG-domain subtract-average on the resident render frame, on the render stream after each chain. The detection frame (LoG - avg) stays GPU-resident for the DNN feed. Requires the detection-input render.");
gd.addCheckbox ("DEBUG: save GPU LoG detection frames", this.det_log_save, // By Claude on 07/19/2026 (item 4 R2)
"TEST-ONLY (ruling 3.4): blocking per-scene D2H of the detection frame (LoG - avg), saved as -CUAS-RT-LOG (z=scenes) for the A/B vs the Java convolve2DLReLU path (RELATIVE tol, ruling 3.3). Slows the run.");
gd.addStringField("Prior-run average file (raw domain)", this.det_avg_file, 60, // By Claude on 07/19/2026 (item 4 R2)
"Item 4 R2 (ruling 3.1): path to a prior run's -CUAS-RT-AVG (sensor WxH float TIFF, raw render domain) = the subtract-average base (LoG'd in Java double at arm). Empty = no prior: EMA (if on) seeds from the first frame; EMA off leaves the detection frame NaN.");
gd.addCheckbox ("Save this run's average (-CUAS-RT-AVG)", this.det_avg_save, // By Claude on 07/19/2026 (item 4 R2)
"Accumulate the NaN-aware raw-domain running average on the GPU (free during the timed loop) and save it after the loop - the NEXT run's prior-average file.");
gd.addNumericField("Average EMA refresh rate", this.det_ema_rate, 6,8,"", // By Claude on 07/19/2026 (item 4 R2)
"Item 4 R2 (ruling 3.1): per-scene EMA rate of the post-LoG average, avg += rate*(LoG-avg) where the gate admits. 0 = OFF (prior-file-only base).");
gd.addNumericField("EMA gate |LoG-avg| <=", this.det_ema_gate, 6,8,"counts", // By Claude on 07/19/2026 (item 4 R2)
"Item 4 R2 (ruling 3.1: the EMA MUST be gated): update the average only where |LoG-avg| is at most this (post-LoG counts) so slow-apparent-motion targets are never absorbed. <=0 = UNGATED (loud warning; experiments only).");
gd.addCheckbox ("Pose test lean correlation (B)", this.pose_lean, // By Claude on 07/05/2026 gd.addCheckbox ("Pose test lean correlation (B)", this.pose_lean, // By Claude on 07/05/2026
"Phase B measurement: TD-average the 16 sensors, then ONE conj-multiply vs the virtual-center TD -> FZ-normalize -> PD -> argmax+eigen -> 3-angle LMA. v1 has NO motion-blur compensation (compare vs the NOMB baseline)."); "Phase B measurement: TD-average the 16 sensors, then ONE conj-multiply vs the virtual-center TD -> FZ-normalize -> PD -> argmax+eigen -> 3-angle LMA. v1 has NO motion-blur compensation (compare vs the NOMB baseline).");
...@@ -374,6 +392,12 @@ public class CuasRtParameters { ...@@ -374,6 +392,12 @@ public class CuasRtParameters {
this.det_render = gd.getNextBoolean(); // By Claude on 07/19/2026 this.det_render = gd.getNextBoolean(); // By Claude on 07/19/2026
this.det_render_save = gd.getNextBoolean(); // By Claude on 07/19/2026 this.det_render_save = gd.getNextBoolean(); // By Claude on 07/19/2026
this.det_render_green = gd.getNextString().trim();// By Claude on 07/19/2026 (item 4 step-4) this.det_render_green = gd.getNextString().trim();// By Claude on 07/19/2026 (item 4 step-4)
this.det_log = gd.getNextBoolean(); // By Claude on 07/19/2026 (item 4 R2)
this.det_log_save = gd.getNextBoolean(); // By Claude on 07/19/2026 (item 4 R2)
this.det_avg_file = gd.getNextString().trim();// By Claude on 07/19/2026 (item 4 R2)
this.det_avg_save = gd.getNextBoolean(); // By Claude on 07/19/2026 (item 4 R2)
this.det_ema_rate = gd.getNextNumber(); // By Claude on 07/19/2026 (item 4 R2)
this.det_ema_gate = gd.getNextNumber(); // By Claude on 07/19/2026 (item 4 R2)
this.pose_lean = gd.getNextBoolean(); // By Claude on 07/05/2026 this.pose_lean = gd.getNextBoolean(); // By Claude on 07/05/2026
this.pose_full = gd.getNextBoolean(); // By Claude on 07/04/2026 this.pose_full = gd.getNextBoolean(); // By Claude on 07/04/2026
this.pose_corr_save = gd.getNextBoolean(); // By Claude on 07/04/2026 this.pose_corr_save = gd.getNextBoolean(); // By Claude on 07/04/2026
...@@ -489,6 +513,12 @@ public class CuasRtParameters { ...@@ -489,6 +513,12 @@ public class CuasRtParameters {
properties.setProperty(prefix+"det_render", this.det_render+""); // boolean // By Claude on 07/19/2026 properties.setProperty(prefix+"det_render", this.det_render+""); // boolean // By Claude on 07/19/2026
properties.setProperty(prefix+"det_render_save", this.det_render_save+"");// boolean // By Claude on 07/19/2026 properties.setProperty(prefix+"det_render_save", this.det_render_save+"");// boolean // By Claude on 07/19/2026
properties.setProperty(prefix+"det_render_green",this.det_render_green); // String // By Claude on 07/19/2026 (item 4 step-4) properties.setProperty(prefix+"det_render_green",this.det_render_green); // String // By Claude on 07/19/2026 (item 4 step-4)
properties.setProperty(prefix+"det_log", this.det_log+""); // boolean // By Claude on 07/19/2026 (item 4 R2)
properties.setProperty(prefix+"det_log_save", this.det_log_save+""); // boolean // By Claude on 07/19/2026 (item 4 R2)
properties.setProperty(prefix+"det_avg_file", this.det_avg_file); // String // By Claude on 07/19/2026 (item 4 R2)
properties.setProperty(prefix+"det_avg_save", this.det_avg_save+""); // boolean // By Claude on 07/19/2026 (item 4 R2)
properties.setProperty(prefix+"det_ema_rate", this.det_ema_rate+""); // double // By Claude on 07/19/2026 (item 4 R2)
properties.setProperty(prefix+"det_ema_gate", this.det_ema_gate+""); // double // By Claude on 07/19/2026 (item 4 R2)
properties.setProperty(prefix+"pose_lean", this.pose_lean+""); // boolean // By Claude on 07/05/2026 properties.setProperty(prefix+"pose_lean", this.pose_lean+""); // boolean // By Claude on 07/05/2026
properties.setProperty(prefix+"pose_full", this.pose_full+""); // boolean // By Claude on 07/04/2026 properties.setProperty(prefix+"pose_full", this.pose_full+""); // boolean // By Claude on 07/04/2026
properties.setProperty(prefix+"pose_corr_save", this.pose_corr_save+""); // boolean // By Claude on 07/04/2026 properties.setProperty(prefix+"pose_corr_save", this.pose_corr_save+""); // boolean // By Claude on 07/04/2026
...@@ -604,6 +634,12 @@ public class CuasRtParameters { ...@@ -604,6 +634,12 @@ public class CuasRtParameters {
if (properties.getProperty(prefix+"det_render")!=null) this.det_render=Boolean.parseBoolean(properties.getProperty(prefix+"det_render")); // By Claude on 07/19/2026 if (properties.getProperty(prefix+"det_render")!=null) this.det_render=Boolean.parseBoolean(properties.getProperty(prefix+"det_render")); // By Claude on 07/19/2026
if (properties.getProperty(prefix+"det_render_save")!=null) this.det_render_save=Boolean.parseBoolean(properties.getProperty(prefix+"det_render_save"));// By Claude on 07/19/2026 if (properties.getProperty(prefix+"det_render_save")!=null) this.det_render_save=Boolean.parseBoolean(properties.getProperty(prefix+"det_render_save"));// By Claude on 07/19/2026
if (properties.getProperty(prefix+"det_render_green")!=null)this.det_render_green=properties.getProperty(prefix+"det_render_green").trim(); // By Claude on 07/19/2026 (item 4 step-4) if (properties.getProperty(prefix+"det_render_green")!=null)this.det_render_green=properties.getProperty(prefix+"det_render_green").trim(); // By Claude on 07/19/2026 (item 4 step-4)
if (properties.getProperty(prefix+"det_log")!=null) this.det_log=Boolean.parseBoolean(properties.getProperty(prefix+"det_log")); // By Claude on 07/19/2026 (item 4 R2)
if (properties.getProperty(prefix+"det_log_save")!=null) this.det_log_save=Boolean.parseBoolean(properties.getProperty(prefix+"det_log_save")); // By Claude on 07/19/2026 (item 4 R2)
if (properties.getProperty(prefix+"det_avg_file")!=null) this.det_avg_file=properties.getProperty(prefix+"det_avg_file").trim(); // By Claude on 07/19/2026 (item 4 R2)
if (properties.getProperty(prefix+"det_avg_save")!=null) this.det_avg_save=Boolean.parseBoolean(properties.getProperty(prefix+"det_avg_save")); // By Claude on 07/19/2026 (item 4 R2)
if (properties.getProperty(prefix+"det_ema_rate")!=null) this.det_ema_rate=Double.parseDouble(properties.getProperty(prefix+"det_ema_rate")); // By Claude on 07/19/2026 (item 4 R2)
if (properties.getProperty(prefix+"det_ema_gate")!=null) this.det_ema_gate=Double.parseDouble(properties.getProperty(prefix+"det_ema_gate")); // By Claude on 07/19/2026 (item 4 R2)
if (properties.getProperty(prefix+"pose_lean")!=null) this.pose_lean=Boolean.parseBoolean(properties.getProperty(prefix+"pose_lean")); // By Claude on 07/05/2026 if (properties.getProperty(prefix+"pose_lean")!=null) this.pose_lean=Boolean.parseBoolean(properties.getProperty(prefix+"pose_lean")); // By Claude on 07/05/2026
if (properties.getProperty(prefix+"pose_full")!=null) this.pose_full=Boolean.parseBoolean(properties.getProperty(prefix+"pose_full")); // By Claude on 07/04/2026 if (properties.getProperty(prefix+"pose_full")!=null) this.pose_full=Boolean.parseBoolean(properties.getProperty(prefix+"pose_full")); // By Claude on 07/04/2026
if (properties.getProperty(prefix+"pose_corr_save")!=null) this.pose_corr_save=Boolean.parseBoolean(properties.getProperty(prefix+"pose_corr_save")); // By Claude on 07/04/2026 if (properties.getProperty(prefix+"pose_corr_save")!=null) this.pose_corr_save=Boolean.parseBoolean(properties.getProperty(prefix+"pose_corr_save")); // By Claude on 07/04/2026
...@@ -722,6 +758,12 @@ public class CuasRtParameters { ...@@ -722,6 +758,12 @@ public class CuasRtParameters {
cp.det_render = this.det_render; // By Claude on 07/19/2026 cp.det_render = this.det_render; // By Claude on 07/19/2026
cp.det_render_save = this.det_render_save; // By Claude on 07/19/2026 cp.det_render_save = this.det_render_save; // By Claude on 07/19/2026
cp.det_render_green = this.det_render_green; // By Claude on 07/19/2026 (item 4 step-4) cp.det_render_green = this.det_render_green; // By Claude on 07/19/2026 (item 4 step-4)
cp.det_log = this.det_log; // By Claude on 07/19/2026 (item 4 R2)
cp.det_log_save = this.det_log_save; // By Claude on 07/19/2026 (item 4 R2)
cp.det_avg_file = this.det_avg_file; // By Claude on 07/19/2026 (item 4 R2)
cp.det_avg_save = this.det_avg_save; // By Claude on 07/19/2026 (item 4 R2)
cp.det_ema_rate = this.det_ema_rate; // By Claude on 07/19/2026 (item 4 R2)
cp.det_ema_gate = this.det_ema_gate; // By Claude on 07/19/2026 (item 4 R2)
cp.pose_lean = this.pose_lean; cp.pose_lean = this.pose_lean;
cp.pose_full = this.pose_full; // By Claude on 07/04/2026 cp.pose_full = this.pose_full; // By Claude on 07/04/2026
cp.pose_corr_save = this.pose_corr_save; // By Claude on 07/04/2026 cp.pose_corr_save = this.pose_corr_save; // By Claude on 07/04/2026
......
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