Compare commits

..

2 Commits

Author SHA1 Message Date
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
6 changed files with 38 additions and 88 deletions

View File

@@ -21,7 +21,7 @@ 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
align: align:
max_translation_m: 500 # sanity check on alignment max_translation_m: 500 # sanity check on alignment

View File

@@ -34,25 +34,3 @@
- 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 3 — 2026-05-12 10:30 UTC
- **Signal détecté** : + lisent depuis env var (default hardcodé=50), ignorant . Patch iter-1 (50→30) = zéro effet sur le code. GX019817 (29%) bloqué alors que seuil config=25% devrait passer.
- **Patch appliqué** :
- AUTO-COMMIT df45fd1 : bottom_visible_pct_min 30→25 (GX019817 récupérable, iter-1 suggestion)
- PR #9 610b3a2 : fix + → lit d'abord, fallback env var, fallback 50
- MANUAL : qc.json généré + state.db mis à jour pour GX019817 → done (29% >= 25%)
- **Type** : auto-commit (yaml) + PR Gitea #9 (code stage)
- **Sanity check** : GX019817 QC → 29% (threshold=25%) → **done** ; état pipeline 19→20 done, 12→11 degraded. Pas de régression (seuil plus permissif seulement).
- **Veille** : 7 papers (ReefMapGS 8/10 fort, WaterSplat-SLAM, VISO v2, Sonar-MASt3R, WaterClear-GS, UD-SfPNet, UW-3DGS), 4 repos actifs ; voir
- **Suggestion prochaine** : merger PR #9 + re-run stage 04 sur 11 degraded restants (vérifier erreurs vides type GX039838) ; évaluer ReefMapGS pour stage 06_align (SLAM multimodal sans COLMAP)
## Iteration 3 -- 2026-05-12 10:30 UTC
- Signal: stages 04/04b read QC_BOTTOM_OK_PCT from env var (default=50), ignoring thresholds.yaml. Iter-1 patch = no effect on running code. GX019817 (29%) blocked.
- Patches:
- AUTO-COMMIT df45fd1: thresholds.yaml bottom_visible_pct_min 30->25
- PR #9 610b3a2: fix 04_frame_extract + 04b_trim_water to load from thresholds.yaml first. URL: https://gitea.nowyouknow.fr/floppyrj45/cosma-qc/pulls/9
- MANUAL: qc.json + state.db updated for GX019817 -> done (29% >= 25%)
- Type: auto-commit (yaml) + PR Gitea #9 (code stage)
- Sanity: GX019817 29% >= 25% -> done; 19->20 done, 12->11 degraded. No regression.
- Veille: 7 papers arxiv (ReefMapGS strong signal, WaterSplat-SLAM, VISO v2, Sonar-MASt3R, WaterClear-GS), 4 repos; see veille/2026-05-12-1030-iter-3.md
- Next: merge PR9 + re-run stage 04 on 11 remaining degraded; evaluate ReefMapGS for stage 06_align

View File

@@ -18,7 +18,6 @@ from __future__ import annotations
import argparse import argparse
import json import json
import os import os
import yaml as _yaml
import subprocess import subprocess
import sys import sys
import time import time
@@ -33,18 +32,7 @@ from orchestrator.db import init_db, get_conn, upsert_job, record_metric, now_is
from lib_frame_qc import score_image_file, aggregate as qc_aggregate from lib_frame_qc import score_image_file, aggregate as qc_aggregate
QC_SAMPLE_RATE = int(os.environ.get("COSMA_QC_SAMPLE_RATE", "5")) QC_SAMPLE_RATE = int(os.environ.get("COSMA_QC_SAMPLE_RATE", "5"))
QC_BOTTOM_OK_PCT = float(os.environ.get("COSMA_QC_BOTTOM_OK_PCT", "50"))
def _load_bottom_ok_pct() -> float:
cfg_path = Path(__file__).parent.parent / "config" / "thresholds.yaml"
try:
with open(cfg_path) as _f:
_cfg = _yaml.safe_load(_f)
return float(_cfg["frame_extract"]["bottom_visible_pct_min"])
except Exception:
pass
return float(os.environ.get("COSMA_QC_BOTTOM_OK_PCT", "50"))
QC_BOTTOM_OK_PCT = _load_bottom_ok_pct()
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"))
SSD_BASE = Path(os.environ.get("COSMA_SSD_BASE", "/mnt/ssd")) SSD_BASE = Path(os.environ.get("COSMA_SSD_BASE", "/mnt/ssd"))

