Commit 9262d943 authored by Andrey Filippov's avatar Andrey Filippov

CLAUDE: broaden scope — general PyTorch DNN-companions repo (not CUAS-only)

Per Andrey: future DNN companions to imagej-elphel (all PyTorch, not Java) live here too. README + per-file
header tagline generalized accordingly.
Co-Authored-By: 's avatarClaude Opus 4.8 (1M context) <noreply@anthropic.com>
parent 76dbfda2
Pipeline #3825 canceled with stages
# imagej_elphel_dnn
DNN companion to [imagej-elphel](https://git.elphel.com/Elphel/imagej-elphel) for tile-processor
motion detection / ranging. GPLv3.
**PyTorch DNN companions to [imagej-elphel](https://git.elphel.com/Elphel/imagej-elphel).** GPLv3.
## Layers
- **L1 — `RawFCN`** (`model.py`): fully-convolutional patch net `[B,N,P,P] -> [B,C,1,1]`, slid densely over
the full frame (no FC layers). Per-tile detection logit + velocity field. Trained on synthetic sequences.
A shared home for Elphel's deep-learning models that augment the ImageJ/tile-processor pipeline — Python/PyTorch
(the Java side stays in imagej-elphel). New DNN companions (beyond the current motion-detection set) land here too.
## Current models
- **L1 — `RawFCN`** (`model.py`): fully-convolutional patch net `[B,N,P,P] -> [B,C,1,1]` slid densely over the
full frame (no FC layers) — per-tile detection logit + velocity field, trained on synthetic sequences.
- **L2 — `Layer2Net` / ConvGRU on a torus** (`layer2.py`): learned track-before-detect over the L1 field.
## Workflow
- Training / eval / synthetic data generation: `train.py`, `layer2_train*.py`, `gen_synth_cuas.py`, `synth.py`, eval scripts.
- Inference (dev/remote): `infer_server.py` (+ `run_infer_server.sh`) — PyTorch server.
- **Deployment export:** `export_torchscript.py` produces a self-contained TorchScript `.pt` (weights + graph),
loaded natively (no Python) by LibTorch in [tile_processor_gpu](https://git.elphel.com/Elphel/tile_processor_gpu)
and bundled as a resource in imagej-elphel (`resources/cuas_dnn/`). Build-once on a dev box (PyTorch);
deployment needs only the NVIDIA driver + libtorch runtime + the bundled `.pt`.
- Training / eval / synthetic data: `train.py`, `layer2_train*.py`, `gen_synth_cuas.py`, `synth.py`, eval scripts.
- Inference (dev/remote): `infer_server.py` (+ `run_infer_server.sh`).
- **Deployment export:** `export_torchscript.py` → self-contained TorchScript `.pt` (weights+graph), loaded
natively (no Python) by LibTorch in [tile_processor_gpu](https://git.elphel.com/Elphel/tile_processor_gpu),
bundled as an imagej-elphel resource. Build-once on a dev box (PyTorch); deployment needs only the NVIDIA
driver + libtorch runtime + the bundled `.pt`.
Checkpoints (`runs/`) are training outputs and are not tracked.
# baselines.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# baselines.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# build_combo3.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# build_combo3.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# clean_eval_fwhm.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# clean_eval_fwhm.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# compare_dnn_truth.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# compare_dnn_truth.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# dense_check.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# dense_check.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# diag_clean.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# diag_clean.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# eval_mfs.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# eval_mfs.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# export_onnx.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# export_onnx.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# export_refine.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# export_refine.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# export_torchscript.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# export_torchscript.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# extract_B.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# extract_B.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# gap_eval.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# gap_eval.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# gen_synth_cuas.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# gen_synth_cuas.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# ghost_probe.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# ghost_probe.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# infer_server.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# infer_server.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# l1_samples.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# l1_samples.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# l2_fp_analysis.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# l2_fp_analysis.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2_data.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2_data.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2_eval.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2_eval.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2_gapcheck.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2_gapcheck.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2_train.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2_train.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2_train_A.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2_train_A.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2_train_P.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2_train_P.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# layer2p.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# layer2p.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# make_testvec.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# make_testvec.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# model.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# model.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# nettest.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# nettest.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# partial_votes.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# partial_votes.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env bash
# run_infer_server.sh - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# run_infer_server.sh - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env bash
# run_l2A.sh - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# run_l2A.sh - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env bash
# run_l2_chain.sh - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# run_l2_chain.sh - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env bash
# run_l2_dense.sh - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# run_l2_dense.sh - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env bash
# run_l2_seq.sh - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# run_l2_seq.sh - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# shake.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# shake.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# stage2.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# stage2.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# stage2_eval3.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# stage2_eval3.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# synth.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# synth.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# test_infer_client.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# test_infer_client.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# train.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# train.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
#!/usr/bin/env python3
# velocity_bias.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# velocity_bias.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# viz_results.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# viz_results.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# viz_trainingdata.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# viz_trainingdata.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
# vote_1d.py - part of imagej_elphel_dnn (Elphel DNN: tile-processor motion detection / ranging)
# vote_1d.py - part of imagej_elphel_dnn — Elphel PyTorch DNN companions to imagej-elphel
#
# Copyright (C) 2026 Elphel, Inc.
#
......
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