- 25 Jun, 2026 14 commits
-
-
Andrey Filippov authored
setLpfRbg flattens the 4x64 r/b/g/m arrays -> "lpf_data"; setLpfCorr -> const_name (lpf_corr / lpf_rb_corr). Uploads to the native module's constant memory, matching JCUDA. mvn clean. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
GpuQuad.create(gpuTileProcessor, quadCLT, debug) returns the JCuda GpuQuad by default, or the native GpuQuadJna when -Dtp.backend=jna (srcdir/devrt overridable via -Dtp.jna.srcdir / -Dtp.jna.devrt). Routed all 32 main+aux `new GpuQuad(...)` 3-arg sites in Eyesis_Correction.java through the factory. JCUDA remains the default (behavior identical when the property is unset). mvn -DskipTests compile clean. Migration now fully implemented + compiling end-to-end (Step 1 native TpProc API, Step 2 GpuQuadJna full CUAS surface, Step 3 selector). Ready for the JCUDA-vs-JNA comparison + incremental troubleshooting. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
Override execCorr2D_TD / execCorr2D_inter_TD / execCorr2D_combine / execCorr2D_normalize / getCorr2D / getCorr2DCombo delegating to the granular TpProc functions (setCorrMask kept for getNumUsedPairs; mono scale triplet 1/0/0; init|no_transpose<<1). handleWH -> full-frame no-op (TpProc fixed-size). GpuQuadJna now covers the full CUAS GPU surface (geometry/kernels/bayer/tasks/convert/imclt/getRBG/ correlations). mvn compile clean. fcorr_weights (per-tile) + setLpf* not yet plumbed — to surface in troubleshooting. Next: backend selector. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
Override GpuQuad's GPU-touching methods for the image path, delegating to the native TpProc (with own caching, since base uses the null gpuTileProcessor): - setGeometryCorrection / setExtrinsicsVector -> tp_proc_set_geometry / set_correction_vector (gc.expandSensors(16).toFloatArray, cv.toFullRollArray). - setConvolutionKernels -> per-cam transpose-flatten (i=((i0&7)<<3)+((i0>>3)&7), CltExtra offsets) -> tp_proc_set_kernels / set_kernel_offsets. - setBayerImages -> channel-combine -> tp_proc_set_image (center -> set_center_image broadcast). - setTasks -> TpTask.asFloatArray -> tp_proc_set_tasks. - execSetTilesOffsets -> set gc+cv -> tp_proc_exec_geometry. - execConvertDirect(ref_scene,wh,erase_clt,no_kernels,use_center_image) -> tp_proc_exec_convert_direct (honors no_kernels skip-deconvolution + use_center_image, the fragile paths). - execImcltRbgAll -> tp_proc_exec_imclt; getRBG -> tp_proc_get_rbg + same inner-region extraction. mvn -DskipTests compile clean; all @Override signatures match base. Correlations (execCorr2D_*) and the backend selector are next. JCUDA remains the untouched default. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
Architecture B (chosen after finding GpuQuad's surface is ~70 methods, too large for a clean interface): - GpuQuad: add a protected no-alloc constructor (QuadCLT, debug_level, native_backend marker) that sets only the final config fields (gpuTileProcessor=null) and allocates NO JCuda memory / context. The working JCuda constructors are untouched. - New GpuQuadJna extends GpuQuad: uses the no-alloc ctor, then stands up the native libtileproc.so via TpJna (tp_create_module + tp_proc_create + tp_proc_setup). Inherits all methods (so it compiles); GPU-touching methods will be overridden incrementally to delegate to TpProc, the rest throw to fail loudly off the validated path. close() frees native memory deterministically. mvn -DskipTests compile: clean. JCUDA remains the default/working path. Next: per-method override marshalling (kernels/bayer/geometry/tasks + convert/imclt/getRBG/corr), then the backend selector (QuadCLT ctor) and the live JCUDA-vs-JNA file comparison. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
TpJna: tp_proc_setup_rbg_corr/exec_imclt/get_rbg/exec_corr2d/get_corr2d_combo + extended tp_proc_convert_selftest. StageProc validates convert+imclt+corr through the persistent API (all match goldens) + no_kernels smoke. PASS on 5060 Ti. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
TpJna: tp_proc_create/setup/set_*/exec_*/get_clt/destroy + tp_proc_convert_selftest. StageProc: validates the persistent convert path == Stage-2 CLT golden + no_kernels smoke test. PASS on 5060 Ti. This is the production-facing surface GpuQuadJna (integration step 2) delegates to. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
CLAUDE: Stage 5 — JNA textures_nonoverlap binding + Stage5 driver (executes; golden mismatch documented) TpJna: tp_tex_selftest. Stage5: reports EXECUTED (Blackwell OK) + golden-match separately. textures_nonoverlap executes correctly on 5060 Ti; diff_rgb_combo golden mismatch is a documented known issue (not in the LWIR16 CUAS workflow). All kernels the CUAS workflow uses are validated. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
TpJna: add tp_corr_selftest. Stage4: run convert_direct + correlate2D/combine/normalize, report CLT error and the order-independent (sorted-distribution) correlation value error. PASS on 5060 Ti: sorted value error 2.06e-05 vs aux_corr-quad.corr (pointwise 0.66 is the stale golden's differing tile order, not a value error). Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
TpJna: add tp_imclt_selftest binding. Stage3: run convert_direct + imclt_rbg_all, report CLT and RBG max error. PASS on 5060 Ti: RBG relative ~1.31e-5 vs golden. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
TpJna: add tp_convert_direct_selftest binding. Stage2: invoke it against the tile_processor_gpu/clt golden, report num_active_tiles + max|CLT-golden|. PASS on 5060 Ti: 5120 active tiles, relative error ~8.85e-6 vs golden (first real kernel execution + CDP via the native shim, no JCuda). Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
TpJna: add the instance + geometry surface (tp_create_instance, tp_set_geometry_correction/correction_vector, tp_exec_calc_reverse_distortions, tp_exec_rot_derivs, tp_get_rbyrdist/rot_deriv, tp_destroy_instance). Stage1: drive the geometry path entirely across JNA (no JCuda) from the tile_processor_gpu/clt reference data (little-endian float32), then validate: rByRDist == clt/*.rbyrdist to ~1e-7 (GpuQuad.maxRbyRDistErr tolerance), rot_deriv rows orthogonal to ~1e-10. PASS for aux (16-cam) and main on 5060 Ti. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
Add JNA 5.14.0 dependency + com.elphel.imagej.gpu.jna (TpJna interface, Stage0 driver): load libtileproc.so, NVRTC-compile+CDP-link+load the kernels, 19/19 functions on the 5060 Ti from Java via JNA (no JCuda). First step of the GPU-layer migration; existing JCuda path untouched. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
Checkpoint of the CUAS real-time work before the JCuda->JNA GPU-layer migration: - OpticalFlow.buildSeries mode-0 curt_en fork: generate the merged-CUAS stack via CuasRanging.prepareFpixels() (GPU, explicit) then run the CUDA-free CuasDetectRT; coexists with the oracle (oracle gated off when curt_en). - CuasDetectRT: file + in-memory(ImagePlus) entries via shared ingest(); -OFFSET gains an L2 "age" slice (5->6 ch), per-level noise scale, -LEV0 uniform naming, -OFFSET-<model> suffix. - infer_server.py: L2 track-age (masked 5x5 max-pool, AGE_THR=0.2/AGE_K=0.5), per-level noise normalization (sqrt(2)^(L-3) default, Java-sent scale), nch + noise_scale + CMD_STATUS protocol additions; auto model-switch in CuasDnnRemote.ensureServer. - cuasSynth + cuasNoise list SET keys (shared synth dir / inline per-level scales). - CuasRanging.saveUasFlightLogCsv: per-frame UAS truth -> <name>-UAS_DATA.tsv (mode-0 only). Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
- 21 Jun, 2026 6 commits
-
-
Andrey Filippov authored
-
Andrey Filippov authored
CLAUDE: -OFFSET in px (s-first, full-frame meta, s-gated NaN); curt_dnn_thresh viz-only (recurrent gets full field) -OFFSET (remote) reordered to {s,Vx,Vy,dx,dy} (s first -> ImageJ auto-ranges on it); Vx,Vy converted cells->px/level-frame (/vel_decimate); full-frame ROI written to the file metadata (self-describes its extent); Vx,Vy,dx,dy NaN'd where s<curt_dnn_thresh (s kept). curt_dnn_thresh is now VISUALIZATION-ONLY: the local inferROI feeds Layer 2 the FULL field (sThresh=0) so the recurrent gets the weak sub-threshold signal it integrates (no premature threshold = the LReLU lesson); dialog label/tooltip/decl updated to say viz-only, do-not-use-for-computation. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
Checkboxes were laid out with fill=HORIZONTAL, stretching the (text-less) JCheckBox across the half-width cell so its click target reached the scrollbar - a near-scrollbar miss-click silently toggled them (this flipped 'DNN remote' off mid-session). Anchor checkboxes WEST at natural size; the rest of the cell is now dead space. Applies to all tabbed dialogs. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
runDnnRemote requests each level's scenes in chunks (REQ=64) via CuasDnnRemote.inferBatch instead of per-scene; the DGX runs them continuously (production-representative ~100ms/scene full-res) and applies the ghostbuster on the GPU in decode, so BOTH the ROI 121-cell field and the full-frame -OFFSET {dx,dy,s,Vx,Vy} are ghostbusted (dropped the Java-side ghostbust). Validated: local vs remote on the same weighted9_pm_s model -> max |diff| ~1e-4 (ORT per-pixel vs PyTorch shift-and-stitch fp). Full-res ~100ms/scene is the oracle; RT would use the 1/4-res single forward (~4.4ms). Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
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:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
detectTargets() can offload the DNN front-end to the GB10 DGX (curt_dnn_remote): CuasDnnRemote uploads the LoG-conditioned stack once, the DGX builds the pyramid and runs full-res shift-and-stitch per (level,scene), returning the full-frame {dx,dy,s,Vx,Vy} (-OFFSET) + ROI 121-cell softmax*s (-RECT/-HYPER-RECT). Auto-launches the server if down (bundled cuas_dnn/ scripts, or curt_dnn_remote_srcdir local-repo override - mirrors the GPU-kernel default-vs-override). Synthetic targets are mixed into the upload stack so synth works on the remote path. 4 curt_dnn_remote_* dialog params, grouped with the model fields. Local CPU path unchanged (curt_dnn_remote=false) for Layer 2. Validated end-to-end; shift-and-stitch is fp64-exact vs per-pixel. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
- 20 Jun, 2026 3 commits
-
-
Andrey Filippov authored
Dead after the 3d3/matched-filter removal (predecessor at tag cuas-layer1): render3d3Hyperstack, get3d3Radius + the 3d3 kernel state (kernel3d3_rad, indx_*_3d3) with its constructor param/setup/call-site; TemporalKernelGenerator.generateKernelMatched/Direct; CuasDetectRT SUFFIX_CONV3D3, CONV3D3_MODES, bilinearFrame. No live callers; build OK. Co-authored-by:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
Layer-1 is DNN-only; predecessor code preserved at git tag cuas-layer1. Removed: 3d3 coarse-velocity path (curt_3d3_*, rleak1, convolve3D3LReLU); C5P matched-filter / Bayes-posterior / whitening (curt_c5_matched/en/post/.../white*/from_pix); LReLU rectification (curt_rleak0/pyr -> linear alpha=1, LoG kept); distribution-vote (-GVOTE/-GHEADS, voteScatterGrid); curt_dnn_t8frac. 28 dialog params dropped; dialogQuestions/dialogAnswers re-verified aligned (44 widgets = 44 getNext). ~1841 lines removed. Deprecated (kept): curt_stage2_model, MF-S S convention. Kept: DNN front-end, recurrent, synth-test, SUBAVG, pyramid, LoG (linear). Build OK. Runtime-untested (dialog) — verify a run; restore point: tag cuas-layer1. Co-authored-by:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
- 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:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
- 19 Jun, 2026 1 commit
-
-
Andrey Filippov authored
Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
- 18 Jun, 2026 12 commits
-
-
Andrey Filippov authored
- CuasStage2Infer: ONNX runner for the learned Stage-2 vote-refine (full-field conv). - CuasDetectRT: voteScatter (s^2-weighted bilinear splat at tail T=P-V*(N-1)) + reg-branch wiring -> saves -VOTE heatmap + -REFINED detection when curt_stage2_model is set; curt_c5_en gates the heavy C5P convolve (DNN-only fast path). - IntersceneMatchParameters: curt_c5_en + curt_stage2_model params (all 6 sites each). - CuasDnnInfer: setSessionLogLevel(ERROR) to suppress benign ORT VerifyOutputSizes warnings. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
parse_images_txt() now accepts both frame_NNN names and timestamp names (e.g. 1763232419_474661.png). Introduces sort_key (float) so entries sort correctly regardless of naming style. fno stays -1 for timestamp images since no integer frame number is present. Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
Serial (USB/CH340G, 115200 baud) G-code driver for Creality Ender 3. Provides tap(), swipe(), home(), calibrate() over /dev/ttyUSB0. Part of the NanoKVM + Ender 3 physical phone-control project. Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
*-ims.corr-xml in the scene root dir always has an INS-fused GPS fix (did_ins_2-lla, fallback did_gps1_pos-lla) giving the representative position of the sequence for map location. Changes: - find_xml_files: also yields ims_path (*-ims.corr-xml from scene root) - parse_lla(): reads lat/lon from INS or GPS1 LLA entry - lat/lon added to metrics, console tables, and TSV output Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
*-elevations_histogram.csv (row 2, col 1) gives flight altitude above ground level for each sequence. Low AGL (<25-50 m) correlates with algorithm failures in dense-canopy areas. Changes: - find_xml_files: also yields hist_path (*-elevations_histogram.csv) - parse_agl(): reads AGL from second row, first column (tab-separated) - agl_m added to sequence metrics dict and TSV output - --min_agl filter: hide sequences below given AGL from console output - AGL column shown in console tables Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
Finite-diff vel1 was dominated by single-frame pose glitches from algorithm failures (low altitude / dense canopy), giving 600+ deg/s for sequences where _dt shows ~10 deg/s. Changes: - parse _dt entries (algorithm's smooth polynomial derivatives) as primary velocity metric — unaffected by pose glitches - keep finite-diff as secondary; glitch = fd_max / dt_max (~1 = clean data, >>1 = pose jumps / algorithm failure) - --max_glitch filter hides suspect sequences from console output (TSV always contains all rows for Calc analysis) - removed windowed finite-diff (vel5) — _dt makes it redundant Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
Scans all scene dirs under a linked data root, parses each *-INTERFRAME.corr-xml (latest version subdir), and computes per-sequence angular metrics for A/T/R axes: - range (max−min, deg) - vel1: max consecutive |Δangle|/Δt (deg/s) — fast, noise-sensitive - velW: max W-frame windowed |Δangle|/Δt (deg/s) — robust (default W=5) A/T/R Cessna-nadir convention documented: R=heading, T=banking, A=pitch. Sequence-length/altitude note documented: metrics are Δt-normalised. Outputs ranked console tables and optional TSV. Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
- flat column names (no _x_y_z suffix, single comparison set) - XML angles in degrees (not radians) — more useful for Calc plotting - auto TSV when --out ends in .tsv, CSV otherwise - column comment block documents layout in the source Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
Documents the ImageJ (1-based slice:timestamp), INTERFRAME.corr-xml (timestamp_microseconds key), and COLMAP (0-based frame_NNNN) conventions in the module docstring so any frame can be cross-referenced across tools. Also clarifies the underscore→dot timestamp conversion in parse_interframe_xml. Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
Timestamps are unambiguous when using sub-sequences (e.g. 378 of 498 frames). 0-based sequential scene_idx was misleading. - console top-N table: Scene column replaced with Timestamp - CSV: scene_idx column removed, timestamp is the identity column - parse_interframe_xml: drop scene_idx from returned dicts Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
*-egomotion.csv is a human-readable output file for Calc analysis, not a machine input source. *-INTERFRAME.corr-xml is the internal state always present alongside processed data and is the correct programmatic source for x/y/z/a/t/r poses. - remove parse_egomotion_csv() and --ego argument - --xml is now required - remove IMS/PIMU col_specs (not in XML) - rename CSV output columns: ego_* → xml_*, ers_*_rad → xml_*_rad Co-authored-by:Claude <claude@elphel.com>
-
Andrey Filippov authored
--ego (egomotion.csv) was required but is not always present (it is an optional output file). --xml (*-INTERFRAME.corr-xml) is always written by the pipeline and contains the same x/y/z/a/t/r values. Changes: - add parse_interframe_xml(): sorts timestamps → same frame order as COLMAP - --xml is the new preferred input; --ego is optional and overrides --xml (it additionally provides IMS/PIMU columns) - at least one of --xml or --ego is required - IMS/PIMU [SKIP] messages suppressed when using XML (NaN is expected) - verified: XML and egomotion.csv produce identical results Co-authored-by:Claude <claude@elphel.com>
-
- 17 Jun, 2026 3 commits
-
-
Andrey Filippov authored
CuasDnnInfer auto-detects reg from the ONNX output channels (6 = reg head {det,Vx,Vy,logvar,dx,dy}, else grid) via getOutCh()/isReg(), and adds inferROIReg() returning {S,Vx,Vy,sigma,dx,dy} per ROI pixel (S=sigmoid(det), Vx/Vy model-bounded, sigma=exp(logvar/2)). CuasDetectRT branches: reg saves an S-first {S,Vx,Vy,sigma} hyperstack (-VXYS) + -OFFSET (showArraysHyperstack, channel x time x ROI), metadata-tagged; ghostbuster/grid renders/recurrent skipped (no grid corners, |v|<=vmax baked in). Set curt_dnn_patch=32 for the reg model; curt_dnn_vmax unused in reg mode. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
tagCuasImp() serializes every curt_* param (via IntersceneMatchParameters.setProperties, so new params are auto-included) into the ImagePlus properties and calls EyesisTiff.encodeProperiesToInfo -> XML in the "Info" field -> FileSaver writes it to the TIFF ImageDescription. Applied to -DNN-RECT/-HYPER-RECT/-OFFSET. The python reader (python3-imagej-tiff format) decodes it back, so outputs are self-describing; ROI/model/patch/vmax/etc. restore without manual entry (supplements the filename tag). Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
Andrey Filippov authored
The DNN save titles (-DNN-OFFSET / -HYPER-RECT / -RECT) now carry the ROI as -ROI<x>_<y>_<w>_<h> (underscores to avoid scp/shell colon hazards) so the python flight-log comparison can auto-restore the ROI per file instead of a hardcoded constant - lets the real-UAS evaluation run hands-off across multiple ROIs. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-
- 16 Jun, 2026 1 commit
-
-
Andrey Filippov authored
The CONV2D images are saved BEFORE synth injection (real-only), so the actual DNN input (LoG-conditioned real bg + injected synth) was no longer visible once the mixing order moved to post-conditioning. Add a per-selected-level save of dpixels_pyramid right after injection: getBaseName()+"-SYNTHMIX"+("B" if over real bg)+("-SUBAVG" if avg-subtracted)+"-LEVn", full-frame (640x512), same timestamps - what the network actually sees. Gated by save_LoG_pixels. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
-