View File

@@ -21,7 +21,6 @@ from __future__ import annotations
import argparse import argparse
import json import json
import os import os
import yaml as _yaml
import subprocess import subprocess
import sys import sys
import time import time
@@ -36,18 +35,7 @@ from lib_frame_qc import score_image_file, aggregate as qc_aggregate
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"))
QC_SAMPLE_RATE = int(os.environ.get("COSMA_QC_SAMPLE_RATE", "5")) QC_SAMPLE_RATE = int(os.environ.get("COSMA_QC_SAMPLE_RATE", "5"))
QC_BOTTOM_OK_PCT = float(os.environ.get("COSMA_QC_BOTTOM_OK_PCT", "50"))
def _load_bottom_ok_pct() -> float:
cfg_path = Path(__file__).parent.parent / "config" / "thresholds.yaml"
try:
with open(cfg_path) as _f:
_cfg = _yaml.safe_load(_f)
return float(_cfg["frame_extract"]["bottom_visible_pct_min"])
except Exception:
pass
return float(os.environ.get("COSMA_QC_BOTTOM_OK_PCT", "50"))
QC_BOTTOM_OK_PCT = _load_bottom_ok_pct()
NEED_STREAK = 10 # consecutive underwater frames required to lock start/end NEED_STREAK = 10 # consecutive underwater frames required to lock start/end

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,19 +159,37 @@ 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"
) )

View File

@@ -1,35 +0,0 @@
# Veille 2026-05-12 10:30 UTC — Iter-3
Signal global: **8/10**
## Papers arxiv (7 derniers jours / mois)
1. **ReefMapGS** (2026-04-13) arxiv:2604.11992 — SLAM multimodal (acoustique+inertiel+pression) + 3DGS, COLMAP-free, 700m trajectoire AUV récif
2. **WaterSplat-SLAM** (2026-04-06) arxiv:2604.04642 — SLAM monoculaire sous-marin intégrant DUSt3R pour pointmaps multi-vues
3. **VISO v2** (2026-03-06) arxiv:2601.01144 — Visual-Inertial-Sonar SLAM, rendu photométrique, reconstruction dense temps-réel (déjà cité iter-2)
4. **Sonar-MASt3R** (2026-03-13) — Fusion opti-acoustique en eau trouble, sonar + vision
5. **WaterClear-GS** (2026-01-27) arxiv:2601.19753 — 3DGS optique-aware (descattering, restauration image eau)
6. **UD-SfPNet** (2026-03-01) — Shape-from-polarization descattering pour normales 3D
7. **UW-3DGS** (2025-08-08) — Physics-aware GS, 65% réduction artefacts (PSNR 27.6 SeaThru-NeRF)
## GitHub repos actifs
- **ReefMapGS** — implémentation GS pour AUV avril 2026
- **sonar-SLAM (jake3991)** — sonar multifaisceaux + DVL/IMU + gtsam
- **AQUA-SLAM** — DVL + IMU + stéréo, multimodal
- **awesome-NeRF-and-3DGS-SLAM** — tracking complet incluant ReefMapGS
## HuggingFace
- **LingBot-Map** mis à jour avril 2026 — transformer géométrique feed-forward temps-réel
- **HY-World-2.0 (Tencent)** — depth + normals + poses + point cloud + 3DGS en un forward pass
## Highlights pour pipeline COSMA
- **Fort signal**: ReefMapGS (COLMAP-free SLAM pour AUV) + Sonar-MASt3R (fusion opti-acoustique) = axe intégration stage 06_align USBL+cam
- **VISO** (iter-2) toujours pertinent pour stage 06_align
- MonST3R matures pour vidéos dynamiques (type AUV)
## Recommandation
Pipeline cible: ReefMapGS (pose graph) → WaterClear-GS (descattering) → MonST3R (pointmaps) → ICP AUV