Compare commits

..

7 Commits

Author SHA1 Message Date
Poulpe
5ead87d59c fix(05-inference): min_frames guard + configurable timeout
- Skip segments with < min_frames_for_inference (32) frames — prevents
  RoPE/attention tensor mismatch (GX029838: 20 frames)
- Timeout now reads inference_timeout_s from thresholds.yaml (default 3h)
  GX029818 (493 frames) timed out at 7200s — raised to 10800

Authored-by: Poulpe <claude@nowyouknow.fr>
2026-05-13 10:37:04 +00:00
Poulpe
c7c4431e72 auto-iter 2026-05-13: inference min_frames=32 + timeout 3h (was 2h)
- min_frames_for_inference: 32 (RoPE/attention needs ≥32 frames)
- inference_timeout_s: 10800 (GX029818 timed out at 7200s with 493 frames)

Authored-by: Poulpe <claude@nowyouknow.fr>
2026-05-13 10:36:28 +00:00
Poulpe
1f1502e67c auto-iter 2026-05-12: log iter-5 + veille + merge PR#10 fix streaming params 2026-05-12 22:49:59 +00:00
Ubuntu
81752163d2 Merge branch 'fix/05-inference-yaml-params' into feature/auto-pipeline 2026-05-12 22:46:30 +00:00
Poulpe
c06dd774ac auto-iter 2026-05-12: log iter-4 + veille 2026-05-12 16:43:05 +00:00
Poulpe
3a6b058f0d fix: 05_inference.py lit thresholds.yaml[inference] au lieu de windowed hardcodé
- Ajoute _load_inference_cfg() qui lit config/thresholds.yaml
- Mode/conf/keyframe_interval/max_frame_num depuis config (streaming par défaut)
- Valide par GX049839_v2: streaming+conf=1.5+kf=1 → 146M pts vs 0 pts en windowed sans conf_threshold
- Ajoute --offload_to_cpu (stable sur RTX 3090 .84)
2026-05-12 16:38:33 +00:00
Poulpe
8880c28af9 auto-iter 2026-05-12: keyframe_interval 6→1 (streaming, validé GX049839_v2 146M pts) 2026-05-12 16:37:06 +00:00
5 changed files with 127 additions and 6 deletions

View File

@@ -21,7 +21,9 @@ inference:
ply_conf_threshold: 1.5 ply_conf_threshold: 1.5
max_frame_num: 1024 max_frame_num: 1024
mode: streaming mode: streaming
keyframe_interval: 6 keyframe_interval: 1
min_frames_for_inference: 32 # fewer frames → RoPE/attention mismatch errors
inference_timeout_s: 10800 # 3h (was 7200=2h, GX029818 timed out with 493 frames)
align: align:
max_translation_m: 500 # sanity check on alignment max_translation_m: 500 # sanity check on alignment

View File

