-
Andrey Filippov authored
Piece 3 of the native-JNA DNN path. Adds a local backend that runs the SAME L1+L2 inference as CuasDnnRemote but in-process via LibTorch (libtpdnn.so / JNA), so the CUAS pipeline runs without the DGX or any Python server: - CuasDnnBackend : shared interface (upload/getNFrames/inferBatch->BatchResult/close) - TpDnnJna : JNA Library binding libtpdnn.so's C-ABI - CuasDnnLocal : wraps it; reads N/P/vr/l2_ch from each model's bundled .meta.json (single source of truth), float[][]<->float[], builds BatchResult - CuasDnnRemote : now implements CuasDnnBackend (signatures unchanged) - CuasDetectRT : DNN path gate now fires on (curt_dnn_remote || curt_dnn_local); backend = local? CuasDnnLocal : CuasDnnRemote; ensureServer skipped when local; local-CPU-ORT gate also excludes curt_dnn_local (no double-run). runDnnRemote loop unchanged. - IntersceneMatchParameters: curt_dnn_local (flag) + curt_dnn_local_dir (model dir override; empty = bundled /cuas_dnn resource) + GUI labels/persist. Validated: full Java->JNA->libtpdnn vs the Python-server oracle = EXACT (offset5=0.0, roi=0.0, nch=6). mvn -DskipTests package OK. Runtime: -Djna.library.path=<dir with libtpdnn.so>; libtpdnn.so finds libtorch via its rpath. Model resolution mirrors CuasDnnRemote's bundled-vs-override scheme. Co-Authored-By:Claude Opus 4.8 (1M context) <noreply@anthropic.com>
54d842f0