Commit 01a6e535 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: Port ghostbuster to the remote DNN path (match CPU -HYPER-RECT)

runDnnRemote() decoded the raw softmax*s field but skipped dnnGhostbust, so the untrained corner-velocity sidelobes (which the local CPU path zeros when curt_dnn_vmax>0) survived as background noise (~0.06 vs ~5e-4 on the MAX-all-v layer). Apply dnnGhostbust to the ROI field, mirroring the local path -> verified: ImageJ subtract of -HYPER-RECT MAX slices vs the CPU (17_UAS_REFACTORED) is exact zero. (Full-frame -OFFSET s is not yet ghostbusted - Java lacks the full 121-field; a DGX-side decode ghostbuster would cover that.)
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 69753750
...@@ -735,6 +735,10 @@ public class CuasDetectRT { ...@@ -735,6 +735,10 @@ public class CuasDetectRT {
long t1 = System.currentTimeMillis(); long t1 = System.currentTimeMillis();
double [][][] fld = new double [rnp][1][r.nvel]; double [][][] fld = new double [rnp][1][r.nvel];
for (int p = 0; p < rnp; p++) { float [] rv = r.roiField[p]; double [] dv = fld[p][0]; for (int v = 0; v < r.nvel; v++) dv[v] = rv[v]; } for (int p = 0; p < rnp; p++) { float [] rv = r.roiField[p]; double [] dv = fld[p][0]; for (int v = 0; v < r.nvel; v++) dv[v] = rv[v]; }
// ghostbuster: zero untrained corner-velocity cells + ghost-peak pixels, matching the local CPU path
// (the DGX returns the raw softmax*s field) - removes the corner sidelobe noise. By Claude on 06/20/2026
if (clt_parameters.imp.curt_dnn_vmax > 0)
dnnGhostbust(fld, null, clt_parameters.imp.curt_vel_radius, clt_parameters.imp.curt_dnn_vmax * clt_parameters.imp.curt_vel_decimate);
dnn_roi[j] = fld; dnn_roi[j] = fld;
for (int c = 0; c < 5; c++) { float [] sc = r.offset5[c]; double [] dc = off5[c][j]; for (int p = 0; p < H*W; p++) dc[p] = sc[p]; } for (int c = 0; c < 5; c++) { float [] sc = r.offset5[c]; double [] dc = off5[c][j]; for (int p = 0; p < H*W; p++) dc[p] = sc[p]; }
ts_dnn[j] = ts_pyramid[nlev][newest] + " f"+newest; ts_dnn[j] = ts_pyramid[nlev][newest] + " f"+newest;
......
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