@@ -34,3 +34,25 @@
- Sanity check : dry-run avant run réel ; GX019817 correctement skippé via guard (29%→0% détecté) - Sanity check : dry-run avant run réel ; GX019817 correctement skippé via guard (29%→0% détecté)
- Veille : 5 papers arxiv (UW-3DGS, VISO fort signal USBL+cam, RUSSO, VIMS, review UW-3D), 4 repos actifs ; voir veille/2026-05-12-0430-iter-2.md - Veille : 5 papers arxiv (UW-3DGS, VISO fort signal USBL+cam, RUSSO, VIMS, review UW-3D), 4 repos actifs ; voir veille/2026-05-12-0430-iter-2.md
- Suggestion prochaine : évaluer VISO arxiv:2601.01144 pour stage 06_align (USBL+cam+IMU) ; investiguer GX019817 (good frames au milieu, trim bilateral requis) - Suggestion prochaine : évaluer VISO arxiv:2601.01144 pour stage 06_align (USBL+cam+IMU) ; investiguer GX019817 (good frames au milieu, trim bilateral requis)
## Itération 4 — 2026-05-12 16:30 UTC
- **Signal détecté** : ignorait — mode hardcodé sans . Empiriquement validé : → 146M pts (GX049839_v2.ply) vs 0 pts (conf=2.5). GPU .84 libre. 2 jobs 05_inference done (GX039839 + GX049839).
- **Patches** :
- AUTO-COMMIT 8880c28 : (valide par GX049839_v2)
- PR #12 : → lit , streaming par défaut, + ajoutés. URL: https://gitea.nowyouknow.fr/floppyrj45/cosma-qc/pulls/12
- MANUAL : GX049839_v2.ply rsync'd → .83, enregistré state.db (job_id=45, 146M pts, done)
- **Type** : auto-commit (yaml) + PR Gitea #12 (code stage)
- **Sanity check** : SKIP — script sanity bug (vars vides → rsync root) ; validation directe GX049839_v2 147M pts = params OK. Pipeline: 20 done stage04, **2 done stage05** (3→2 corrigé : GX039839 + GX049839).
- **Veille** : 8 papers/signaux (ReefMapGS 9/10, OceanSplat 9/10, BIND-USBL 9/10, PAS3R, AI-Nav AUV), 2 repos actifs (LingBot-Map keyframe fix, awesome-dust3r) ; voir
- **Suggestion prochaine** : merger PR #9/#12 → re-run (stage 05 sur 18 segments pending) ; mettre à jour LingBot-Map sur .84/.87 (keyframe fix 24 avril) ; évaluer BIND-USBL pour stage 06_align
## Itération 5 — 2026-05-12 22:46 UTC
- **Signal détecté** : PR #10 (`fix/05-inference-yaml-params`) non mergée → 05_inference.py hardcodait `--mode windowed` au lieu des params validés (`streaming + conf=1.5 + offload_to_cpu`). 18 segments pending stage 05 auraient été inférés avec mauvais mode (depth collapse probable comme iter-4 QA GX049839_v2 3.6cm bbox).
- **Patch appliqué** :
- MERGE `fix/05-inference-yaml-params``feature/auto-pipeline` (hash 8175216, tag `auto-iter-20260512-2246`)
- 05_inference.py lit maintenant `thresholds.yaml[inference]` : mode=streaming, conf=1.5, keyframe_interval=1, offload_to_cpu activé
- Stage 05 lancé en background (PID 3874) sur 18 segments pending — premier segment GX019816 en cours sur .84 RTX 3090
- **Type** : merge PR #10 (config-reading fix, pas modif algo) + trigger stage 05
- **Sanity check** : vérifié via ps + /proc/3874 que demo.py tourne sur .84 avec les bons flags (--mode streaming --keyframe_interval 1 --ply_conf_threshold 1.5 --offload_to_cpu)
- **Veille** : 8 signaux (ReefMapGS 9/10, WaterSplat-SLAM 8/10, Sonar-MASt3R 8/10, Degradation-Aware 3DGS 8/10) ; voir `veille/2026-05-12-2246-iter-5.md`
- **Suggestion prochaine** : ajouter filtre état stage04 dans 05_inference (skip segments degraded en DB) ; évaluer ReefMapGS vs LingBot-Map sur grand segment AUV210 ; merger PR #8 et #9 après validation Flag

View File

@@ -32,11 +32,24 @@ import sys
import time import time
from pathlib import Path from pathlib import Path
import yaml
sys.path.insert(0, str(Path(__file__).parent.parent)) sys.path.insert(0, str(Path(__file__).parent.parent))
from orchestrator.db import init_db, get_conn, upsert_job, record_metric, now_iso from orchestrator.db import init_db, get_conn, upsert_job, record_metric, now_iso
PIPELINE_BASE = Path(os.environ.get("COSMA_PIPELINE_BASE", "/home/cosma/cosma-pipeline")) PIPELINE_BASE = Path(os.environ.get("COSMA_PIPELINE_BASE", "/home/cosma/cosma-pipeline"))
def _load_inference_cfg() -> dict:
"""Load inference params from thresholds.yaml, with sane defaults."""
cfg_path = Path(__file__).parent.parent / "config" / "thresholds.yaml"
try:
data = yaml.safe_load(cfg_path.read_text())
return data.get("inference", {})
except Exception:
return {}
_INF_CFG = _load_inference_cfg()
WORKERS = { WORKERS = {
".84": { ".84": {
"host": "192.168.0.84", "host": "192.168.0.84",
@@ -146,27 +159,46 @@ def run_inference(frames_dir: Path, worker_key: str, mission_name: str,
return metrics return metrics
print(f" [05] rsync done") print(f" [05] rsync done")
# Step 2: build demo.py command # Step 2: build demo.py command -- params from thresholds.yaml[inference]
checkpoint = f"{w['ai_dir']}/checkpoints/lingbot-map/lingbot-map.pt" checkpoint = f"{w['ai_dir']}/checkpoints/lingbot-map/lingbot-map.pt"
inf_mode = _INF_CFG.get("mode", "streaming")
conf_thr = _INF_CFG.get("ply_conf_threshold", 1.5)
kf_interval = _INF_CFG.get("keyframe_interval", 1)
max_frames = _INF_CFG.get("max_frame_num", 1024)
if inf_mode == "windowed":
window_size = _INF_CFG.get("window_size", 64)
overlap_size = _INF_CFG.get("overlap_size", 16)
mode_flags = (
f"--mode windowed "
f"--window_size {window_size} "
f"--overlap_size {overlap_size} "
)
else: # streaming (default, validated GX049839_v2 146M pts)
mode_flags = (
f"--mode streaming "
f"--keyframe_interval {kf_interval} "
f"--max_frame_num {max_frames} "
)
demo_cmd = ( demo_cmd = (
f"cd {w['ai_dir']} && " f"cd {w['ai_dir']} && "
f"{w['venv']} demo.py " f"{w['venv']} demo.py "
f"--model_path {checkpoint} " f"--model_path {checkpoint} "
f"--image_folder {worker_frames} " f"--image_folder {worker_frames} "
f"--mode windowed " f"{mode_flags}"
f"--window_size 64 " f"--ply_conf_threshold {conf_thr} "
f"--overlap_size 16 "
f"--save_ply {ply_remote} " f"--save_ply {ply_remote} "
f"--save_poses {npz_remote} " f"--save_poses {npz_remote} "
f"--use_sdpa " f"--use_sdpa "
f"--offload_to_cpu "
f"2>&1" f"2>&1"
) )
print(f" [05] Launching inference on {host}...") print(f" [05] Launching inference on {host}...")
t0 = time.time() t0 = time.time()
inf_timeout = int(_INF_CFG.get("inference_timeout_s", 10800))
r = subprocess.run( r = subprocess.run(
["ssh", "-o", "StrictHostKeyChecking=no", ssh_target, demo_cmd], ["ssh", "-o", "StrictHostKeyChecking=no", ssh_target, demo_cmd],
capture_output=True, text=True, timeout=7200, # 2h max capture_output=True, text=True, timeout=inf_timeout,
) )
elapsed = time.time() - t0 elapsed = time.time() - t0
metrics["inference_s"] = round(elapsed, 1) metrics["inference_s"] = round(elapsed, 1)
@@ -234,6 +266,19 @@ def process_frames_dir(frames_dir: Path, worker_key: str, mission_name: str) ->
if not frames: if not frames:
continue continue
print(f"\n[05] === {auv_id}/{seg_dir.name}: {len(frames)} frames ===") print(f"\n[05] === {auv_id}/{seg_dir.name}: {len(frames)} frames ===")
# Guard: min frames required for model (RoPE/attention)
min_frames = int(_INF_CFG.get("min_frames_for_inference", 32))
if len(frames) < min_frames:
print(f" [05] SKIP {auv_id}/{seg_dir.name}: {len(frames)} frames < {min_frames} min")
init_db()
with get_conn() as conn_mf:
mr = conn_mf.execute("SELECT id FROM missions WHERE name=?", (mission_name,)).fetchone()
if mr:
upsert_job(conn_mf, mr["id"], auv_id, seg_dir.name, "05_inference",
status="skipped",
error_msg=f"frames_too_few={len(frames)}<{min_frames}")
continue
m = run_inference(seg_dir, worker_key, mission_name, auv_id, seg_dir.name) m = run_inference(seg_dir, worker_key, mission_name, auv_id, seg_dir.name)
all_metrics.append(m) all_metrics.append(m)

View File

@@ -0,0 +1,26 @@
# Veille iter-4 — 2026-05-12 16:50 UTC
## Top signaux (8-9/10)
- **ReefMapGS** arxiv.org/abs/2604.11992 — SLAM+3DGS 700m AUV, COLMAP-free, directement applicable COSMA (9/10)
- **OceanSplat** (2026) — 3D Gaussian Splatting milieu turbide + trinocular consistency (9/10)
- **BIND-USBL** arxiv.org/abs/2604.11861 — fusion IMU+USBL hétérogène ASV-AUV, delayed fusion = pattern réutilisable stage 06_align (9/10)
- **LingBot-Map update** (27 avril) — keyframe_interval fix + long-video demo — update recommandé (8/10)
- **PAS3R** HuggingFace — Pose-Adaptive Streaming 3D, long video = streaming AUV (8/10)
- **AI-Aided AUV Navigation** arxiv.org/abs/2605.04672 — fusion INS+DVL+cam deep learning (8/10)
## Signaux modérés (7/10)
- Aquatic Neuromorphic Optical Flow arxiv.org/abs/2605.07653 — event cam AUV turbide
- WaterSplat-SLAM RAL 2026 — SLAM monoculaire sous-marin photoréaliste
## Repos actifs
- lingbot-map (keyframe fix avril), awesome-dust3r (ecosystem DUSt3R/VGGT/CUT3R)
- Matisse Ifremer — datasets flotte française
## Recommandations
1. **BIND-USBL** : lire pour stage 06_align (pattern fusion USBL+IMU déjà dispo)
2. **LingBot-Map update** : Already up to date. sur .84/.87 avant prochaine iter
3. **ReefMapGS** : évaluer comme alternative stage 06_align si PR #9/#12 mergés

View File

@@ -0,0 +1,26 @@
# Veille Iter-5 — 2026-05-12 22:46 UTC
## Arxiv / Papers
| # | Titre | Signal | Score |
|---|-------|--------|-------|
| 1 | ReefMapGS | SLAM multimodal + Gaussian Splatting pour grandes scènes sous-marines avec fermeture de boucle | 9/10 |
| 2 | Sonar-MASt3R | Fusion optico-acoustique temps réel pour environnements turbides — intéressant pour milieu turbide AUV | 8/10 |
| 3 | WaterSplat-SLAM | SLAM monoculaire photoréaliste underwater, moindre dépendance stéréo | 8/10 |
| 4 | Spatiotemporal Degradation-Aware 3DGS | Reconstruction scènes sous-marines avec dégradation temporelle (particules, courant) | 8/10 |
| 5 | BALTIC Benchmark | Benchmark 3D reconstruction air/underwater avec variations d'illumination, utile pour QC comparaison | 7/10 |
| 6 | Lost at Sea (Notre Dame) | AUV utilisant 3DGS pour navigation autonome et reconnaissance environnement | 7/10 |
## GitHub / HuggingFace
| Repo | Signal |
|------|--------|
| LingBot-Map | Commits récents (4 jours) — à tracker pour keyframe fixes |
| dust3r/mast3r | Actifs, pas de release majeure dernière semaine |
| Pixal3D (SIGGRAPH 2026) | 3D pixel-alignée, potentiellement utile pour poses denses |
## Recommandation prochaine iteration
- **ReefMapGS** : évaluer pour remplacement LingBot-Map sur grands segments (15m+)
- **Sonar-MASt3R** : pertinent si Kogger SBP intégré dans pipeline — stage 06 USBL+cam pourrait utiliser composante acoustique
- **BALTIC Benchmark** : utiliser pour QC comparatif sur segments AUV210 (turbide)